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

[framework] Add ability to destroy caps from a managed coin #14758

Merged

Conversation

gregnazario
Copy link
Contributor

Description

Managed coins are stuck forever, where all three capabilities are always accessible. This can cause some issues if someone who set it up originally, wanted to no longer allow burning or minting of the coin.

This PR allows you to destroy this ability, or store it elsewhere and choose which to destroy.

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

⏱️ 2h 38m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
execution-performance / single-node-performance 46m 🟩🟩
rust-move-unit-coverage 15m 🟩
rust-move-unit-coverage 11m 🟩
rust-move-unit-coverage 10m 🟩
rust-move-tests 10m 🟩
rust-move-tests 9m 🟥
rust-move-tests 9m 🟩
execution-performance / test-target-determinator 9m 🟩🟩
check-dynamic-deps 8m 🟩🟩🟩🟩🟩
rust-cargo-deny 6m 🟩🟩🟩
test-target-determinator 5m 🟩
rust-doc-tests 5m 🟩
check 4m 🟩
semgrep/ci 2m 🟩🟩🟩🟩🟩
general-lints 2m 🟩🟩🟩🟩

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

Job Duration vs 7d avg Delta
check-dynamic-deps 2m 1m +89%

settingsfeedbackdocs ⋅ learn more about trunk.io

@gregnazario gregnazario force-pushed the add-ability-to-stop-managed-coin branch from 8965afd to 46f6b0d Compare September 26, 2024 19:34
@gregnazario gregnazario force-pushed the add-ability-to-stop-managed-coin branch from 46f6b0d to 5fb05ee Compare October 2, 2024 18:07
@gregnazario gregnazario enabled auto-merge (squash) October 2, 2024 18:08
): (BurnCapability<CoinType>, FreezeCapability<CoinType>, MintCapability<CoinType>) acquires Capabilities {
let account_addr = signer::address_of(account);
assert!(
exists<Capabilities<CoinType>>(account_addr),
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to have a public function to view if Capabilities exists in an address.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Oct 2, 2024

✅ Forge suite realistic_env_max_load success on 80c411312dbe963a0586e42130564688388d45a2

two traffics test: inner traffic : committed: 11816.76 txn/s, latency: 3360.85 ms, (p50: 3000 ms, p70: 3300, p90: 4200 ms, p99: 7200 ms), latency samples: 4493060
two traffics test : committed: 100.02 txn/s, latency: 2910.86 ms, (p50: 2500 ms, p70: 2700, p90: 3700 ms, p99: 11100 ms), latency samples: 1840
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.242, avg: 0.222", "QsPosToProposal: max: 0.603, avg: 0.479", "ConsensusProposalToOrdered: max: 0.337, avg: 0.324", "ConsensusOrderedToCommit: max: 0.507, avg: 0.470", "ConsensusProposalToCommit: max: 0.840, avg: 0.794"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.86s no progress at version 16776 (avg 0.23s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 8.36s no progress at version 2392982 (avg 8.36s) [limit 15].
Test Ok

Copy link
Contributor

github-actions bot commented Oct 2, 2024

✅ Forge suite compat success on 628e88b8a1971b4986dfb2b88ec763090f85c82f ==> 80c411312dbe963a0586e42130564688388d45a2

Compatibility test results for 628e88b8a1971b4986dfb2b88ec763090f85c82f ==> 80c411312dbe963a0586e42130564688388d45a2 (PR)
1. Check liveness of validators at old version: 628e88b8a1971b4986dfb2b88ec763090f85c82f
compatibility::simple-validator-upgrade::liveness-check : committed: 12492.43 txn/s, latency: 2325.53 ms, (p50: 2100 ms, p70: 2200, p90: 2500 ms, p99: 10300 ms), latency samples: 486040
2. Upgrading first Validator to new version: 80c411312dbe963a0586e42130564688388d45a2
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 7471.62 txn/s, latency: 3718.39 ms, (p50: 3900 ms, p70: 4400, p90: 5000 ms, p99: 5300 ms), latency samples: 137860
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 7106.05 txn/s, latency: 4570.99 ms, (p50: 4800 ms, p70: 5000, p90: 6200 ms, p99: 6700 ms), latency samples: 239940
3. Upgrading rest of first batch to new version: 80c411312dbe963a0586e42130564688388d45a2
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 5967.32 txn/s, latency: 4756.86 ms, (p50: 5100 ms, p70: 5800, p90: 6200 ms, p99: 6300 ms), latency samples: 112200
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 5724.69 txn/s, latency: 5679.35 ms, (p50: 6100 ms, p70: 6300, p90: 6600 ms, p99: 7000 ms), latency samples: 192860
4. upgrading second batch to new version: 80c411312dbe963a0586e42130564688388d45a2
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 10822.45 txn/s, latency: 2533.28 ms, (p50: 2800 ms, p70: 2900, p90: 3000 ms, p99: 3100 ms), latency samples: 188920
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 11298.05 txn/s, latency: 2772.73 ms, (p50: 2700 ms, p70: 2900, p90: 3200 ms, p99: 4900 ms), latency samples: 362120
5. check swarm health
Compatibility test for 628e88b8a1971b4986dfb2b88ec763090f85c82f ==> 80c411312dbe963a0586e42130564688388d45a2 passed
Test Ok

Copy link
Contributor

github-actions bot commented Oct 2, 2024

✅ Forge suite framework_upgrade success on 628e88b8a1971b4986dfb2b88ec763090f85c82f ==> 80c411312dbe963a0586e42130564688388d45a2

Compatibility test results for 628e88b8a1971b4986dfb2b88ec763090f85c82f ==> 80c411312dbe963a0586e42130564688388d45a2 (PR)
Upgrade the nodes to version: 80c411312dbe963a0586e42130564688388d45a2
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1173.78 txn/s, submitted: 1175.80 txn/s, failed submission: 2.02 txn/s, expired: 2.02 txn/s, latency: 2714.21 ms, (p50: 2400 ms, p70: 2700, p90: 4700 ms, p99: 6500 ms), latency samples: 104580
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1003.95 txn/s, submitted: 1006.53 txn/s, failed submission: 2.58 txn/s, expired: 2.58 txn/s, latency: 3083.01 ms, (p50: 2700 ms, p70: 3300, p90: 5400 ms, p99: 7700 ms), latency samples: 85480
5. check swarm health
Compatibility test for 628e88b8a1971b4986dfb2b88ec763090f85c82f ==> 80c411312dbe963a0586e42130564688388d45a2 passed
Upgrade the remaining nodes to version: 80c411312dbe963a0586e42130564688388d45a2
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1097.50 txn/s, submitted: 1099.94 txn/s, failed submission: 2.44 txn/s, expired: 2.44 txn/s, latency: 2679.12 ms, (p50: 2400 ms, p70: 3000, p90: 4500 ms, p99: 6000 ms), latency samples: 99040
Test Ok

@gregnazario gregnazario merged commit 8d138df into aptos-labs:main Oct 2, 2024
49 checks passed
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.

3 participants