Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | eth/downloader: fix comment typos (#17956) | Wenbiao Zheng | 2018-10-23 | 1 | -3/+3 |
| | |||||
* | eth/downloader: fix invalid hash chain error due to head mini reorg | Péter Szilágyi | 2018-10-05 | 1 | -1/+38 |
| | |||||
* | eth/downloader: use intermediate variable for better readability (#17510) | Wenbiao Zheng | 2018-09-30 | 1 | -4/+8 |
| | |||||
* | eth: conform better to the golint standards (#16783) | williambannas | 2018-06-14 | 1 | -3/+3 |
| | | | | | | * eth: made changes to conform better to the golint standards * eth: fix comment nit | ||||
* | common: improve documentation comments (#16701) | kiel barry | 2018-05-29 | 1 | -1/+1 |
| | | | | | This commit adds many comments and removes unused code. It also removes the EmptyHash function, which had some uses but was silly. | ||||
* | core/rawdb: separate raw database access to own package (#16666) | Péter Szilágyi | 2018-05-07 | 1 | -2/+2 |
| | |||||
* | eth/downloader: fix for Issue #16539 (#16546) | Domino Valdano | 2018-04-23 | 1 | -3/+11 |
| | |||||
* | eth/downloader: wait for all fetcher goroutines to exit before terminating ↵ | gary rong | 2018-04-16 | 1 | -9/+8 |
| | | | | (#16509) | ||||
* | eth: fix typos (#16414) | Yusup | 2018-04-04 | 1 | -4/+4 |
| | |||||
* | eth: update higest block we know during the sync if a higher was found (#16283) | gary rong | 2018-03-09 | 1 | -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ágyi | 2018-03-03 | 1 | -1/+5 |
| | |||||
* | metrics: pull library and introduce ResettingTimer and InfluxDB reporter ↵ | Anton Evangelatov | 2018-02-23 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | (#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 lookups | Péter Szilágyi | 2018-02-11 | 1 | -5/+6 |
| | |||||
* | eth, light: minor light client startup cleanups | Péter Szilágyi | 2018-02-08 | 1 | -1/+0 |
| | |||||
* | core, trie: intermediate mempool between trie and database (#15857) | Péter Szilágyi | 2018-02-06 | 1 | -151/+166 |
| | | | 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 Swende | 2018-02-05 | 1 | -3/+20 |
| | | | | set (#15992) | ||||
* | core, eth, les, light: get rid of redundant methods | Péter Szilágyi | 2018-01-31 | 1 | -4/+6 |
| | |||||
* | eth/downloader: minor comments cleanup (#15495) | jtakalai | 2017-11-16 | 1 | -5/+5 |
| | | | | | it's -> its pet peeve, and I like to imagine I'm not alone. | ||||
* | build: enable unconvert linter (#15456) | ferhat elmas | 2017-11-11 | 1 | -2/+2 |
| | | | | | | | | | * build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter | ||||
* | Merge pull request #14973 from rjl493456442/fix_downloader | Péter Szilágyi | 2017-09-11 | 1 | -0/+4 |
|\ | | | | | eth/downloader: exit loop when there is no more available task | ||||
| * | eth/downloader: exit loop when there is no more available task | rjl493456442 | 2017-08-14 | 1 | -0/+4 |
| | | |||||
* | | core, eth/downloader: commit block data using batches (#15115) | Felix Lange | 2017-09-10 | 1 | -4/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 committed | Péter Szilágyi | 2017-09-06 | 1 | -2/+1 |
|/ | |||||
* | eth/downloader: Doc fixes | Nick Johnson | 2017-07-05 | 1 | -1/+3 |
| | |||||
* | eth/downloader, les, light: Changes in response to review | Nick Johnson | 2017-07-03 | 1 | -17/+22 |
| | |||||
* | eth, les: Refactor downloader peer to use structs | Nick Johnson | 2017-06-29 | 1 | -47/+44 |
| | |||||
* | eth, les, light: Refactor downloader to use blockchain interface | Nick Johnson | 2017-06-28 | 1 | -61/+82 |
| | |||||
* | eth/downloader: separate state sync from queue (#14460) | Felix Lange | 2017-06-22 | 1 | -156/+178 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 refactors | Péter Szilágyi | 2017-05-02 | 1 | -0/+4 |
| | |||||
* | core, eth, les: support resuming fast sync on heavy rollback (#3743) | Péter Szilágyi | 2017-03-22 | 1 | -8/+8 |
| | |||||
* | Logger updates 3 (#3730) | Péter Szilágyi | 2017-03-02 | 1 | -32/+32 |
| | | | | | | | | * 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 formatting | Péter Szilágyi | 2017-02-28 | 1 | -19/+15 |
| | |||||
* | eth/downloader: review fixes | Péter Szilágyi | 2017-02-27 | 1 | -1/+1 |
| | |||||
* | accounts, eth/downloader: use "err" instead of "error" in logs | Péter Szilágyi | 2017-02-27 | 1 | -13/+13 |
| | |||||
* | eth/downloader: port over old logs from glog to log15 | Péter Szilágyi | 2017-02-27 | 1 | -96/+107 |
| | |||||
* | eth, les, swarm: fix go vet issues sufraced by log15 | Péter Szilágyi | 2017-02-23 | 1 | -1/+1 |
| | |||||
* | all: blidly swap out glog to our log15, logs need rework | Péter Szilágyi | 2017-02-23 | 1 | -78/+77 |
| | |||||
* | params: core, core/vm, miner: 64bit gas instructions | Jeffrey Wilcke | 2017-02-14 | 1 | -6/+6 |
| | | | | | | | | | | | | | | | | | 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 Wilcke | 2017-02-13 | 1 | -6/+6 |
| | | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757. | ||||
* | params: core, core/vm, miner: 64bit gas instructions (#3514) | Jeffrey Wilcke | 2017-02-02 | 1 | -6/+6 |
| | | | | | | | | | | | | | | | | 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 | ||||
* | all: fix spelling errors | Péter Szilágyi | 2017-01-07 | 1 | -1/+1 |
| | |||||
* | cmd, eth: added light client and light server modes | zsfelfoldi | 2016-11-09 | 1 | -6/+21 |
| | |||||
* | eth/downloader: lower a state sync log level (users freak out) | Péter Szilágyi | 2016-11-01 | 1 | -1/+1 |
| | |||||
* | eth/downloader: reduce fast sync block requirements, fix test | Péter Szilágyi | 2016-10-31 | 1 | -3/+7 |
| | |||||
* | core/state, eth/downloader, trie: reset fast-failure on progress | Péter Szilágyi | 2016-10-31 | 1 | -11/+16 |
| | |||||
* | eth/downloader: fix a data race in a log output | Péter Szilágyi | 2016-10-21 | 1 | -1/+2 |
| | |||||
* | cmd/geth, code, eth/downloader: tune import logs and mem stats | Péter Szilágyi | 2016-10-21 | 1 | -1/+1 |
| | |||||
* | common, core, eth/downloader: adjust import log formatting | Péter Szilágyi | 2016-10-18 | 1 | -1/+1 |
| | |||||
* | ethereum, ethclient: add SyncProgress API endpoint | Péter Szilágyi | 2016-09-06 | 1 | -2/+9 |
| | |||||
* | Merge pull request #2866 from karalabe/downloader-future-ancestors | Péter Szilágyi | 2016-08-16 | 1 | -9/+17 |
|\ | | | | | eth/downloader: fewer headers and futures too in ancestor lookup | ||||
| * | eth/downloader: fewer headers and futures too un ancestor lookup | Péter Szilágyi | 2016-07-26 | 1 | -9/+17 |
| | | |||||
* | | Merge pull request #2868 from karalabe/downloader-abort-master-drop | Péter Szilágyi | 2016-08-09 | 1 | -2/+15 |
|\ \ | | | | | | | eth/downloader: abort sync if master drops (timeout prev) | ||||
| * | | eth/downloader: abort sync if master drops (timeout prev) | Péter Szilágyi | 2016-07-26 | 1 | -2/+15 |
| |/ | |||||
* | | Merge pull request #2867 from karalabe/dao-challenge-finish | Péter Szilágyi | 2016-08-09 | 1 | -1/+1 |
|\ \ | | | | | | | eth, eth/downloader: don't forward the DAO challenge header | ||||
| * | | eth, eth/downloader: don't forward the DAO challenge header | Péter Szilágyi | 2016-07-26 | 1 | -1/+1 |
| |/ | |||||
* | | Merge pull request #2861 from karalabe/track-peer-heads-properly | Péter Szilágyi | 2016-08-09 | 1 | -3/+4 |
|\ \ | |/ |/| | eth, eth/downloader: better remote head tracking | ||||
| * | eth, eth/downloader: better remote head tracking | Péter Szilágyi | 2016-07-25 | 1 | -3/+4 |
| | | |||||
* | | Merge pull request #2855 from karalabe/downloader-fix-stall-drop | Felix Lange | 2016-07-25 | 1 | -1/+8 |
|\ \ | |/ |/| | eth/downloader: fix the stall checks/drops during sync | ||||
| * | eth/downloader: fix the stall checks/drops during sync | Péter Szilágyi | 2016-07-22 | 1 | -1/+8 |
| | | |||||
* | | eth, eth/downloader, eth/fetcher: delete eth/61 code | Felix Lange | 2016-07-22 | 1 | -598/+69 |
|/ | | | | | The eth/61 protocol was disabled in #2776, this commit removes its message handlers and hash-chain sync logic. | ||||
* | eth/downloader: return invalid chain (peer drop) on import fails | Péter Szilágyi | 2016-07-12 | 1 | -1/+1 |
| | |||||
* | eth/downloader: adaptive quality of service tuning | Péter Szilágyi | 2016-06-06 | 1 | -25/+119 |
| | |||||
* | eth/downloader: make fast sync resilient to critical section fails | Péter Szilágyi | 2016-06-02 | 1 | -14/+51 |
| | |||||
* | Merge pull request #2637 from karalabe/downloader-always-cancel | Péter Szilágyi | 2016-05-31 | 1 | -0/+2 |
|\ | | | | | eth/downloader: ensure cancel channel is closed post sync | ||||
| * | eth/downloader: ensure cancel channel is closed post sync | Péter Szilágyi | 2016-05-30 | 1 | -0/+2 |
| | | |||||
* | | eth/downloader, trie: pull head state concurrently with chain | Péter Szilágyi | 2016-05-27 | 1 | -28/+28 |
|/ | |||||
* | eth/downloader: fix reviewer comments | Péter Szilágyi | 2016-05-20 | 1 | -7/+30 |
| | |||||
* | eth/downloader: stream partial skeleton filling to processor | Péter Szilágyi | 2016-05-17 | 1 | -13/+25 |
| | |||||
* | eth/downloader: implement concurrent header downloads | Péter Szilágyi | 2016-05-17 | 1 | -181/+299 |
| | |||||
* | eth/downloader: bound fork ancestry and allow heavy short forks | Péter Szilágyi | 2016-05-13 | 1 | -11/+57 |
| | |||||
* | all: fix go vet warnings | Felix Lange | 2016-04-15 | 1 | -4/+2 |
| | |||||
* | core, eth: replace reorganiz with reorganis | Leif Jurvetson | 2016-03-16 | 1 | -2/+2 |
| | |||||
* | eth: various typos | Leif Jurvetson | 2016-03-16 | 1 | -5/+5 |
| | |||||
* | eth/downloader: fix premature exit before notifying all part fetchers | Péter Szilágyi | 2016-02-29 | 1 | -1/+3 |
| | |||||
* | eth/downloader: fix header download limiting | Felix Lange | 2016-02-26 | 1 | -1/+1 |
| | | | | Fixes #2201 | ||||
* | eth/downloader: fix partial rollback and ancestor lookup | Péter Szilágyi | 2016-02-19 | 1 | -2/+28 |
| | |||||
* | eth, eth/downloader, jsre: surface state sync progress through the API | Péter Szilágyi | 2016-02-10 | 1 | -3/+11 |
| | |||||
* | eth/downloader: raise pending state limit that prevented concurrency | Péter Szilágyi | 2016-02-08 | 1 | -1/+0 |
| | |||||
* | core, eth/downloader: ensure state presence in ancestor lookup | Péter Szilágyi | 2016-01-04 | 1 | -52/+52 |
| | |||||
* | eth/downloader: fetch data proportionally to peer capacity | Péter Szilágyi | 2015-11-19 | 1 | -104/+74 |
| | |||||
* | eth/downloader: also drain stateCh, receiptCh in eth/61 mode | Felix Lange | 2015-11-19 | 1 | -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 deliveries | Felix Lange | 2015-11-19 | 1 | -105/+57 |
| | | | | | | | | | | | | | | | | 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: don't block sync goroutines that short circuit | Péter Szilágyi | 2015-10-28 | 1 | -2/+4 |
| | |||||
* | core, eth, trie: fix data races and merge/review issues | Péter Szilágyi | 2015-10-21 | 1 | -71/+120 |
| | |||||
* | core, eth: roll back uncertain headers in failed fast syncs | Péter Szilágyi | 2015-10-19 | 1 | -10/+50 |
| | |||||
* | eth/downloader: concurrent receipt and state processing | Péter Szilágyi | 2015-10-19 | 1 | -24/+40 |
| | |||||
* | core, eth, trie: direct state trie synchronization | Péter Szilágyi | 2015-10-19 | 1 | -334/+234 |
| | |||||
* | core, eth: receipt chain reconstruction | Péter Szilágyi | 2015-10-19 | 1 | -22/+33 |
| | |||||
* | eth/downloader: add fast and light sync strategies | Péter Szilágyi | 2015-10-19 | 1 | -229/+438 |
| | |||||
* | eth/downloader: match capabilities when querying idle peers | Péter Szilágyi | 2015-10-02 | 1 | -2/+2 |
| | |||||
* | eth/downloader: always send termination wakes, clean leftover | Péter Szilágyi | 2015-09-23 | 1 | -20/+36 |
| | |||||
* | eth/downloader: header-chain order and ancestry check | Péter Szilágyi | 2015-09-15 | 1 | -1/+1 |
| | |||||
* | eth, rpc: standardize the chain sync progress counters | Péter Szilágyi | 2015-09-15 | 1 | -47/+139 |
| | |||||
* | core: split out TD from database and all internals | Péter Szilágyi | 2015-09-11 | 1 | -3/+8 |
| | |||||
* | eth/downloader: fix race causing occasional test failure | Péter Szilágyi | 2015-09-01 | 1 | -1/+3 |
| | |||||
* | eth: update metrics collection to handle eth/62 algos | Péter Szilágyi | 2015-08-25 | 1 | -4/+40 |
| | |||||
* | eth: port the synchronisation algo to eth/62 | Péter Szilágyi | 2015-08-25 | 1 | -94/+580 |
| | |||||
* | eth: kill off protocol eth/60 in preparation for eth/62 | Péter Szilágyi | 2015-08-24 | 1 | -394/+3 |
| | |||||
* | eth, eth/downloader: handle header requests, table driven proto tests | Péter Szilágyi | 2015-08-24 | 1 | -5/+7 |
| | |||||
* | eth, metrics, p2p: prepare metrics and net packets to eth/62 | Péter Szilágyi | 2015-08-21 | 1 | -1/+2 |
| | |||||
* | eth, eth/downloader: don't report stall if fetcher filled the block | Péter Szilágyi | 2015-07-29 | 1 | -10/+22 |
| | |||||
* | all: fix license headers one more time | Felix Lange | 2015-07-24 | 1 | -1/+1 |
| | | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a. | ||||
* | all: update license headers to distiguish GPL/LGPL | Felix Lange | 2015-07-23 | 1 | -4/+4 |
| | | | | | 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 delvier | Péter Szilágyi | 2015-07-09 | 1 | -0/+8 |
| | |||||
* | all: update license information | Felix Lange | 2015-07-07 | 1 | -0/+16 |
| | |||||
* | eth, eth/downloader: fix #1231, DOS vulnerability in hash queueing | Péter Szilágyi | 2015-07-01 | 1 | -4/+14 |
| | |||||
* | eth/downloader: reduce hash fetches in prep for eth/61 | Péter Szilágyi | 2015-07-01 | 1 | -3/+3 |
| | |||||
* | eth, eth/downloader: transition to eth 61 | Péter Szilágyi | 2015-07-01 | 1 | -21/+376 |
| | |||||
* | eth, eth/downloader: pass the eth protocol version through | Péter Szilágyi | 2015-07-01 | 1 | -2/+2 |
| | |||||
* | eth, eth/fetcher: move propagated block import into fetcher | Péter Szilágyi | 2015-06-18 | 1 | -1/+1 |
| | |||||
* | eth, eth/fetcher: separate notification sync mechanism | Péter Szilágyi | 2015-06-18 | 1 | -0/+1 |
| | |||||
* | eth/downloader: always reenter processing if not exiting | Péter Szilágyi | 2015-06-18 | 1 | -23/+22 |
| | |||||
* | eth, eth/downloader: fix processing interrupt caused by temp cancel | Péter Szilágyi | 2015-06-18 | 1 | -21/+19 |
| | |||||
* | eth/downloader: fix #1280, overlapping (good/bad) delivery hang | Péter Szilágyi | 2015-06-17 | 1 | -0/+1 |
| | |||||
* | eth/downloader: detailed comment for the race corner case | Péter Szilágyi | 2015-06-15 | 1 | -4/+15 |
| | |||||
* | eth/downloader: fix import statistic reset, fetch hashes async | Péter Szilágyi | 2015-06-15 | 1 | -11/+14 |
| | |||||
* | eth, eth/downloader: move block processing into the downlaoder | Péter Szilágyi | 2015-06-15 | 1 | -58/+119 |
| | |||||
* | eth/downloader: instreument and test the sync peer drop | Péter Szilágyi | 2015-06-15 | 1 | -5/+9 |
| | |||||
* | eth, eth/downloader: move peer removal into downloader | Péter Szilágyi | 2015-06-15 | 1 | -28/+59 |
| | |||||
* | eth/downloader: fetch the block hashes on the fly, when needed | Péter Szilágyi | 2015-06-11 | 1 | -9/+5 |
| | |||||
* | cmd/geth, eth/downloader: rough guess at the import eta | Péter Szilágyi | 2015-06-10 | 1 | -2/+13 |
| | |||||
* | cmd/geth, eth/downloader: collect and report import progress too | Péter Szilágyi | 2015-06-10 | 1 | -4/+35 |
| | |||||
* | eth/downloader: fix hash fetch timeout handling | Felix Lange | 2015-06-09 | 1 | -12/+18 |
| | | | | Fixes #1206 | ||||
* | eth/downloader: reject peer registration if head is banned | Péter Szilágyi | 2015-06-08 | 1 | -4/+15 |
| | |||||
* | eth/downloader: cap the hash ban set, add test for it | Péter Szilágyi | 2015-06-08 | 1 | -7/+16 |
| | |||||
* | eth/downloader: preallocate the block cache | Péter Szilágyi | 2015-06-08 | 1 | -4/+4 |
| | |||||
* | eth/downloader: fix merge compile error | Péter Szilágyi | 2015-06-08 | 1 | -1/+1 |
| | |||||
* | eth/downloader: don't block hash deliveries while pulling blocks | Péter Szilágyi | 2015-06-08 | 1 | -17/+14 |
| | |||||
* | eth/downloader: clean up and simplify the code a bit | Péter Szilágyi | 2015-06-08 | 1 | -13/+3 |
| | |||||
* | eth/downloader: short circuit sync if head hash is banned | Péter Szilágyi | 2015-06-08 | 1 | -0/+4 |
| | |||||
* | eth/downloader: accumulating hash bans for reconnecting attackers | Péter Szilágyi | 2015-06-08 | 1 | -5/+91 |
| | |||||
* | eth/downloader: clean up tests and unused variables | Péter Szilágyi | 2015-06-08 | 1 | -6/+4 |
| | |||||
* | Merge pull request #1189 from karalabe/downloader-polishes | Jeffrey Wilcke | 2015-06-05 | 1 | -16/+35 |
|\ | | | | | eth/downloader: handle timeouts more gracefully | ||||
| * | eth/downloader: differentiate stale and nonexistent deliveries | Péter Szilágyi | 2015-06-05 | 1 | -16/+34 |
| | | |||||
| * | eth/downloader: log hard timeouts and reset capacity | Péter Szilágyi | 2015-06-05 | 1 | -0/+1 |
| | | |||||
* | | eth, eth/downloader: fix #1098, elevate empty hash errors to peer drops | Péter Szilágyi | 2015-06-05 | 1 | -2/+2 |
|/ | |||||
* | eth/downloader: log after state updates, easier to debug | Péter Szilágyi | 2015-06-04 | 1 | -5/+3 |
| | |||||
* | eth/downloader: fix #1178, don't request blocks beyond the cache bounds | Péter Szilágyi | 2015-06-04 | 1 | -14/+24 |
| | |||||
* | eth/downloader: add a basic block download congestion control | Péter Szilágyi | 2015-06-03 | 1 | -6/+8 |
| | |||||
* | core, eth/downloader: expose the bad hashes, check in downloader | Péter Szilágyi | 2015-05-28 | 1 | -0/+16 |
| | |||||
* | eth/downloader: silence "Added N blocks from..." if N == 0 | Péter Szilágyi | 2015-05-26 | 1 | -1/+1 |
| | |||||
* | eth, eth/downloader: surface downloaded block origin, drop on error | Péter Szilágyi | 2015-05-26 | 1 | -1/+7 |
| | |||||
* | eth, eth/downloader: remove duplicate consts, bump hash fetch to 2K | Péter Szilágyi | 2015-05-21 | 1 | -4/+6 |
| | |||||
* | eth/downloader: circumvent a forged block chain with known parent attack | Péter Szilágyi | 2015-05-21 | 1 | -12/+21 |
| | |||||
* | eth/downloader: prevent a peer from dripping bad hashes | Péter Szilágyi | 2015-05-21 | 1 | -8/+12 |
| | |||||
* | eth/downloader: moved start event | obscuren | 2015-05-16 | 1 | -2/+2 |
| | | | | Start event has moved because it could possibly could stall the miner | ||||
* | eth/downloader: circumvent download race between crosscheck and hashes | Péter Szilágyi | 2015-05-16 | 1 | -5/+7 |
| | |||||
* | eth/downloader: fix cancel channel double close | Péter Szilágyi | 2015-05-16 | 1 | -3/+8 |
| | |||||
* | eth/downloader: circumvent a fake blockchain attack | Péter Szilágyi | 2015-05-15 | 1 | -12/+9 |
| | |||||
* | eth/downloader: don't penalize for stale cross checks | Péter Szilágyi | 2015-05-15 | 1 | -7/+17 |
| | |||||
* | eth, eth/downloader: detect and handle madeup hash attacks | Péter Szilágyi | 2015-05-15 | 1 | -32/+64 |
| | |||||
* | eth/downloader: circumvent hash reordering attacks | Péter Szilágyi | 2015-05-15 | 1 | -15/+21 |
| | |||||
* | eth/downloader: check sync after failed attacks | Péter Szilágyi | 2015-05-15 | 1 | -1/+5 |
| | |||||
* | eth/downloader: add a test for detecting missing blocks | Péter Szilágyi | 2015-05-15 | 1 | -3/+1 |
| | |||||
* | eth, eth/downloader: prevent hash repeater attack | Péter Szilágyi | 2015-05-15 | 1 | -4/+6 |
| | |||||
* | eth, eth/downloader, miner: use download events to check miner start | obscuren | 2015-05-15 | 1 | -1/+16 |
| | |||||
* | Merge pull request #974 from karalabe/downloader-fix-unknown-parent-attack | Jeffrey Wilcke | 2015-05-14 | 1 | -9/+2 |
|\ | | | | | eth, eth/downloader: handle a potential unknown parent attack | ||||
| * | eth/downloader: remove a previous leftover | Péter Szilágyi | 2015-05-14 | 1 | -1/+0 |
| | | |||||
| * | eth, eth/downloader: remove parent verification from the downlaoder | Péter Szilágyi | 2015-05-14 | 1 | -12/+2 |
| | | |||||
| * | eth, eth/downloader: handle a potential unknown parent attack | Péter Szilágyi | 2015-05-14 | 1 | -8/+12 |
| | | |||||
* | | Merge pull request #950 from karalabe/downloader-cancel-sync | Jeffrey Wilcke | 2015-05-14 | 1 | -32/+37 |
|\ \ | | | | | | | eth/downloader: fix deliveries to check for sync cancels | ||||
| * | | eth/downloader: remove a redundant sync progress check | Péter Szilágyi | 2015-05-13 | 1 | -4/+0 |
| | | | |||||
| * | | eth/downloader: add a user sync notificaton | Péter Szilágyi | 2015-05-13 | 1 | -0/+5 |
| | | | |||||
| * | | eth/downloader: sync the cancel channel during cancel too | Péter Szilágyi | 2015-05-13 | 1 | -21/+4 |
| | | | |||||
| * | | eth/downloader: fix deliveries to check for sync cancels | Péter Szilágyi | 2015-05-13 | 1 | -10/+31 |
| |/ | |||||
* / | eth/downloader: fix nil panic caused by wrong variable use | Péter Szilágyi | 2015-05-13 | 1 | -1/+1 |
|/ | |||||
* | eth/downloader: fix active peer shadowing, polish func names | Péter Szilágyi | 2015-05-13 | 1 | -18/+10 |
| | |||||
* | eth, eth/downloader: moved pending queue error message to debug | obscuren | 2015-05-11 | 1 | -2/+2 |
| | |||||
* | eth/downloader: use count instead of peers, clearer | Péter Szilágyi | 2015-05-11 | 1 | -2/+2 |
| | |||||
* | eth/downloader: revert to demotion, use harsher penalty | Péter Szilágyi | 2015-05-11 | 1 | -3/+9 |
| | |||||
* | eth/downloader: fix #910, thread safe peers & polishes | Péter Szilágyi | 2015-05-11 | 1 | -84/+56 |
| | |||||
* | eth: added a cancel method for the downloader | obscuren | 2015-05-10 | 1 | -2/+60 |
| | | | | | | | | | Added a cancel method to the downloader which gracefully shuts down any active syncing process (hash fetching or block downloading) and resets the queue and remove any pending blocks. Issue with the downloader which would stall because of an active ongoing process when an invalid block was found. | ||||
* | eth/downloader: fix leftover state between syncs | Péter Szilágyi | 2015-05-08 | 1 | -1/+4 |
| | |||||
* | eth, eth/downloader: handle sync errors a bit more gracefully | Péter Szilágyi | 2015-05-08 | 1 | -15/+13 |
| | |||||
* | eth, eth/downloader: make synchronize thread safe | Péter Szilágyi | 2015-05-08 | 1 | -57/+15 |
| | |||||
* | eth/downloader: fix expiration not running while fetching | Péter Szilágyi | 2015-05-07 | 1 | -22/+18 |
| | |||||
* | eth/downloader: prioritize block fetch based on chain position, cap memory use | Péter Szilágyi | 2015-05-07 | 1 | -120/+70 |
| | |||||
* | downloader: hash downloading recovery | obscuren | 2015-05-03 | 1 | -19/+54 |
| | | | | | | If a peer fails to respond (disconnect, etc) during hash downloading switch to a different peer which has it's current_hash in the queue's peer set. | ||||
* | eth/downloader: changed has to blockHashes for chain linking | obscuren | 2015-05-03 | 1 | -1/+1 |
| | |||||
* | eth, eth/downloader: Moved block processing & graceful shutdown | obscuren | 2015-05-01 | 1 | -149/+132 |
| | | | | | | | The downloader is no longer responsible for processing blocks. The eth-protocol handler now takes care of this instead. Added graceful shutdown during block processing. Closes #846 | ||||
* | eth/downloader: delete blocks from queue | obscuren | 2015-04-30 | 1 | -2/+14 |
| | |||||
* | eth, eth/downloader: remove bad peers from peer set | obscuren | 2015-04-30 | 1 | -10/+8 |
| | | | | Peers in the eth protocol handler are now being ignored for catch up. | ||||
* | eth/downloader: drop block | obscuren | 2015-04-30 | 1 | -1/+1 |
| | |||||
* | eth/downloader: ignore orphan blocks in the downloader. | obscuren | 2015-04-29 | 1 | -5/+9 |
| | | | | | | When blocks have been sorted and are being processed, orphan blocks should be ignored and thrown out. The protocol handler is responsible for downloading blocks which have missing parents. | ||||
* | core: return the index of the block that failed when inserting a chain | obscuren | 2015-04-29 | 1 | -5/+4 |
| | |||||
* | eth/downloader: reset the chain when parent is missing during processing | obscuren | 2015-04-29 | 1 | -0/+2 |
| | |||||
* | eth: check if downloader is busy before showing log message | obscuren | 2015-04-29 | 1 | -0/+4 |
| | |||||
* | eth/downloader: removed update loop and synch channel | obscuren | 2015-04-25 | 1 | -25/+0 |
| | |||||
* | eth, eth/downloader: simplified synchronisation process | obscuren | 2015-04-24 | 1 | -24/+13 |
| | |||||
* | eth, eth/downloader: don't require td on downloader. Fixed tests | obscuren | 2015-04-24 | 1 | -4/+1 |
| | |||||
* | eth, eth/downloader: moved peer selection to protocol handler | obscuren | 2015-04-24 | 1 | -45/+50 |
| | |||||
* | core: added chain head reset to known block | obscuren | 2015-04-20 | 1 | -0/+2 |
| | |||||
* | geth: admin download status | obscuren | 2015-04-20 | 1 | -11/+15 |
| | |||||
* | downloader: fixed tests with low ttl | obscuren | 2015-04-19 | 1 | -2/+2 |
| | |||||
* | moved | obscuren | 2015-04-19 | 1 | -6/+6 |
| | |||||
* | Removed debug println | obscuren | 2015-04-19 | 1 | -3/+0 |
| | |||||
* | downloader: moved chunk ignoring. Fixes issue with catching up | obscuren | 2015-04-19 | 1 | -17/+22 |
| | |||||
* | downloader: defer peer reset after download | obscuren | 2015-04-19 | 1 | -4/+7 |
| | |||||
* | downloader: reset hashTtl on receive | obscuren | 2015-04-19 | 1 | -0/+2 |
| | |||||
* | downloader: don't remove peers. keep them around | obscuren | 2015-04-19 | 1 | -2/+3 |
| | |||||
* | downloader: free up peers from work when the downloader resets | obscuren | 2015-04-19 | 1 | -1/+3 |
| | |||||
* | downloader: throw an error if there are no peers available for download | obscuren | 2015-04-19 | 1 | -6/+16 |
| | | | | | | If all peers have been tried during the block download process and some hashes are unfetchable (available peers > 0 and fetching == 0) throw an error so the process can be aborted. | ||||
* | downloader: fixed a race condition for download status | obscuren | 2015-04-19 | 1 | -1/+0 |
| | |||||
* | eth: adapted to new synchronous api of downloader's AddBlock | obscuren | 2015-04-19 | 1 | -2/+0 |
| | |||||
* | downloader: improved downloading and synchronisation | obscuren | 2015-04-19 | 1 | -109/+35 |
| | | | | | | * Downloader's peers keeps track of peer's previously requested hashes so that we don't have to re-request * Changed `AddBlock` to be fully synchronous | ||||
* | downloader: make sure that hashes are only accepted from the active peer | obscuren | 2015-04-18 | 1 | -18/+45 |
| | |||||
* | downloader: reset the queue if a peer response with an empty hash set | obscuren | 2015-04-18 | 1 | -14/+25 |
| | |||||
* | downloader: all handlers check for isBusy | obscuren | 2015-04-18 | 1 | -7/+7 |
| | |||||
* | Merge branch 'develop' into downloader-proto | obscuren | 2015-04-18 | 1 | -5/+97 |
|\ | | | | | | | | | Conflicts: eth/downloader/downloader.go | ||||
| * | downloader: fixed a typo | obscuren | 2015-04-17 | 1 | -1/+1 |
| | | |||||
| * | downloader: added demotion / promotion in prep. for rep. system | obscuren | 2015-04-16 | 1 | -0/+5 |
| | | |||||
| * | downloader: updated downloader and fixed issues with catch up | obscuren | 2015-04-16 | 1 | -21/+47 |
| | | | | | | | | | | | | Properly ignore blocks coming from peers not in our peer list (blocked) and do never request anything from bad peers. Added some checks to account for blocks known when requesting hashes (missing parents). | ||||
* | | downloader: updated downloader and fixed issues with catch up | obscuren | 2015-04-16 | 1 | -22/+48 |
|/ | | | | | | Properly ignore blocks coming from peers not in our peer list (blocked) and do never request anything from bad peers. Added some checks to account for blocks known when requesting hashes (missing parents). | ||||
* | downloader: added missing blocks catchup functionality | obscuren | 2015-04-13 | 1 | -121/+190 |
| | | | | | When a parent is missing in the block list an attempt should be made to fetch the missing parent and grandparents. | ||||
* | downloader: return an error for peer.fetch and return chunk to queue | obscuren | 2015-04-12 | 1 | -2/+8 |
| | | | | | If a peer was somehow already fetching and somehow managed to end up in the `available` pool it should return it's work. | ||||
* | downloader: implemented new downloader | obscuren | 2015-04-12 | 1 | -0/+328 |