Skip to content

Commit 0ae7448

Browse files
authored
move: make address32 feature default (#14112)
## Description Make the address32 feature the default in move and fixup a number of tests. ## Test Plan How did you test the new or updated feature? --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
1 parent 9edab42 commit 0ae7448

File tree

248 files changed

+856
-761
lines changed

Some content is hidden

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

248 files changed

+856
-761
lines changed

move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/constants_tests.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ fn valid_primitives() {
5151
},
5252
Constant {
5353
type_: SignatureToken::Address,
54-
data: vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
54+
data: vec![
55+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
56+
0, 0, 0, 0,
57+
],
5558
},
5659
];
5760
assert!(constants::verify_module(&module).is_ok());
@@ -68,7 +71,8 @@ fn invalid_primitives() {
6871
malformed(SignatureToken::U256, vec![0, 0]);
6972
let data = vec![
7073
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
71-
0, 0,
74+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
75+
0, 0, 0, 0,
7276
];
7377
malformed(SignatureToken::Address, data);
7478
}
@@ -149,7 +153,10 @@ fn valid_vectors() {
149153
},
150154
Constant {
151155
type_: tvec(SignatureToken::Address),
152-
data: large_vec(vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
156+
data: large_vec(vec![
157+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
158+
0, 0, 0, 0,
159+
]),
153160
},
154161
// double large
155162
Constant {
@@ -188,7 +195,8 @@ fn valid_vectors() {
188195
Constant {
189196
type_: tvec(tvec(SignatureToken::Address)),
190197
data: double_vec(large_vec(vec![
191-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
198+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
199+
0, 0, 0, 0,
192200
])),
193201
},
194202
];
@@ -217,7 +225,8 @@ fn invalid_vectors() {
217225
tvec(SignatureToken::Address),
218226
vec![
219227
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220-
0, 0, 0, 0,
228+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
229+
0, 0, 0, 0, 0, 0, 0,
221230
],
222231
);
223232
// wrong lens

move-bytecode-verifier/bytecode-verifier-tests/src/unit_tests/limit_tests.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,10 @@ fn max_vec_len() {
757757
},
758758
Constant {
759759
type_: tvec(SignatureToken::Address),
760-
data: large_vec(vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
760+
data: large_vec(vec![
761+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
762+
0, 0, 0, 0,
763+
]),
761764
},
762765
// double large
763766
Constant {
@@ -796,7 +799,8 @@ fn max_vec_len() {
796799
Constant {
797800
type_: tvec(tvec(SignatureToken::Address)),
798801
data: double_vec(large_vec(vec![
799-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
802+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
803+
0, 0, 0, 0,
800804
])),
801805
},
802806
];

move-bytecode-verifier/transactional-tests/tests/ability_field_requirements/unrestricted_has_resource_field.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
processed 1 task
22

33
task 0 'publish'. lines 1-10:
4-
Error: Unable to publish module '00000000000000000000000000000042::Test'. Got VMError: {
4+
Error: Unable to publish module '0000000000000000000000000000000000000000000000000000000000000042::Test'. Got VMError: {
55
major_status: FIELD_MISSING_TYPE_ABILITY,
66
sub_status: None,
77
location: 0x42::Test,

move-bytecode-verifier/transactional-tests/tests/check_bounds/128_params_and_128_locals.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
processed 1 task
22

33
task 0 'publish'. lines 1-265:
4-
Error: Unable to publish module '00000000000000000000000000000001::M'. Got VMError: {
4+
Error: Unable to publish module '0000000000000000000000000000000000000000000000000000000000000001::M'. Got VMError: {
55
major_status: TOO_MANY_LOCALS,
66
sub_status: None,
77
location: undefined,

move-bytecode-verifier/transactional-tests/tests/check_bounds/1_param_and_255_locals.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
processed 1 task
22

33
task 0 'publish'. lines 1-264:
4-
Error: Unable to publish module '00000000000000000000000000000001::M'. Got VMError: {
4+
Error: Unable to publish module '0000000000000000000000000000000000000000000000000000000000000001::M'. Got VMError: {
55
major_status: TOO_MANY_LOCALS,
66
sub_status: None,
77
location: undefined,

move-bytecode-verifier/transactional-tests/tests/check_bounds/too_few_type_actuals.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
processed 1 task
22

33
task 0 'publish'. lines 1-11:
4-
Error: Unable to publish module '00000000000000000000000000000001::M'. Got VMError: {
4+
Error: Unable to publish module '0000000000000000000000000000000000000000000000000000000000000001::M'. Got VMError: {
55
major_status: NUMBER_OF_TYPE_ARGUMENTS_MISMATCH,
66
sub_status: None,
77
location: undefined,

move-bytecode-verifier/transactional-tests/tests/check_bounds/too_many_type_actuals.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
processed 1 task
22

33
task 0 'publish'. lines 1-11:
4-
Error: Unable to publish module '00000000000000000000000000000001::M'. Got VMError: {
4+
Error: Unable to publish module '0000000000000000000000000000000000000000000000000000000000000001::M'. Got VMError: {
55
major_status: NUMBER_OF_TYPE_ARGUMENTS_MISMATCH,
66
sub_status: None,
77
location: undefined,

move-bytecode-verifier/transactional-tests/tests/check_duplication/duplicate_field_name.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
processed 1 task
22

33
task 0 'publish'. lines 1-7:
4-
Error: Unable to publish module '00000000000000000000000000000001::M'. Got VMError: {
4+
Error: Unable to publish module '0000000000000000000000000000000000000000000000000000000000000001::M'. Got VMError: {
55
major_status: DUPLICATE_ELEMENT,
66
sub_status: None,
77
location: 0x1::M,

move-bytecode-verifier/transactional-tests/tests/check_duplication/duplicate_function_name.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
processed 1 task
22

33
task 0 'publish'. lines 1-6:
4-
Error: Unable to publish module '00000000000000000000000000000042::M'. Got VMError: {
4+
Error: Unable to publish module '0000000000000000000000000000000000000000000000000000000000000042::M'. Got VMError: {
55
major_status: DUPLICATE_ELEMENT,
66
sub_status: None,
77
location: 0x42::M,

move-bytecode-verifier/transactional-tests/tests/check_duplication/duplicate_struct_name.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
processed 1 task
22

33
task 0 'publish'. lines 1-6:
4-
Error: Unable to publish module '00000000000000000000000000000042::M'. Got VMError: {
4+
Error: Unable to publish module '0000000000000000000000000000000000000000000000000000000000000042::M'. Got VMError: {
55
major_status: DUPLICATE_ELEMENT,
66
sub_status: None,
77
location: 0x42::M,

0 commit comments

Comments
 (0)