Skip to content
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

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

runtian-zhou
Copy link
Contributor

@runtian-zhou runtian-zhou commented Dec 7, 2022

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?

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@movekevin movekevin requested a review from davidiw December 8, 2022 06:10
@@ -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};
Copy link
Contributor

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.

Comment on lines 102 to 103
impl Features {
pub(crate) fn has_modified(&self, on_chain_features: &AFeatures) -> bool {
Copy link
Contributor

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?

Comment on lines 41 to 48
fn fetch_and_compare<T: OnChainConfig + PartialEq>(
client: &Option<Client>,
expected: &T,
) -> Result<bool> {
Copy link
Contributor

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?

@runtian-zhou runtian-zhou force-pushed the runtianz/compare_onchain_configs branch from 17a6d00 to b081fa1 Compare December 13, 2022 02:22
@runtian-zhou runtian-zhou requested a review from banool as a code owner December 13, 2022 02:22
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

✅ Forge suite land_blocking success on b081fa10b07239d5a9a8551b9273a8f04acee2d8

performance benchmark with full nodes : 6457 TPS, 6151 ms latency, 8100 ms p99 latency,no expired txns
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> b081fa10b07239d5a9a8551b9273a8f04acee2d8

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> b081fa10b07239d5a9a8551b9273a8f04acee2d8 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 6990 TPS, 5524 ms latency, 10200 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: b081fa10b07239d5a9a8551b9273a8f04acee2d8
compatibility::simple-validator-upgrade::single-validator-upgrade : 4666 TPS, 8799 ms latency, 12600 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: b081fa10b07239d5a9a8551b9273a8f04acee2d8
compatibility::simple-validator-upgrade::half-validator-upgrade : 4194 TPS, 10273 ms latency, 13400 ms p99 latency,no expired txns
4. upgrading second batch to new version: b081fa10b07239d5a9a8551b9273a8f04acee2d8
compatibility::simple-validator-upgrade::rest-validator-upgrade : 6156 TPS, 6525 ms latency, 10400 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> b081fa10b07239d5a9a8551b9273a8f04acee2d8 passed
Test Ok

@runtian-zhou runtian-zhou merged commit 65661d0 into main Dec 13, 2022
@runtian-zhou runtian-zhou deleted the runtianz/compare_onchain_configs branch December 13, 2022 03:25
areshand pushed a commit to areshand/aptos-core-1 that referenced this pull request Dec 18, 2022
…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
runtian-zhou added a commit that referenced this pull request Dec 20, 2022
…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
@Markuze Markuze mentioned this pull request Dec 26, 2022
runtian-zhou added a commit that referenced this pull request Jan 3, 2023
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants