-
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
feat: make NodeConfig
generic over ChainSpec
#11039
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.
very nice, more progress!
/// All settings for how the node should be configured. | ||
config: NodeConfig, | ||
config: NodeConfig<ChainSpec>, |
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.
this makes sense and unblocks separation of Opchainspec and regular eth chainspec further, right?
/// All settings for how the node should be configured. | ||
config: NodeConfig, | ||
config: NodeConfig<ChainSpec>, |
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.
there's perhaps an argument to make the entire config generic,so the builder can be used with custom config, but we should investigate this separately
#[derive(Debug)] | ||
pub struct NodeConfig<ChainSpec> { |
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.
this is a bit unpleasant, but can we impls Clone here manually, auto derive doesn't work for arc.
nvm saw it below
maybe we could also remove the Arc and require chainspec clone and expect that chainspec internally wraps the arc, but different discussion
9ad110a
to
57b7ab5
Compare
Depends on #10978
Towards #10909
Makes
NodeConfig
generic over chainspec, allowing us to forward custom chainspecs parsed from CLI into NodeBuilder.For now still requires concrete
ChainSpec
in several places including RPC and networking configuration