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

restructure shared state between StateStore and BufferedState #15451

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

msmouse
Copy link
Contributor

@msmouse msmouse commented Dec 2, 2024

Description

CurrentState and SmtAncestors need to be replaced when StateStore::reset(&self), that's why they were wrapped in an additional layer of Mutexes. This restructures the BufferedState constructors so that they are not responsible to allocate new instances of CurrentState and SmtAncestors, rather, they now take in those instances as parameters and just set the value of them.

Also deleted SmtAncestors under the smt crate and created PersistedState in the DB crate, in preparation for adding more content to the structure.

How Has This Been Tested?

existing coverage

Key Areas to Review

Type of Change

  • Refactoring

Which Components or Systems Does This Change Impact?

  • Validator Node

Copy link

trunk-io bot commented Dec 2, 2024

⏱️ 2h 47m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
execution-performance / single-node-performance 46m 🟩🟩
rust-move-tests 13m 🟩
rust-move-tests 13m 🟩
rust-move-tests 12m 🟩
rust-images / rust-all 11m 🟩
rust-move-tests 11m
execution-performance / test-target-determinator 9m 🟩🟩
check-dynamic-deps 9m 🟩🟩🟩🟩🟩
test-target-determinator 9m 🟩🟩
check 7m 🟩🟩
rust-cargo-deny 7m 🟩🟩🟩🟩
rust-doc-tests 5m 🟩
rust-doc-tests 5m 🟩
fetch-last-released-docker-image-tag 3m 🟩🟩
semgrep/ci 2m 🟩🟩🟩🟩🟩

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
check-dynamic-deps 5m 1m +252%

settingsfeedbackdocs ⋅ learn more about trunk.io

@msmouse msmouse changed the title ExecutedTrees -> LedgerSummary restructure shared state between StateStore and BufferedState Dec 2, 2024
@msmouse msmouse requested a review from a team December 2, 2024 23:28
@msmouse msmouse marked this pull request as ready for review December 2, 2024 23:28
@msmouse msmouse added the CICD:run-e2e-tests when this label is present github actions will run all land-blocking e2e tests from the PR label Dec 2, 2024
@msmouse msmouse requested a review from zekun000 December 2, 2024 23:38

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@msmouse msmouse enabled auto-merge (squash) December 3, 2024 02:02

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Dec 3, 2024

✅ Forge suite realistic_env_max_load success on 21693a1b368c07afd27712e2728a706b4d3ad830

two traffics test: inner traffic : committed: 13902.50 txn/s, latency: 2857.57 ms, (p50: 2700 ms, p70: 2700, p90: 3000 ms, p99: 3300 ms), latency samples: 5286000
two traffics test : committed: 99.99 txn/s, latency: 2067.53 ms, (p50: 1500 ms, p70: 2000, p90: 2200 ms, p99: 17700 ms), latency samples: 1800
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 2.511, avg: 1.536", "ConsensusProposalToOrdered: max: 0.324, avg: 0.298", "ConsensusOrderedToCommit: max: 0.374, avg: 0.364", "ConsensusProposalToCommit: max: 0.674, avg: 0.662"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.97s no progress at version 38905 (avg 0.21s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 15.65s no progress at version 2481007 (avg 15.65s) [limit 16].
Test Ok

Copy link
Contributor

github-actions bot commented Dec 3, 2024

✅ Forge suite compat success on 010570d3b7aa20889fb5ad0e5b23800aa33f5634 ==> 21693a1b368c07afd27712e2728a706b4d3ad830

Compatibility test results for 010570d3b7aa20889fb5ad0e5b23800aa33f5634 ==> 21693a1b368c07afd27712e2728a706b4d3ad830 (PR)
1. Check liveness of validators at old version: 010570d3b7aa20889fb5ad0e5b23800aa33f5634
compatibility::simple-validator-upgrade::liveness-check : committed: 14371.78 txn/s, latency: 2025.19 ms, (p50: 1900 ms, p70: 2100, p90: 2400 ms, p99: 4200 ms), latency samples: 548600
2. Upgrading first Validator to new version: 21693a1b368c07afd27712e2728a706b4d3ad830
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 6204.64 txn/s, latency: 4505.16 ms, (p50: 5000 ms, p70: 5200, p90: 6100 ms, p99: 6100 ms), latency samples: 120320
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 6693.48 txn/s, latency: 4837.11 ms, (p50: 5000 ms, p70: 5300, p90: 6700 ms, p99: 7200 ms), latency samples: 225860
3. Upgrading rest of first batch to new version: 21693a1b368c07afd27712e2728a706b4d3ad830
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 6767.68 txn/s, latency: 4174.77 ms, (p50: 4800 ms, p70: 5000, p90: 5200 ms, p99: 5300 ms), latency samples: 122420
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 6134.21 txn/s, latency: 5134.83 ms, (p50: 5200 ms, p70: 5300, p90: 7100 ms, p99: 7500 ms), latency samples: 232060
4. upgrading second batch to new version: 21693a1b368c07afd27712e2728a706b4d3ad830
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 11629.00 txn/s, latency: 2405.38 ms, (p50: 2600 ms, p70: 2700, p90: 2800 ms, p99: 2900 ms), latency samples: 203020
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 11270.67 txn/s, latency: 2792.62 ms, (p50: 2700 ms, p70: 2800, p90: 4500 ms, p99: 5400 ms), latency samples: 365620
5. check swarm health
Compatibility test for 010570d3b7aa20889fb5ad0e5b23800aa33f5634 ==> 21693a1b368c07afd27712e2728a706b4d3ad830 passed
Test Ok

Copy link
Contributor

github-actions bot commented Dec 3, 2024

✅ Forge suite framework_upgrade success on 010570d3b7aa20889fb5ad0e5b23800aa33f5634 ==> 21693a1b368c07afd27712e2728a706b4d3ad830

Compatibility test results for 010570d3b7aa20889fb5ad0e5b23800aa33f5634 ==> 21693a1b368c07afd27712e2728a706b4d3ad830 (PR)
Upgrade the nodes to version: 21693a1b368c07afd27712e2728a706b4d3ad830
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1230.25 txn/s, submitted: 1234.36 txn/s, failed submission: 4.11 txn/s, expired: 4.11 txn/s, latency: 2441.06 ms, (p50: 2100 ms, p70: 2600, p90: 3900 ms, p99: 5100 ms), latency samples: 107700
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1175.56 txn/s, submitted: 1177.35 txn/s, failed submission: 1.79 txn/s, expired: 1.79 txn/s, latency: 2522.78 ms, (p50: 2100 ms, p70: 2700, p90: 4300 ms, p99: 6200 ms), latency samples: 105020
5. check swarm health
Compatibility test for 010570d3b7aa20889fb5ad0e5b23800aa33f5634 ==> 21693a1b368c07afd27712e2728a706b4d3ad830 passed
Upgrade the remaining nodes to version: 21693a1b368c07afd27712e2728a706b4d3ad830
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1197.39 txn/s, submitted: 1201.72 txn/s, failed submission: 4.33 txn/s, expired: 4.33 txn/s, latency: 2644.79 ms, (p50: 2400 ms, p70: 2900, p90: 3600 ms, p99: 5100 ms), latency samples: 105020
Test Ok

@msmouse msmouse requested a review from areshand December 3, 2024 03:01
@msmouse msmouse merged commit 6f64eea into main Dec 3, 2024
145 of 147 checks passed
@msmouse msmouse deleted the 1202-alden-persisted-state branch December 3, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CICD:run-e2e-tests when this label is present github actions will run all land-blocking e2e tests from the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants