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

[feature] Add permissioned signer functionality #14521

Merged

Conversation

runtian-zhou
Copy link
Contributor

@runtian-zhou runtian-zhou commented Sep 4, 2024

Description

Implement rust extension for the permissioned signer, including the new ser/de logic.

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
  • Other (specify)

How Has This Been Tested?

This will be tested with future PRs. Also a replay-verify is executed to make sure this feature is not breaking.

Key Areas to Review

We still need to keep the old serialization logic in the bcs module because it can otherwise cause on chain divergence.

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 Sep 4, 2024

⏱️ 3h 36m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
rust-move-unit-coverage 19m 🟩
rust-move-unit-coverage 18m 🟩
rust-cargo-deny 17m 🟩🟩🟩🟩🟩 (+4 more)
general-lints 15m 🟩🟩🟩🟩🟩 (+4 more)
rust-move-unit-coverage 14m 🟩
rust-move-unit-coverage 14m 🟩
rust-move-tests 13m 🟩
rust-move-unit-coverage 11m 🟩
rust-move-tests 9m 🟥
rust-move-tests 9m 🟥
rust-move-tests 9m 🟥
rust-move-tests 9m 🟥
rust-move-tests 9m 🟥
rust-move-tests 8m 🟥
check-dynamic-deps 8m 🟩🟩🟩🟩🟩 (+3 more)

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

Job Duration vs 7d avg Delta
general-lints 29s 2m -73%

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor Author

runtian-zhou commented Sep 4, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 85.80247% with 23 lines in your changes missing coverage. Please review.

Project coverage is 60.1%. Comparing base (e7391d6) to head (7c5a356).

Files with missing lines Patch % Lines
...party/move/move-vm/types/src/values/values_impl.rs 75.0% 13 Missing ⚠️
...-move/framework/src/natives/permissioned_signer.rs 94.2% 3 Missing ⚠️
...rd_party/move/move-compiler-v2/src/plan_builder.rs 50.0% 3 Missing ⚠️
third_party/move/move-vm/types/src/value_serde.rs 40.0% 3 Missing ⚠️
third_party/move/move-core/types/src/value.rs 92.8% 1 Missing ⚠️
Additional details and impacted files
@@                            Coverage Diff                             @@
##           08-29-create_permissioned_signer_example   #14521    +/-   ##
==========================================================================
  Coverage                                      60.1%    60.1%            
==========================================================================
  Files                                           856      857     +1     
  Lines                                        211026   210762   -264     
==========================================================================
- Hits                                         126865   126723   -142     
+ Misses                                        84161    84039   -122     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@runtian-zhou runtian-zhou force-pushed the 08-29-create_permissioned_signer_example branch from 456f5f4 to 55771fc Compare September 4, 2024 20:29
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from 31c9b2c to 6d309ff Compare September 4, 2024 20:30
@runtian-zhou runtian-zhou force-pushed the 08-29-create_permissioned_signer_example branch from 55771fc to 070a951 Compare September 5, 2024 00:41
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from 6d309ff to 703921b Compare September 5, 2024 00:41
@runtian-zhou runtian-zhou mentioned this pull request Sep 5, 2024
10 tasks
@runtian-zhou runtian-zhou force-pushed the 08-29-create_permissioned_signer_example branch from 070a951 to b832d3d Compare September 9, 2024 07:08
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from 703921b to 48991ff Compare September 9, 2024 07:08
@runtian-zhou runtian-zhou force-pushed the 08-29-create_permissioned_signer_example branch from b832d3d to 6ddb481 Compare September 9, 2024 07:46
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from 48991ff to 906c7c7 Compare September 9, 2024 07:47
@runtian-zhou runtian-zhou force-pushed the 08-29-create_permissioned_signer_example branch from 6ddb481 to 8b92b98 Compare September 9, 2024 17:09
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from 906c7c7 to 350db4c Compare September 9, 2024 17:09
@runtian-zhou runtian-zhou force-pushed the 08-29-create_permissioned_signer_example branch from 8b92b98 to fa646c8 Compare September 10, 2024 17:24
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from 350db4c to dad258f Compare September 10, 2024 17:25
@runtian-zhou runtian-zhou force-pushed the 08-29-create_permissioned_signer_example branch from fa646c8 to c3aba3a Compare September 10, 2024 17:29
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from dad258f to 6b4da66 Compare September 10, 2024 17:29
@runtian-zhou runtian-zhou force-pushed the 08-29-create_permissioned_signer_example branch from c3aba3a to 50b556b Compare September 12, 2024 01:49
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from 6b4da66 to b1fd015 Compare September 12, 2024 01:50
@runtian-zhou runtian-zhou mentioned this pull request Sep 12, 2024
21 tasks
@runtian-zhou runtian-zhou force-pushed the 08-29-create_permissioned_signer_example branch from 50b556b to 8cd68d5 Compare September 17, 2024 05:08
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from b1fd015 to 6592c01 Compare September 17, 2024 05:08
@lightmark lightmark changed the title Implement rust logics for permissioned signer [feature] Add permissioned signer functionality Sep 17, 2024
@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch 3 times, most recently from 1835d3d to 42decc7 Compare September 18, 2024 17:52

This comment has been minimized.

@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from 23524b5 to 20fa44c Compare January 14, 2025 22:34

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.

This comment has been minimized.

This comment has been minimized.

@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch 2 times, most recently from 74f33c1 to fd6ef05 Compare January 14, 2025 23:41

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from fd6ef05 to 6c56a97 Compare January 15, 2025 00:02

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@runtian-zhou runtian-zhou force-pushed the 09-04-implement_rust_logics_for_permissioned_signer branch from 6c56a97 to 95d2640 Compare January 15, 2025 00:34

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 95d26400d153376262e565bb20387211fe4ae587

two traffics test: inner traffic : committed: 14614.89 txn/s, latency: 2717.82 ms, (p50: 2700 ms, p70: 2700, p90: 3000 ms, p99: 3900 ms), latency samples: 5556880
two traffics test : committed: 99.97 txn/s, latency: 1383.10 ms, (p50: 1300 ms, p70: 1400, p90: 1500 ms, p99: 1600 ms), latency samples: 1840
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 1.616, avg: 1.561", "ConsensusProposalToOrdered: max: 0.293, avg: 0.290", "ConsensusOrderedToCommit: max: 0.328, avg: 0.317", "ConsensusProposalToCommit: max: 0.620, avg: 0.607"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.55s no progress at version 42592 (avg 0.19s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.56s no progress at version 5462840 (avg 0.55s) [limit 16].
Test Ok

Copy link
Contributor

✅ Forge suite compat success on 6593fb81261f25490ffddc2252a861c994234c2a ==> 95d26400d153376262e565bb20387211fe4ae587

Compatibility test results for 6593fb81261f25490ffddc2252a861c994234c2a ==> 95d26400d153376262e565bb20387211fe4ae587 (PR)
1. Check liveness of validators at old version: 6593fb81261f25490ffddc2252a861c994234c2a
compatibility::simple-validator-upgrade::liveness-check : committed: 17796.75 txn/s, latency: 1968.88 ms, (p50: 2100 ms, p70: 2100, p90: 2200 ms, p99: 2400 ms), latency samples: 572380
2. Upgrading first Validator to new version: 95d26400d153376262e565bb20387211fe4ae587
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 4745.99 txn/s, latency: 6512.07 ms, (p50: 7300 ms, p70: 7800, p90: 8200 ms, p99: 8300 ms), latency samples: 96560
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 4742.94 txn/s, latency: 7200.56 ms, (p50: 8000 ms, p70: 8200, p90: 8300 ms, p99: 8500 ms), latency samples: 168940
3. Upgrading rest of first batch to new version: 95d26400d153376262e565bb20387211fe4ae587
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 4985.72 txn/s, latency: 6201.77 ms, (p50: 6800 ms, p70: 7600, p90: 7900 ms, p99: 7900 ms), latency samples: 98160
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 5022.10 txn/s, latency: 6881.66 ms, (p50: 7600 ms, p70: 7700, p90: 7900 ms, p99: 7900 ms), latency samples: 176320
4. upgrading second batch to new version: 95d26400d153376262e565bb20387211fe4ae587
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 9147.39 txn/s, latency: 3361.49 ms, (p50: 4000 ms, p70: 4100, p90: 4200 ms, p99: 4300 ms), latency samples: 163320
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 8994.80 txn/s, latency: 3787.94 ms, (p50: 4100 ms, p70: 4200, p90: 4300 ms, p99: 4500 ms), latency samples: 294260
5. check swarm health
Compatibility test for 6593fb81261f25490ffddc2252a861c994234c2a ==> 95d26400d153376262e565bb20387211fe4ae587 passed
Test Ok

@runtian-zhou runtian-zhou merged commit 842bb85 into main Jan 15, 2025
46 checks passed
@runtian-zhou runtian-zhou deleted the 09-04-implement_rust_logics_for_permissioned_signer branch January 15, 2025 01:07
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.

5 participants