aptos-core
aptos-core copied to clipboard
feat: Batch Vote Func
Description
This PR adds batch voting functionalities for Aptos governance so voters can vote with multiple stake pools in a single transaction.
Type of Change
- [x] 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
- [x] Aptos Framework
- [ ] Aptos CLI/SDK
- [ ] Developer Infrastructure
- [ ] Other (specify)
How Has This Been Tested?
Unit tests
Checklist
- [x] I have read and followed the CONTRIBUTING doc
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I identified and added all stakeholders and component owners affected by this change as reviewers
- [x] I tested both happy and unhappy path of the functionality
⏱️ 28s total CI duration on this PR
| Job | Cumulative Duration | Recent Runs |
|---|---|---|
| permission-check | 9s | 🟥 🟥 |
| permission-check | 8s | 🟥 🟥 |
| permission-check | 6s | 🟥 🟥 |
| permission-check | 5s | 🟥 🟥 |
LGTM, overall! I left one comment about replacing
partial_votewithvote_internalfor consistency and efficiency.If it fails for one
stake_pool, the entire function call will fail. Is that fine, or do we want to forgive those failures of some individual stake pools? (@movekevin )
It's not possible since there's no try catch anyway
Forge is running suite framework_upgrade on a68e71c05caebf01504d4499110f3fba213fb53d ==> 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
Forge is running suite compat on a68e71c05caebf01504d4499110f3fba213fb53d ==> 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
Forge is running suite realistic_env_max_load on 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite compat success on a68e71c05caebf01504d4499110f3fba213fb53d ==> 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
Compatibility test results for a68e71c05caebf01504d4499110f3fba213fb53d ==> 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd (PR)
1. Check liveness of validators at old version: a68e71c05caebf01504d4499110f3fba213fb53d
compatibility::simple-validator-upgrade::liveness-check : committed: 8321.674675563565 txn/s, latency: 3377.0537244693633 ms, (p50: 2700 ms, p90: 4100 ms, p99: 23200 ms), latency samples: 349580
2. Upgrading first Validator to new version: 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 2136.162657504432 txn/s, latency: 14175.273824561404 ms, (p50: 13600 ms, p90: 23000 ms, p99: 24600 ms), latency samples: 85500
3. Upgrading rest of first batch to new version: 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 3342.1479848104777 txn/s, latency: 9225.05058722429 ms, (p50: 9100 ms, p90: 13900 ms, p99: 14200 ms), latency samples: 139640
4. upgrading second batch to new version: 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 6390.698264750706 txn/s, latency: 5082.49396660764 ms, (p50: 4800 ms, p90: 8500 ms, p99: 9600 ms), latency samples: 237180
5. check swarm health
Compatibility test for a68e71c05caebf01504d4499110f3fba213fb53d ==> 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd passed
Test Ok
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite realistic_env_max_load success on 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
two traffics test: inner traffic : committed: 8442.21416762154 txn/s, latency: 4646.3687302397575 ms, (p50: 4500 ms, p90: 5400 ms, p99: 10200 ms), latency samples: 3643680
two traffics test : committed: 99.97802620770126 txn/s, latency: 1871.788953488372 ms, (p50: 1800 ms, p90: 2100 ms, p99: 2400 ms), latency samples: 1720
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.219, avg: 0.208", "QsPosToProposal: max: 0.213, avg: 0.199", "ConsensusProposalToOrdered: max: 0.424, avg: 0.404", "ConsensusOrderedToCommit: max: 0.398, avg: 0.389", "ConsensusProposalToCommit: max: 0.803, avg: 0.793"]
Max round gap was 1 [limit 4] at version 1834062. Max no progress secs was 4.951443 [limit 15] at version 1834062.
Test Ok
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite framework_upgrade success on a68e71c05caebf01504d4499110f3fba213fb53d ==> 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
Compatibility test results for a68e71c05caebf01504d4499110f3fba213fb53d ==> 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd (PR)
Upgrade the nodes to version: 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1248.5722930634938 txn/s, submitted: 1249.8053291024662 txn/s, failed submission: 1.233036038972441 txn/s, expired: 1.233036038972441 txn/s, latency: 2680.7432451115938 ms, (p50: 2100 ms, p90: 4800 ms, p99: 9800 ms), latency samples: 101260
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1102.327049908723 txn/s, submitted: 1104.5975484667224 txn/s, failed submission: 2.2704985579994292 txn/s, expired: 2.2704985579994292 txn/s, latency: 2747.1529660144183 ms, (p50: 2100 ms, p90: 5100 ms, p99: 8400 ms), latency samples: 97100
5. check swarm health
Compatibility test for a68e71c05caebf01504d4499110f3fba213fb53d ==> 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd passed
Upgrade the remaining nodes to version: 63ee8e4b35e31de3369416ea0ea8d05e9591f2dd
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1114.0706211544143 txn/s, submitted: 1116.9020811886287 txn/s, failed submission: 2.8314600342145426 txn/s, expired: 2.8314600342145426 txn/s, latency: 2823.606089931574 ms, (p50: 2100 ms, p90: 5100 ms, p99: 10200 ms), latency samples: 102300
Test Ok
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
Forge is running suite realistic_env_max_load on 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
Forge is running suite framework_upgrade on a68e71c05caebf01504d4499110f3fba213fb53d ==> 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
Forge is running suite compat on a68e71c05caebf01504d4499110f3fba213fb53d ==> 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
- Grafana dashboard (auto-refresh)
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite compat success on a68e71c05caebf01504d4499110f3fba213fb53d ==> 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
Compatibility test results for a68e71c05caebf01504d4499110f3fba213fb53d ==> 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14 (PR)
1. Check liveness of validators at old version: a68e71c05caebf01504d4499110f3fba213fb53d
compatibility::simple-validator-upgrade::liveness-check : committed: 10239.304273614984 txn/s, latency: 3217.674045780008 ms, (p50: 2400 ms, p90: 6600 ms, p99: 12000 ms), latency samples: 354740
2. Upgrading first Validator to new version: 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 3262.6910204275196 txn/s, latency: 9443.753387290168 ms, (p50: 9200 ms, p90: 13900 ms, p99: 14200 ms), latency samples: 133440
3. Upgrading rest of first batch to new version: 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 3338.262849828192 txn/s, latency: 9311.611451751867 ms, (p50: 9400 ms, p90: 14000 ms, p99: 14400 ms), latency samples: 139280
4. upgrading second batch to new version: 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 4496.7982222245255 txn/s, latency: 7221.468770422365 ms, (p50: 6600 ms, p90: 11500 ms, p99: 16000 ms), latency samples: 165260
5. check swarm health
Compatibility test for a68e71c05caebf01504d4499110f3fba213fb53d ==> 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14 passed
Test Ok
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite realistic_env_max_load success on 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
two traffics test: inner traffic : committed: 8494.403163987921 txn/s, latency: 4607.15212105409 ms, (p50: 4500 ms, p90: 6300 ms, p99: 9600 ms), latency samples: 3681660
two traffics test : committed: 100.01627361913768 txn/s, latency: 1947.1550561797753 ms, (p50: 1900 ms, p90: 2100 ms, p99: 6100 ms), latency samples: 1780
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.213, avg: 0.205", "QsPosToProposal: max: 0.221, avg: 0.209", "ConsensusProposalToOrdered: max: 0.412, avg: 0.404", "ConsensusOrderedToCommit: max: 0.349, avg: 0.336", "ConsensusProposalToCommit: max: 0.756, avg: 0.741"]
Max round gap was 1 [limit 4] at version 1781925. Max no progress secs was 5.036272 [limit 15] at version 1781925.
Test Ok
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking
:white_check_mark: Forge suite framework_upgrade success on a68e71c05caebf01504d4499110f3fba213fb53d ==> 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
Compatibility test results for a68e71c05caebf01504d4499110f3fba213fb53d ==> 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14 (PR)
Upgrade the nodes to version: 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1033.404327869105 txn/s, submitted: 1036.0043845037253 txn/s, failed submission: 2.6000566346203464 txn/s, expired: 2.6000566346203464 txn/s, latency: 3014.6827081427264 ms, (p50: 2400 ms, p90: 5400 ms, p99: 9400 ms), latency samples: 87440
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1034.336545891255 txn/s, submitted: 1035.8896037679685 txn/s, failed submission: 1.5530578767135959 txn/s, expired: 1.5530578767135959 txn/s, latency: 2919.3310381810384 ms, (p50: 2100 ms, p90: 5400 ms, p99: 8400 ms), latency samples: 93240
5. check swarm health
Compatibility test for a68e71c05caebf01504d4499110f3fba213fb53d ==> 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14 passed
Upgrade the remaining nodes to version: 86e6c490a1de1ba6c0c3bb0c89efd6a1765f8d14
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1135.6046072262698 txn/s, submitted: 1139.5260531581905 txn/s, failed submission: 3.9214459319208985 txn/s, expired: 3.9214459319208985 txn/s, latency: 2685.3773207393865 ms, (p50: 2100 ms, p90: 4800 ms, p99: 8400 ms), latency samples: 98460
Test Ok
- Grafana dashboard
- Humio Logs
- Axiom Logs
- Validator CPU Profile
- Fullnode CPU Profile
- Test runner output
- Test run is land-blocking