aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader
Commit message (Collapse)AuthorAgeFilesLines
* vendor, crypto, swarm: switch over to upstream sha3 packageDave McGregor2019-01-041-2/+2
|
* eth/downloader: progress in stateSync not used anymore (#17998)Wenbiao Zheng2018-12-221-7/+4
|
* downloader: fix edgecase where returned index is OOB for downloader (#18335)Martin Holst Swende2018-12-201-1/+9
| | | | | | | | * downloader: fix edgecase where returned index is OOB for downloader * downloader: documentation Co-Authored-By: holiman <martin@swende.se>
* eth/downloader: fix light client cht binary search issuePéter Szilágyi2018-11-281-0/+22
|
* core, eth/downloader: fix ancestor lookup for fast syncPéter Szilágyi2018-11-162-13/+50
|
* downloader: different sync strategyMartin Holst Swende2018-11-162-39/+155
|
* eth: fix comment typo (#18114)mr_franklin2018-11-151-1/+1
| | | | | | * consensus/clique: fix comment typo * eth,eth/downloader: fix comment typo
* eth/downloader: speed up tests by generating chain only once (#17916)Felix Lange2018-11-072-544/+491
| | | | | | | | | | | | * 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.
* eth/downloader: remove the expired id directly (#17963)Wenbiao Zheng2018-11-071-4/+3
|
* core, eth/downloader: fix validation flaw, fix downloader printout flaw (#17974)Martin Holst Swende2018-11-071-0/+1
|
* downloader: measure successfull deliveries, not failed (#17983)Martin Holst Swende2018-11-071-8/+11
| | | | | | * downloader: measure successfull deliveries, not failed * downloader: fix typos
* eth/downloader: SetBlocksIdle is not used (#17962)Wenbiao Zheng2018-10-241-7/+0
| | | | | | __ <(o )___ ( ._> / `---'
* eth/downloader: fix comment typos (#17956)Wenbiao Zheng2018-10-232-6/+6
|
* eth/downloader: fix invalid hash chain error due to head mini reorgPéter Szilágyi2018-10-052-3/+40
|
* eth/downloader: use intermediate variable for better readability (#17510)Wenbiao Zheng2018-09-301-4/+8
|
* core, eth: fix goimports for Go 1.11Péter Szilágyi2018-09-191-2/+2
|
* core, eth, trie: use common/prque (#17508)Wenbiao Zheng2018-09-031-17/+17
|
* all: remove the duplicate 'the' in annotations (#17509)Wenbiao Zheng2018-08-271-1/+1
|
* eth: conform better to the golint standards (#16783)williambannas2018-06-143-16/+16
| | | | | | * eth: made changes to conform better to the golint standards * eth: fix comment nit
* trie: rename TrieSync to Sync and improve hexToKeybytes (#16804)Wenbiao Zheng2018-05-291-1/+1
| | | | | | | 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.
* common: improve documentation comments (#16701)kiel barry2018-05-291-1/+1
| | | | | This commit adds many comments and removes unused code. It also removes the EmptyHash function, which had some uses but was silly.
* all: get rid of error when creating memory database (#16716)gary rong2018-05-091-2/+2
| | | | | | | | * all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-073-6/+7
|
* eth/downloader: fix for Issue #16539 (#16546)Domino Valdano2018-04-231-3/+11
|
* all: fix various typos (#16533)Wuxiang2018-04-191-1/+1
| | | | | | | | * fix typo * fix typo * fix typo
* eth/downloader: wait for all fetcher goroutines to exit before terminating ↵gary rong2018-04-161-9/+8
| | | | (#16509)
* eth/downloader: flush state sync data before exit (#16280)gary rong2018-04-091-5/+13
|
* eth: fix typos (#16414)Yusup2018-04-046-15/+15
|
* eth: update higest block we know during the sync if a higher was found (#16283)gary rong2018-03-091-0/+8
| | | | | | * eth: update higest block we know during the sync if a higher was found * eth: avoid useless sync in fast sync
* eth/downloader: save and load trie sync progress (#16224)Péter Szilágyi2018-03-032-1/+9
|
* metrics: pull library and introduce ResettingTimer and InfluxDB reporter ↵Anton Evangelatov2018-02-233-16/+16
| | | | | | | | | | | | | | | | | | | | (#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
* eth/downloader: don't require state for ancestor lookupsPéter Szilágyi2018-02-112-13/+9
|
* eth, light: minor light client startup cleanupsPéter Szilágyi2018-02-081-1/+0
|
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-064-395/+314
| | | This commit reduces database I/O by not writing every state trie to disk.
* eth/downloader: fix #15858 by checking if downloader dropPeer function is ↵Martin Holst Swende2018-02-051-3/+20
| | | | set (#15992)
* core, eth, les, light: get rid of redundant methodsPéter Szilágyi2018-01-312-6/+8
|
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-1/+1
|
* eth/downloader: avoid hidden reference to finished statesync request (#15545)Péter Szilágyi2018-01-021-1/+4
|
* accounts, consensus, core, eth: make chain maker consensus agnostic (#15497)gary rong2017-12-221-1/+2
| | | | | | | | | | * 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
* eth/downloader: update tests for reliability (#15337)Rob2017-12-011-12/+49
| | | | | 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.
* all: fix code comment typos (#15547)Ricardo Domingos2017-11-241-1/+1
| | | | | | | | | | | | * 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
* eth/downloader: minor comments cleanup (#15495)jtakalai2017-11-161-5/+5
| | | | | it's -> its pet peeve, and I like to imagine I'm not alone.
* build: enable unconvert linter (#15456)ferhat elmas2017-11-112-3/+3
| | | | | | | | | * build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
* cmd, eth: separate out FakePeer for future reusePéter Szilágyi2017-10-101-0/+160
|
* eth/downloader: track peer drops and deassign state sync tasksPéter Szilágyi2017-09-122-9/+42
|
* Merge pull request #14973 from rjl493456442/fix_downloaderPéter Szilágyi2017-09-111-0/+4
|\ | | | | eth/downloader: exit loop when there is no more available task
| * eth/downloader: exit loop when there is no more available taskrjl4934564422017-08-141-0/+4
| |
* | core, eth/downloader: commit block data using batches (#15115)Felix Lange2017-09-103-42/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | eth: disable fast sync after pivot is committedPéter Szilágyi2017-09-061-2/+1
|/
* eth/downloader: fix race in downloadTesterPeer (#14942)Ivan Daniluk2017-08-091-7/+25
| | | | | | | | * eth/downloader: fix race in downloadTesterPeer Signed-off-by: Ivan Daniluk <ivan.daniluk@gmail.com> * eth/downloader: minor datarace fix cleanup
* eth: fix megacheck warningsEgon Elbre2017-08-081-10/+9
|
* eth/downloader: Doc fixesNick Johnson2017-07-052-3/+7
|
* eth/downloader, les, light: Changes in response to reviewNick Johnson2017-07-033-22/+51
|
* eth, les: Refactor downloader peer to use structsNick Johnson2017-06-295-252/+245
|
* eth, les, light: Refactor downloader to use blockchain interfaceNick Johnson2017-06-283-139/+117
|
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-271-1/+1
| | | | | | | | | With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
* eth/downloader: separate state sync from queue (#14460)Felix Lange2017-06-225-453/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eth/downloader: separate state sync from queue Scheduling of state node downloads hogged the downloader queue lock when new requests were scheduled. This caused timeouts for other requests. With this change, state sync is fully independent of all other downloads and doesn't involve the queue at all. State sync is started and checked on in processContent. This is slightly awkward because processContent doesn't have a select loop. Instead, the queue is closed by an auxiliary goroutine when state sync fails. We tried several alternatives to this but settled on the current approach because it's the least amount of change overall. Handling of the pivot block has changed slightly: the queue previously prevented import of pivot block receipts before the state of the pivot block was available. In this commit, the receipt will be imported before the state. This causes an annoyance where the pivot block is committed as fast block head even when state downloads fail. Stay tuned for more updates in this area ;) * eth/downloader: remove cancelTimeout channel * eth/downloader: retry state requests on timeout * eth/downloader: improve comment * eth/downloader: mark peers idle when state sync is done * eth/downloader: move pivot block splitting to processContent This change also ensures that pivot block receipts aren't imported before the pivot block itself. * eth/downloader: limit state node retries * eth/downloader: improve state node error handling and retry check * eth/downloader: remove maxStateNodeRetries It fails the sync too much. * eth/downloader: remove last use of cancelCh in statesync.go Fixes TestDeliverHeadersHang*Fast and (hopefully) the weird cancellation behaviour at the end of fast sync. * eth/downloader: fix leak in runStateSync * eth/downloader: don't run processFullSyncContent in LightSync mode * eth/downloader: improve comments * eth/downloader: fix vet, megacheck * eth/downloader: remove unrequested tasks anyway * eth/downloader, trie: various polishes around duplicate items This commit explicitly tracks duplicate and unexpected state delieveries done against a trie Sync structure, also adding there to import info logs. The commit moves the db batch used to commit trie changes one level deeper so its flushed after every node insertion. This is needed to avoid a lot of duplicate retrievals caused by inconsistencies between Sync internals and database. A better approach is to track not-yet-written states in trie.Sync and flush on commit, but I'm focuing on correctness first now. The commit fixes a regression around pivot block fail count. The counter previously was reset to 1 if and only if a sync cycle progressed (inserted at least 1 entry to the database). The current code reset it already if a node was delivered, which is not stong enough, because unless it ends up written to disk, an attacker can just loop and attack ad infinitum. The commit also fixes a regression around state deliveries and timeouts. The old downloader tracked if a delivery is stale (none of the deliveries were requestedt), in which case it didn't mark the node idle and did not send further requests, since it signals a past timeout. The current code did mark it idle even on stale deliveries, which eventually caused two requests to be in flight at the same time, making the deliveries always stale and mass duplicating retrievals between multiple peers. * eth/downloader: fix state request leak This commit fixes the hang seen sometimes while doing the state sync. The cause of the hang was a rare combination of events: request state data from peer, peer drops and reconnects almost immediately. This caused a new download task to be assigned to the peer, overwriting the old one still waiting for a timeout, which in turned leaked the requests out, never to be retried. The fix is to ensure that a task assignment moves any pending one back into the retry queue. The commit also fixes a regression with peer dropping due to stalls. The current code considered a peer stalling if they timed out delivering 1 item. However, the downloader never requests only one, the minimum is 2 (attempt to fine tune estimated latency/bandwidth). The fix is simply to drop if a timeout is detected at 2 items. Apart from the above bugfixes, the commit contains some code polishes I made while debugging the hang. * core, eth, trie: support batched trie sync db writes * trie: rename SyncMemCache to syncMemBatch
* eth/downloader: fix a potential issue against future refactorsPéter Szilágyi2017-05-021-0/+4
|
* cmd/geth: add --config file flag (#13875)Felix Lange2017-04-121-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * p2p/discover, p2p/discv5: add marshaling methods to Node * p2p/netutil: make Netlist decodable from TOML * common/math: encode nil HexOrDecimal256 as 0x0 * cmd/geth: add --config file flag * cmd/geth: add missing license header * eth: prettify Config again, fix tests * eth: use gasprice.Config instead of duplicating its fields * eth/gasprice: hide nil default from dumpconfig output * cmd/geth: hide genesis block in dumpconfig output * node: make tests compile * console: fix tests * cmd/geth: make TOML keys look exactly like Go struct fields * p2p: use discovery by default This makes the zero Config slightly more useful. It also fixes package node tests because Node detects reuse of the datadir through the NodeDatabase. * cmd/geth: make ethstats URL settable through config file * cmd/faucet: fix configuration * cmd/geth: dedup attach tests * eth: add comment for DefaultConfig * eth: pass downloader.SyncMode in Config This removes the FastSync, LightSync flags in favour of a more general SyncMode flag. * cmd/utils: remove jitvm flags * cmd/utils: make mutually exclusive flag error prettier It now reads: Fatal: flags --dev, --testnet can't be used at the same time * p2p: fix typo * node: add DefaultConfig, use it for geth * mobile: add missing NoDiscovery option * cmd/utils: drop MakeNode This exposed a couple of places that needed to be updated to use node.DefaultConfig. * node: fix typo * eth: make fast sync the default mode * cmd/utils: remove IPCApiFlag (unused) * node: remove default IPC path Set it in the frontends instead. * cmd/geth: add --syncmode * cmd/utils: make --ipcdisable and --ipcpath mutually exclusive * cmd/utils: don't enable WS, HTTP when setting addr * cmd/utils: fix --identity
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-231-1/+1
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* core, eth, les: support resuming fast sync on heavy rollback (#3743)Péter Szilágyi2017-03-222-10/+10
|
* Logger updates 3 (#3730)Péter Szilágyi2017-03-022-35/+35
| | | | | | | | * accounts, cmd, eth, ethdb: port logs over to new system * ethdb: drop concept of cache distribution between dbs * eth: fix some log nitpicks to make them nicer
* common, eth/downloader, log: support terminal log formattingPéter Szilágyi2017-02-282-28/+24
|
* eth/downloader: review fixesPéter Szilágyi2017-02-272-7/+13
|
* accounts, eth/downloader: use "err" instead of "error" in logsPéter Szilágyi2017-02-271-13/+13
|
* eth/downloader: port over old logs from glog to log15Péter Szilágyi2017-02-274-125/+137
|
* eth, les, swarm: fix go vet issues sufraced by log15Péter Szilágyi2017-02-231-1/+1
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-232-91/+89
|
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-142-7/+7
| | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"Jeffrey Wilcke2017-02-132-7/+7
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-022-7/+7
| | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* eth/downloader: improve deliverNodeData (#3588)Felix Lange2017-01-241-72/+52
| | | | | Commit d3b751e accidentally deleted a crucial 'return' statement, leading to a crash in case of an issue with node data. This change improves the fix in PR #3591 by removing the lock entirely.
* eth/downloader: fix mutex regression causing panics on fail (#3591)Péter Szilágyi2017-01-201-1/+2
|
* all: fix ineffectual assignments and remove uses of crypto.Sha3Felix Lange2017-01-091-1/+1
| | | | | go get github.com/gordonklaus/ineffassign ineffassign .
* all: fix spelling errorsPéter Szilágyi2017-01-071-1/+1
|
* all: gofmt -w -sFelix Lange2017-01-062-4/+4
|
* Merge pull request #3516 from fjl/types-drop-sign-ecdsaPéter Szilágyi2017-01-061-1/+1
|\ | | | | core/types: remove redundant SignECDSA wrappers, rename to SignTx
| * core/types: remove redundant SignECDSA wrappers, rename to SignTxFelix Lange2017-01-051-1/+1
| |
* | trie: remove dependency on ethdbFelix Lange2017-01-061-5/+10
|/ | | | This removes the core/types -> leveldb dependency.
* core/types, params: EIP#155Jeffrey Wilcke2016-11-131-1/+2
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-1/+1
| | | | | | | | | | | | | | | This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
* cmd, eth: added light client and light server modeszsfelfoldi2016-11-092-7/+22
|
* eth/downloader: clear pending requests when switching trie rootPéter Szilágyi2016-11-011-9/+18
|
* eth/downloader: lower a state sync log level (users freak out)Péter Szilágyi2016-11-011-1/+1
|
* eth/downloader: reduce fast sync block requirements, fix testPéter Szilágyi2016-10-312-13/+28
|
* core/state, eth/downloader, trie: reset fast-failure on progressPéter Szilágyi2016-10-313-160/+206
|
* eth/downloader: fix a data race in a log outputPéter Szilágyi2016-10-211-1/+2
|
* cmd/geth, code, eth/downloader: tune import logs and mem statsPéter Szilágyi2016-10-211-1/+1
|
* common, core, eth/downloader: adjust import log formattingPéter Szilágyi2016-10-181-1/+1
|
* trie, core/state: improve memory usage and performance (#3135)Felix Lange2016-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * trie: store nodes as pointers This avoids memory copies when unwrapping node interface values. name old time/op new time/op delta Get 388ns ± 8% 215ns ± 2% -44.56% (p=0.000 n=15+15) GetDB 363ns ± 3% 202ns ± 2% -44.21% (p=0.000 n=15+15) UpdateBE 1.57µs ± 2% 1.29µs ± 3% -17.80% (p=0.000 n=13+15) UpdateLE 1.92µs ± 2% 1.61µs ± 2% -16.25% (p=0.000 n=14+14) HashBE 2.16µs ± 6% 2.18µs ± 6% ~ (p=0.436 n=15+15) HashLE 7.43µs ± 3% 7.21µs ± 3% -2.96% (p=0.000 n=15+13) * trie: close temporary databases in GetDB benchmark * trie: don't keep []byte from DB load around Nodes decoded from a DB load kept hashes and values as sub-slices of the DB value. This can be a problem because loading from leveldb often returns []byte with a cap that's larger than necessary, increasing memory usage. * trie: unload old cached nodes * trie, core/state: use cache unloading for account trie * trie: use explicit private flags (fixes Go 1.5 reflection issue). * trie: fixup cachegen overflow at request of nick * core/state: rename journal size constant
* ethereum, ethclient: add SyncProgress API endpointPéter Szilágyi2016-09-063-48/+48
|
* rpc: refactor subscriptions and filtersBas van Kervel2016-08-171-46/+111
|
* Merge pull request #2866 from karalabe/downloader-future-ancestorsPéter Szilágyi2016-08-161-9/+17
|\ | | | | eth/downloader: fewer headers and futures too in ancestor lookup
| * eth/downloader: fewer headers and futures too un ancestor lookupPéter Szilágyi2016-07-261-9/+17
| |
* | Merge pull request #2868 from karalabe/downloader-abort-master-dropPéter Szilágyi2016-08-091-2/+15
|\ \ | | | | | | eth/downloader: abort sync if master drops (timeout prev)
| * | eth/downloader: abort sync if master drops (timeout prev)Péter Szilágyi2016-07-261-2/+15
| |/
* | Merge pull request #2867 from karalabe/dao-challenge-finishPéter Szilágyi2016-08-091-1/+1
|\ \ | | | | | | eth, eth/downloader: don't forward the DAO challenge header
| * | eth, eth/downloader: don't forward the DAO challenge headerPéter Szilágyi2016-07-261-1/+1
| |/
* | Merge pull request #2861 from karalabe/track-peer-heads-properlyPéter Szilágyi2016-08-093-10/+27
|\ \ | |/ |/| eth, eth/downloader: better remote head tracking
| * eth, eth/downloader: better remote head trackingPéter Szilágyi2016-07-253-10/+27
| |
* | Merge pull request #2855 from karalabe/downloader-fix-stall-dropFelix Lange2016-07-251-1/+8
|\ \ | |/ |/| eth/downloader: fix the stall checks/drops during sync
| * eth/downloader: fix the stall checks/drops during syncPéter Szilágyi2016-07-221-1/+8
| |
* | eth, eth/downloader, eth/fetcher: delete eth/61 codeFelix Lange2016-07-226-932/+75
|/ | | | | The eth/61 protocol was disabled in #2776, this commit removes its message handlers and hash-chain sync logic.
* accounts, core, eth: pass chain config for chain maker to test DAOPéter Szilágyi2016-07-151-1/+1
|
* eth/downloader: return invalid chain (peer drop) on import failsPéter Szilágyi2016-07-121-1/+1
|
* eth/downloader: fix occasional fast sync critical section test failsPéter Szilágyi2016-06-131-1/+3
|
* eth/downloader: adaptive quality of service tuningPéter Szilágyi2016-06-063-48/+235
|
* eth/downloader: make fast sync resilient to critical section failsPéter Szilágyi2016-06-022-26/+109
|
* Merge pull request #2637 from karalabe/downloader-always-cancelPéter Szilágyi2016-05-312-1/+13
|\ | | | | eth/downloader: ensure cancel channel is closed post sync
| * eth/downloader: ensure cancel channel is closed post syncPéter Szilágyi2016-05-302-1/+13
| |
* | eth/downloader, trie: pull head state concurrently with chainPéter Szilágyi2016-05-272-29/+35
|/
* eth/downloader: fix reviewer commentsPéter Szilágyi2016-05-202-9/+32
|
* eth/downloader: stream partial skeleton filling to processorPéter Szilágyi2016-05-173-19/+55
|
* eth/downloader: implement concurrent header downloadsPéter Szilágyi2016-05-174-211/+584
|
* eth/downloader: bound fork ancestry and allow heavy short forksPéter Szilágyi2016-05-132-43/+201
|
* rpc: remove NotifierContextKeyFelix Lange2016-04-161-1/+1
| | | | | | | Context keys must have a unique type in order to prevent any unintented clashes. The code used int(1) as key. Fix it by implementing the pattern recommended by package context.
* all: fix go vet warningsFelix Lange2016-04-152-5/+3
|
* all: update license informationFelix Lange2016-04-151-7/+7
|
* rpc: add pub/sub supportBas van Kervel2016-04-021-16/+59
|
* core, eth: replace reorganiz with reorganisLeif Jurvetson2016-03-161-2/+2
|
* eth: various typosLeif Jurvetson2016-03-164-10/+10
|
* eth/downloader: fix a throughput estimation data racePéter Szilágyi2016-03-101-2/+2
|
* eth/downloader: fix premature exit before notifying all part fetchersPéter Szilágyi2016-02-291-1/+3
|
* eth/downloader: fix header download limitingFelix Lange2016-02-261-1/+1
| | | | Fixes #2201
* Merge pull request #2251 from karalabe/increase-downlaoder-queuePéter Szilágyi2016-02-242-1/+6
|\ | | | | eth/downloader: bump the download queue size to prevent starvation
| * eth/downloader: bump the download queue size to prevent starvationPéter Szilágyi2016-02-232-1/+6
| |
* | Merge pull request #2242 from jimenezrick/upstream-cryptoJeffrey Wilcke2016-02-241-1/+1
|\ \ | |/ |/| Closes #2241: Use Keccak-256 from golang.org/x/crypto/sha3 and mention explicitly
| * all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-221-1/+1
| | | | | | | | As we aren't really using the standarized SHA-3
* | eth/downloader: fix partial rollback and ancestor lookupPéter Szilágyi2016-02-191-2/+28
|/
* eth, eth/downloader, jsre: surface state sync progress through the APIPéter Szilágyi2016-02-103-22/+31
|
* eth/downloader: raise pending state limit that prevented concurrencyPéter Szilágyi2016-02-082-3/+3
|
* rpc: migrated the RPC insterface to a new reflection based RPC layerBas van Kervel2016-01-261-1/+1
|
* core, eth/downloader: ensure state presence in ancestor lookupPéter Szilágyi2016-01-043-57/+68
|
* eth/downloader: throttling tests are time-sensitive, don't run parallelPéter Szilágyi2015-12-301-3/+1
|
* eth/downloader: fix negative balance issue in testsFelix Lange2015-12-181-2/+5
| | | | | | | | | | The test chain generated by makeChainFork included invalid uncle headers, crashing the generator during the state commit. The headers were invalid because they used the iteration counter as the block number, even though makeChainFork uses a block with number > 0 as the parent. Fix this by introducing BlockGen.Number, which allows accessing the actual number of the block being generated.
* rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-141-0/+64
|
* eth/downloader: fetch data proportionally to peer capacityPéter Szilágyi2015-11-193-246/+258
|
* eth/downloader: run tests in parallelFelix Lange2015-11-191-0/+29
|
* eth/downloader: also drain stateCh, receiptCh in eth/61 modeFelix Lange2015-11-191-71/+77
| | | | | | | | | State and receipt deliveries from a previous eth/62+ sync can hang if the downloader has moved on to syncing with eth/61. Fix this by also draining the eth/63 channels while waiting for eth/61 data. A nicer solution would be to take care of the channels in a central place, but that would involve a major rewrite.
* eth/downloader: don't hang for spurious deliveriesFelix Lange2015-11-193-236/+230
| | | | | | | | | | | | | | | | Unexpected deliveries could block indefinitely if they arrived at the right time. The fix is to ensure that the cancellation channel is always closed when the sync ends, unblocking any deliveries. Also remove the atomic check for whether a sync is currently running because it doesn't help and can be misleading. Cancelling always seems to break the tests though. The downloader spawned d.process whenever new data arrived, making it somewhat hard to track when block processing was actually done. Fix this by running d.process in a dedicated goroutine that is tied to the lifecycle of the sync. d.process gets notified of new work by the queue instead of being invoked all the time. This removes a ton of weird workaround code, including a hairy use of atomic CAS.
* eth/downloader: fix dysfunctional ignore list hidden by generic setPéter Szilágyi2015-11-042-11/+46
|
* eth: don't block sync goroutines that short circuitPéter Szilágyi2015-10-281-2/+4
|
* core, eth, trie: fix data races and merge/review issuesPéter Szilágyi2015-10-215-347/+518
|
* eth: clean out light node notions from ethPéter Szilágyi2015-10-191-4/+6
|
* core, eth: roll back uncertain headers in failed fast syncsPéter Szilágyi2015-10-193-11/+130
|
* eth/downloader: concurrent receipt and state processingPéter Szilágyi2015-10-194-72/+158
|
* core, eth, trie: direct state trie synchronizationPéter Szilágyi2015-10-196-451/+760
|
* core, eth: receipt chain reconstructionPéter Szilágyi2015-10-192-114/+166
|
* eth/downloader: add fast and light sync strategiesPéter Szilágyi2015-10-196-775/+1388
|
* eth/downloader: match capabilities when querying idle peersPéter Szilágyi2015-10-023-8/+53
|
* eth/downloader: always send termination wakes, clean leftoverPéter Szilágyi2015-09-231-20/+36
|
* eth/downloader: header-chain order and ancestry checkPéter Szilágyi2015-09-153-7/+77
|
* eth, rpc: standardize the chain sync progress countersPéter Szilágyi2015-09-152-51/+476
|
* core: split out TD from database and all internalsPéter Szilágyi2015-09-112-16/+39
|
* eth/downloader: fix race causing occasional test failurePéter Szilágyi2015-09-011-1/+3
|
* eth: update metrics collection to handle eth/62 algosPéter Szilágyi2015-08-253-4/+97
|
* eth: port the synchronisation algo to eth/62Péter Szilágyi2015-08-254-217/+1125
|
* eth: kill off protocol eth/60 in preparation for eth/62Péter Szilágyi2015-08-242-772/+5
|
* eth, eth/downloader: handle header requests, table driven proto testsPéter Szilágyi2015-08-241-5/+7
|
* eth, metrics, p2p: prepare metrics and net packets to eth/62Péter Szilágyi2015-08-211-1/+2
|
* eth, eth/downloader: don't report stall if fetcher filled the blockPéter Szilágyi2015-07-292-42/+64
|
* all: fix license headers one more timeFelix Lange2015-07-245-5/+5
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-235-20/+20
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* eth/downloader: drop peer if advertised TD but won't delvierPéter Szilágyi2015-07-092-99/+44
|
* all: update license informationFelix Lange2015-07-075-0/+80
|
* eth/downloader: fix a rare test race on the OSX CIPéter Szilágyi2015-07-031-1/+7
|
* eth, eth/downloader: fix #1231, DOS vulnerability in hash queueingPéter Szilágyi2015-07-011-4/+14
|
* eth/downloader: reduce hash fetches in prep for eth/61Péter Szilágyi2015-07-011-3/+3
|
* eth, eth/downloader: transition to eth 61Péter Szilágyi2015-07-014-81/+606
|
* eth, eth/downloader: pass the eth protocol version throughPéter Szilágyi2015-07-013-35/+44
|
* eth/downloader, eth/fetcher: use core.GenerateChain in testsFelix Lange2015-06-301-156/+97
| | | | | | TestMadeupParentBlockChainAttack has been deleted because it was too hard to port and the attack that it checks the prevention of is being averted in a different way (through a protocol change).
* core/types: make blocks immutableFelix Lange2015-06-301-1/+4
|
* eth, eth/fetcher: move propagated block import into fetcherPéter Szilágyi2015-06-181-1/+1
|
* eth/fetcher: fix timer reset bug, add initial testsPéter Szilágyi2015-06-181-3/+5
|
* eth, eth/fetcher: separate notification sync mechanismPéter Szilágyi2015-06-181-0/+1
|
* eth/downloader: extend slow test to fix even slower CI server...Péter Szilágyi2015-06-181-1/+1
|
* eth/downloader: always reenter processing if not exitingPéter Szilágyi2015-06-182-39/+37
|
* eth, eth/downloader: fix processing interrupt caused by temp cancelPéter Szilágyi2015-06-182-23/+21
|
* eth/downloader: fix #1280, overlapping (good/bad) delivery hangPéter Szilágyi2015-06-172-0/+35
|
* eth/downloader: detailed comment for the race corner casePéter Szilágyi2015-06-151-4/+15
|
* eth/downloader: fix import statistic reset, fetch hashes asyncPéter Szilágyi2015-06-151-11/+14
|
* eth, eth/downloader: do async block fetches, add dl testsPéter Szilágyi2015-06-152-4/+46
|
* eth/downloader: sanity test for multi peer syncsPéter Szilágyi2015-06-151-0/+31
|
* eth, eth/downloader: move block processing into the downlaoderPéter Szilágyi2015-06-152-180/+249
|
* eth/downloader: add valid peer during attacks (check interference)Péter Szilágyi2015-06-151-93/+140
|
* eth/downloader: instreument and test the sync peer dropPéter Szilágyi2015-06-152-9/+66
|
* eth/downloader: support individual peers in the test suitePéter Szilágyi2015-06-151-112/+113
|
* eth/downloader: remove uneeded testing functionsPéter Szilágyi2015-06-152-37/+2
|
* eth, eth/downloader: move peer removal into downloaderPéter Szilágyi2015-06-153-45/+76
|
* eth/downloader: fetch the block hashes on the fly, when neededPéter Szilágyi2015-06-111-9/+5
|
* cmd/geth, eth/downloader: rough guess at the import etaPéter Szilágyi2015-06-101-2/+13
|
* cmd/geth, eth/downloader: collect and report import progress tooPéter Szilágyi2015-06-101-4/+35
|
* eth/downloader: fix hash fetch timeout handlingFelix Lange2015-06-091-12/+18
| | | | Fixes #1206
* eth/downloader: test registration rejection on head banPéter Szilágyi2015-06-081-2/+10
|
* eth/downloader: reject peer registration if head is bannedPéter Szilágyi2015-06-081-4/+15
|
* eth/downloader: cap the hash ban set, add test for itPéter Szilágyi2015-06-084-9/+61
|
* eth/downloader: fix throttling test to be less timing dependentPéter Szilágyi2015-06-081-3/+7
|
* eth/downloader: fix another rebase errorPéter Szilágyi2015-06-081-2/+1
|
* eth/downloader: preallocate the block cachePéter Szilágyi2015-06-083-21/+14
|
* eth/downloader: fix merge compile errorPéter Szilágyi2015-06-081-1/+1
|
* eth/downloader: don't block hash deliveries while pulling blocksPéter Szilágyi2015-06-081-17/+14
|
* eth/downloader: update test for shitty travisPéter Szilágyi2015-06-081-1/+1
|
* eth/downloader: clean up and simplify the code a bitPéter Szilágyi2015-06-081-13/+3
|
* eth/downloader: short circuit sync if head hash is bannedPéter Szilágyi2015-06-081-0/+4
|
* eth/downloader: accumulating hash bans for reconnecting attackersPéter Szilágyi2015-06-082-5/+126
|
* eth/downloader: clean up tests and unused variablesPéter Szilágyi2015-06-082-120/+79
|
* Merge pull request #1189 from karalabe/downloader-polishesJeffrey Wilcke2015-06-053-19/+50
|\ | | | | eth/downloader: handle timeouts more gracefully
| * eth/downloader: differentiate stale and nonexistent deliveriesPéter Szilágyi2015-06-052-19/+46
| |
| * eth/downloader: log hard timeouts and reset capacityPéter Szilágyi2015-06-052-0/+4
| |
* | eth, eth/downloader: fix #1098, elevate empty hash errors to peer dropsPéter Szilágyi2015-06-051-2/+2
|/
* eth/downloader: drop log entry from peer, it's covered alreadyPéter Szilágyi2015-06-041-5/+0
|
* eth/downloader: log after state updates, easier to debugPéter Szilágyi2015-06-041-5/+3
|
* eth/downloader: fix #1178, don't request blocks beyond the cache boundsPéter Szilágyi2015-06-043-15/+35
|
* eth/downloader: demote peers if they exceed the soft limits at 1 blocks alreadyPéter Szilágyi2015-06-031-3/+8
|
* eth/downloader: add a basic block download congestion controlPéter Szilágyi2015-06-035-55/+67
|
* core, eth/downloader: expose the bad hashes, check in downloaderPéter Szilágyi2015-05-281-0/+16
|
* eth/downloader: silence "Added N blocks from..." if N == 0Péter Szilágyi2015-05-261-1/+1
|
* eth, eth/downloader: surface downloaded block origin, drop on errorPéter Szilágyi2015-05-263-14/+22
|
* Merge pull request #1064 from karalabe/downloader-attacksJeffrey Wilcke2015-05-223-21/+93
|\ | | | | Fix two additional download vulnerabilities
| * eth, eth/downloader: remove duplicate consts, bump hash fetch to 2KPéter Szilágyi2015-05-213-6/+8
| |
| * eth/downloader: circumvent a forged block chain with known parent attackPéter Szilágyi2015-05-212-13/+56
| |
| * eth/downloader: prevent a peer from dripping bad hashesPéter Szilágyi2015-05-212-9/+36
| |
* | eth/downloader: fix test to it doesn't time out on a slow machinePéter Szilágyi2015-05-201-1/+1
|/
* eth/downloader: moved start eventobscuren2015-05-161-2/+2
| | | | Start event has moved because it could possibly could stall the miner
* Merge pull request #996 from karalabe/fix-potential-crosscheck-raceJeffrey Wilcke2015-05-161-5/+7
|\ | | | | eth/downloader: circumvent download race between crosscheck and hashes
| * eth/downloader: circumvent download race between crosscheck and hashesPéter Szilágyi2015-05-161-5/+7
| |
* | eth/downloader: fix #992, where tests may time out on a slow machinePéter Szilágyi2015-05-161-0/+6
|/
* eth/downloader: fix cancel channel double closePéter Szilágyi2015-05-161-3/+8
|
* eth/downloader: circumvent a fake blockchain attackPéter Szilágyi2015-05-152-27/+58
|
* eth/downloader: don't penalize for stale cross checksPéter Szilágyi2015-05-151-7/+17
|
* eth, eth/downloader: detect and handle madeup hash attacksPéter Szilágyi2015-05-153-42/+109
|
* eth/downloader: circumvent hash reordering attacksPéter Szilágyi2015-05-153-49/+88
|
* eth/downloader: check sync after failed attacksPéter Szilágyi2015-05-152-7/+23
|
* eth/downloader: add a test for detecting missing blocksPéter Szilágyi2015-05-152-8/+24
|
* eth, eth/downloader: prevent hash repeater attackPéter Szilágyi2015-05-153-13/+46
|
* eth/downloader: fixed testobscuren2015-05-151-1/+3
|
* eth, eth/downloader, miner: use download events to check miner startobscuren2015-05-152-1/+21
|
* Merge pull request #974 from karalabe/downloader-fix-unknown-parent-attackJeffrey Wilcke2015-05-143-34/+82
|\ | | | | eth, eth/downloader: handle a potential unknown parent attack
| * eth/downloader: add a small additional check to the testPéter Szilágyi2015-05-141-0/+3
| |
| * eth/downloader: remove a previous leftoverPéter Szilágyi2015-05-141-1/+0
| |
| * eth, eth/downloader: remove parent verification from the downlaoderPéter Szilágyi2015-05-143-37/+13
| |
| * eth, eth/downloader: handle a potential unknown parent attackPéter Szilágyi2015-05-142-25/+95
| |
* | Merge pull request #950 from karalabe/downloader-cancel-syncJeffrey Wilcke2015-05-141-32/+37
|\ \ | | | | | | eth/downloader: fix deliveries to check for sync cancels
| * | eth/downloader: remove a redundant sync progress checkPéter Szilágyi2015-05-131-4/+0
| | |
| * | eth/downloader: add a user sync notificatonPéter Szilágyi2015-05-131-0/+5
| | |
| * | eth/downloader: sync the cancel channel during cancel tooPéter Szilágyi2015-05-131-21/+4
| | |
| * | eth/downloader: fix deliveries to check for sync cancelsPéter Szilágyi2015-05-131-10/+31
| |/
* / eth/downloader: fix nil panic caused by wrong variable usePéter Szilágyi2015-05-131-1/+1
|/
* eth/downloader: fix active peer shadowing, polish func namesPéter Szilágyi2015-05-132-22/+14
|
* eth, eth/downloader: moved pending queue error message to debugobscuren2015-05-111-2/+2
|