-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[aptos-release-tooling] Add an option to compare release binary with on chain configs #5796
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -3,7 +3,7 @@ | |||
|
|||
use crate::utils::*; | |||
use anyhow::Result; | |||
use aptos_types::on_chain_config::FeatureFlag as AFeatureFlag; | |||
use aptos_types::on_chain_config::{FeatureFlag as AFeatureFlag, Features as AFeatures}; |
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.
Let's in the future use names like AptosFeatureFlag
instead of AFeatureFlag
, the short adding (which I saw in the view functions as well), leads to easy mistakes and confusion later.
impl Features { | ||
pub(crate) fn has_modified(&self, on_chain_features: &AFeatures) -> bool { |
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.
has_modified
what's modified?
I look at the code, and it tells me that it's if one of hte feature flags provided is different than the current state. Could you add a comment for this?
fn fetch_and_compare<T: OnChainConfig + PartialEq>( | ||
client: &Option<Client>, | ||
expected: &T, | ||
) -> Result<bool> { |
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.
Similarly, fetch_and_compare
, could you add a comment, or rename it to fetch_and_equals
or something like that?
17a6d00
to
b081fa1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
…on chain configs (aptos-labs#5796) * [aptos-release-tooling] Add an option to compare release binary with on chain configs * fixup! [aptos-release-tooling] Add an option to compare release binary with on chain configs
…on chain configs (#5796) * [aptos-release-tooling] Add an option to compare release binary with on chain configs * fixup! [aptos-release-tooling] Add an option to compare release binary with on chain configs
…mainnet (#5936) * [release-tooling] Implement a parser from yaml (#5562) * [release-builder] Implement a parser for the framework release config * [release-builder] Add consensus config to release config * [release-tooling] Refactor the common logic for generating proposal. * [release tooling] multi-step proposal release tooling (#5834) Co-authored-by: chloeqjz <[email protected]> * [aptos-release-tooling] Add an option to compare release binary with on chain configs (#5796) * [aptos-release-tooling] Add an option to compare release binary with on chain configs * fixup! [aptos-release-tooling] Add an option to compare release binary with on chain configs Co-authored-by: 0xchloe <[email protected]> Co-authored-by: chloeqjz <[email protected]>
Description
Add an option to compare on chain configs so that governance proposal will only be generated when they are modified.
Test Plan
Tested the fetch and compare logic with local aptos node. Was wondering if we should persist such test in smoke test?