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

[trivial] Add intrinsic for limit for aggregator and update movefmt version #15177

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions aptos-move/framework/aptos-framework/doc/aggregator.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,9 @@ Destroys an aggregator and removes it from its <code>AggregatorFactory</code>.



<pre><code><b>pragma</b> opaque;
<pre><code><b>pragma</b> intrinsic;
// This enforces <a id="high-level-req-1.2" href="#high-level-req">high-level requirement 1</a>:
<b>aborts_if</b> <b>false</b>;
<b>ensures</b> [abstract] result == <a href="aggregator.md#0x1_aggregator_spec_get_limit">spec_get_limit</a>(<a href="aggregator.md#0x1_aggregator">aggregator</a>);
<b>aborts_if</b> [abstract] <b>false</b>;
</code></pre>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ spec aptos_framework::aggregator {
}

spec limit {
pragma opaque;
pragma intrinsic;
/// [high-level-req-1.2]
aborts_if false;
ensures [abstract] result == spec_get_limit(aggregator);
aborts_if [abstract] false;
}

spec native fun spec_read(aggregator: Aggregator): u128;
Expand Down
7 changes: 7 additions & 0 deletions aptos-move/framework/src/aptos-natives.bpl
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ function {:inline} $IsEqual'$1_aggregator_Aggregator'(s1: $1_aggregator_Aggregat
function {:inline} $1_aggregator_spec_get_limit(s: $1_aggregator_Aggregator): int {
s->$limit
}
function {:inline} $1_aggregator_limit(s: $1_aggregator_Aggregator): int {
s->$limit
}
procedure {:inline 1} $1_aggregator_limit(s: $1_aggregator_Aggregator) returns (res: int) {
res := s->$limit;
return;
}
function {:inline} $1_aggregator_spec_get_handle(s: $1_aggregator_Aggregator): int {
s->$handle
}
Expand Down
1 change: 1 addition & 0 deletions crates/aptos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to the Aptos CLI will be captured in this file. This project

## Unreleased
- Fix typos in `aptos move compile` help text.
- Update the default version of `movefmt` to be installed from 1.0.5 to 1.0.6

## [4.3.0] - 2024/10/30
- Allow for setting large-packages module for chunking publish mode with `--large-packages-module-address`
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos/src/update/movefmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use self_update::update::ReleaseUpdate;
use std::path::PathBuf;

const FORMATTER_BINARY_NAME: &str = "movefmt";
const TARGET_FORMATTER_VERSION: &str = "1.0.5";
const TARGET_FORMATTER_VERSION: &str = "1.0.6";

const FORMATTER_EXE_ENV: &str = "FORMATTER_EXE";
#[cfg(target_os = "windows")]
Expand Down
Loading