zeta-chain / node

ZetaChain’s blockchain node and an observer validator client
https://zetachain.com
MIT License
164 stars 105 forks source link

Upgrade tests: allow to add gateway upgrade instructions during the test #2921

Open lumtis opened 2 days ago

lumtis commented 2 days ago

Describe the Issue

In v2 contracts, we add the ability to upgrade the gateway contracts on ZEVM and connected chains.

It can happen protocol modifications like https://github.com/zeta-chain/node/pull/2904 are based on the assumption that the gateway contract is upgraded.

In practice, inbounds, outbounds will fail after upgrade before the gateway is upgraded (we should consider adding a pausing step in the playbook).

In the upgrade tests, we should add somewhere a place to specify instruction of upgrading the gateway contract.

Solution envisaged

Adding a method UpgradeGateways, this method is called in the upgrade test. In this method, when upgrade is necessary, the gateway contract on EVM or ZEVM is redeploy with version currently defined in go.mod, and upgrade with the new implementation contract.