-
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
fix(configs): Refactor contracts config #3660
base: deniallugo-multilayer-client
Are you sure you want to change the base?
fix(configs): Refactor contracts config #3660
Conversation
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
d30c61f
to
2cd7b6b
Compare
Signed-off-by: Danil <[email protected]>
0fd3fd4
to
62d7129
Compare
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
7247fa0
to
b0c9be8
Compare
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
c39056e
to
1d898b0
Compare
…-config-refactoring
174f7aa
to
cf094e2
Compare
Signed-off-by: Danil <[email protected]>
af0626e
to
0609c50
Compare
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
fdc561e
to
6638eee
Compare
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
23f33d7
to
322346b
Compare
Signed-off-by: Danil <[email protected]>
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. --------- Signed-off-by: Danil <[email protected]>
#[derive(Debug, Clone)] | ||
pub struct SettlementLayerContracts { | ||
l1_contracts: ChainSpecificContracts, | ||
gateway_contracts: Option<ChainSpecificContracts>, |
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.
l2Contracts overlaps, no? In gateway_contracts and l1_contracts
diamond_proxy_contract_address: self.contracts_config.diamond_proxy_addr, | ||
chain_admin_contract_address: Some(self.contracts_config.chain_admin_addr), | ||
diamond_proxy_contract_address: input | ||
.contracts_resource |
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.
here it was changed from L1 to GW, and for the chainAdmin as well
|
||
#[derive(Debug, FromContext)] | ||
#[context(crate = crate)] | ||
pub struct Input { | ||
pub master_pool: PoolResource<MasterPool>, | ||
pub main_node_client: MainNodeClientResource, | ||
pub l1_client: EthInterfaceResource, | ||
pub gateway_client: Option<GatewayEthInterfaceResource>, | ||
pub gateway_client: UniversalClientResource, |
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.
shouldn't it be settlment_layer_client? i.e. it is for l1 or gw client, no?
core/node/node_framework/src/implementations/layers/settlement_layer_data.rs
Show resolved
Hide resolved
@@ -72,16 +69,6 @@ impl WiringLayer for QueryEthClientLayer { | |||
} else { | |||
None | |||
}, |
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.
why did you get rid of this? We need to watch the GW for EthWatch component. Or did you add it back somewhere else?
We need to watch both L1 and GW
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.
ah its in query_gateway_client I think
} | ||
|
||
#[async_trait::async_trait] | ||
impl WiringLayer for GatewayClientLayer { |
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.
Probably rename to SLClientLayer? If it is a GatewayClient it cannot be an L1 client
Signed-off-by: Danil <[email protected]>
What ❔
Refactor contracts config and moving it to framework. Also it support both layers Gateway and L1, allowing to automatically decide what layer supposed to be used now.
Why ❔
In the future the contracts config will be loaded from Settlement Layer. It's the preparation, where no components depends on the contracts config directly.
Is this a breaking change?
Operational changes
Checklist
zkstack dev fmt
andzkstack dev lint
.