| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
| |
- switchC initialised as closed
- move select in setChainInfoFromBlock out of peer lock
|
|
|
|
|
|
|
| |
- 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)
|
| |
|
|
|
|
|
| |
@zelig: Temporarily commented out TD check untill the rest of the network has
been fixed.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
| |
- 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)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
- 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
|
| |
|
| |
|
|
|
|
| |
@zelig we need to discuss this
|
|
|
|
| |
@zelig look in to this please
|
|
|
|
| |
@zelig this will need updating with the TD checking
|
| |
|
| |
|
|
|
|
|
|
| |
@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.
|
| |
|
|
|
|
| |
peer head info update
|
|
|
|
| |
peers compete
|
| |
|
| |
|
|
|
|
|
|
| |
- reset bestIdleTimer when launching head section process
- log chain head events
- common.Hash key in activateChain map
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
ethersphere-jsonlog
Conflicts:
eth/backend.go
|
| | |
|
|/
|
|
|
|
|
|
|
| |
- 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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- add ErrIncorrectTD
- checkTD called after insertChain successful
- fix tests, use blockPoolTester.tds to map block index to TD
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
set period (PeerSuspensionInterval)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- best peer cannot be idle for more than idleBestPeerTimeout
- introduce ErrIdleTooLong fatal error
- modify default values
|
| |
|
|
|
|
|
|
| |
- improve logging
- suicide -> removeChain
- improved status BlocksInPool calculation
|
|
- 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
|