go-ethereum/eth
Csaba Kiraly 9af1f71e78
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
eth: stabilize tx relay peer selection (#31714)
When maxPeers was just above some perfect square, and a few peers
dropped for some reason, we changed the peer selection function.
When new peers were acquired, we changed again.

This PR improves the selection function, in two ways. First, it will always select
sqrt(peers) to broadcast to. Second, the selection now uses siphash with a secret
key, to guard against information leaks about tx source.

---------

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-08-28 16:05:54 +02:00
..
catalyst eth/catalyst: return methods by reflect (#32300) 2025-08-19 06:54:19 -06:00
downloader eth/downloader: skip nil peer in GetHeader (#32369) 2025-08-11 21:34:59 +08:00
ethconfig eth: fix typos and outdated comments (#32324) 2025-08-01 20:00:00 +08:00
fetcher eth/fetcher: fix announcement drop logic (#32210) 2025-07-14 21:33:24 +08:00
filters eth/filters: fix error when blockHash is used with fromBlock/toBlock (#31877) 2025-08-01 17:14:30 +02:00
gasestimator eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348) 2025-08-05 19:51:16 +08:00
gasprice core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
protocols eth/protocols/snap: add healing and syncing metrics (#32258) 2025-07-24 16:43:04 +08:00
syncer eth/syncer: stop ticker to prevent resource leak (#32443) 2025-08-19 09:47:48 +08:00
tracers eth/tracers: fix testcase 7702_delegate (#32349) 2025-08-27 21:40:55 +02:00
api_admin.go eth: ignore genesis block on importChain (#27956) 2023-08-21 13:32:34 -04:00
api_backend.go ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021) 2025-07-01 15:18:49 +08:00
api_backend_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
api_debug.go eth: use headers in debug.GetModifiedAccountsBy* (#31765) 2025-05-16 19:35:17 +02:00
api_debug_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
api_miner.go miner: refactor the miner, make the pending block on demand (#28623) 2024-03-06 14:45:03 +02:00
backend.go triedb/pathdb: introduce file-based state journal (#32060) 2025-07-15 11:45:20 +08:00
dropper.go eth: add logic to drop peers randomly when saturated (#31476) 2025-04-14 12:45:27 +02:00
handler.go eth: stabilize tx relay peer selection (#31714) 2025-08-28 16:05:54 +02:00
handler_eth.go eth: check blob transaction validity on the peer goroutine when received (#31219) 2025-03-01 14:10:38 +01:00
handler_eth_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
handler_snap.go eth: check snap satelliteness, delegate drop to eth (#22235) 2021-02-02 10:44:36 +02:00
handler_test.go eth: stabilize tx relay peer selection (#31714) 2025-08-28 16:05:54 +02:00
peer.go eth/protocols/eth: implement eth/69 (#29158) 2025-05-16 17:10:47 +02:00
peerset.go eth: stabilize tx relay peer selection (#31714) 2025-08-28 16:05:54 +02:00
state_accessor.go core, eth, triedb: serve historical states over RPC (#31161) 2025-06-25 16:50:54 +08:00
sync.go consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169) 2024-03-05 16:13:28 +02:00
sync_test.go eth: replace hardcoded sleep with polling loop in snap sync test (#32499) 2025-08-27 09:49:47 +08:00