Conversation
| @@ -4,36 +4,29 @@ | |||
| /* eslint-disable no-plusplus, no-await-in-loop */ | |||
There was a problem hiding this comment.
Some things re this file:
- The diff is missleading. I havent added code, just removed. And some very very minor renaming and changes.
- To avoid more complexity in here, leaving this as TODO. This file is named
UpgradeToPPbut there is ashould create rollup type validium & migrate to ALGatewaytest. I guess that test doesn't belong here. If so, will move it in a different PR.
|
|
||
| describe('Polygon Rollup Manager with Polygon Pessimistic Consensus', () => { | ||
|
|
||
| describe('Polygon Rollup Manager with zkevm etrog migration to ECDSA Multisig with real prover', () => { |
There was a problem hiding this comment.
Renamed this, since this test contains migration zkevm etroc to ECDSA as well, not just to PP.
| await polTokenContract.transfer(trustedSequencer, ethers.parseEther('1000')); | ||
| }); | ||
|
|
||
| it('should check the initialized parameters', async () => { |
There was a problem hiding this comment.
I have removed this logic since it is already tested here: https://github.com/agglayer/agglayer-contracts/blob/feature/v12/test/contractsv2/PolygonRollupManager.test.ts#L225-L256 It was a copy paste, so no need to be duplicated.
| if (rollupVerifierType == VerifierType.Pessimistic) { | ||
| // No genesis on pessimistic rollups | ||
| if (genesis != bytes32(0)) revert InvalidRollupType(); | ||
| } else if (rollupVerifierType == VerifierType.ALGateway) { |
There was a problem hiding this comment.
after those lines fix comment:
// unreachable code since solidity enforces the enum input rollupVerifierType to be one of the enum values
| if (rollupVerifierType == VerifierType.Pessimistic) { | ||
| rollup.programVKey = programVKey; | ||
| rollup.lastPessimisticRoot = initPessimisticRoot; | ||
| rollup.lastLocalExitRoot = initRoot; | ||
| if (verifier.code.length == 0) { | ||
| revert InvalidVerifierAddress(); | ||
| } | ||
| } else if (rollupVerifierType == VerifierType.ALGateway) { |
There was a problem hiding this comment.
the condition if (rollupVerifierType == VerifierType.Pessimistic) {
should revert with a custom error.
Now we can create a "weird" state transition rollup
|
This cleanup will come with v13, I'd suggest to change the PR to |
This PR is part of a series of multiple PRs cleaning up the legacy
PolygonPessimisticConsensus. All code referencing such feature is removed. This can be done since there are noPolygonPessimisticConsensusdeployed in any chain (mainnet, testnets, etc), no migrations to/fromPolygonPessimisticConsensusare expected in the future and no new deployment with such types will happen in the future.Since the changes are rather big for a single PR, more PRs will follow up addressing the following in parts:
NOTE: Do not merge this PR until feature/v13 branch is created.