-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[core] Cleanup protocol version cheecks in transaction validity check #17530
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
crates/sui-types/src/transaction.rs
Outdated
@@ -1490,6 +1490,12 @@ impl VersionedProtocolMessage for TransactionData { | |||
}); | |||
} | |||
|
|||
if !protocol_config.random_beacon() && self.uses_randomness() { |
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.
why does this now go in check_version_supported
? It doesn't seem to have anything to do with the message version?
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 function doesn't actually just check message version. The next line checks a bunch of feature flags and whether some of the transaction features used are enabled by the config.
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.
nit, but while you're in the area, maybe rename it to something more representative to what it currently does?
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.
Looks good. We should do a pass over the code coverage report after this lands.
67c4e71
to
f6ad3f3
Compare
Description
This PR consolidates protocol version support checks on transactions during validity check.
Specifically, it breaks down the protocol config version checks from authority_server into two pieces:
One notable change is that the randomness check now only checks the protocol config feature, without checking whether the randomness object exists. I believe this is fine because if the randomness object does not exist, it will fail latter when loading input objects anyway. But worth double check @aschran
Test plan
CI
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.