-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[CLI] Add multisig governance tooling, docs #8346
Conversation
Use literal file include for maintainability Update pnpm package spec for literal file include Update dictionary for literal file include See aptos-labs#8054 (comment)
Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment)
@movekevin a4bbabb resolves all of your review comments |
f8d9504
to
a6d6be7
Compare
@movekevin a6d6be7 resolves your nit review comment |
@banool Based on discussions with @movekevin it looks like the approach here is going to be land this and then just close out #8054 |
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 awesome. I'm only the requesting changes for some small things like some clap stuff, using Lazy, etc. The rest I want to see what you think.
Some more feedback beyond what I left in the code:
How about verify-proposal
instead of check-transaction
? The latter feels quite vague.
In the "Multisig governance" section in move/move-on-aptos/cli it would be good to mention which multisig we're talking about.
I'll save further docs comments for after this round of feedback.
aptos-move/move-examples/cli_args/entry_function_arguments.json
Outdated
Show resolved
Hide resolved
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.
Also could you please update crates/aptos/CHANGELOG.md
?
In addition to these changes, I'd like to see something that makes it obvious that vector args have changed, like:
- **Breaking change**: You can no longer pass in a vector like this: `--arg vector<address>:0x1,0x2`, you must do it like this: `--arg 'address:["0x1", "0x2"]'`
Resolve aptos-labs#8346 (review) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Resolve aptos-labs#8346 (comment) Address aptos-labs#8346 (comment) Resolve aptos-labs#8346 (review)
@banool I believe 6aa7447 resolves all items in the two above quote reply blocks |
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.
You don't have to do it in this PR but if you're interested, it'd be helpful if you could add end to end tests for this new functionality in crates/aptos/e2e
. Whether you do it now or one of us does it later, it'd be helpful if you could open an issue for this.
I'd appreciate if you could resolve that issue with the JSON response in the error case (if it indeed works how I expect right now). If you think it's too much of an overhaul let me know and we can help out.
@banool #8392 opens an issue per your request See #8346 (comment) re: JSON response Your thoughts? |
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.
Awesome thanks a lot for all your work on this PR and sticking with me with these changes I've requested, I'd say we're good to go!
@banool @movekevin thanks for all of the collaboration on this! It looks like there are two approving reviews, so will one of you please land this into |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
@davidiw @lightmark @movekevin @0xjinn
Closes #7709
Linked issue and PR
This PR completes all milestones listed in #7709, adding a single squashed commit on top of PR #8054 (which has a single squashed commit and a second commit addressing a request from a reviewer, who subsequently provided an approving review).
Summary of changes
In addition to the changes from #8054, this PR adds:
aptos multisig execute
, marked as a TODO by @movekevin in 349cda9aptos multisig check-transaction
subcommand for verifying on-chain multisig transaction proposals--json-output-file
option foraptos move publish
that creates a JSON file with publication transaction data, which can be passed toaptos multisig check-transaction
to verify on-chain multisig publication transaction propsalsImplications
By closing #7709, this PR adds functionality required for trustless multisig goverance via the CLI, using practical workflows: developers may now pass multisig governance entry function arguments via JSON input files, check expected transaction data against on-chain hashes or payloads, and publish packages while verifying data along the way.
In particular, this functionality allows for a publication proposer to provide other multisig owners with a
git
commit for a particular Move package, such that the corresponding publication payload hash can be checked against a locally-compiled bytecode record (via thejson-output-file
command foraptos multsig publish
, combined with theaptos multisig check-transaction
command): this is analagous to evaluating a checksum against a locally compiled binary, as is typical in open-source software.One the package is published, multisig owners can then conduct governance operations by posting a transaction proposal in JSON format in a public forum, and can verify that the JSON file evaluates to an on-chain multisig payload hash.
Hence with the new functionality, multisig-based DAOs can now conduct protocol governance "out in the open" with standard and official tooling.
Select command examples from tutorial
See full tutorial preview here
Creating a publication JSON file:
aptos move publish \ --named-addresses test_account=$multisig_addr \ --json-output-file publication.json
Creating a hash-only publication transaction:
aptos multisig create-transaction \ --multisig-address $multisig_addr \ --json-file publication.json \ --hash-only \ --private-key-file ace.key
Creating a full-payload governance transaction:
Checking against an on-chain payload hash:
aptos multisig check-transaction \ --multisig-address $multisig_addr \ --json-file publication.json \ --sequence-number 1