This raises problems when initialising an ecosystem (using zkstack ecosystem init --resume) stalls, and one tries to resume it with the --resume flag.
In this cases the AcceptAdmin.s.sol script will be rerun which fails because it tries to re-add already existing governance operations which the Governance contract will prohibit (governanceAcceptOwner and governanceAcceptAdmin).
Similarly, chainAdminAcceptAdmin also fails for the same reason.
π Reproduction Steps
Run zkstack ecosystem init and break it off after AcceptAdmin.s.sol has run once
Rerun with zkstack ecosystem init --resume
π€ Expected Behavior
We would expect the initialisation of the ecosystem resumes succesfully.
I have a fix for this ready which tries to check whether the admin has already been set on the contract before proceeding.
Will create a PR asap and link here.
π Script Bug Report
π Description
The AcceptAdmin.s.sol script does not work well with the
--resume
flag. This is also flagged inside theaccept_ownership.rs
file in the zksync-era repo: https://github.com/matter-labs/zksync-era/blob/5161eeda5905d33f4d038a2a04ced3e06f39d593/zkstack_cli/crates/zkstack/src/accept_ownership.rs#L36This raises problems when initialising an ecosystem (using
zkstack ecosystem init --resume
) stalls, and one tries to resume it with the --resume flag.In this cases the AcceptAdmin.s.sol script will be rerun which fails because it tries to re-add already existing governance operations which the Governance contract will prohibit (
governanceAcceptOwner
andgovernanceAcceptAdmin
). Similarly,chainAdminAcceptAdmin
also fails for the same reason.π Reproduction Steps
Run
zkstack ecosystem init
and break it off after AcceptAdmin.s.sol has run once Rerun withzkstack ecosystem init --resume
π€ Expected Behavior
We would expect the initialisation of the ecosystem resumes succesfully.
π― Current Behavior
The initialisation fails with
π₯οΈ Environment
https://github.com/matter-labs/era-contracts/blob/84d5e3716f645909e8144c7d50af9dd6dd9ded62/l1-contracts/deploy-scripts/AcceptAdmin.s.sol
π Additional Context
/
π Log Output