Skip to content

Commit 362677f

Browse files
authored
[aptos cli] update cli 7.13.0 to mark lang version 2.3 and bytecode version 9 as default (#18400)
1 parent d181eb3 commit 362677f

File tree

105 files changed

+231
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+231
-236
lines changed

api/goldens/aptos_api__tests__state_test__test_get_account_module.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"bytecode": "0xa11ceb0b0800000a0b010002020208030a3f054923076c7b08e70120108702b9010ac0030d0ccd037e0dcb04060fd10404000000010600000307000006000100010000070304000101010004060200010101000806070001010100090809000101010002060400010101000a0a0200010101000b0a07000101010205070301080001030205030108010001060800010502060800060801010101060801046775696404475549440269640249440c6372656174696f6e5f6e756d046164647206637265617465096372656174655f69640f63726561746f725f616464726573730565715f69640f69645f6372656174696f6e5f6e756d1269645f63726561746f725f61646472657373076163636f756e74066f626a656374000000000000000000000000000000000000000000000000000000000000000114636f6d70696c6174696f6e5f6d65746164617461090003322e3003322e32126170746f733a3a6d657461646174615f763185010100000000000000001d45475549445f47454e455241544f525f4e4f545f5055424c49534845445b475549442067656e657261746f72206d757374206265207075626c6973686564206168656164206f66206669727374207573616765206f6620606372656174655f776974685f6361706162696c697479602066756e6374696f6e2e00000002010208010102020403050500030000020d0a01140c020a02060100000000000000160b01150b020b0012011200020101000005040b010b001201020201000005050b001000100114020301000005050b001000100214020401000005050b0010000b0121020501000005040b00100014020601000005040b00100114020701000005040b0010021402000001000101000c000d00",
2+
"bytecode": "0xa11ceb0b0900000a0b010002020208030a3f054923076c7b08e70120108702b9010ac0030d0ccd037e0dcb04060fd10404000000010600000307000006000100010000070304000101010004060200010101000806070001010100090809000101010002060400010101000a0a0200010101000b0a07000101010205070301080001030205030108010001060800010502060800060801010101060801046775696404475549440269640249440c6372656174696f6e5f6e756d046164647206637265617465096372656174655f69640f63726561746f725f616464726573730565715f69640f69645f6372656174696f6e5f6e756d1269645f63726561746f725f61646472657373076163636f756e74066f626a656374000000000000000000000000000000000000000000000000000000000000000114636f6d70696c6174696f6e5f6d65746164617461090003322e3003322e33126170746f733a3a6d657461646174615f763185010100000000000000001d45475549445f47454e455241544f525f4e4f545f5055424c49534845445b475549442067656e657261746f72206d757374206265207075626c6973686564206168656164206f66206669727374207573616765206f6620606372656174655f776974685f6361706162696c697479602066756e6374696f6e2e00000002010208010102020403050500030000020d0a01140c020a02060100000000000000160b01150b020b0012011200020101000005040b010b001201020201000005050b001000100114020301000005050b001000100214020401000005050b0010000b0121020501000005040b00100014020601000005040b00100114020701000005040b0010021402000001000101000c000d00",
33
"abi": {
44
"address": "0x1",
55
"name": "guid",

aptos-move/aptos-release-builder/src/components/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use aptos_types::{
2626
};
2727
use futures::executor::block_on;
2828
use handlebars::Handlebars;
29-
use move_binary_format::file_format_common::VERSION_DEFAULT_LANG_V2;
29+
use move_binary_format::file_format_common::VERSION_DEFAULT;
3030
use once_cell::sync::Lazy;
3131
use serde::{de::Visitor, Deserialize, Deserializer, Serialize, Serializer};
3232
use std::{
@@ -773,7 +773,7 @@ impl Default for ReleaseConfig {
773773
metadata: ProposalMetadata::default(),
774774
name: "framework".to_string(),
775775
update_sequence: vec![ReleaseEntry::Framework(FrameworkReleaseConfig {
776-
bytecode_version: VERSION_DEFAULT_LANG_V2,
776+
bytecode_version: VERSION_DEFAULT,
777777
git_hash: None,
778778
})],
779779
},

crates/aptos/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
All notable changes to the Aptos CLI will be captured in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and the format set out by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
44

55
# Unreleased
6-
- Updated default version of formatter to 1.4.5 and move mutation tests to 2.2.0.
76

87
## [7.13.0]
9-
- Set language version 2.3 as stable, which adds support for signed integer types.
8+
- Set language version 2.3 and bytecode version v9 as default, adding support for signed integer types.
9+
- Update default version of formatter to 1.4.5 and move mutation tests to 2.2.0.
1010

1111
## [7.12.1]
1212
- Fix link time optimization issues with Aptos CLI released via homebrew.

testsuite/smoke-test/src/upgrade.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use aptos_release_builder::{
2020
};
2121
use aptos_temppath::TempPath;
2222
use aptos_types::on_chain_config::{FeatureFlag as AptosFeatureFlag, OnChainConsensusConfig};
23-
use move_binary_format::file_format_common::VERSION_DEFAULT_LANG_V2;
23+
use move_binary_format::file_format_common::VERSION_DEFAULT;
2424
use std::{fs, path::PathBuf, process::Command, sync::Arc};
2525

2626
// Ignored. This is redundant with the forge compat test but this test is easier to run locally and
@@ -114,7 +114,7 @@ async fn test_upgrade_flow() {
114114
name: "framework".to_string(),
115115
metadata: ProposalMetadata::default(),
116116
update_sequence: vec![ReleaseEntry::Framework(FrameworkReleaseConfig {
117-
bytecode_version: VERSION_DEFAULT_LANG_V2, // TODO: remove explicit bytecode version from sources
117+
bytecode_version: VERSION_DEFAULT, // TODO: remove explicit bytecode version from sources
118118
git_hash: None,
119119
})],
120120
},

third_party/move/move-binary-format/src/file_format_common.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -552,22 +552,21 @@ pub const VERSION_8: u32 = 8;
552552
/// + allow `$` in identifiers
553553
pub const VERSION_9: u32 = 9;
554554

555+
/// Mark which oldest version is supported.
556+
pub const VERSION_MIN: u32 = VERSION_5;
557+
555558
/// Mark which version is the latest version.
556559
pub const VERSION_MAX: u32 = VERSION_9;
557560

558561
/// Mark which version is the default version. This is the version used by default by tools like
559562
/// the compiler. Notice that this version might be different from the one supported on nodes.
560563
/// The node's max version is determined by the on-chain config for that node.
561-
pub const VERSION_DEFAULT: u32 = VERSION_8;
562-
563-
/// Mark which version is the default version if compiling Move 2.
564-
pub const VERSION_DEFAULT_LANG_V2: u32 = VERSION_8;
564+
/// !!! For user experience, the default version needs to be already in production.
565+
pub const VERSION_DEFAULT: u32 = VERSION_9;
565566

566-
/// Mark which version is the default version if compiling with language version 2.3
567-
pub const VERSION_DEFAULT_LANG_V2_3: u32 = VERSION_9;
568-
569-
// Mark which oldest version is supported.
570-
pub const VERSION_MIN: u32 = VERSION_5;
567+
/// Mark which bytecode version is the default if compiling with language version 2.4 -
568+
/// In general, these are used to set up the default bytecode version for language versions higher than the default.
569+
pub const VERSION_DEFAULT_LANG_V2_4: u32 = VERSION_9;
571570

572571
pub(crate) mod versioned_data {
573572
use crate::{errors::*, file_format_common::*};

third_party/move/move-ir-compiler/transactional-tests/tests/bytecode-generation/declarations/function.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
processed 2 tasks
22
task 0 lines 1-31: print-bytecode --input=module [// This module defines several public functions with complex bodies.]
3-
// Bytecode version v8
3+
// Bytecode version v9
44
module 0x3d10::Example
55
struct Coin
66
value: u64
@@ -53,7 +53,7 @@ public fun deposit(l0: &mut Coin, l1: Coin)
5353

5454

5555
task 1 lines 33-46: print-bytecode --input=module [// Functions may be declared with entry modifier]
56-
// Bytecode version v8
56+
// Bytecode version v9
5757
module 0x4d10::M
5858
// Function definition at index 0
5959
entry public fun f()

third_party/move/move-ir-compiler/transactional-tests/tests/bytecode-generation/declarations/let.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
processed 2 tasks
22
task 0 lines 1-7: print-bytecode [// `let` generates a local with the given type.]
3-
// Bytecode version v8
3+
// Bytecode version v9
44
script
55
// Function definition at index 0
66
entry public fun main()

third_party/move/move-ir-compiler/transactional-tests/tests/bytecode-generation/expressions/binary_add.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
processed 1 task
22
task 0 lines 1-13: print-bytecode --input=module [module 0xE.Expressions {]
3-
// Bytecode version v8
3+
// Bytecode version v9
44
module 0xe::Expressions
55
// Function definition at index 0
66
fun binary_add()

third_party/move/move-ir-compiler/transactional-tests/tests/bytecode-generation/expressions/borrow.exp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
processed 9 tasks
22
task 0 lines 1-11: print-bytecode [// Borrowing a local produces a reference type.]
3-
// Bytecode version v8
3+
// Bytecode version v9
44
script
55
// Function definition at index 0
66
entry public fun main()
@@ -17,7 +17,7 @@ entry public fun main()
1717

1818

1919
task 1 lines 13-24: print-bytecode [// Borrowing a local reference produces a reference type.]
20-
// Bytecode version v8
20+
// Bytecode version v9
2121
script
2222
// Function definition at index 0
2323
entry public fun main()
@@ -35,7 +35,7 @@ entry public fun main()
3535

3636

3737
task 2 lines 26-59: print-bytecode --input=module [module 0x1d4.M {]
38-
// Bytecode version v8
38+
// Bytecode version v9
3939
module 0x1d4::M
4040
struct T
4141
u: u64
@@ -75,7 +75,7 @@ public fun h(l0: &mut T)
7575

7676

7777
task 3 lines 61-80: print-bytecode --input=module [module 0x2d4.M {]
78-
// Bytecode version v8
78+
// Bytecode version v9
7979
module 0x2d4::M
8080
struct T<T0>
8181
u: T0

third_party/move/move-ir-compiler/transactional-tests/tests/bytecode-generation/expressions/borrow_mut.exp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
processed 3 tasks
22
task 0 lines 1-10: print-bytecode [main() {]
3-
// Bytecode version v8
3+
// Bytecode version v9
44
script
55
// Function definition at index 0
66
entry public fun main()
@@ -18,7 +18,7 @@ entry public fun main()
1818

1919

2020
task 1 lines 12-23: print-bytecode --input=module [module 0x3d.Foobar {]
21-
// Bytecode version v8
21+
// Bytecode version v9
2222
module 0x3d::Foobar
2323
struct FooCoin
2424
value: u64
@@ -36,7 +36,7 @@ public fun borrow_mut_field(l0: &mut FooCoin)
3636

3737

3838
task 2 lines 25-36: print-bytecode --input=module [module 0x4d.Foobar {]
39-
// Bytecode version v8
39+
// Bytecode version v9
4040
module 0x4d::Foobar
4141
struct FooCoin<T0>
4242
value: u64

0 commit comments

Comments
 (0)