Skip to content

L2V31 upgrade contract and further upgrade testing#2091

Open
kelemeno wants to merge 242 commits intodraft-v31from
kl/l2V31upgrade
Open

L2V31 upgrade contract and further upgrade testing#2091
kelemeno wants to merge 242 commits intodraft-v31from
kl/l2V31upgrade

Conversation

@kelemeno
Copy link
Copy Markdown
Contributor

What ❔

Why ❔

Checklist

  • 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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move the upgrade specific logic to L2V31Instead, and keep this GenesisRelated. I.e. disentangle the two.

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:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registerBridgedTokensInNTV(address(bridgehub));
migrateTokenBalances(address(ntv), address(assetTracker), bridgehub);
// Register bridged tokens in NTV and migrate balances to AssetTracker
TokenMigrationUtils.registerBridgedTokensInNTV(address(bridgehub));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the new Utils do not have broadcast sent and so these txs never actually get executed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please double check that if this piece of code is called, that its results are actually verified within the test suite

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its not called

bytes32 assetId = ntv.bridgedTokens(i);
l1AssetTracker.registerLegacyToken(assetId);
}
TokenMigrationUtils.registerAllLegacyTokens(config.bridgehubProxyAddress);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants