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

Create object with permissioned signer #15707

Draft
wants to merge 1 commit into
base: 12-17-feature_gate_permissioned_signer
Choose a base branch
from

Conversation

runtian-zhou
Copy link
Contributor

Description

How Has This Been Tested?

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

⏱️ 3h 6m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-cargo-deny 47m 🟩🟩🟩🟩🟩 (+22 more)
check-dynamic-deps 42m 🟩🟩🟩🟩🟩 (+21 more)
rust-targeted-unit-tests 22m 🟥
rust-move-tests 16m 🟥
rust-move-tests 16m 🟥
general-lints 13m 🟩🟩🟩🟩🟩 (+22 more)
semgrep/ci 10m 🟩🟩🟩🟩🟩 (+21 more)
rust-move-tests 6m
file_change_determinator 5m 🟩🟩🟩🟩🟩 (+22 more)
rust-lints 4m 🟩
rust-move-tests 3m
rust-check-merge-base 1m 🟩
permission-check 1m 🟩🟩🟩🟩🟩 (+20 more)
permission-check 1m 🟩🟩🟩🟩🟩 (+20 more)

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

Job Duration vs 7d avg Delta
check-dynamic-deps 4m 2m +167%

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor Author

runtian-zhou commented Jan 10, 2025

@@ -446,6 +446,24 @@ module aptos_framework::permissioned_signer {
)
}

/// Grant an unlimited permission to a permissioned signer **without** master signer's approvoal.
Copy link

Choose a reason for hiding this comment

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

Typo in function comment: approvoal should be approval

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch 2 times, most recently from 66b0a0a to 5f78ed5 Compare January 10, 2025 18:58
Comment on lines +729 to +737
/// Grant a transfer permission to the permissioned signer using TransferRef.
public fun grant_permission_with_transfer_ref(
permissioned_signer: &signer,
ref: &TransferRef,
) {
permissioned_signer::grant_unlimited_with_permissioned_signer(
permissioned_signer,
TransferPermission { object: ref.self }
)
Copy link

Choose a reason for hiding this comment

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

Add spec block before function to specify abort conditions:
spec grant_permission_with_transfer_ref {
aborts_if !permissioned_signer::is_permissioned_signer(permissioned_signer) with error::permission_denied();
}

Spotted by Graphite Reviewer (based on CI logs)

Is this helpful? React 👍 or 👎 to let us know.

@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 8148ebc to dfa01cc Compare January 10, 2025 22:51
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 5f78ed5 to a1bc425 Compare January 10, 2025 22:51
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from dfa01cc to dfe7a0b Compare January 10, 2025 22:59
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from a1bc425 to 9baff65 Compare January 10, 2025 23:00
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from dfe7a0b to 1f5be33 Compare January 10, 2025 23:34
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 9baff65 to 41af726 Compare January 10, 2025 23:34
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 1f5be33 to dbdce9e Compare January 10, 2025 23:53
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 41af726 to a8d8e8e Compare January 10, 2025 23:53
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from dbdce9e to cf19520 Compare January 11, 2025 00:23
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from a8d8e8e to 5d0736d Compare January 11, 2025 00:23
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from cf19520 to d4bcfe0 Compare January 11, 2025 01:24
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 5d0736d to 164a5ac Compare January 11, 2025 01:24
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from d4bcfe0 to d88840b Compare January 11, 2025 01:58
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 164a5ac to edda220 Compare January 11, 2025 01:58
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from d88840b to 2f50393 Compare January 11, 2025 03:43
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 2ac1311 to 25aebf2 Compare January 11, 2025 05:08
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from bb44dff to eebdf27 Compare January 12, 2025 23:49
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 25aebf2 to 33583cc Compare January 12, 2025 23:49
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from eebdf27 to a44c587 Compare January 13, 2025 04:37
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 33583cc to 8a7d707 Compare January 13, 2025 04:37
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from a44c587 to 32f31d4 Compare January 13, 2025 04:40
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 8a7d707 to 1609f68 Compare January 13, 2025 04:41
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 32f31d4 to 1e46c52 Compare January 13, 2025 05:57
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 1609f68 to 57f9057 Compare January 13, 2025 05:58
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 1e46c52 to 85ff210 Compare January 13, 2025 19:08
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 57f9057 to ab206c6 Compare January 13, 2025 19:08
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 85ff210 to ce6813c Compare January 13, 2025 20:21
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from ab206c6 to 71ba998 Compare January 13, 2025 20:21
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from ce6813c to 6d151ac Compare January 13, 2025 20:31
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 71ba998 to 4d43839 Compare January 13, 2025 20:31
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 6d151ac to 75c97b0 Compare January 13, 2025 21:19
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 4d43839 to e60a1a9 Compare January 13, 2025 21:20
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 75c97b0 to 37cabc1 Compare January 13, 2025 21:44
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from e60a1a9 to 6c5a617 Compare January 13, 2025 21:45
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 37cabc1 to 3736cdb Compare January 13, 2025 22:27
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 6c5a617 to 1cfb6a4 Compare January 13, 2025 22:27
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 3736cdb to 406fd4a Compare January 13, 2025 23:12
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 1cfb6a4 to 1f5756c Compare January 13, 2025 23:13
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 406fd4a to e75f27b Compare January 14, 2025 00:24
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 1f5756c to cb04560 Compare January 14, 2025 00:24
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from e75f27b to d4fcefc Compare January 14, 2025 04:13
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from cb04560 to 4be521a Compare January 14, 2025 04:14
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from d4fcefc to 1847955 Compare January 14, 2025 16:00
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch from 4be521a to 070189b Compare January 14, 2025 16:01
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.

1 participant