Dave McGregor
33d233d3e1
vendor, crypto, swarm: switch over to upstream sha3 package
6 years ago
Wenbiao Zheng
81c3dc728f
eth/downloader: progress in stateSync not used anymore ( #17998 )
6 years ago
Martin Holst Swende
5f251a6448
downloader: fix edgecase where returned index is OOB for downloader ( #18335 )
...
* downloader: fix edgecase where returned index is OOB for downloader
* downloader: documentation
Co-Authored-By: holiman <martin@swende.se>
6 years ago
Péter Szilágyi
174083c3ae
eth/downloader: fix light client cht binary search issue
6 years ago
Péter Szilágyi
accc0fab4f
core, eth/downloader: fix ancestor lookup for fast sync
6 years ago
Martin Holst Swende
51b2f1620c
downloader: different sync strategy
6 years ago
mr_franklin
b91766fe6d
eth: fix comment typo ( #18114 )
...
* consensus/clique: fix comment typo
* eth,eth/downloader: fix comment typo
6 years ago
Felix Lange
0bcff8f525
eth/downloader: speed up tests by generating chain only once ( #17916 )
...
* core: speed up GenerateChain
Use a mock implementation of ChainReader instead of creating
and destroying a BlockChain object for each generated block.
* eth/downloader: speed up tests by generating chain only once
This change reworks the downloader tests so they share a common test
blockchain instead of generating a chain in every test. The tests are
roughly twice as fast now.
6 years ago
Wenbiao Zheng
b35165555d
eth/downloader: remove the expired id directly ( #17963 )
6 years ago
Martin Holst Swende
eea3ae42a3
core, eth/downloader: fix validation flaw, fix downloader printout flaw ( #17974 )
6 years ago
Martin Holst Swende
dc6648bb58
downloader: measure successfull deliveries, not failed ( #17983 )
...
* downloader: measure successfull deliveries, not failed
* downloader: fix typos
6 years ago
Wenbiao Zheng
6810933640
eth/downloader: SetBlocksIdle is not used ( #17962 )
...
__
<(o )___
( ._> /
`---'
6 years ago
Wenbiao Zheng
3088c122d8
eth/downloader: fix comment typos ( #17956 )
6 years ago
Péter Szilágyi
6ee3b26f44
eth/downloader: fix invalid hash chain error due to head mini reorg
6 years ago
Wenbiao Zheng
024b22c30e
eth/downloader: use intermediate variable for better readability ( #17510 )
6 years ago
Péter Szilágyi
faa69bea1c
core, eth: fix goimports for Go 1.11
6 years ago
Wenbiao Zheng
6a33954731
core, eth, trie: use common/prque ( #17508 )
6 years ago
Wenbiao Zheng
d1aa605f1e
all: remove the duplicate 'the' in annotations ( #17509 )
6 years ago
williambannas
9402f96597
eth: conform better to the golint standards ( #16783 )
...
* eth: made changes to conform better to the golint standards
* eth: fix comment nit
7 years ago
Wenbiao Zheng
38c7eb0f26
trie: rename TrieSync to Sync and improve hexToKeybytes ( #16804 )
...
This removes a golint warning: type name will be used as trie.TrieSync by
other packages, and that stutters; consider calling this Sync.
In hexToKeybytes len(hex) is even and (even+1)/2 == even/2, remove the +1.
7 years ago
kiel barry
84f8c0cc1f
common: improve documentation comments ( #16701 )
...
This commit adds many comments and removes unused code.
It also removes the EmptyHash function, which had some uses
but was silly.
7 years ago
gary rong
7beccb29be
all: get rid of error when creating memory database ( #16716 )
...
* all: get rid of error when create mdb
* core: clean up variables definition
* all: inline mdb definition
7 years ago
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
7 years ago
Domino Valdano
7cf83cee52
eth/downloader: fix for Issue #16539 ( #16546 )
7 years ago
Wuxiang
8f8774cf6d
all: fix various typos ( #16533 )
...
* fix typo
* fix typo
* fix typo
7 years ago
gary rong
de2a7bb764
eth/downloader: wait for all fetcher goroutines to exit before terminating ( #16509 )
7 years ago
gary rong
1100e8ba63
eth/downloader: flush state sync data before exit ( #16280 )
7 years ago
Yusup
7aad81f881
eth: fix typos ( #16414 )
7 years ago
gary rong
77da203547
eth: update higest block we know during the sync if a higher was found ( #16283 )
...
* eth: update higest block we know during the sync if a higher was found
* eth: avoid useless sync in fast sync
7 years ago
Péter Szilágyi
ca64a122d3
eth/downloader: save and load trie sync progress ( #16224 )
7 years ago
Anton Evangelatov
ae9f97221a
metrics: pull library and introduce ResettingTimer and InfluxDB reporter ( #15910 )
...
* go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter.
* vendor: change nonsense/go-metrics to ethersphere/go-metrics
* go-metrics: add tests. move ResettingTimer logic from reporter to type.
* all, metrics: pull in metrics package in go-ethereum
* metrics/test: make sure metrics are enabled for tests
* metrics: apply gosimple rules
* metrics/exp, internal/debug: init expvar endpoint when starting pprof server
* internal/debug: tiny comment formatting fix
7 years ago
Péter Szilágyi
96dad6b6f6
eth/downloader: don't require state for ancestor lookups
7 years ago
Péter Szilágyi
eb07dbb079
eth, light: minor light client startup cleanups
7 years ago
Péter Szilágyi
55599ee95d
core, trie: intermediate mempool between trie and database ( #15857 )
...
This commit reduces database I/O by not writing every state trie to disk.
7 years ago
Martin Holst Swende
bc0666fb27
eth/downloader: fix #15858 by checking if downloader dropPeer function is set ( #15992 )
7 years ago
Péter Szilágyi
566d5c0777
core, eth, les, light: get rid of redundant methods
7 years ago
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64
7 years ago
Péter Szilágyi
9c42a41ed8
eth/downloader: avoid hidden reference to finished statesync request ( #15545 )
7 years ago
gary rong
5f8888e116
accounts, consensus, core, eth: make chain maker consensus agnostic ( #15497 )
...
* accounts, consensus, core, eth: make chain maker consensus agnostic
* consensus, core: move CalcDifficulty to Engine interface
* consensus: add docs for calcDifficulty function
* consensus, core: minor comment fixups
7 years ago
Rob
d927c67f9d
eth/downloader: update tests for reliability ( #15337 )
...
Updated use of Parallel and added some subtests to help isolate
them. Increased timeout in RequestHeadersByNumber so it
doesn't time out and causes other tests to break.
7 years ago
Ricardo Domingos
9ff9d04a69
all: fix code comment typos ( #15547 )
...
* console: fix typo in comment
* contracts/release: fix typo in comment
* core: fix typo in comment
* eth: fix typo in comment
* miner: fix typo in comment
7 years ago
jtakalai
5aa3eac22d
eth/downloader: minor comments cleanup ( #15495 )
...
it's -> its
pet peeve, and I like to imagine I'm not alone.
7 years ago
ferhat elmas
86f6568f66
build: enable unconvert linter ( #15456 )
...
* build: enable unconvert linter
- fixes #15453
- update code base for failing cases
* cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
7 years ago
Péter Szilágyi
35767dfd0c
cmd, eth: separate out FakePeer for future reuse
7 years ago
Péter Szilágyi
f46adfac28
eth/downloader: track peer drops and deassign state sync tasks
7 years ago
Felix Lange
10181b57a9
core, eth/downloader: commit block data using batches ( #15115 )
...
* ethdb: add Putter interface and Has method
* ethdb: improve docs and add IdealBatchSize
* ethdb: remove memory batch lock
Batches are not safe for concurrent use.
* core: use ethdb.Putter for Write* functions
This covers the easy cases.
* core/state: simplify StateSync
* trie: optimize local node check
* ethdb: add ValueSize to Batch
* core: optimize HasHeader check
This avoids one random database read get the block number. For many uses
of HasHeader, the expectation is that it's actually there. Using Has
avoids a load + decode of the value.
* core: write fast sync block data in batches
Collect writes into batches up to the ideal size instead of issuing many
small, concurrent writes.
* eth/downloader: commit larger state batches
Collect nodes into a batch up to the ideal size instead of committing
whenever a node is received.
* core: optimize HasBlock check
This avoids a random database read to get the number.
* core: use numberCache in HasHeader
numberCache has higher capacity, increasing the odds of finding the
header without a database lookup.
* core: write imported block data using a batch
Restore batch writes of state and add blocks, tx entries, receipts to
the same batch. The change also simplifies the miner.
This commit also removes posting of logs when a forked block is imported.
* core: fix DB write error handling
* ethdb: use RLock for Has
* core: fix HasBlock comment
7 years ago
Péter Szilágyi
f30179d62e
eth: disable fast sync after pivot is committed
7 years ago
rjl493456442
02aa86e659
eth/downloader: exit loop when there is no more available task
7 years ago
Ivan Daniluk
17ce0a37de
eth/downloader: fix race in downloadTesterPeer ( #14942 )
...
* eth/downloader: fix race in downloadTesterPeer
Signed-off-by: Ivan Daniluk <ivan.daniluk@gmail.com>
* eth/downloader: minor datarace fix cleanup
7 years ago
Egon Elbre
8f06b7980d
eth: fix megacheck warnings
7 years ago