-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 Code Deployment module with CLI commands #11748
Conversation
⏱️ 32h 56m total CI duration on this PR
🚨 1 job on the last run was significantly faster/slower than expected
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #11748 +/- ##
========================================
Coverage 71.4% 71.4%
========================================
Files 800 802 +2
Lines 183827 184016 +189
========================================
+ Hits 131317 131496 +179
- Misses 52510 52520 +10 ☔ View full report in Codecov by Sentry. |
20292b0
to
61a57c5
Compare
@@ -45,7 +45,7 @@ fn test_module_event_enabled() { | |||
vec![bcs::to_bytes(&10u64).unwrap()], | |||
); | |||
let events = h.get_events(); | |||
assert_eq!(events.len(), 12); | |||
assert_eq!(events.len(), 13); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because we emit PublishPackage
event in code.move
when a package gets published.
ee850e2
to
1b7d0ae
Compare
970275b
to
cef4244
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
* clean error log lines (#12019) * [table info][2/4] add utils for table info backup and restore and redesign the db read (#11793) * separate indexer async v2 db from aptosdb * address comments * add utils for table info backup and restore and redesign the db read * address comments to spawn block sync file ops * address comments * tests for events and improve event v1 handling (#12012) * [move-vm] Cache verified modules (#12002) * [move-vm] Cache verified modules * fixup! [move-vm] Cache verified modules * [passkey] Add MAX_BYTES limit for signatures (#11697) * [passkey] Add MAX_BYTES limit for signatures * [passkey] Add tracing for AssertionSignature type and fix README * [passkey] Rebased on latest main, rerun authenticator_regenerate.sh * Object Code Deployment module with CLI commands generated (#11748) * [simple] rename RG split in VmChangeSet flag (#12027) * rename RG split in VmChangeSet flag old name was stale, when charging was different * [fuzzing] fixes oss-fuzz FP and fuzz.sh (#12030) * [fuzzing] fixes oss-fuzz FP and fuzz.sh * Update Docker images (#12026) Co-authored-by: sionescu <sionescu@users.noreply.github.com> * Update release.yaml (#12020) * Update release.yaml * enable REFUNDABLE_BYTES * enable FairnessShuffler * enable WEBAUTHN_SIGNATURE * AIP-54 Object Code Deployment release addition * enable vtxn and jwk consensus * Update release.yaml adding aggregators v2 flags, and updating execution onchain config * add feature flag for zkID (ZK-only mode) * fix jwk/zkid entries in release yaml 1.10 (#12024) * update * update * Update release.yaml fix flag name * Update release.yaml rename feature --------- Co-authored-by: aldenhu <msmouse@gmail.com> Co-authored-by: hariria <hariria@usc.edu> Co-authored-by: John Chang <johnchang9094@gmail.com> Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com> Co-authored-by: igor-aptos <110557261+igor-aptos@users.noreply.github.com> Co-authored-by: Alin Tomescu <tomescu.alin@gmail.com> Co-authored-by: zhoujunma <zjma@users.noreply.github.com> * Cherry-pick VM changes (#12021) * [gas] add gas charges for type creation * [gas-calibration] Add calibration sample * [move-vm] Implement a per-frame cache for paranoid mode * fixup! [move-vm] Implement a per-frame cache for paranoid mode * fixup! fixup! [move-vm] Implement a per-frame cache for paranoid mode * fixup! fixup! fixup! [move-vm] Implement a per-frame cache for paranoid mode * fixup! fixup! fixup! fixup! [move-vm] Implement a per-frame cache for paranoid mode * [gas] add gas charges for dependencies --------- Co-authored-by: Runtian Zhou <runtian@aptoslabs.com> * trivial doc fix * [GHA] Upgrade actions/checkout to v4 * jwk ob counters (#12048) * Revert "[GHA] Upgrade actions/checkout to v4" This reverts commit 04d078f. * [CI][indexer] fix the e2e localnet. (#12047) * fix the e2e localnet. * fix the e2e localnet. * bump latest gas feature version to 14 Also be conservative and leave legacy parameters in >14 versions for now. Need to clean up after REFUNDABLE_BYTES feature is actually enabled on all networks. * compat test to be against the testnet tag * [GHA] Upgrade lint-test.yaml and the dependent actions to checkout@v4 actions/checkout@v4 doesn't behave well if both a workflow and an invoked action checkout the source code on top of each other. * [GHA] Update pin for tj-actions/changed-files * start jwk consensus for google (#12053) * [consensus] check rpc epoch in epoch_manager (#12018) * [consensus] check rpc epoch in epoch_manager * fix gas version (13 is deprecated/cannot be used) (#12064) * FatalVMError shouldn't create "Delayed materialization code invariant" (#12044) * Move all visibility checking into AST-level function_checker, simplify that code a bit, and improve diagnostics. (#11948) * rust changes to move all visibility checking to AST and clean it up a bit * change `Known attribute ... position` warning to a neater `Attribute .. position` warning * add FunctionData id_loc to allow pointing at function name in declaration for more concise error messages. abstract messages a bit in function_checker * add 'inlined from' labels to diagnostics with labels, fix bug in function_checker to enable post-inlining visibility checking * lint * fix for small stakes * assert --------- Co-authored-by: igor-aptos <110557261+igor-aptos@users.noreply.github.com> Co-authored-by: jill <121921928+jillxuu@users.noreply.github.com> Co-authored-by: George Mitenkov <georgemitenk0v@gmail.com> Co-authored-by: runtianz <runtian@aptoslabs.com> Co-authored-by: Andrew Hariri <hariria@usc.edu> Co-authored-by: John Chang <johnchang9094@gmail.com> Co-authored-by: Gerardo Di Giacomo <gerardo@aptoslabs.com> Co-authored-by: sionescu <sionescu@users.noreply.github.com> Co-authored-by: Junkil Park <jpark@aptoslabs.com> Co-authored-by: aldenhu <msmouse@gmail.com> Co-authored-by: danielxiangzl <xiangzhuolun@gmail.com> Co-authored-by: Alin Tomescu <tomescu.alin@gmail.com> Co-authored-by: Victor Gao <10379359+vgao1996@users.noreply.github.com> Co-authored-by: Stelian Ionescu <stelian@aptoslabs.com> Co-authored-by: Stelian Ionescu <sionescu@cddr.org> Co-authored-by: larry-aptos <112209412+larry-aptos@users.noreply.github.com> Co-authored-by: Balaji Arun <balaji@aptoslabs.com> Co-authored-by: Brian R. Murphy <132495859+brmataptos@users.noreply.github.com>
Description
This PR implements AIP-54, Object Code Deployment which outlines the proposal to deploy code to objects. This is an improved alternative over deploying code to accounts and resource accounts. Detailed information in this Doc
aptos-move/framework/aptos-framework/sources/object_code_deployment.move
. Each entry function is feature gated as this feature is not available yet for use.crates/aptos/src/move_tool/mod.rs
.Test Plan
Integration Tests
Integration tests written under
aptos-move/e2e-move-tests/src/tests/object_code_deployment.rs
which test end to end workflow. Main test cases defined:publish
inobject_code_deployment
module withOBJECT_CODE_DEPLOYMENT
feature enabled AND disabled.PublisherRef
is not created when package deployed is immutable.upgrade
inobject_code_deployment
module withOBJECT_CODE_DEPLOYMENT
feature enabled AND disabled.upgrade
fails when transaction signer is NOT owner ofPublisherRef
.upgrade
fails when incompatible module trying to be upgraded to.upgrade
fails when initial module deployed was immutable to begin with.freeze_package_registry
happy case.freeze_package_registry
fails when transaction signer is NOT owner ofPackageRegistry
.CLI Commands
Locally built CLI tool via
cargo build --package aptos --release
and ran publish and upgrade commands:aptos move create-object-and-publish-package --address-name publish=<address> --named-addresses publish=<address>
aptos move upgrade-object-package --object-address <address> --named-addresses publish=<address>
Verified modules were deployed to new objects and upgraded as expected.