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

[object] Add permissioned checks to object #14582

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

runtian-zhou
Copy link
Contributor

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

Description

Adds permissioned signer support for object transfers and token/collection mutations in the Aptos Framework. This change introduces new permission types and validation checks to ensure only authorized signers can perform transfers and mutations on objects, tokens and collections.

Type of Change

  • New feature
  • Aptos Framework

Which Components or Systems Does This Change Impact?

  • Move/Aptos Virtual Machine
  • Aptos Framework

How Has This Been Tested?

Added new test cases in object.move and aptos_token.move to verify permissioned signer functionality for transfers and mutations.

Key Areas to Review

  • New permission types added: TransferPermission, TokenUpdatePermission, CollectionUpdatePermission
  • Permission validation checks in transfer and mutation operations
  • Integration with existing permissioned_signer module
  • Authorization and revocation flows for token/collection mutations

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 10, 2024

⏱️ 1h 45m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
rust-move-unit-coverage 18m 🟩
rust-move-unit-coverage 14m 🟩
rust-move-unit-coverage 14m 🟩
rust-move-tests 10m 🟥
rust-move-tests 9m 🟥
general-lints 7m 🟩🟩🟩🟩
rust-cargo-deny 7m 🟩🟩🟩🟩
rust-move-tests 5m
rust-move-unit-coverage 5m
execution-performance / test-target-determinator 5m 🟩
check-dynamic-deps 4m 🟩🟩🟩🟩🟩 (+1 more)
rust-move-tests 3m 🟥
semgrep/ci 2m 🟩🟩🟩🟩🟩 (+1 more)
file_change_determinator 48s 🟩🟩🟩🟩
file_change_determinator 43s 🟩🟩🟩🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor Author

runtian-zhou commented Sep 10, 2024

@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from da28781 to 006ad4c Compare September 10, 2024 17:29
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 381be20 to 6a1fe6d Compare September 10, 2024 17:30
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.4%. Comparing base (0161bbf) to head (2431b7b).

Additional details and impacted files
@@                          Coverage Diff                           @@
##           09-04-add_permission_check_to_account   #14582   +/-   ##
======================================================================
  Coverage                                   59.4%    59.4%           
======================================================================
  Files                                        857      857           
  Lines                                     210762   210762           
======================================================================
  Hits                                      125197   125197           
  Misses                                     85565    85565           

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

@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 006ad4c to ef7abd3 Compare September 12, 2024 01:50
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 6a1fe6d to 9037ce3 Compare September 12, 2024 01:50
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from ef7abd3 to c38c2dd Compare September 17, 2024 05:09
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 9037ce3 to 843150a Compare September 17, 2024 05:09
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from c38c2dd to 95b6704 Compare September 17, 2024 21:23
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 843150a to 33a73d7 Compare September 17, 2024 21:23
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 95b6704 to 7394967 Compare September 18, 2024 06:23
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 33a73d7 to 9123ceb Compare September 18, 2024 06:23
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 7394967 to a091794 Compare September 18, 2024 17:52
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 9123ceb to 206e782 Compare September 18, 2024 17:52
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from a091794 to 67163ae Compare September 19, 2024 00:35
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 206e782 to 9c81c83 Compare September 19, 2024 00:35
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 67163ae to f10a3b3 Compare September 19, 2024 08:09
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 9c81c83 to 75362c4 Compare September 19, 2024 08:09
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from f10a3b3 to 5c9396f Compare October 4, 2024 20:56
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 75362c4 to 86c07b1 Compare October 4, 2024 20:57
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 5c9396f to 9935539 Compare October 5, 2024 01:54
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 86c07b1 to 0573a7b Compare October 5, 2024 01:54
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 9935539 to b927c02 Compare October 5, 2024 02:25
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 0573a7b to 6a446be Compare October 5, 2024 02:25

This comment has been minimized.

@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from b45959f to 4dbfcfa Compare January 15, 2025 20:20

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-09-add_perimission_checks_to_object branch from 4dbfcfa to 5c551bf Compare January 15, 2025 21:12

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.

* Create object with permissioned signer

* Update permissioned_signer.move

* Update permissioned_signer.move
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from eb4b8f1 to e4a9607 Compare January 15, 2025 23:44

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.

Copy link
Contributor

✅ Forge suite compat success on f69dc31b0f674662b6bfa941dc7eee9ce9035e29 ==> 764b8d439d5e433f104d8f8a1e96677b17978000

Compatibility test results for f69dc31b0f674662b6bfa941dc7eee9ce9035e29 ==> 764b8d439d5e433f104d8f8a1e96677b17978000 (PR)
1. Check liveness of validators at old version: f69dc31b0f674662b6bfa941dc7eee9ce9035e29
compatibility::simple-validator-upgrade::liveness-check : committed: 15541.45 txn/s, latency: 2020.79 ms, (p50: 2000 ms, p70: 2100, p90: 2800 ms, p99: 3800 ms), latency samples: 505400
2. Upgrading first Validator to new version: 764b8d439d5e433f104d8f8a1e96677b17978000
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 4939.96 txn/s, latency: 6239.12 ms, (p50: 7000 ms, p70: 7500, p90: 7800 ms, p99: 7800 ms), latency samples: 98060
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 4803.85 txn/s, latency: 7082.98 ms, (p50: 7800 ms, p70: 7800, p90: 7800 ms, p99: 8000 ms), latency samples: 174240
3. Upgrading rest of first batch to new version: 764b8d439d5e433f104d8f8a1e96677b17978000
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 5210.14 txn/s, latency: 5940.44 ms, (p50: 6700 ms, p70: 7200, p90: 7300 ms, p99: 7400 ms), latency samples: 101660
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 5102.72 txn/s, latency: 6749.15 ms, (p50: 7400 ms, p70: 7500, p90: 7500 ms, p99: 7700 ms), latency samples: 177600
4. upgrading second batch to new version: 764b8d439d5e433f104d8f8a1e96677b17978000
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 9357.95 txn/s, latency: 3275.23 ms, (p50: 3900 ms, p70: 4000, p90: 4100 ms, p99: 4300 ms), latency samples: 165280
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 9309.28 txn/s, latency: 3680.68 ms, (p50: 4000 ms, p70: 4100, p90: 4200 ms, p99: 4400 ms), latency samples: 305580
5. check swarm health
Compatibility test for f69dc31b0f674662b6bfa941dc7eee9ce9035e29 ==> 764b8d439d5e433f104d8f8a1e96677b17978000 passed
Test Ok

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 764b8d439d5e433f104d8f8a1e96677b17978000

two traffics test: inner traffic : committed: 14962.43 txn/s, submitted: 14962.58 txn/s, expired: 0.16 txn/s, latency: 2654.76 ms, (p50: 2700 ms, p70: 2700, p90: 2700 ms, p99: 3600 ms), latency samples: 5689020
two traffics test : committed: 99.97 txn/s, latency: 1282.61 ms, (p50: 1300 ms, p70: 1300, p90: 1500 ms, p99: 3100 ms), latency samples: 1840
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 1.640, avg: 1.487", "ConsensusProposalToOrdered: max: 0.297, avg: 0.289", "ConsensusOrderedToCommit: max: 0.303, avg: 0.295", "ConsensusProposalToCommit: max: 0.598, avg: 0.585"]
Max non-epoch-change gap was: 1 rounds at version 6239624 (avg 0.00) [limit 4], 1.88s no progress at version 6239624 (avg 0.19s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.57s no progress at version 2985208 (avg 0.57s) [limit 16].
Test Ok

@runtian-zhou runtian-zhou merged commit 6d13ea8 into main Jan 16, 2025
46 checks passed
@runtian-zhou runtian-zhou deleted the 09-09-add_perimission_checks_to_object branch January 16, 2025 01:03
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