[DO NOT MERGE] [MEL] Changes to OSP contracts#432
Draft
TucksonDev wants to merge 4 commits into
Draft
Conversation
4 tasks
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 builds on top of #427 and contains changes to support MEL in the OSP contracts.
Key changes
nextParentChainBlockHashdefined in the configuration of the previous assertion), and extract all child chain messages (batches and delayed messages) from themMsgCountand one counter for messages that have been executedExecutedMsgCountmaxInboxMessagesReadand thebridgecontract anymore, and instead uses thenextParentChainBlockHash. The GlobalState already contains the MELState hash, which contains the information about the message counters and accumulators.GetEndParentChainBlockHash. Thus, all prior block hashes are provable with their preimages, and all messages contained in those blocks are then legit. OnlyReadPreImageis needed for that. The MELState hash is also included in the GlobalState (provable withGetGlobalStateandSetGlobalState), and any intermediate changes to the MELState are provable by the internal wasm instructions that modify them (which are all included as opcodes in the OSP contracts).Pending work
Nitro reference PRs