Skip to content

SC ChangeLog

This document summarizes most important changes on the SC side. You can also check the full git diff

TLDR

Structs

RollupDataReturnV2 --> any software should migrate to this struct to support all rollups with all its information

VerifierTypes

Events

Functions

PolygonPessimisticConsensus.sol

Description

Consensus SC to be deployed every time a new sovereign chain is created by the rollup manager. It inherits from PolygonConsensusBase as the other consensus implemented: PolygonValidumEtrog & PolygonZkEVMEtrog

Changes

It adds a new function: getConsensusHash

/**
* Note Return the necessary consensus information for the proof hashed
*/
function getConsensusHash() public view returns (bytes32) {
    return keccak256(abi.encodePacked(CONSENSUS_TYPE, trustedSequencer));
}
Note that trustedSequencer address can be modified at any time by the rollup admin

PolygonRollupManager.sol

Description

Allow to create a new kind of rollupTypes based on the Verifier type. Pending states has been removed (related to decentralize aggregator) in order to clean the SC and reduce the bytecode.

Changes

VerifierType

Introduced two types of Verifiers:

enum VerifierType {
        StateTransition,
        Pessimistic
    }
- StateTransition: verifies state transition constraint function. Consensus to support this verifiers are PolygonValidumEtrog & PolygonZkEVMEWtrog - Pessimistic: verifies the pessimisitc circuit contraints. Consensus to support this verifiers are PolygonPessimisticConsensus

AddNewRollupType

Function to add new rollups has been adapted in order to support creation of new rollups with Pessimistic verifier.

Event has been changed in order to include data related to Pessimistic verifiers:

/**
* @dev Emitted when a new rollup type is added
*/
event AddNewRollupType(
    uint32 indexed rollupTypeID,
    address consensusImplementation,
    address verifier,
    uint64 forkID,
    VerifierType rollupVerifierType,
    bytes32 genesis,
    string description,
    bytes32 programVKey
);
New parameter programVKey: identifier of the program that will be proven in SP1 Verifier

Note: If any software rely on this event it should be changed

verifyPessimisticTrustedAggregator

Function to verify Pessimsitic verifiers types. Important to notice that a chain using this verification will update its LER. Therefore, it will also update the RER and the GER. Current bridge services rely on VerifyBatchesTrustedAggregator event to track RER tree. Hence, same event signature has been maintained for Pessimistic verifiers

// Same event as verifyBatches to support current bridge service to synchronize everything
emit VerifyBatchesTrustedAggregator(
    rollupID,
    0, // final batch: does not apply in pessimistic
    bytes32(0), // new state root: does not apply in pessimistic
    newLocalExitRoot,
    msg.sender
);

Versioning

New constant has been added in order to check the PolygonRollupManager.sol version.

// Current rollup manager version
    string public constant ROLLUP_MANAGER_VERSION = "pessimistic";
It will be updated on each upgrade.