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

[dag][bugfix] fix bitmask for incomplete first round #9723

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

ibalajiarun
Copy link
Contributor

@ibalajiarun ibalajiarun commented Aug 22, 2023

Description

This PR fixes the bitmask fn in the dag_store to make it return the proper bitmask when starting from an empty DAG. Previously, it was only properly handling the case when the initial round of the DAG store is 0, which doesn't accommodate for when starting a DAG store without the whole prefix.

Test Plan

Fixed unit tests.

@@ -272,6 +272,10 @@ impl Dag {
}

pub fn lowest_incomplete_round(&self) -> Option<Round> {
if self.nodes_by_round.is_empty() {
return Some(self.lowest_round());
}
Copy link
Contributor

@sasha8 sasha8 Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if the DAG is empty you return Some(lowest_round), but if the DAG is full you return None. The question is why empty DAG is not considered full. In the sense that all rounds either have all nodes or none?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, removed the option and now I return the actual round that is incomplete. For a full dag, its highest_round+1, and an empty dag, its lowest_round.

Base automatically changed from balaji/dag-rb-fetch to main August 24, 2023 18:02
@ibalajiarun ibalajiarun force-pushed the balaji/dag-bitmask-fix branch 2 times, most recently from 178b9f5 to 2bcdbd4 Compare August 24, 2023 20:54
@ibalajiarun ibalajiarun enabled auto-merge (squash) August 24, 2023 20:55
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

✅ Forge suite compat success on aptos-node-v1.6.2 ==> bc4d9ee513b62632f1eff27be89371d652118531

Compatibility test results for aptos-node-v1.6.2 ==> bc4d9ee513b62632f1eff27be89371d652118531 (PR)
1. Check liveness of validators at old version: aptos-node-v1.6.2
compatibility::simple-validator-upgrade::liveness-check : committed: 4642 txn/s, latency: 6826 ms, (p50: 6600 ms, p90: 9900 ms, p99: 12600 ms), latency samples: 190360
2. Upgrading first Validator to new version: bc4d9ee513b62632f1eff27be89371d652118531
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 1788 txn/s, latency: 16293 ms, (p50: 18700 ms, p90: 22200 ms, p99: 22500 ms), latency samples: 93000
3. Upgrading rest of first batch to new version: bc4d9ee513b62632f1eff27be89371d652118531
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 1856 txn/s, latency: 15569 ms, (p50: 18700 ms, p90: 22000 ms, p99: 22300 ms), latency samples: 92820
4. upgrading second batch to new version: bc4d9ee513b62632f1eff27be89371d652118531
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 3364 txn/s, latency: 9447 ms, (p50: 10000 ms, p90: 12900 ms, p99: 13200 ms), latency samples: 141320
5. check swarm health
Compatibility test for aptos-node-v1.6.2 ==> bc4d9ee513b62632f1eff27be89371d652118531 passed
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite realistic_env_max_load success on bc4d9ee513b62632f1eff27be89371d652118531

two traffics test: inner traffic : committed: 6127 txn/s, latency: 6388 ms, (p50: 6000 ms, p90: 8100 ms, p99: 11700 ms), latency samples: 2659140
two traffics test : committed: 100 txn/s, latency: 3193 ms, (p50: 3000 ms, p90: 3700 ms, p99: 6900 ms), latency samples: 1800
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.263, avg: 0.216", "QsPosToProposal: max: 0.189, avg: 0.161", "ConsensusProposalToOrdered: max: 0.686, avg: 0.628", "ConsensusOrderedToCommit: max: 0.510, avg: 0.489", "ConsensusProposalToCommit: max: 1.155, avg: 1.116"]
Max round gap was 1 [limit 4] at version 37704. Max no progress secs was 3.678299 [limit 10] at version 1216385.
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite framework_upgrade success on aptos-node-v1.5.1 ==> bc4d9ee513b62632f1eff27be89371d652118531

Compatibility test results for aptos-node-v1.5.1 ==> bc4d9ee513b62632f1eff27be89371d652118531 (PR)
Upgrade the nodes to version: bc4d9ee513b62632f1eff27be89371d652118531
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 4621 txn/s, latency: 7210 ms, (p50: 7800 ms, p90: 10200 ms, p99: 10800 ms), latency samples: 166360
5. check swarm health
Compatibility test for aptos-node-v1.5.1 ==> bc4d9ee513b62632f1eff27be89371d652118531 passed
Test Ok

@ibalajiarun ibalajiarun merged commit cf625f6 into main Aug 24, 2023
39 checks passed
@ibalajiarun ibalajiarun deleted the balaji/dag-bitmask-fix branch August 24, 2023 21:34
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.

3 participants