-
Notifications
You must be signed in to change notification settings - Fork 132
multi: allow supply commit state machine to accept pending updates during state transition #1609
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
Merged
Conversation
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
3f50668
to
aff4830
Compare
bd5d0b4
to
37f23fa
Compare
aff4830
to
5d593a6
Compare
37f23fa
to
be0a52c
Compare
cf3e3d5
to
407e826
Compare
be0a52c
to
f2a69aa
Compare
407e826
to
e742cf7
Compare
e742cf7
to
c57141c
Compare
f2a69aa
to
93ed469
Compare
c57141c
to
f7c21e5
Compare
93ed469
to
633373a
Compare
f7c21e5
to
b4dc187
Compare
633373a
to
3ca1517
Compare
b4dc187
to
451e0ae
Compare
3ca1517
to
988837b
Compare
451e0ae
to
483f5fa
Compare
988837b
to
a9ef139
Compare
483f5fa
to
edabb47
Compare
a9ef139
to
ca7db9a
Compare
edabb47
to
b912c0c
Compare
…ld, and group key param
79708b2
to
79bfec0
Compare
5db6108
to
da300cf
Compare
Removed from draft. |
…pdates In this commit, we update the supply update insertion logic to support dangling updates. To do this, we modify the main routine to: * Use an upfront query to determine if a transition exists or not: * If not, then we'll just make a new one and add the update. * Otherwise we check if it's frozen, if so, then we'll insert a dangling update. We also now allow insertions at any state, as we'll also update the main state machine to allow inserting updates at any state. With this change, we can always call insert supply updates, and know that they'll either be added to the current transition, or added as a dangling update.
After this point, any inserted updates will now be dangling.
… updates We'll now automatically loop back to the updates pending state if we have any dangling updates. After the next tick we'll then re run the main loop to create a new on-chain commitment.
da300cf
to
ef03639
Compare
guggero
approved these changes
Jul 25, 2025
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.
Very nice, LGTM 🎉
ffranr
approved these changes
Jul 29, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
supply commit
Work on the supply commitment feature, enabling issuers to attest to total asset supply on-chain.
supply tree
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.
In this PR, we update the state machine to accept pending updates during a state transition. This takes a burden off of callers, as they can just continue to send in new events at will without needing to handle the error case.
To achieve this, we add a stage where we explicitly freeze a pending state transition. Once frozen, any other updates will be added as a dangling update (not pointing to a state transition). We then update the state machine to do a new transition where we'll query for dangling updates and bind them to a new state transition in an atomic step. We'll then create a new state transition with these dangling updates.
TODO