-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: move optimism bootnodes to reth-primitives
#7657
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, 1 q re match
crates/primitives/src/chain/spec.rs
Outdated
#[cfg(feature = "optimism")] | ||
C::Base | C::Optimism => Some(op_nodes()), | ||
#[cfg(feature = "optimism")] | ||
C::BaseGoerli | | ||
C::BaseSepolia | | ||
C::OptimismGoerli | | ||
C::OptimismSepolia | | ||
C::OptimismKovan => Some(op_testnet_nodes()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this correct?
this uses the same nodes for multiple different chains?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added the differentiation
if chain == Chain::optimism_mainnet() || chain == Chain::base_mainnet() { | ||
builder = builder.add_optimism_mainnet_boot_nodes() | ||
} else if chain == Chain::from_named(NamedChain::OptimismSepolia) || | ||
chain == Chain::from_named(NamedChain::BaseSepolia) | ||
{ | ||
builder = builder.add_optimism_sepolia_boot_nodes() | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how are you adding the boot nodes now that this is removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By adding the nodes to the ChainSpec, NetworkConfig will have them to serve to discovery_v5_with_config_builder
As title suggests.
Additionally it fixes an issue where op stack chains were loading ethereum mainnet boot nodes (in addition to op ones) because there were no bootnodes associated with their chain specs.