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

add perimission checks to object #14582

Draft
wants to merge 1 commit into
base: 09-04-add_permission_check_to_account
Choose a base branch
from

Conversation

runtian-zhou
Copy link
Contributor

Description

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?

Key Areas to Review

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 39m 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
check-dynamic-deps 3m 🟩🟩🟩🟩
rust-move-tests 3m 🟥
semgrep/ci 2m 🟩🟩🟩🟩
file_change_determinator 48s 🟩🟩🟩🟩
file_change_determinator 43s 🟩🟩🟩🟩
permission-check 15s 🟩🟩🟩🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor Author

runtian-zhou commented Sep 10, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

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

@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
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 47e6977 to 8c769d8 Compare November 18, 2024 21:55
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 232210d to 418f0a3 Compare November 18, 2024 21:56
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 8c769d8 to 4a6a3b8 Compare November 18, 2024 22:00
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 418f0a3 to 107c66f Compare November 18, 2024 22:00
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 4a6a3b8 to dd5f835 Compare November 18, 2024 22:18
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 107c66f to 052a15c Compare November 18, 2024 22:18
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from dd5f835 to 79d54d6 Compare November 19, 2024 18:12
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 052a15c to 31f1473 Compare November 19, 2024 18:12
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 79d54d6 to 27f0fc8 Compare November 19, 2024 18:39
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 31f1473 to 3853273 Compare November 19, 2024 18:39
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 27f0fc8 to 23fff63 Compare November 19, 2024 19:24
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 3853273 to b3898d7 Compare November 19, 2024 19:24
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 23fff63 to f9a83e7 Compare November 19, 2024 21:23
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from b3898d7 to ead6327 Compare November 19, 2024 21:23
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from f9a83e7 to 07cad53 Compare November 20, 2024 20:25
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from ead6327 to 7f150e2 Compare November 20, 2024 20:25
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 07cad53 to ec2c261 Compare November 20, 2024 21:02
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 7f150e2 to 12eac30 Compare November 20, 2024 21:02
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from ec2c261 to 6bddfa8 Compare November 21, 2024 18:01
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 12eac30 to cd44e31 Compare November 21, 2024 18:01
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 6bddfa8 to 7754575 Compare November 22, 2024 08:06
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from cd44e31 to 1892e08 Compare November 22, 2024 08:06
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 7754575 to 2bd6008 Compare November 22, 2024 08:47
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 1892e08 to 930dbda Compare November 22, 2024 08:47
@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 2bd6008 to 1c1bb56 Compare November 22, 2024 21:30
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 930dbda to 4afdbd5 Compare November 22, 2024 21:30
Comment on lines +72 to +74
struct TokenUpdatePermission has copy, drop, store {
token_address: address,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whether we want it here or not, from expressiviness of permissions model, we should think of how would it be implemented to have either a global permission to update all tokens, or a specific permission to update a concrete object.

in that case would these be enums, we would be checking both against? or something else more concrete with permissioned_signer?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second I don't think this is the file you want to be adding permissions to - this is an example implementation of tokens on aptos.
aptos-move/framework/aptos-token-objects/sources/token.move and collection.move are the right places

@runtian-zhou runtian-zhou force-pushed the 09-04-add_permission_check_to_account branch from 1c1bb56 to efd81cc Compare November 25, 2024 20:04
@runtian-zhou runtian-zhou force-pushed the 09-09-add_perimission_checks_to_object branch from 4afdbd5 to fab2669 Compare November 25, 2024 20:04
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.

2 participants