Péter Szilágyi
c10a0a62c3
eth: request id dispatcher and direct req/reply APIs ( #23576 )
...
* eth: request ID based message dispatcher
* eth: fix dispatcher cancellation, rework fetchers idleness tracker
* eth/downloader: drop peers who refuse to serve advertised chains
3 years ago
Péter Szilágyi
e3430ac7df
eth: check snap satelliteness, delegate drop to eth ( #22235 )
...
* eth: check snap satelliteness, delegate drop to eth
* eth: better handle eth/snap satellite relation, merge reg/unreg paths
4 years ago
Péter Szilágyi
017831dd5b
core, eth: split eth package, implement snap protocol ( #21482 )
...
This commit splits the eth package, separating the handling of eth and snap protocols. It also includes the capability to run snap sync (https://github.com/ethereum/devp2p/blob/master/caps/snap.md ) , but does not enable it by default.
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Martin Holst Swende <martin@swende.se>
4 years ago
timcooijmans
5d4512b113
eth: use maxQueuedTxAnns for to limit the number of transactions announced ( #21419 )
4 years ago
gary rong
93142e50c3
eth: don't block if transaction broadcast loop fails ( #21255 )
...
* eth: don't block if transaction broadcast loop is returned
* eth: kick out peer if we failed to send message
* eth: address comment
4 years ago
Péter Szilágyi
34ed2d834a
eth: skip transaction announcer goroutine on eth<65
5 years ago
Péter Szilágyi
270fbfba4b
eth: fix transaction announce/broadcast goroutine leak
5 years ago
Péter Szilágyi
9938d954c8
eth: rework tx fetcher to use O(1) ops + manage network requests
5 years ago
rjl493456442
049e17116e
core, eth: implement eth/65 transaction fetcher
5 years ago
Péter Szilágyi
64571f9379
eth: eth/64 - extend handshake packet with fork id
5 years ago
Péter Szilágyi
983f92368b
core/forkid: implement the forkid EIP, announce via ENR ( #19738 )
...
* eth: chain config (genesis + fork) ENR entry
* core/forkid, eth: protocol independent fork ID, update to CRC32 spec
* core/forkid, eth: make forkid a struct, next uint64, enr struct, RLP
* core/forkid: change forkhash rlp encoding from int to [4]byte
* eth: fixup eth entry a bit and update it every block
* eth: fix lint
* eth: fix crash in ethclient tests
5 years ago
Péter Szilágyi
fc4fee8649
eth: enforce stricter known limits on idle peers
5 years ago
Péter Szilágyi
38f6b85638
eth, les, light: enforce CHT checkpoints on fast-sync too
6 years ago
Ralph Caraveo III
5d30be412b
all: switch out defunct set library to different one ( #16873 )
...
* keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set.
* whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
6 years ago
Péter Szilágyi
d9cee2c172
eth: propagate blocks and transactions async
7 years ago
Péter Szilágyi
e61035c5a3
cmd, eth, les, mobile: make networkid uint64 everywhere
8 years ago
Péter Szilágyi
e7030c4bf5
all: update light logs (and a few others) to the new model
8 years ago
Péter Szilágyi
9184249b39
Logger updates 3 ( #3730 )
...
* 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
8 years ago
Felix Lange
35e8308bf7
eth, les: shorten genesis block mismatch error message
8 years ago
Péter Szilágyi
d4fd06c3dc
all: blidly swap out glog to our log15, logs need rework
8 years ago
Péter Szilágyi
1dd272080d
eth, eth/downloader: better remote head tracking
8 years ago
Felix Lange
016007bd25
eth, eth/downloader, eth/fetcher: delete eth/61 code
...
The eth/61 protocol was disabled in #2776 , this commit removes its
message handlers and hash-chain sync logic.
8 years ago
Péter Szilágyi
7f00e8c033
core, eth: enforce network split post DAO hard-fork
8 years ago
Felix Lange
56ed6152a1
core, eth, miner: improve shutdown synchronisation
...
Shutting down geth prints hundreds of annoying error messages in some
cases. The errors appear because the Stop method of eth.ProtocolManager,
miner.Miner and core.TxPool is asynchronous. Left over peer sessions
generate events which are processed after Stop even though the database
has already been closed.
The fix is to make Stop synchronous using sync.WaitGroup.
For eth.ProtocolManager, in order to make use of WaitGroup safe, we need
a way to stop new peer sessions from being added while waiting on the
WaitGroup. The eth protocol Run function now selects on a signaling
channel and adds to the WaitGroup only if ProtocolManager is not
shutting down.
For miner.worker and core.TxPool the number of goroutines is static,
WaitGroup can be used in the usual way without additional
synchronisation.
9 years ago
Péter Szilágyi
e46ab3bdcd
eth, p2p, rpc/api: polish protocol info gathering
9 years ago
Felix Lange
3cf74336c9
eth: time out status message exchange after 5s
9 years ago
Péter Szilágyi
ab27bee25a
core, eth, trie: direct state trie synchronization
9 years ago
Péter Szilágyi
f186b39018
eth/downloader: add fast and light sync strategies
9 years ago
Péter Szilágyi
cdc2662c40
core: split out TD from database and all internals
9 years ago
Péter Szilágyi
2b339cbbd8
core, eth: split the db blocks into headers and bodies
9 years ago
Péter Szilágyi
47a7fe5d22
eth: port the synchronisation algo to eth/62
9 years ago
Péter Szilágyi
42f44dda54
eth, eth/downloader: handle header requests, table driven proto tests
9 years ago
Péter Szilágyi
c51e153b5c
eth, metrics, p2p: prepare metrics and net packets to eth/62
9 years ago
Felix Lange
bfbcfbe4a9
all: fix license headers one more time
...
I forgot to update one instance of "go-ethereum" in commit 3f047be5a
.
9 years ago
Felix Lange
3f047be5aa
all: update license headers to distiguish GPL/LGPL
...
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
9 years ago
Péter Szilágyi
4f95e2f9ec
eth: calculate the correct TD, only update if better
9 years ago
Felix Lange
ea54283b30
all: update license information
9 years ago
Péter Szilágyi
1ae80aaf64
eth: fix #1371 , double lock during block/txn known set limitation
9 years ago
Péter Szilágyi
f43c07cb3c
eth, eth/downloader: transition to eth 61
9 years ago
Péter Szilágyi
aac2b6ae4c
eth: add the blocks from numbers protocol message
9 years ago
Péter Szilágyi
5db8f447d5
eth: fix #1319 , put an upper limit on the known txns and blocks
9 years ago
Péter Szilágyi
6fc85f1ec2
eth: clean up peer struct a bit, fix double txn bcast
9 years ago
Péter Szilágyi
2c8ed76e01
eth: start cleaning up old protocol implementation, add metrics
9 years ago
Péter Szilágyi
f86707713c
eth: fix data race accessing peer.td
10 years ago
Péter Szilágyi
44147d057d
eth: fix data race accessing peer.recentHash
10 years ago
Péter Szilágyi
8c012e103f
eth: mark blocks as known when broadcasting hashes too
10 years ago
Péter Szilágyi
6f415b96b3
eth: implement the NewBlockHashes protocol proposal
10 years ago
Péter Szilágyi
63c6cedb14
eth/downloader: cap the hash ban set, add test for it
10 years ago
Péter Szilágyi
06a041589f
eth, eth/downloader: remove duplicate consts, bump hash fetch to 2K
10 years ago
Péter Szilágyi
3c8227b935
eth: fix odd method names in peer set
10 years ago