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

[move] Avoid double hashing in favour of equivalent keys for type tag cache #15740

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

georgemitenkov
Copy link
Contributor

@georgemitenkov georgemitenkov commented Jan 15, 2025

Description

Instead of using a pair of hashmaps, and separately hashing keys, use hashbrown's Equivalent trait to use a pair of reference as keys.

How Has This Been Tested?

Unit tests for hash and equivalence.

Key Areas to Review

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

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 Jan 15, 2025

⏱️ 18m total CI duration on this PR
Job Cumulative Duration Recent Runs
check-dynamic-deps 9m 🟩🟩🟩🟩
rust-cargo-deny 5m 🟩🟩🟩
semgrep/ci 2m 🟩🟩🟩🟩
general-lints 1m 🟩🟩🟩
file_change_determinator 30s 🟩🟩🟩
permission-check 6s 🟩🟩🟩
permission-check 6s 🟩🟩🟩
check-branch-prefix 1s 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor Author

georgemitenkov commented Jan 15, 2025

@georgemitenkov georgemitenkov marked this pull request as ready for review January 15, 2025 14:42
@georgemitenkov georgemitenkov force-pushed the george/single-key-for-tag-cache branch 2 times, most recently from 4c943eb to 5240633 Compare January 16, 2025 12:19
@georgemitenkov georgemitenkov force-pushed the george/single-key-for-tag-cache branch from 5240633 to 4f0eae6 Compare January 27, 2025 10:10
@georgemitenkov georgemitenkov force-pushed the george/single-key-for-tag-cache branch 2 times, most recently from cfa2edd to c0ff83a Compare January 27, 2025 13:42
Base automatically changed from george/struct-names to main January 27, 2025 14:20
@georgemitenkov georgemitenkov force-pushed the george/single-key-for-tag-cache branch from c0ff83a to 6b96cb5 Compare January 29, 2025 14:51
@georgemitenkov georgemitenkov enabled auto-merge (squash) January 29, 2025 17:21

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 fb03839bf3428d78aca5ebf1a843cce98585161e

two traffics test: inner traffic : committed: 14952.10 txn/s, latency: 2655.86 ms, (p50: 2400 ms, p70: 2400, p90: 3600 ms, p99: 6600 ms), latency samples: 5685160
two traffics test : committed: 99.98 txn/s, latency: 2446.02 ms, (p50: 1500 ms, p70: 2200, p90: 5500 ms, p99: 7100 ms), latency samples: 1820
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 1.367, avg: 0.877", "ConsensusProposalToOrdered: max: 0.291, avg: 0.287", "ConsensusOrderedToCommit: max: 0.409, avg: 0.398", "ConsensusProposalToCommit: max: 0.698, avg: 0.686"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 1.02s no progress at version 35219 (avg 0.19s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.68s no progress at version 2876103 (avg 0.68s) [limit 16].
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on 55909aa300b714e37df1113a239332c334cb2896 ==> fb03839bf3428d78aca5ebf1a843cce98585161e

Compatibility test results for 55909aa300b714e37df1113a239332c334cb2896 ==> fb03839bf3428d78aca5ebf1a843cce98585161e (PR)
Upgrade the nodes to version: fb03839bf3428d78aca5ebf1a843cce98585161e
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1563.09 txn/s, submitted: 1570.37 txn/s, failed submission: 7.28 txn/s, expired: 7.28 txn/s, latency: 1844.51 ms, (p50: 1500 ms, p70: 2100, p90: 3000 ms, p99: 4600 ms), latency samples: 141760
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1093.38 txn/s, submitted: 1097.41 txn/s, failed submission: 4.04 txn/s, expired: 4.04 txn/s, latency: 2775.48 ms, (p50: 1800 ms, p70: 2200, p90: 8700 ms, p99: 12100 ms), latency samples: 97500
5. check swarm health
Compatibility test for 55909aa300b714e37df1113a239332c334cb2896 ==> fb03839bf3428d78aca5ebf1a843cce98585161e passed
Upgrade the remaining nodes to version: fb03839bf3428d78aca5ebf1a843cce98585161e
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1777.79 txn/s, submitted: 1783.12 txn/s, failed submission: 5.32 txn/s, expired: 5.32 txn/s, latency: 1606.67 ms, (p50: 1500 ms, p70: 1800, p90: 2300 ms, p99: 3100 ms), latency samples: 160320
Test Ok

Copy link
Contributor

✅ Forge suite compat success on 55909aa300b714e37df1113a239332c334cb2896 ==> fb03839bf3428d78aca5ebf1a843cce98585161e

Compatibility test results for 55909aa300b714e37df1113a239332c334cb2896 ==> fb03839bf3428d78aca5ebf1a843cce98585161e (PR)
1. Check liveness of validators at old version: 55909aa300b714e37df1113a239332c334cb2896
compatibility::simple-validator-upgrade::liveness-check : committed: 6152.58 txn/s, submitted: 6152.75 txn/s, expired: 0.17 txn/s, latency: 2624.47 ms, (p50: 2600 ms, p70: 2800, p90: 3400 ms, p99: 4700 ms), latency samples: 399469
2. Upgrading first Validator to new version: fb03839bf3428d78aca5ebf1a843cce98585161e
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 3706.17 txn/s, latency: 8159.39 ms, (p50: 8700 ms, p70: 9900, p90: 10500 ms, p99: 10600 ms), latency samples: 80820
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 3761.03 txn/s, latency: 9122.73 ms, (p50: 10000 ms, p70: 10300, p90: 10700 ms, p99: 10800 ms), latency samples: 135020
3. Upgrading rest of first batch to new version: fb03839bf3428d78aca5ebf1a843cce98585161e
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 3810.35 txn/s, latency: 8162.25 ms, (p50: 9000 ms, p70: 9600, p90: 9800 ms, p99: 9900 ms), latency samples: 87440
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 3789.47 txn/s, latency: 9045.87 ms, (p50: 10000 ms, p70: 10300, p90: 10600 ms, p99: 10700 ms), latency samples: 136380
4. upgrading second batch to new version: fb03839bf3428d78aca5ebf1a843cce98585161e
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 7916.56 txn/s, latency: 3890.76 ms, (p50: 4400 ms, p70: 4800, p90: 5100 ms, p99: 5200 ms), latency samples: 146160
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 7885.04 txn/s, latency: 4345.51 ms, (p50: 4700 ms, p70: 4900, p90: 5100 ms, p99: 5300 ms), latency samples: 263120
5. check swarm health
Compatibility test for 55909aa300b714e37df1113a239332c334cb2896 ==> fb03839bf3428d78aca5ebf1a843cce98585161e passed
Test Ok

@georgemitenkov georgemitenkov merged commit 9986c83 into main Jan 29, 2025
79 of 88 checks passed
@georgemitenkov georgemitenkov deleted the george/single-key-for-tag-cache branch January 29, 2025 17:59
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