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

[Spec] update specs of voting, transaction_fee, code #8172

Merged
merged 12 commits into from
Jun 14, 2023

Conversation

xudon9
Copy link
Contributor

@xudon9 xudon9 commented May 12, 2023

Description

This is a part of spec work for Aptos Framework from MoveBit. The changes are:

  • Completed all specs left as TODO in transaction_fee and voting;
  • Some functions in code gets specified.

Test Plan

aptos move prove -f voting.move
aptos move prove -f transaction_fee.move
aptos move prove -f code.move

@@ -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);

Copy link
Contributor

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)));

Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Copy link
Contributor

@UIZorrot UIZorrot left a 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

UIZorrot

This comment was marked as duplicate.

use aptos_framework::chain_status;

Copy link
Contributor

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?
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this mean?

@rahxephon89 rahxephon89 self-requested a review May 27, 2023 07:42
@rahxephon89 rahxephon89 enabled auto-merge (squash) May 27, 2023 07:42
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

auto-merge was automatically disabled June 12, 2023 06:31

Head branch was pushed to by a user without write access

@rahxephon89 rahxephon89 enabled auto-merge (squash) June 12, 2023 06:37
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

✅ Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 9f2f8c4c30105cd09293c8f52de9c79585f43851

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 9f2f8c4c30105cd09293c8f52de9c79585f43851 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : committed: 8811 txn/s, latency: 3756 ms, (p50: 3700 ms, p90: 5100 ms, p99: 6000 ms), latency samples: 299600
2. Upgrading first Validator to new version: 9f2f8c4c30105cd09293c8f52de9c79585f43851
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 4060 txn/s, latency: 7645 ms, (p50: 8300 ms, p90: 10500 ms, p99: 11000 ms), latency samples: 158340
3. Upgrading rest of first batch to new version: 9f2f8c4c30105cd09293c8f52de9c79585f43851
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 4768 txn/s, latency: 6725 ms, (p50: 7600 ms, p90: 8300 ms, p99: 8800 ms), latency samples: 176440
4. upgrading second batch to new version: 9f2f8c4c30105cd09293c8f52de9c79585f43851
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 6913 txn/s, latency: 4771 ms, (p50: 4700 ms, p90: 6600 ms, p99: 7700 ms), latency samples: 241960
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 9f2f8c4c30105cd09293c8f52de9c79585f43851 passed
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite land_blocking success on 9f2f8c4c30105cd09293c8f52de9c79585f43851

performance benchmark : committed: 5616 txn/s, latency: 7054 ms, (p50: 5400 ms, p90: 11500 ms, p99: 27100 ms), latency samples: 2398274
Max round gap was 1 [limit 4] at version 260854. Max no progress secs was 3.841776 [limit 10] at version 2637844.
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite framework_upgrade success on aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 9f2f8c4c30105cd09293c8f52de9c79585f43851

Compatibility test results for aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 9f2f8c4c30105cd09293c8f52de9c79585f43851 (PR)
Upgrade the nodes to version: 9f2f8c4c30105cd09293c8f52de9c79585f43851
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 4555 txn/s, latency: 7176 ms, (p50: 7800 ms, p90: 9700 ms, p99: 12700 ms), latency samples: 168560
5. check swarm health
Compatibility test for aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 9f2f8c4c30105cd09293c8f52de9c79585f43851 passed
Test Ok

@junkil-park junkil-park merged commit 22d6280 into aptos-labs:main Jun 14, 2023
vusirikala pushed a commit that referenced this pull request Jun 21, 2023
* [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>
banool pushed a commit that referenced this pull request Jul 7, 2023
* [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>
xbtmatt pushed a commit to xbtmatt/aptos-core that referenced this pull request Jul 25, 2023
* [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>
xbtmatt pushed a commit to xbtmatt/aptos-core that referenced this pull request Jul 25, 2023
* [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>
gedigi pushed a commit that referenced this pull request Aug 2, 2023
* [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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants