L2V31 upgrade contract and further upgrade testing#2091
L2V31 upgrade contract and further upgrade testing#2091
Conversation
…s into kl/anvil-testing-interop
…s into kl/anvil-testing-interop
l1-contracts/contracts/dev-contracts/MockSystemContractProxyAdmin.sol
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
WDYT about renaming to L2ForceDeploymentsHelper? (if you want to, could be done in a separate PR)
Having Genesis in name can raise confusion and indicate that it only updates genesis
There was a problem hiding this comment.
I would move the upgrade specific logic to L2V31Instead, and keep this GenesisRelated. I.e. disentangle the two.
l1-contracts/test/anvil-interop/docs/v31-upgrade-test-runner.md
Outdated
Show resolved
Hide resolved
l1-contracts/deploy-scripts/upgrade/SystemContractsProcessing.s.sol
Outdated
Show resolved
Hide resolved
l1-contracts/contracts/upgrades/SettlementLayerV31UpgradeBase.sol
Outdated
Show resolved
Hide resolved
| import {EcosystemUpgradeParams} from "../default-upgrade/UpgradeParams.sol"; | ||
|
|
||
| /// @notice Script used for v31 ecosystem upgrade flow (core + CTM) | ||
| /// TODO: IMPORTANT this script should also contain the following steps: |
There was a problem hiding this comment.
FYI: The script still missed some of the crucial steps for the upgrades. It is likely okay for the purposes of this PR, but it must be fixed before release
There was a problem hiding this comment.
l1-contracts/deploy-scripts/upgrade/default-upgrade/CTMUpgradeBase.sol
Outdated
Show resolved
Hide resolved
l1-contracts/deploy-scripts/upgrade/SystemContractsProcessing.s.sol
Outdated
Show resolved
Hide resolved
l1-contracts/deploy-scripts/utils/bytecode/ContractsBytecodesLib.sol
Outdated
Show resolved
Hide resolved
l1-contracts/contracts/upgrades/SettlementLayerV31UpgradeBase.sol
Outdated
Show resolved
Hide resolved
| registerBridgedTokensInNTV(address(bridgehub)); | ||
| migrateTokenBalances(address(ntv), address(assetTracker), bridgehub); | ||
| // Register bridged tokens in NTV and migrate balances to AssetTracker | ||
| TokenMigrationUtils.registerBridgedTokensInNTV(address(bridgehub)); |
There was a problem hiding this comment.
Note that the new Utils do not have broadcast sent and so these txs never actually get executed
There was a problem hiding this comment.
please double check that if this piece of code is called, that its results are actually verified within the test suite
There was a problem hiding this comment.
I think its not called
l1-contracts/contracts/l2-upgrades/L2GenesisForceDeploymentsHelper.sol
Outdated
Show resolved
Hide resolved
| bytes32 assetId = ntv.bridgedTokens(i); | ||
| l1AssetTracker.registerLegacyToken(assetId); | ||
| } | ||
| TokenMigrationUtils.registerAllLegacyTokens(config.bridgehubProxyAddress); |
There was a problem hiding this comment.
IDK what is the intent of this script, but if it should be called on per-chain basis, it wont work since registerAllLegacyTokens would fail once it is called the second time
What ❔
Why ❔
Checklist