Commit graph

524 commits

Author SHA1 Message Date
Ignotus Peverell
ce1dca1b68
Ask for txhashet before horizon to account for fast sync time
We test if we're in fast sync or not by checking if our head is
more recent than horizon. However, by the time we get the data and
validate, more blocks have passed, and we'd be after horizon again.
So we request the txhashset for a more recent block than the one
at horizon.

The current value was 20, leaving only 20 min of slack, which isn't
enough for debug builds and isn't future-proof. Change to use
`0.9*horizon`, leaving about 2.5 hours.
2018-05-12 21:31:22 +01:00
Ignotus Peverell
d3a33c790e
Automatically trigger compaction every 2000 blocks (#1054)
Does so in a separate thread as it can take some time. Also
remove validation pre-compaction as it's hopefully unecessary
now.
2018-05-11 17:58:52 +01:00
Yeastplume
4121ea1240
Wallet+Keychain refactoring (#1035)
* beginning to refactor keychain into wallet lib

* rustfmt

* more refactor of aggsig lib, simplify aggsig context manager, hold instance statically for now

* clean some warnings

* clean some warnings

* fix wallet send test a bit

* fix core tests, move wallet dependent tests into integration tests

* repair chain tests

* refactor/fix pool tests

* fix wallet tests, moved from keychain

* add wallet tests
2018-05-09 10:15:58 +01:00
Blade Doyle
982fdea636 Enhance login and submit logging (#1055)
* Enhance login handler to support parameters.  Also report worker login string when reporting found blocks

* report worker id if no login
2018-05-09 10:10:47 +01:00
Antioch Peverell
4dd94ff39e
[testnet2] Store output sum (#1043)
* block sums and reworked block validation
read and write block_sums
refactor validate on both block and txhashset
write block_sum on fast sync
we store the kernel_sum (need to account for the offset)

* block_sums

* rustfmt

* cleanup
2018-05-07 09:21:41 -04:00
Casey Rodarmor
b42b2a4f77 Fix comment in test_p2p() (#1041) 2018-05-06 21:02:45 -04:00
Casey Rodarmor
a481c6d495 Add comments to get rid of missing_docs warnings (#1032) 2018-05-03 08:57:35 -04:00
Blade Doyle
9f890643b9 issue 1017 - only generate blocks when there are workers (#1018) 2018-05-01 09:29:39 +01:00
Yeastplume
820d55a532
Change wallet retry strategy (and address stratum panic) (#1004)
* remove complex retry from wallet client

* remove complex retry from wallet client

* move retry code to stratum
2018-04-25 16:48:19 +01:00
Antioch Peverell
e22d025dc8 Simplify block marker metadata (#985)
* wip BlockMarker struct, get rid of PMMRMetadata
* use rewind to init the txhashet correctly on startup, we do not need to track pos via metadata (we have block markers), we do not need to open the txhashset with specific pos (we have rewind)
* better logging on init
* keep rewinding and validating on init, to find a good block
* use validate_roots on chain init
2018-04-24 19:53:01 +00:00
Quentin Le Sceller
55f6e3e63f
Anti-aggregation mechanism for multi-kernel transaction (#984)
* Test multi kernel deaggregation

* Add aggregate without cut_through and deaggregate function

* Add deaggregate function in pool and test

* Rustfmt

* Add deaggregate_and_add_to_memory_pool

* Deaggregate regular multi kernel transaction by default

* Rustfmt

* Add error type faileddeaggregation

* Add find candidates function

* Rustfmt

* Use intersection of sets instead of for comparisons

* Rustfmt

* Removed unnecessary if

* Stricter verification with is_subset

* Rustfmt
2018-04-24 15:47:13 -04:00
Yeastplume
4c6a193e01
[WIP] Miner removal (#979)
* Beginning to remove in-process miner

* rustfmt

* rustfmt

* rustfmt

* rustfmt

* remove pow crate and put remnants into core

* rustfmt

* fix test compilation in core and chain

* rustfmt

* Updating server tests to use test miner

* rustfmt

* rustfmt

* remove pow from test matrix

* adding basic stratum stats to TUI

* run stratum server at all times, and halt messages while syncing

* fix core tests

* add ability to run internal test miner for cuckoo 16 testing

* modify build instructions
2018-04-24 09:18:24 +01:00
Antioch Peverell
7cc4fdfed9
simplify request_headers and use less read locks on peers (#995) 2018-04-23 11:54:16 -04:00
Blade Doyle
86d7628562 add request method name to the result to allow matching onthe client side (#987)
* add request method name to the result to allow matching onthe client side

* update tests for change in rpc response api
2018-04-23 09:41:35 +01:00
Antioch Peverell
03fa9f491d
we were generating different genesis blocks (#994)
every time a user testing node started up
and we could not peer them successfully
2018-04-22 08:42:48 -04:00
Antioch Peverell
b7e29fee55
introduce some minimal sync state (#978)
* commit

* rustfmt

* only fast sync once
then treat as full sync

* commit

* add some debug logging so we can track progress when verifying rangeproofs

* rustfmt
2018-04-18 20:12:39 +01:00
Antioch Peverell
891382653d
we may receive a block (header) with no previous header (#972)
as we have not yet sync'd to that point
this is valid and not an error
2018-04-18 01:52:07 +01:00
Yeastplume
07c2358562
add height to stratum job (#969) 2018-04-17 16:17:30 +01:00
Blade Doyle
323480a771 minor code reorg, add mining job difficulty, enhance miner status response (#967) 2018-04-17 09:16:58 +01:00
Blade Doyle
e13c22356a enhance test by validating against stats (#959) 2018-04-16 09:58:19 +01:00
yeastplume
a3c606d303 text config fix 2018-04-13 15:25:05 +01:00
Yeastplume
ac8ba4bd4a
Stratum config tweak (#958)
* don't require stratum server config

* don't require stratum server config
2018-04-13 14:58:25 +01:00
Blade Doyle
bcc8f68f52 minimal stratum server (#937)
* Fix issue where we have no metadata for a block (#938)

when restarting node before initial sync completed

* Avoid double-locking on add eviction. Fixes #936

* Fix 33c5a983

* Add support for DNS Seed (#940)

* Add support for DNS Seed
* Add port
* Add seed.grin-tech.org
* Remove duplicate IPs

* minimal stratum server

* Modifications for review comments.  Move stratum test into its own file, move get_block() into its own rust module, use pool and chain only rather than the entire Miner object

* rustfmt

* cleanup

* cleanup

* Introduce extending_readonly to simplify a forcing and cancelling rollbacks (#945)

readonly views of the txhashset

* Add DNS Seed and make DNSSeed default (#942)

* Add dns seed seeding type
* Add grin-seed.owncrypto.de and make DNSSeed default
* Add email address for each DNS Seed

* [WIP] Core PMMR and API updates to support wallet restore (#950)

* update pmmr to get batch of elements by insertion position

* update pmmr to get batch of elements by insertion position

* add api + chain calls to get traversed outputs back out

* add api + chain calls to get traversed outputs back out

* first pass getting wallet restore to work again with updated utxo-walking api

* Update simulation.md

* Fix Bus Error (core dumped) when validating fast sync txhashset (#956)

This PR fixes #953 by introducing a lock for txhashet_write. It's not enough
to synchronize access to in memory data, files also needs to be protected, so
a general txhashset lock was introduced.

* refactor grin crate into separate modules (#955)

* Add total kernel offset to block api (#954)

* minimal stratum server

* Modifications for review comments.  Move stratum test into its own file, move get_block() into its own rust module, use pool and chain only rather than the entire Miner object

* rustfmt

* cleanup

* cleanup

* Merge with grin_grin -> servers code reorg

* Merge with grin_grin -> servers code reorg

* add stratum server stats
2018-04-13 14:42:25 +01:00
Yeastplume
1c5aee68bf
refactor grin crate into separate modules (#955) 2018-04-12 10:11:24 +01:00