-
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
[Spec] update specs of voting, transaction_fee, code #8172
Conversation
@@ -364,6 +364,11 @@ module aptos_framework::voting { | |||
proposal_id: u64, | |||
) acquires VotingForum { | |||
let proposal_state = get_proposal_state<ProposalType>(voting_forum_address, proposal_id); | |||
|
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.
Using assume with ghost state is not an ideal way to specify aborts_if condition. Could you try to write a spec fun version of get_proposal_state instead? If it is difficult to do so, we can visit this aborts_if condition later.
let resolvable_time = to_u64(*simple_map::borrow(&proposal.metadata, &utf8(RESOLVABLE_TIME_METADATA_KEY))); | ||
|
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.
Same as above
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 have fixed it on the newest commit
use aptos_framework::chain_status; | ||
|
||
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.
remove the trailing whitespaces.
requires chain_status::is_operating(); // Ensures existence of Timestamp | ||
// Addition of yes_votes and no_votes might overflow. | ||
pragma addition_overflow_unchecked; | ||
|
||
include AbortsIfNotContainProposalID<ProposalType>; | ||
// Any way to specify the result? |
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.
what does this mean?
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.
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.
Head branch was pushed to by a user without write access
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
|
* [spec] update specs of voting, transaction_fee, code * [spec] add account and voting module * run linter * [spec] Fix timeout of smart_vector.move * [spec] Update docs of smart_vector --------- Co-authored-by: zorrot <ui_zorrot@163.com>
* [spec] update specs of voting, transaction_fee, code * [spec] add account and voting module * run linter * [spec] Fix timeout of smart_vector.move * [spec] Update docs of smart_vector --------- Co-authored-by: zorrot <ui_zorrot@163.com>
* [spec] update specs of voting, transaction_fee, code * [spec] add account and voting module * run linter * [spec] Fix timeout of smart_vector.move * [spec] Update docs of smart_vector --------- Co-authored-by: zorrot <ui_zorrot@163.com>
* [spec] update specs of voting, transaction_fee, code * [spec] add account and voting module * run linter * [spec] Fix timeout of smart_vector.move * [spec] Update docs of smart_vector --------- Co-authored-by: zorrot <ui_zorrot@163.com>
* [spec] update specs of voting, transaction_fee, code * [spec] add account and voting module * run linter * [spec] Fix timeout of smart_vector.move * [spec] Update docs of smart_vector --------- Co-authored-by: zorrot <ui_zorrot@163.com>
Description
This is a part of spec work for Aptos Framework from MoveBit. The changes are:
transaction_fee
andvoting
;code
gets specified.Test Plan
aptos move prove -f voting.move
aptos move prove -f transaction_fee.move
aptos move prove -f code.move