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.
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
[Fix] Selection of transition ID in finalize. #2575
[Fix] Selection of transition ID in finalize. #2575
Changes from 13 commits
8b739c9
78bce6f
de6c852
230e995
3fc729f
df6a484
5a72fea
e9fad83
3fb928d
40e7f11
ca5d52a
104432a
1af02b4
a5a1233
b6c98be
b2dfffe
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 comment is a bit tangential to what's being fixed, but my fear is this approach of a
CONSENSUS_VX_HEIGHT
is quickly creating a situation where we could have double digit consensus versions and migratory logic like this in many places within the the SnarkVM codebase. This could easily lead to nontrivial errors.At some point soon, the community should come up with some kind of migration model and spec which lays out a standard format for migration.
I haven't thought this out in enough depth yet, but I imagine we might have some kind of migration
decorator
-style pattern (perhaps a macro? Enums that apply migration functions, etc.?) that clearly denotes a change in consensus rules, specifies the logic at each and does a standard set of checks.After the higher priority fixes
mainnet
the community should do some active design to keep future updates and fixes maintainable.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.
It's a good call out.
Your macro suggestion reminded me of the
malice
approach, maybe we can borrow the design there.We could also enforce stricter standards around migration logic, requiring that a README is maintained in this repo, which defines the invariants around each new
CONSENSUS_V*_HEIGHT
.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.
+1 very much something worth thinking about and documenting.
One design principle I'm confident about (which also went wrong in the first design of the Fee lowering PR) is that wherever consensus changes are introduced, they should be independent full self-contained functionality, and not complex derivations of each other's functionality.
A second one: whether we should always use
<
or>=
or a match for the comparison.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.
@iamalwaysuncomfortable this is a wonderful point. Thank you for bringing it up.
I also have a great dislike for
CONSENSUS_VX_HEIGHT
as it will quickly grow out of control. It's definitely worth exploring cleaner solutions. There should be plenty of examples of other chains that have managed quick bug fixes, hard forks, etc. that we can learn from.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.
Provable protocol team will hereby promise to do a small lit review in january.