[DO NOT MERGE] [MEL] Changes to Rollup and OSP contracts#427
Draft
TucksonDev wants to merge 4 commits intodevelopfrom
Draft
[DO NOT MERGE] [MEL] Changes to Rollup and OSP contracts#427TucksonDev wants to merge 4 commits intodevelopfrom
TucksonDev wants to merge 4 commits intodevelopfrom
Conversation
ganeshvanahalli
requested changes
Apr 22, 2026
|
|
||
| /// @dev MELConfig was set | ||
| event MELConfigSet( | ||
| uint64 indexed melVersion, address indexed inbox, address indexed sequencerInbox, uint64 activationBlock |
Contributor
There was a problem hiding this comment.
shouldn't melVersion be uint16? as defined in MELState.sol?
Comment on lines
+466
to
+494
| function setMELConfig( | ||
| uint16 _melVersion, | ||
| address _inbox, | ||
| address _sequencerInbox | ||
| ) external { | ||
| // MEL versions can only be increased | ||
| require(_melVersion > melVersion, "INVALID_MEL_VERSION"); | ||
|
|
||
| // Setting the contracts | ||
| setInbox(IInboxBase(_inbox)); | ||
| setSequencerInbox(_sequencerInbox); | ||
|
|
||
| // Set the new MEL version | ||
| melVersion = _melVersion; | ||
|
|
||
| // Save the new MELConfig | ||
| MELConfig memory _melConfig = MELConfig({ | ||
| melVersion: _melVersion, | ||
| inbox: _inbox, | ||
| sequencerInbox: _sequencerInbox, | ||
| activationBlockNumber: uint64(block.number) | ||
| }); | ||
|
|
||
| bytes32 melConfigHash = keccak256(abi.encode(_melConfig)); | ||
| melConfig[melConfigHash] = _melConfig; | ||
|
|
||
| // Emit event to signal the update to nitro | ||
| emit MELConfigSet(_melVersion, _inbox, _sequencerInbox, uint64(block.number)); | ||
| } |
| // using constant ints for array size requires newer solidity | ||
| bytes32[2] memory bytes32Vals; | ||
| uint64[2] memory u64Vals; | ||
| bytes32[2] memory melBytes32Vals; |
| bytes32[2] memory bytes32Vals; | ||
| uint64[2] memory u64Vals; | ||
| bytes32[2] memory melBytes32Vals; | ||
| uint64[2] memory melU64Vals; |
This was referenced Apr 24, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
!! WIP - DO NOT MERGE !!
Note
This is a preliminary version, and can completely change, based on changes in the design or the implementation of the feature in nitro.
This PR contains changes to support MEL in the Rollup and OSP contracts.
Key changes
Pending work
nextParentChainBlockHashto use on initializationNitro reference PRs