paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.84k stars 1.1k forks source link

Support static peers #9213

Closed mattsse closed 2 months ago

mattsse commented 3 months ago

Describe the feature

9201 added a new peerkind: static peers

// Static nodes are used as pre-configured connections which are always // maintained and re-connected on disconnects.

we should prefer connections to static peers by ranking them higher:

https://github.com/paradigmxyz/reth/blob/2a9fa4869e658ca89e050d0d985a7ccbfa360bfa/crates/net/network/src/peers.rs#L804-L814

and only penalize them temporarily like we do for trusted peers:

https://github.com/paradigmxyz/reth/blob/2a9fa4869e658ca89e050d0d985a7ccbfa360bfa/crates/net/network/src/peers.rs#L376-L379

https://github.com/paradigmxyz/reth/blob/2a9fa4869e658ca89e050d0d985a7ccbfa360bfa/crates/net/network/src/peers.rs#L447-L447

TODO

Additional context

No response

jsvisa commented 3 months ago

pick this issue

mattsse commented 2 months ago

just following up @jsvisa do you have bandwidth for this? this feature is not urgent, just nice to have.

jsvisa commented 2 months ago

Sorry not have started yet, I'm going to implement it this week