-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Large Package Publishing module with CLI command options (--chunked-publish) #13344
base: main
Are you sure you want to change the base?
Conversation
⏱️ 4h 45m total CI duration on this PR
🚨 2 jobs on the last run were significantly faster/slower than expected
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13344 +/- ##
===========================================
- Coverage 71.4% 33.1% -38.4%
===========================================
Files 2319 1753 -566
Lines 456030 337769 -118261
===========================================
- Hits 325836 111808 -214028
- Misses 130194 225961 +95767 ☔ View full report in Codecov by Sentry. |
ba4f40c
to
00b8d8e
Compare
large_package_publishing
e2e-move tests00b8d8e
to
0401e12
Compare
aptos-move/move-examples/large_packages/sources/large_packages.move
Outdated
Show resolved
Hide resolved
…ent and use SmartTable to store code in StagingArea / added relevant test cases
…oy 3) object upgrade from the CLI (under `aptos move` commands)
0401e12
to
58c6cdc
Compare
58c6cdc
to
9115ce2
Compare
updated immutable `large_packages.move` module deployed addresses
9115ce2
to
d63226b
Compare
…and publishing removed publish only functions
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.
I think we're seeing an ambiguity of where to put code that's not quite in the framework.. my suggestion would be either create move-framework-ext or just merge it into the framework helpers.
beyond that it seems like the chunked api supports both the traditional and chunked publishing... my recommendation is to not let the users choose which but instead let it be decided by the size of the package being published.
we could also leverage two enums:
- chunked or not
- account, object, etc
whereas you have two enums that are mirrors of each other
looks really good though
I'm a little concerned this might take more time to land, so it might be worthwhile getting the Python variant fixed first, update docs, and then resume here? But let's get one other source of feedback, maybe @JohnChangUK? And your own thoughts...
@@ -14,6 +14,7 @@ rust-version = { workspace = true } | |||
|
|||
[dependencies] | |||
anyhow = { workspace = true } | |||
aptos = { workspace = true } |
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 probably an anti-pattern, I don't think the test should go here.
@@ -0,0 +1,9 @@ | |||
[package] |
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.
we didn't we just take any arbitrary package and try to update rather than making another one?
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use crate::{assert_move_abort, assert_success, assert_vm_status, tests::common, MoveHarness}; | ||
use aptos::move_tool::chunked_publish::create_chunks; |
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.
let's move this to aptos_framework
crate so we don't further bloat the dependencies for building e2e-move-tests
) -> Vec<SignedTransaction> { | ||
let package = BuiltPackage::build(path.to_owned(), options.unwrap()) | ||
.expect("package build must succeed"); | ||
// let package_arc = { |
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.
don't forget to cleanup
) | ||
} | ||
|
||
/// Create payloads from metadata and code chunks for a large package. |
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.
a lot of this code feels like it should live somewhere where both the CLI and this testing harness can access it. I don't know if the framework actually knows about Aptos types, if it does, then let's push it there...
Description
large_packages.move module update & deployment
large_packages.move
module inmove-examples
for better data handling and supporting object code deployment & object code upgrade.SmartTable
in theStagingArea
to store package code datastage_code_chunk
supports 1) deploying to a standard account 2) deploying to an object 3) upgrading object codelarge_packages.move
module both on mainnet and testnet, under account0xa29df848eebfe5d981f708c2a5b06d31af2be53bbd8ddc94c8523f4b903f7adb
CLI
aptos move clear-staging-area
: to cleanup StagingArea resource of an account.--chunked-publish
flag:aptos move publish [OPTIONS] --chunked-publish
aptos move create-object-and-publish-package [OPTIONS] --address-name <ADDRESS_NAME> --chunked-publish
aptos move upgrade-object-package [OPTIONS] --address-name <ADDRESS_NAME> --chunked-publish
e2e move tests
large_packages.move
with following test cases:SDK Updates required:
Option
Move type, as the entry functionlarge_packages::stage_code_chunk
receives theOption
type.(current sequence number) + 1 + 4
will be the sequence number when the package is finally deployed. In aptos CLI, this is done by running a preliminary package build to determine number of chunks of the package.Type of Change
How Has This Been Tested?
cargo nextest run large_package_publishing
Checklist