You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(gateway): Requirement to stop L1->L2 transactions before v26 upgrade (#3707)
## What ❔
A way to disable the addition of new L1->L2 transactions completely
before the start of the upgrade.
The chains will be expected to firstly set the new config value to
`true` (and wait until all the older txs are processed) and after the
end of the upgrade return it back to `false` (or remove completely)
## 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?
This is a breaking change for zkstack_cli functionality for gateway
upgrade as new server version would be required for it to work.
- [x] 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. -->
- [x] 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.
- [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev
lint`.
let client = get_zk_client(l2_rpc_url, l2_chain_id)?;
931
+
932
+
let status = match client.l1_to_l2_txs_status().await{
933
+
Ok(x) => x,
934
+
Err(e) => {
935
+
anyhow::bail!("Failed to query the status for L1->L2 transactions. The error {:#?}. Please ensure that you run the correct server version and `unstable` namespace is enabled.", e)
936
+
}
937
+
};
938
+
939
+
anyhow::ensure!(
940
+
status.l1_to_l2_txs_paused,
941
+
"L1->L2 transactions have not been paused"
942
+
);
943
+
anyhow::ensure!(
944
+
status.l1_to_l2_txs_in_mempool == 0,
945
+
"There are still L1->L2 transactions present in the mempool"
946
+
);
947
+
948
+
Ok(())
949
+
}
950
+
951
+
fnprint_error(err: anyhow::Error){
952
+
println!(
953
+
"Chain is not ready to finalize the upgrade due to the reason:\n{:#?}",
954
+
err
955
+
);
956
+
println!("Once the chain is ready, you can re-run this command to obtain the calls to finalize the upgrade");
957
+
println!("If you want to display finalization params anyway, pass `--force-display-finalization-params=true`.");
0 commit comments