aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool
Commit message (Collapse)AuthorAgeFilesLines
* blockpool: deletedobscuren2015-04-2113-4038/+0
|
* blockpool stability fixes:zelig2015-04-138-344/+356
| | | | | | | | | | | | - follow up locks and fix them - chainManager: call SetQueued for parentErr future blocks, uncomment TD checks, unskip test - make ErrIncorrectTD non-fatal to be forgiving to genuine mistaken nodes (temp) but demote them to guard against stuck best peers. - add purging to bounded nodeCache (config nodeCacheSize) - use nodeCache when creating blockpool entries and let non-best peers add blocks (performance boost) - minor error in addError - reduce idleBestPeerTimeout to 1 minute - correct status counts and unskip status passing status test - glogified logging
* bugfixes for headsection deadlockszelig2015-04-111-7/+15
| | | | | - switchC initialised as closed - move select in setChainInfoFromBlock out of peer lock
* td update from nodezelig2015-04-104-139/+148
| | | | | | | - reorg and simplify AddBlock - introduce nodeCache - TestPeerPromotionByTdOnBlock unskipped and passes - move switchC/idleC channel creation around: solves deadlock (now respects the contract with section process: either can activate or complete at any one time)
* Skipped td testobscuren2015-04-101-0/+1
|
* Disabled TD checkobscuren2015-04-092-0/+4
| | | | | @zelig: Temporarily commented out TD check untill the rest of the network has been fixed.
* separate lock for blacklistzelig2015-04-091-3/+6
|
* oops peer unlocked before return - fixes deadlockzelig2015-04-092-0/+2
|
* uncomment future block TD check, add test for skipping TD check on future blockzelig2015-04-094-9/+46
|
* fix deadlock issue in AddBlockzelig2015-04-094-39/+46
| | | | | | - add peer switch channel arg to activateChain - no peer locking within - proper locking in AddBlock - fixes deadlock issue - comment out TD check and skip incorrect TD test again for hotfix
* future queued block supportzelig2015-04-091-1/+2
| | | | | | | - queued bool // flag for blockpool to skip TD check - set to true when future block queued - in checkTD: skip check if queued - TODO: add test (insertchain sets future block)
* put back checkTD and unskip incorrectTD testzelig2015-04-092-5/+5
|
* introduce peers registry on nodeszelig2015-04-092-43/+41
| | | | | | | | | | | | - TestPeerPromotionByTdOnBlock renamed and skipped for now test should pass iff if TD is updated based on an agreement - senders register in AddBlock, flag records if they are coming from newblock message (and therefore advertise their TD with the block) or block message (TODO: latter are stored on the cache and updated by checkTD call; protocol should also call AddBlock on newblock messages by non-best peers) - remove TD update from optional TD field in addBlock: this is no longer part of the eth protocol spec -> TODO: reflect in wiki - only initialise peer map if at least two
* fix blockpool deadlockzelig2015-04-093-12/+22
| | | | | | - do not break from headsection on error [remove peer after protocol quit will close switchC, until then head block can arrive and block on channel while keeping peers lock causing a deadlock.] - more careful locking in AddBlock
* fix TestPoolStatus test crashing, skip tests failing (due to @obscuren hotfixes)zelig2015-04-093-1/+11
|
* Updated loggingobscuren2015-04-071-1/+2
|
* Disabled PoW checkobscuren2015-04-051-9/+12
| | | | @zelig we need to discuss this
* Temp removed unrequested block errorobscuren2015-04-051-9/+13
| | | | @zelig look in to this please
* Skipping testobscuren2015-04-051-0/+2
| | | | @zelig this will need updating with the TD checking
* Removed debuggingobscuren2015-04-051-2/+0
|
* prevent deadlockobscuren2015-04-051-0/+2
|
* Disabled peer TD check to support suspended blocks (Future blocks)obscuren2015-04-042-6/+6
| | | | | | @zelig When blocks are in the future they'll be cached and processed at a later time. Because of this the returned TD will be much lower than the broadcasted TD.
* basic glogobscuren2015-04-041-1/+1
|
* proper locking to prevent "parent unknown" INVALID blocks due to race in ↵zelig2015-04-021-5/+4
| | | | peer head info update
* proper locking to prevent close of closed channel crash when multiple mining ↵zelig2015-04-021-3/+7
| | | | peers compete
* blockpool: wrap intermittent status test in a loopzelig2015-03-272-40/+55
|
* header check for testzelig2015-03-252-3/+8
|
* bugfix with idle too long triggered after peer switchzelig2015-03-252-8/+10
| | | | | | - reset bestIdleTimer when launching head section process - log chain head events - common.Hash key in activateChain map
* fixed bad unclesobscuren2015-03-241-1/+2
|
* Merge branch 'jsonlog' of https://github.com/ethersphere/go-ethereum into ↵obscuren2015-03-231-12/+6
|\ | | | | | | | | | | | | ethersphere-jsonlog Conflicts: eth/backend.go
| * fix blockpool test loggerzelig2015-03-221-12/+6
| |
* | Idle too long error incorrectly triggered even when peer sending new blockszelig2015-03-224-28/+31
|/ | | | | | | | | - fix status chain map uses common.Hash as key - add badPeers increment to IncorrectTD errors (forgotten) - signal head info update to head section process even if parent hash is not in pool (inserted), so that idle timer can be set to nil - suicideC -> peer.headInfoTimer - quit -> peer.bestIdleTimer - and they are properly set from within getBlockHashes and handleSection
* use common.Hash as pool key, no string conversion neededzelig2015-03-202-8/+8
|
* fix common.Hash conversionzelig2015-03-203-3/+5
|
* fix import in reorganised testzelig2015-03-201-2/+0
|
* improve documentation and move one testzelig2015-03-209-156/+202
|
* reduce logging outputzelig2015-03-203-25/+22
|
* uncomment status test, hack: skip the 2 unreliable fieldszelig2015-03-202-171/+182
|
* check and penalise td misreportingzelig2015-03-207-52/+129
| | | | | | - add ErrIncorrectTD - checkTD called after insertChain successful - fix tests, use blockPoolTester.tds to map block index to TD
* fix missing hexification on IdleTooLong error logzelig2015-03-201-1/+1
|
* use own total difficulty to limit best peerzelig2015-03-205-15/+82
| | | | | | | | | - update blockpool td by subscribing to ChainHeadEvent - if ahead of best peer, demote it - addPeer now take own td as current td - removePeer now take own td as current td - add relevant tests to peers_test - eth: backend now calls blockpool with eth.eventMux and chainManager.Td
* peer suspension to disallow reconnect after disconnect on fatal error for ↵zelig2015-03-207-40/+116
| | | | set period (PeerSuspensionInterval)
* updated blockpoolobscuren2015-03-173-58/+57
|
* Moved ethutil => commonobscuren2015-03-163-9/+9
|
* moved to detailobscuren2015-03-161-1/+1
|
* fix wonky head section loop; correct status countszelig2015-03-062-24/+33
|
* partial fix to idle best peer issuezelig2015-03-043-13/+33
| | | | | | - best peer cannot be idle for more than idleBestPeerTimeout - introduce ErrIdleTooLong fatal error - modify default values
* log when added peer is behind (hash found in blockchain)zelig2015-03-031-0/+1
|
* - fix peer disconnect by adding severity function to errszelig2015-03-034-38/+55
| | | | | | - improve logging - suicide -> removeChain - improved status BlocksInPool calculation
* major rewrite, reorg of blockpool + new featureszelig2015-02-2513-0/+3583
- blockpool moves to its own package - uses errs pkg for its own coded errors - publicly settable config of params (time intervals and batchsizes) - test helpers in subpackage - optional TD in blocks used now to update peers chain info - major improvement in algorithm - fix fragility and sync/parallelisation bugs - implement status for reporting on sync status (peers/hashes/blocks etc) - several tests added and further corner cases covered