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-vm] Move Aptos metadata to aptos-types (1/2) #16090

Merged
merged 2 commits into from
Mar 26, 2025

Conversation

georgemitenkov
Copy link
Contributor

@georgemitenkov georgemitenkov commented Mar 10, 2025

Description

This is the 1st out of 2 PRs. The goal is to cache Aptos metadata in module cache, to avoid deserialization on every resource group access and cache it across blocks.

This PR only refactors code to ensure metadata is not under framework.rs but is defined globally in aptos-types so it can be used by loader, etc. without cyclic dependencies.

There are no changes to the code.

How Has This Been Tested?

Key Areas to Review

Type of Change

  • Refactoring

Which Components or Systems Does This Change Impact?

  • Move/Aptos Virtual Machine

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Copy link

trunk-io bot commented Mar 10, 2025

⏱️ 33m total CI duration on this PR
Job Cumulative Duration Recent Runs
check-dynamic-deps 17m 🟩🟩🟩🟩🟩 (+4 more)
rust-cargo-deny 8m 🟩🟩🟩🟩🟩
semgrep/ci 3m 🟩🟩🟩🟩🟩 (+4 more)
general-lints 2m 🟩🟩🟩🟩🟩
file_change_determinator 54s 🟩🟩🟩 (+3 more)
permission-check 27s 🟩🟩🟩🟩🟩 (+4 more)
permission-check 20s 🟩🟩🟩🟩🟩 (+4 more)
check-branch-prefix 1s 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor Author

georgemitenkov commented Mar 10, 2025

@georgemitenkov georgemitenkov changed the title [refactoring] Move Aptos metadata to aptos-types [aptos-vm] Move Aptos metadata to aptos-types (1/2) Mar 10, 2025
@georgemitenkov georgemitenkov marked this pull request as ready for review March 10, 2025 12:04
@georgemitenkov georgemitenkov requested review from runtian-zhou and removed request for gregnazario, banool, 0xmaayan and movekevin March 10, 2025 12:04
@georgemitenkov georgemitenkov force-pushed the george/remove-feature-flag-3.13 branch from 6c5d6aa to 8348561 Compare March 10, 2025 12:14
@georgemitenkov georgemitenkov force-pushed the george/refactor-metadata branch from 267a42e to 22bddf5 Compare March 10, 2025 12:14
@georgemitenkov georgemitenkov changed the base branch from george/remove-feature-flag-3.13 to graphite-base/16090 March 12, 2025 12:05
@georgemitenkov georgemitenkov force-pushed the george/refactor-metadata branch from 22bddf5 to e923f1b Compare March 13, 2025 17:51
@georgemitenkov georgemitenkov changed the base branch from graphite-base/16090 to george/remove-feature-flag-3.13 March 13, 2025 17:51

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.

@georgemitenkov georgemitenkov force-pushed the george/refactor-metadata branch from 4063166 to 63c209b Compare March 18, 2025 20:00

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.

@georgemitenkov georgemitenkov disabled auto-merge March 26, 2025 08:10
@georgemitenkov georgemitenkov force-pushed the george/refactor-metadata branch from d860988 to ae6143b Compare March 26, 2025 08:11
@georgemitenkov georgemitenkov enabled auto-merge (squash) March 26, 2025 08:14

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on ae6143b576b242496b86a7e35bf32c16cac85e12

two traffics test: inner traffic : committed: 10971.45 txn/s, latency: 3620.45 ms, (p50: 3600 ms, p70: 3600, p90: 4100 ms, p99: 5100 ms), latency samples: 4171580
two traffics test : committed: 99.96 txn/s, latency: 1605.57 ms, (p50: 1400 ms, p70: 1600, p90: 2200 ms, p99: 2800 ms), latency samples: 1860
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 2.755, avg: 2.283", "ConsensusProposalToOrdered: max: 0.347, avg: 0.332", "ConsensusOrderedToCommit: max: 0.415, avg: 0.394", "ConsensusProposalToCommit: max: 0.755, avg: 0.726"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 1.27s no progress at version 1879517 (avg 0.23s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.86s no progress at version 1864605 (avg 0.86s) [limit 16].
Test Ok

Copy link
Contributor

✅ Forge suite compat success on 2e48f76143b9b0624af00b952048444fb9af0ca3 ==> ae6143b576b242496b86a7e35bf32c16cac85e12

Compatibility test results for 2e48f76143b9b0624af00b952048444fb9af0ca3 ==> ae6143b576b242496b86a7e35bf32c16cac85e12 (PR)
1. Check liveness of validators at old version: 2e48f76143b9b0624af00b952048444fb9af0ca3
compatibility::simple-validator-upgrade::liveness-check : committed: 5588.75 txn/s, submitted: 5589.09 txn/s, expired: 0.34 txn/s, latency: 2891.97 ms, (p50: 2900 ms, p70: 3100, p90: 3500 ms, p99: 4300 ms), latency samples: 362978
2. Upgrading first Validator to new version: ae6143b576b242496b86a7e35bf32c16cac85e12
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 3049.75 txn/s, latency: 10507.16 ms, (p50: 9900 ms, p70: 12700, p90: 13000 ms, p99: 13000 ms), latency samples: 84000
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 2767.10 txn/s, latency: 11919.27 ms, (p50: 13300 ms, p70: 13600, p90: 13900 ms, p99: 14000 ms), latency samples: 106600
3. Upgrading rest of first batch to new version: ae6143b576b242496b86a7e35bf32c16cac85e12
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 2880.00 txn/s, latency: 10146.45 ms, (p50: 10900 ms, p70: 12600, p90: 13200 ms, p99: 13400 ms), latency samples: 63780
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 2912.17 txn/s, latency: 11438.01 ms, (p50: 12900 ms, p70: 13200, p90: 13400 ms, p99: 13700 ms), latency samples: 110560
4. upgrading second batch to new version: ae6143b576b242496b86a7e35bf32c16cac85e12
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 5714.79 txn/s, latency: 5374.64 ms, (p50: 6200 ms, p70: 6600, p90: 6700 ms, p99: 6800 ms), latency samples: 108640
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 5609.19 txn/s, latency: 6115.12 ms, (p50: 6800 ms, p70: 6900, p90: 7100 ms, p99: 7200 ms), latency samples: 191220
5. check swarm health
Compatibility test for 2e48f76143b9b0624af00b952048444fb9af0ca3 ==> ae6143b576b242496b86a7e35bf32c16cac85e12 passed
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on 2e48f76143b9b0624af00b952048444fb9af0ca3 ==> ae6143b576b242496b86a7e35bf32c16cac85e12

Compatibility test results for 2e48f76143b9b0624af00b952048444fb9af0ca3 ==> ae6143b576b242496b86a7e35bf32c16cac85e12 (PR)
Upgrade the nodes to version: ae6143b576b242496b86a7e35bf32c16cac85e12
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1846.00 txn/s, submitted: 1852.28 txn/s, failed submission: 6.27 txn/s, expired: 6.27 txn/s, latency: 1606.93 ms, (p50: 1500 ms, p70: 1800, p90: 2100 ms, p99: 2500 ms), latency samples: 164761
Upgrade the remaining nodes to version: ae6143b576b242496b86a7e35bf32c16cac85e12
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1723.27 txn/s, submitted: 1727.54 txn/s, failed submission: 4.27 txn/s, expired: 4.27 txn/s, latency: 1693.25 ms, (p50: 1500 ms, p70: 1800, p90: 2400 ms, p99: 3000 ms), latency samples: 153320
5. check swarm health
Compatibility test for 2e48f76143b9b0624af00b952048444fb9af0ca3 ==> ae6143b576b242496b86a7e35bf32c16cac85e12 passed
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1653.09 txn/s, submitted: 1658.55 txn/s, failed submission: 5.46 txn/s, expired: 5.46 txn/s, latency: 2274.85 ms, (p50: 1500 ms, p70: 1800, p90: 2500 ms, p99: 13600 ms), latency samples: 139340
Test Ok

@georgemitenkov georgemitenkov merged commit f097ac9 into main Mar 26, 2025
85 of 88 checks passed
@georgemitenkov georgemitenkov deleted the george/refactor-metadata branch March 26, 2025 19:41
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