Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | all: fix code comment typos (#15547) | Ricardo Domingos | 2017-11-24 | 1 | -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: track peer drops and deassign state sync tasks | Péter Szilágyi | 2017-09-12 | 1 | -6/+16 |
| | |||||
* | eth/downloader: Doc fixes | Nick Johnson | 2017-07-05 | 1 | -2/+4 |
| | |||||
* | eth/downloader, les, light: Changes in response to review | Nick Johnson | 2017-07-03 | 1 | -4/+28 |
| | |||||
* | eth, les: Refactor downloader peer to use structs | Nick Johnson | 2017-06-29 | 1 | -72/+58 |
| | |||||
* | eth/downloader: separate state sync from queue (#14460) | Felix Lange | 2017-06-22 | 1 | -12/+13 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 | ||||
* | Logger updates 3 (#3730) | Péter Szilágyi | 2017-03-02 | 1 | -3/+3 |
| | | | | | | | | * 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 | ||||
* | eth/downloader: port over old logs from glog to log15 | Péter Szilágyi | 2017-02-27 | 1 | -18/+11 |
| | |||||
* | all: gofmt -w -s | Felix Lange | 2017-01-06 | 1 | -2/+2 |
| | |||||
* | eth, eth/downloader: better remote head tracking | Péter Szilágyi | 2016-07-25 | 1 | -4/+9 |
| | |||||
* | eth, eth/downloader, eth/fetcher: delete eth/61 code | Felix Lange | 2016-07-22 | 1 | -50/+0 |
| | | | | | The eth/61 protocol was disabled in #2776, this commit removes its message handlers and hash-chain sync logic. | ||||
* | eth/downloader: adaptive quality of service tuning | Péter Szilágyi | 2016-06-06 | 1 | -19/+62 |
| | |||||
* | eth/downloader: implement concurrent header downloads | Péter Szilágyi | 2016-05-17 | 1 | -5/+61 |
| | |||||
* | eth/downloader: fix a throughput estimation data race | Péter Szilágyi | 2016-03-10 | 1 | -2/+2 |
| | |||||
* | eth/downloader: fetch data proportionally to peer capacity | Péter Szilágyi | 2015-11-19 | 1 | -106/+125 |
| | |||||
* | eth/downloader: fix dysfunctional ignore list hidden by generic set | Péter Szilágyi | 2015-11-04 | 1 | -5/+40 |
| | |||||
* | core, eth, trie: fix data races and merge/review issues | Péter Szilágyi | 2015-10-21 | 1 | -6/+22 |
| | |||||
* | core, eth, trie: direct state trie synchronization | Péter Szilágyi | 2015-10-19 | 1 | -28/+79 |
| | |||||
* | eth/downloader: add fast and light sync strategies | Péter Szilágyi | 2015-10-19 | 1 | -69/+123 |
| | |||||
* | eth/downloader: match capabilities when querying idle peers | Péter Szilágyi | 2015-10-02 | 1 | -3/+5 |
| | |||||
* | eth: port the synchronisation algo to eth/62 | Péter Szilágyi | 2015-08-25 | 1 | -13/+79 |
| | |||||
* | 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". | ||||
* | all: update license information | Felix Lange | 2015-07-07 | 1 | -0/+16 |
| | |||||
* | eth, eth/downloader: transition to eth 61 | Péter Szilágyi | 2015-07-01 | 1 | -11/+14 |
| | |||||
* | eth, eth/downloader: pass the eth protocol version through | Péter Szilágyi | 2015-07-01 | 1 | -1/+4 |
| | |||||
* | eth, eth/downloader: do async block fetches, add dl tests | Péter Szilágyi | 2015-06-15 | 1 | -1/+1 |
| | |||||
* | eth/downloader: cap the hash ban set, add test for it | Péter Szilágyi | 2015-06-08 | 1 | -1/+1 |
| | |||||
* | eth/downloader: log hard timeouts and reset capacity | Péter Szilágyi | 2015-06-05 | 1 | -0/+3 |
| | |||||
* | eth/downloader: drop log entry from peer, it's covered already | Péter Szilágyi | 2015-06-04 | 1 | -5/+0 |
| | |||||
* | eth/downloader: fix #1178, don't request blocks beyond the cache bounds | Péter Szilágyi | 2015-06-04 | 1 | -0/+10 |
| | |||||
* | eth/downloader: demote peers if they exceed the soft limits at 1 blocks already | Péter Szilágyi | 2015-06-03 | 1 | -3/+8 |
| | |||||
* | eth/downloader: add a basic block download congestion control | Péter Szilágyi | 2015-06-03 | 1 | -5/+40 |
| | |||||
* | 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 | -5/+10 |
| | |||||
* | eth/downloader: fix #910, thread safe peers & polishes | Péter Szilágyi | 2015-05-11 | 1 | -76/+143 |
| | |||||
* | eth/downloader: prioritize block fetch based on chain position, cap memory use | Péter Szilágyi | 2015-05-07 | 1 | -8/+7 |
| | |||||
* | eth/downloader: removed peer td management and best peer selection | obscuren | 2015-04-24 | 1 | -14/+1 |
| | |||||
* | downloader: moved chunk ignoring. Fixes issue with catching up | obscuren | 2015-04-19 | 1 | -5/+3 |
| | |||||
* | downloader: defer peer reset after download | obscuren | 2015-04-19 | 1 | -0/+1 |
| | |||||
* | typo | obscuren | 2015-04-19 | 1 | -1/+1 |
| | |||||
* | downloader: free up peers from work when the downloader resets | obscuren | 2015-04-19 | 1 | -0/+10 |
| | |||||
* | downloader: improved downloading and synchronisation | obscuren | 2015-04-19 | 1 | -1/+14 |
| | | | | | | * 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: added demotion / promotion in prep. for rep. system | obscuren | 2015-04-16 | 1 | -0/+20 |
| | |||||
* | downloader: added missing blocks catchup functionality | obscuren | 2015-04-13 | 1 | -1/+43 |
| | | | | | 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 | -1/+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/+48 |