-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use IndexedMerkleMap for OffchainState #1672
Conversation
…-with-indexed-map
…te-with-indexed-map
…te-with-indexed-map
accounts: OffchainState.Map(PublicKey, UInt64), | ||
totalSupply: OffchainState.Field(UInt64), | ||
}, | ||
{ logTotalCapacity: 10, maxActionsPerProof: 5 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we change the defaults, mainly to check that this works and to exercise the case that settling needs multiple proofs
@state(OffchainStateCommitments) offchainState = State( | ||
OffchainStateCommitments.empty() | ||
); | ||
@state(OffchainState.Commitments) offchainState = offchainState.commitments(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks a bit nicer now, and was necessary because the empty state now depends on the tree size which is part of the offchain state config
This follows #1666 and #1671 and uses the new
IndexedMerkleMap
forOffchainState
.Also:
Fixes(cherry-picked in previous PR)IndexedMerkleMap.clone()
IndexedMerkleMap.{overwrite, overwriteIf}
TODO: