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 another flavor of permission api #15609

Draft
wants to merge 10 commits into
base: 01-10-create_object_with_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 Dec 16, 2024

⏱️ 1h 28m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-move-tests 14m 🟩
rust-move-tests 13m 🟩
rust-move-tests 13m 🟩
rust-cargo-deny 12m 🟩🟩🟩🟩🟩 (+2 more)
rust-move-tests 8m 🟥
rust-move-tests 8m 🟥
check-dynamic-deps 7m 🟩🟩🟩🟩🟩 (+2 more)
general-lints 3m 🟩🟩🟩🟩🟩 (+2 more)
semgrep/ci 3m 🟩🟩🟩🟩🟩 (+2 more)
rust-move-tests 3m 🟥
rust-move-tests 3m 🟥
file_change_determinator 1m 🟩🟩🟩🟩🟩 (+2 more)
permission-check 23s 🟩🟩🟩🟩🟩 (+2 more)
permission-check 21s 🟩🟩🟩🟩🟩 (+2 more)
check-branch-prefix 1s 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor Author

runtian-zhou commented Dec 16, 2024

@runtian-zhou runtian-zhou mentioned this pull request Dec 16, 2024
7 tasks
@runtian-zhou runtian-zhou force-pushed the 10-09-create_benchmark branch from 16346c7 to fc085a0 Compare December 16, 2024 09:29
@runtian-zhou runtian-zhou force-pushed the 12-15-add_another_flavor_of_permission_api branch from be4ea04 to 46ddd6f Compare December 16, 2024 09:30
@runtian-zhou runtian-zhou force-pushed the 10-09-create_benchmark branch from fc085a0 to 6a2e87a Compare December 16, 2024 09:53
@runtian-zhou runtian-zhou force-pushed the 12-15-add_another_flavor_of_permission_api branch from 46ddd6f to 0ee1c8c Compare December 16, 2024 09:53
@runtian-zhou runtian-zhou force-pushed the 10-09-create_benchmark branch from 6a2e87a to a5e92c0 Compare December 17, 2024 02:28
@runtian-zhou runtian-zhou force-pushed the 12-15-add_another_flavor_of_permission_api branch from 0ee1c8c to 851da1d Compare December 17, 2024 02:28
@runtian-zhou runtian-zhou force-pushed the 10-09-create_benchmark branch from a5e92c0 to 60ce91a Compare December 17, 2024 12:02
@runtian-zhou runtian-zhou force-pushed the 12-15-add_another_flavor_of_permission_api branch 2 times, most recently from e06ec0c to dd67295 Compare December 17, 2024 15:19
@runtian-zhou runtian-zhou changed the base branch from 10-09-create_benchmark to 12-17-feature_gate_permissioned_signer December 17, 2024 15:19
Comment on lines +618 to +642
if (perm.key != perm_key) {
return false
};
Copy link

Choose a reason for hiding this comment

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

The generic type parameter PermKey only requires copy + drop + store abilities, but the code uses the != operator which may not be supported for all possible types satisfying these constraints. To ensure type safety, consider either:

  1. Adding drop + copy + store + has[std::cmp::Eq] as the ability constraint for PermKey, or
  2. Using a dedicated comparison function that's guaranteed to work for the intended key types

This will prevent potential runtime errors when comparing complex key types that don't implement equality comparison.

Spotted by Graphite Reviewer

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

@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 6494f73 to 2bd4613 Compare December 18, 2024 07:37
@runtian-zhou runtian-zhou force-pushed the 12-15-add_another_flavor_of_permission_api branch from dd67295 to 287f491 Compare December 18, 2024 07:38
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 2bd4613 to 472be55 Compare January 8, 2025 23:56
@runtian-zhou runtian-zhou force-pushed the 12-15-add_another_flavor_of_permission_api branch from 287f491 to 9bb1d3b Compare January 8, 2025 23:56
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 472be55 to 18a8c9a Compare January 9, 2025 00:55
@runtian-zhou runtian-zhou force-pushed the 12-15-add_another_flavor_of_permission_api branch from 9bb1d3b to 84b19ea Compare January 9, 2025 00:56
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 18a8c9a to 015bf33 Compare January 9, 2025 03:44
@runtian-zhou runtian-zhou force-pushed the 12-15-add_another_flavor_of_permission_api branch from 84b19ea to 646097a Compare January 9, 2025 03:44
@runtian-zhou runtian-zhou force-pushed the 12-17-feature_gate_permissioned_signer branch from 015bf33 to f9ea87a Compare January 9, 2025 07:58
@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-15-add_another_flavor_of_permission_api branch from 739bfca to 2a1750a Compare January 12, 2025 23:49
@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-15-add_another_flavor_of_permission_api branch from 2a1750a to 7dd36e4 Compare January 13, 2025 04:38
@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-15-add_another_flavor_of_permission_api branch from 7dd36e4 to 22808b2 Compare January 13, 2025 04:41
@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-15-add_another_flavor_of_permission_api branch from 22808b2 to 5088c6b Compare January 13, 2025 05:58
@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-15-add_another_flavor_of_permission_api branch from 5088c6b to 2d6de53 Compare January 13, 2025 19:08
@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-15-add_another_flavor_of_permission_api branch from 2d6de53 to dc92d66 Compare January 13, 2025 20:22
@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-15-add_another_flavor_of_permission_api branch from dc92d66 to 88c3201 Compare January 13, 2025 20:31
@runtian-zhou runtian-zhou force-pushed the 01-10-create_object_with_permissioned_signer branch 6 times, most recently from cb04560 to 4be521a Compare January 14, 2025 04:14
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