-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
refactor(zk_toolbox): Minimize dependency on zksync_config
#3436
base: main
Are you sure you want to change the base?
refactor(zk_toolbox): Minimize dependency on zksync_config
#3436
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.
The remaining zksync_config
uses in the config
crate are related to GatewayConfig
and GatewayChainConfig
. Not sure what to do with these mentions because both configs are created from scratch in migrate_from_gateway
/ migrate_to_gateway
modules (rather than being created from a template); so using the same approach as for GeneralConfig
etc. is somewhat problematic. OTOH, these configs do not adhere to Protobuf serialization format anyway 🤷 I guess they could be dealt with in a separate PR (still before the config system integration).
update_from_chain_config(&mut genesis_config, &chain_config)?; | ||
// FIXME: config isn't saved; why? |
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.
Subj.
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.
Have no answer, unfortunately.
.http_url, | ||
)?; | ||
let general_config = gateway_chain_config.get_general_config().await?; | ||
let l2_rpc_url = general_config.get::<String>("api.web3_json_rpc.http_url")?; |
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.
Uses of http_url
/ ws_url
are somewhat problematic because these config params are never actually used by the node. Other similarly unused params are postgres.test.{server_url, prover_url}
. I've left them as-is so far, but IMO they should be 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.
Yes! Nice!
I'd still recommend getting a review from @sanekmelnikov before merging.
What ❔
Largely removes
zkstack
dependency onzksync_config
.Why ❔
This dependency significantly complicates new config system integration. While the alternative is less typesafe, it can be made more typesafe in the future once the config system integration is complete (a node binary can then be used to validate the changed config values).
Checklist
zkstack dev fmt
andzkstack dev lint
.