diff --git a/Cargo.lock b/Cargo.lock index 9f827b6badf9a..67ac0c438f048 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -150,7 +150,7 @@ dependencies = [ "aptos-vm", "async-trait", "base64 0.13.0", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "chrono", "clap 3.2.17", "clap_complete", @@ -159,6 +159,7 @@ dependencies = [ "hex", "itertools", "jemallocator", + "move-binary-format", "move-cli", "move-command-line-common", "move-core-types", @@ -171,7 +172,7 @@ dependencies = [ "rand 0.7.3", "regex", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_yaml 0.8.26", "shadow-rs", @@ -205,7 +206,7 @@ dependencies = [ "aptos-crypto", "aptos-state-view", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "better_any", "claims", "move-binary-format", @@ -235,7 +236,7 @@ dependencies = [ "aptos-types", "aptos-vm", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes 1.2.1", "fail 0.5.0", "futures", @@ -254,7 +255,7 @@ dependencies = [ "rand 0.7.3", "regex", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "storage-interface", "tokio", @@ -291,7 +292,7 @@ dependencies = [ "rand 0.7.3", "regex", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "storage-interface", "tokio", @@ -312,7 +313,7 @@ dependencies = [ "aptos-types", "aptos-vm", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "hex", "indoc", "move-binary-format", @@ -320,7 +321,7 @@ dependencies = [ "move-resource-viewer", "poem", "poem-openapi", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "storage-interface", ] @@ -346,7 +347,7 @@ dependencies = [ "aptos-vm", "aptosdb", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes 1.2.1", "clap 3.2.17", "futures", @@ -361,7 +362,7 @@ dependencies = [ "regex", "reqwest", "scratchpad", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_yaml 0.8.26", "storage-interface", @@ -383,12 +384,12 @@ dependencies = [ "aptos-temppath", "aptos-types", "aptosdb", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes 1.2.1", "hyper", "once_cell", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", "tokio", "warp", @@ -398,10 +399,10 @@ dependencies = [ name = "aptos-bitvec" version = "0.1.0" dependencies = [ - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "proptest", "proptest-derive", - "serde 1.0.144", + "serde 1.0.149", "serde_bytes", "serde_json", ] @@ -417,7 +418,7 @@ dependencies = [ "aptos-state-view", "aptos-types", "arc-swap", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "claims", "criterion", "crossbeam", @@ -453,7 +454,7 @@ version = "0.1.0" dependencies = [ "aptos-framework", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "include_dir 0.7.2", "move-core-types", "once_cell", @@ -469,10 +470,10 @@ dependencies = [ "aptos-logger", "aptos-metrics-core", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "lz4", "once_cell", - "serde 1.0.144", + "serde 1.0.149", "thiserror", ] @@ -488,13 +489,13 @@ dependencies = [ "aptos-secure-storage", "aptos-temppath", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "byteorder", "get_if_addrs", "mirai-annotations", "poem-openapi", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", "serde_yaml 0.8.26", "short-hex-str", "thiserror", @@ -526,7 +527,7 @@ dependencies = [ "aptos-vm", "arc-swap", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "byteorder", "bytes 1.2.1", "channel", @@ -545,7 +546,7 @@ dependencies = [ "rand 0.7.3", "safety-rules", "schemadb", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "short-hex-str", "storage-interface", @@ -565,7 +566,7 @@ dependencies = [ "claims", "futures", "move-core-types", - "serde 1.0.144", + "serde 1.0.149", "thiserror", "tokio", ] @@ -581,13 +582,13 @@ dependencies = [ "aptos-executor-types", "aptos-infallible", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "futures", "itertools", "mirai-annotations", "proptest", "rayon", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "short-hex-str", "tokio", @@ -599,7 +600,7 @@ version = "0.1.0" dependencies = [ "aptos-logger", "backtrace", - "serde 1.0.144", + "serde 1.0.149", "toml", ] @@ -609,8 +610,8 @@ version = "0.0.3" dependencies = [ "anyhow", "aptos-crypto-derive", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", - "bitvec", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", + "bitvec 0.19.6", "blst", "byteorder", "bytes 1.2.1", @@ -628,7 +629,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "ring", - "serde 1.0.144", + "serde 1.0.149", "serde-name", "serde_bytes", "serde_json", @@ -646,9 +647,9 @@ name = "aptos-crypto-derive" version = "0.0.3" dependencies = [ "anyhow", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -664,7 +665,7 @@ dependencies = [ "aptos-time-service", "aptos-types", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "channel", "claims", "futures", @@ -673,7 +674,7 @@ dependencies = [ "netcore", "network", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", "storage-service-client", "storage-service-server", "storage-service-types", @@ -701,7 +702,7 @@ dependencies = [ "network", "once_cell", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", "short-hex-str", "storage-service-types", "thiserror", @@ -745,13 +746,13 @@ dependencies = [ "aptos-vm", "aptosdb", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "channel", "claims", "futures", "move-binary-format", "move-core-types", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", "thiserror", "vm-genesis", @@ -779,7 +780,7 @@ dependencies = [ "aptos-types", "aptos-vm", "aptosdb", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "fail 0.5.0", "itertools", "move-core-types", @@ -788,7 +789,7 @@ dependencies = [ "rand 0.7.3", "rayon", "scratchpad", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", "vm-genesis", ] @@ -825,11 +826,11 @@ dependencies = [ "aptos-secure-net", "aptos-state-view", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "itertools", "once_cell", "scratchpad", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", "thiserror", ] @@ -855,14 +856,14 @@ dependencies = [ "aptos-rest-client", "aptos-sdk", "aptos-warp-webserver", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes 1.2.1", "clap 3.2.17", "futures", "hex", "rand 0.7.3", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "tempfile", "tokio", @@ -881,7 +882,7 @@ dependencies = [ "aptos-logger", "aptos-sdk", "clap 3.2.17", - "serde 1.0.144", + "serde 1.0.149", "serde_yaml 0.8.26", "tokio", "url", @@ -900,7 +901,7 @@ dependencies = [ "gcp-bigquery-client", "log", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "tokio", ] @@ -943,7 +944,7 @@ dependencies = [ "rayon", "regex", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_yaml 0.8.26", "state-sync-driver", @@ -994,7 +995,7 @@ dependencies = [ "aptos-types", "aptos-vm", "base64 0.13.0", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "better_any", "claims", "clap 3.2.17", @@ -1026,7 +1027,7 @@ dependencies = [ "rand_core 0.5.1", "rayon", "ripemd", - "serde 1.0.144", + "serde 1.0.149", "serde_bytes", "serde_json", "serde_yaml 0.8.26", @@ -1064,7 +1065,7 @@ dependencies = [ "aptos-types", "aptos-vault-client", "aptosdb", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "byteorder", "datatest-stable", "hex", @@ -1095,7 +1096,7 @@ dependencies = [ "aptos-gas-algebra-ext", "aptos-global-constants", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "clap 3.2.17", "move-binary-format", "move-core-types", @@ -1131,9 +1132,9 @@ dependencies = [ "aptos-types", "aptos-vm", "aptosdb", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", "serde_yaml 0.8.26", "storage-interface", "vm-genesis", @@ -1145,7 +1146,7 @@ version = "0.1.0" dependencies = [ "base64 0.13.0", "proxy", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "thiserror", "ureq", @@ -1175,7 +1176,7 @@ dependencies = [ "aptos-types", "aptos-vm", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bigdecimal", "chrono", "clap 3.2.17", @@ -1189,7 +1190,7 @@ dependencies = [ "reqwest", "reqwest-middleware", "reqwest-retry", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "sha2 0.9.9", "storage-interface", @@ -1213,7 +1214,7 @@ dependencies = [ "aptos-metrics-core", "aptos-types", "aptosdb", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "byteorder", "itertools", "num-derive", @@ -1223,7 +1224,7 @@ dependencies = [ "proptest-derive", "rand 0.7.3", "rayon", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", "thiserror", ] @@ -1241,9 +1242,9 @@ dependencies = [ name = "aptos-log-derive" version = "0.1.0" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -1261,7 +1262,7 @@ dependencies = [ "once_cell", "pretty_assertions", "prometheus", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "strum", "strum_macros", @@ -1288,7 +1289,7 @@ dependencies = [ "aptos-proptest-helpers", "aptos-types", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "channel", "enum_dispatch", "fail 0.5.0", @@ -1301,7 +1302,7 @@ dependencies = [ "proptest", "rand 0.7.3", "rayon", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "short-hex-str", "storage-interface", @@ -1340,7 +1341,7 @@ dependencies = [ "clap 3.2.17", "futures", "network", - "serde 1.0.144", + "serde 1.0.149", "tokio", ] @@ -1377,7 +1378,7 @@ dependencies = [ "aptos-types", "aptos-vm", "aptosdb", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "clap 3.2.17", "fail 0.5.0", "futures", @@ -1420,7 +1421,7 @@ dependencies = [ "poem-openapi", "prometheus-parse", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_yaml 0.8.26", "thiserror", @@ -1437,7 +1438,7 @@ dependencies = [ "percent-encoding", "poem", "poem-openapi", - "serde 1.0.144", + "serde 1.0.149", "serde_json", ] @@ -1493,11 +1494,11 @@ dependencies = [ "aptos-gas", "aptos-temppath", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "clap 3.2.17", "move-core-types", "move-model", - "serde 1.0.144", + "serde 1.0.149", "serde_yaml 0.8.26", "tempfile", ] @@ -1523,7 +1524,7 @@ dependencies = [ "aptos-infallible", "aptos-logger", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes 1.2.1", "clap 3.2.17", "futures", @@ -1532,7 +1533,7 @@ dependencies = [ "move-core-types", "poem-openapi", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "thiserror", "tokio", @@ -1570,7 +1571,7 @@ dependencies = [ "aptos-sdk", "aptos-types", "aptos-warp-webserver", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "clap 3.2.17", "futures", "hex", @@ -1579,7 +1580,7 @@ dependencies = [ "once_cell", "percent-encoding", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_yaml 0.8.26", "tokio", @@ -1597,7 +1598,7 @@ dependencies = [ "aptos-rosetta", "aptos-types", "clap 3.2.17", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "tokio", "url", @@ -1613,13 +1614,13 @@ dependencies = [ "aptos-global-constants", "aptos-rest-client", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "ed25519-dalek-bip32", "move-core-types", "once_cell", "rand 0.7.3", "rand_core 0.5.1", - "serde 1.0.144", + "serde 1.0.149", "tiny-bip39", "tokio", "url", @@ -1633,7 +1634,7 @@ dependencies = [ "aptos-cached-packages", "aptos-framework", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "heck 0.3.3", "move-core-types", "once_cell", @@ -1655,7 +1656,7 @@ dependencies = [ "aptos-logger", "aptos-metrics-core", "once_cell", - "serde 1.0.144", + "serde 1.0.149", "thiserror", ] @@ -1673,12 +1674,12 @@ dependencies = [ "aptos-time-service", "aptos-vault-client", "base64 0.13.0", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "chrono", "enum_dispatch", "rand 0.7.3", "schemadb", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "thiserror", ] @@ -1690,8 +1691,8 @@ dependencies = [ "anyhow", "aptos-crypto", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", - "serde 1.0.144", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", + "serde 1.0.149", "serde_bytes", "serde_json", ] @@ -1724,7 +1725,7 @@ dependencies = [ "reqwest", "reqwest-middleware", "reqwest-retry", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "state-sync-driver", "sysinfo", @@ -1750,7 +1751,7 @@ dependencies = [ "aptos-rest-client", "aptos-types", "base64 0.13.0", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "chrono", "clap 3.2.17", "debug-ignore", @@ -1767,7 +1768,7 @@ dependencies = [ "reqwest", "reqwest-middleware", "reqwest-retry", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_repr", "serde_yaml 0.8.26", @@ -1828,7 +1829,7 @@ dependencies = [ "aptos-state-view", "aptos-types", "aptos-vm", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "clap 3.2.17", "datatest-stable", "hex", @@ -1841,7 +1842,7 @@ dependencies = [ "move-transactional-test-runner", "move-vm-runtime", "once_cell", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "storage-interface", "vm-genesis", @@ -1855,7 +1856,7 @@ dependencies = [ "aptos-bitvec", "aptos-crypto", "aptos-crypto-derive", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "chrono", "claims", "hex", @@ -1869,7 +1870,7 @@ dependencies = [ "proptest-derive", "rand 0.7.3", "regex", - "serde 1.0.144", + "serde 1.0.149", "serde_bytes", "serde_json", "serde_yaml 0.8.26", @@ -1906,7 +1907,7 @@ dependencies = [ "native-tls", "once_cell", "proptest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "thiserror", "ureq", @@ -1928,7 +1929,7 @@ dependencies = [ "aptos-module-verifier", "aptos-state-view", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "dashmap", "fail 0.5.0", "move-binary-format", @@ -1947,7 +1948,7 @@ dependencies = [ "proptest", "rayon", "read-write-set-dynamic", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "smallvec", "tracing", @@ -1961,9 +1962,9 @@ dependencies = [ "aptos-api-types", "aptos-config", "aptos-logger", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "hyper", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "warp", ] @@ -1981,14 +1982,14 @@ dependencies = [ "aptos-state-view", "aptos-types", "aptos-vm", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "handlebars", "move-command-line-common", "move-compiler", "move-core-types", "move-vm-runtime", "move-vm-types", - "serde 1.0.144", + "serde 1.0.149", "tempfile", ] @@ -2014,7 +2015,7 @@ dependencies = [ "aptosdb-indexer", "arc-swap", "arr_macro", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "byteorder", "itertools", "lru", @@ -2028,7 +2029,7 @@ dependencies = [ "rayon", "schemadb", "scratchpad", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", "thiserror", ] @@ -2049,7 +2050,7 @@ dependencies = [ "aptos-temppath", "aptos-types", "aptos-vm", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "byteorder", "move-core-types", "move-resource-viewer", @@ -2059,7 +2060,7 @@ dependencies = [ "rand 0.7.3", "schemadb", "scratchpad", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", ] @@ -2102,7 +2103,7 @@ checksum = "0609c78bd572f4edc74310dfb63a01f5609d53fa8b4dd7c4d98aef3b3e8d72d1" dependencies = [ "proc-macro-hack", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -2123,6 +2124,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + [[package]] name = "ascii-canvas" version = "3.0.0" @@ -2138,7 +2145,7 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", "serde_json", ] @@ -2294,9 +2301,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -2311,9 +2318,9 @@ version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -2359,7 +2366,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_urlencoded", "sync_wrapper", @@ -2391,7 +2398,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustversion", - "serde 1.0.144", + "serde 1.0.149", "sync_wrapper", "tower", "tower-http", @@ -2480,20 +2487,20 @@ dependencies = [ [[package]] name = "bcs" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510fd83e3eaf7263b06182f3550b4c0af2af42cb36ab8024969ff5ea7fcb2833" +checksum = "8b06b4c1f053002b70e7084ac944c77d58d5d92b2110dbc5e852735e00ad3ccc" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", "thiserror", ] [[package]] name = "bcs" -version = "0.1.3" -source = "git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169#2cde3e8446c460cb17b0c1d6bac7e27e964ac169" +version = "0.1.4" +source = "git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d#d31fab9d81748e2594be5cd5cdf845786a30562d" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", "thiserror", ] @@ -2512,9 +2519,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3deeecb812ca5300b7d3f66f730cc2ebd3511c3d36c691dd79c165d5b19a26e3" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -2526,7 +2533,7 @@ dependencies = [ "num-bigint", "num-integer", "num-traits 0.2.15", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -2535,7 +2542,7 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -2550,7 +2557,7 @@ dependencies = [ "lazy_static 1.4.0", "lazycell", "peeking_take_while", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "regex", "rustc-hash", @@ -2594,7 +2601,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" dependencies = [ "funty", - "radium", + "radium 0.5.3", + "tap", + "wyz", +] + +[[package]] +name = "bitvec" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +dependencies = [ + "funty", + "radium 0.6.2", "tap", "wyz", ] @@ -2660,7 +2679,7 @@ dependencies = [ "lazy_static 1.4.0", "memchr", "regex-automata", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -2679,10 +2698,16 @@ version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + [[package]] name = "bytecode-interpreter-crypto" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "curve25519-dalek-fiat", @@ -2796,7 +2821,7 @@ dependencies = [ "js-sys", "num-integer", "num-traits 0.2.15", - "serde 1.0.144", + "serde 1.0.149", "time 0.1.44", "wasm-bindgen", "winapi 0.3.9", @@ -2908,9 +2933,9 @@ checksum = "13547f7012c01ab4a0e8f8967730ada8f9fdf419e8b6c792788f39cf4e46eefa" dependencies = [ "heck 0.4.0", "proc-macro-error", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -2929,7 +2954,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3362992a0d9f1dd7c3d0e89e0ab2bb540b7a95fea8cd798090e758fda2899b5e" dependencies = [ "codespan-reporting", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -2938,7 +2963,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", "termcolor", "unicode-width", ] @@ -2982,7 +3007,7 @@ dependencies = [ "lazy_static 1.4.0", "nom 5.1.2", "rust-ini", - "serde 1.0.144", + "serde 1.0.149", "serde-hjson", "serde_json", "toml", @@ -3028,7 +3053,7 @@ dependencies = [ "hdrhistogram", "humantime 2.1.0", "prost-types", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "thread_local", "tokio", @@ -3060,7 +3085,7 @@ version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef196d5d972878a48da7decb7686eded338b4858fbabeed513d63a7c98b2b82d" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "unicode-xid 0.2.3", ] @@ -3099,7 +3124,7 @@ dependencies = [ "idna", "log", "publicsuffix", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "time 0.3.13", "url", @@ -3157,7 +3182,7 @@ dependencies = [ "plotters", "rayon", "regex", - "serde 1.0.144", + "serde 1.0.149", "serde_cbor", "serde_derive", "serde_json", @@ -3350,7 +3375,7 @@ dependencies = [ "csv-core", "itoa 0.4.8", "ryu", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -3369,7 +3394,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdffe87e1d521a10f9696f833fe502293ea446d7f256c06128293a4119bdf4cb" dependencies = [ "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -3457,10 +3482,10 @@ checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "strsim 0.10.0", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -3471,7 +3496,7 @@ checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" dependencies = [ "darling_core", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -3508,7 +3533,7 @@ dependencies = [ "aptos-types", "aptos-vm", "aptosdb", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "storage-interface", "structopt", ] @@ -3519,7 +3544,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b48b0b49e2f473c499ddcd133e78f0f2629aaa997ee61adadb2d1753e6af4cf" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -3534,9 +3559,9 @@ version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "226ad66541d865d7a7173ad6a9e691c33fdb910ac723f4bc734b3e5294a1f931" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -3546,10 +3571,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "rustc_version", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -3585,9 +3610,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22a7ab9d7967e6a1a247ea38aedf88ab808b4ac0c159576bc71866ab8f9f9250" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -3712,7 +3737,7 @@ dependencies = [ "aptos-types", "aptos-vm", "aptos-writeset-generator", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "hex", "itertools", "language-e2e-tests", @@ -3724,7 +3749,7 @@ dependencies = [ "proptest", "rand 0.7.3", "rstest", - "serde 1.0.144", + "serde 1.0.149", "tempfile", "vm-genesis", ] @@ -3735,7 +3760,7 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", "signature", ] @@ -3748,7 +3773,7 @@ dependencies = [ "curve25519-dalek", "ed25519", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", "serde_bytes", "sha2 0.9.9", "zeroize", @@ -3775,7 +3800,7 @@ dependencies = [ "curve25519-dalek-fiat", "ed25519", "rand 0.8.5", - "serde 1.0.144", + "serde 1.0.149", "serde_bytes", "sha2 0.9.9", "zeroize", @@ -3818,9 +3843,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eb359f1476bf611266ac1f5355bc14aeca37b299d0ebccc038ee7058891c9cb" dependencies = [ "once_cell", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -3855,7 +3880,7 @@ version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "003000e712ad0f95857bd4d2ef8d1890069e06554101697d12050668b2f6f020" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -3920,7 +3945,7 @@ dependencies = [ "rayon", "schemadb", "scratchpad", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", "structopt", "toml", @@ -3979,7 +4004,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1320970ff3b1c1cacc6a38e8cdb1aced955f29627697cd992c5ded82eb646a8" dependencies = [ "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", +] + +[[package]] +name = "fixed-hash" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", ] [[package]] @@ -4131,9 +4168,9 @@ version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -4189,7 +4226,7 @@ dependencies = [ "hyper-rustls", "log", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "thiserror", "time 0.3.13", @@ -4210,11 +4247,11 @@ dependencies = [ "aptos-crypto", "aptos-crypto-derive", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "move-core-types", "network", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", "serde-reflection", "serde_yaml 0.8.26", "structopt", @@ -4391,7 +4428,7 @@ dependencies = [ "log", "pest", "pest_derive", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "thiserror", ] @@ -4603,7 +4640,7 @@ dependencies = [ "levenshtein", "log", "regex", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_regex", "similar", @@ -4758,6 +4795,35 @@ dependencies = [ "version_check", ] +[[package]] +name = "impl-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-serde" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" +dependencies = [ + "serde 1.0.149", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.105", +] + [[package]] name = "include_dir" version = "0.6.2" @@ -4787,9 +4853,9 @@ checksum = "0a0c890c85da4bab7bce4204c707396bbd3c6c8a681716a51c8814cfc2b682df" dependencies = [ "anyhow", "proc-macro-hack", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -4798,7 +4864,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e074c19deab2501407c91ba1860fa3d6820bfde307db6d8cb851b55a10be89b" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", ] @@ -4986,7 +5052,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f995a3c8f2bc3dd52a18a583e90f9ec109c047fa1603a853e46bcda14d2e279d" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", "serde_json", "treediff", ] @@ -5000,7 +5066,7 @@ dependencies = [ "array_tool", "env_logger 0.7.1", "log", - "serde 1.0.144", + "serde 1.0.149", "serde_json", ] @@ -5013,7 +5079,7 @@ dependencies = [ "base64 0.13.0", "pem 1.1.0", "ring", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "simple_asn1", ] @@ -5027,7 +5093,7 @@ dependencies = [ "base64 0.13.0", "bytes 1.2.1", "chrono", - "serde 1.0.144", + "serde 1.0.149", "serde-value", "serde_json", ] @@ -5062,7 +5128,7 @@ dependencies = [ "openssl", "pem 0.8.3", "pin-project", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_yaml 0.8.26", "static_assertions", @@ -5130,7 +5196,7 @@ dependencies = [ "aptos-state-view", "aptos-types", "aptos-vm", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "goldenfile", "hex", "move-binary-format", @@ -5143,7 +5209,7 @@ dependencies = [ "proptest", "proptest-derive", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", "vm-genesis", ] @@ -5162,7 +5228,7 @@ dependencies = [ "aptos-types", "aptos-vm", "aptos-writeset-generator", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "itertools", "language-e2e-tests", "move-binary-format", @@ -5170,7 +5236,7 @@ dependencies = [ "move-core-types", "move-ir-compiler", "proptest", - "serde 1.0.144", + "serde 1.0.149", "vm-genesis", ] @@ -5204,7 +5270,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ - "arrayvec", + "arrayvec 0.5.2", "bitflags", "cfg-if", "ryu", @@ -5288,7 +5354,7 @@ dependencies = [ "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", "rand 0.8.5", - "serde 1.0.144", + "serde 1.0.149", "sha2 0.9.9", "typenum", ] @@ -5382,7 +5448,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", - "serde 1.0.144", + "serde 1.0.149", "value-bag", ] @@ -5487,7 +5553,7 @@ dependencies = [ "async-trait", "claims", "futures", - "serde 1.0.144", + "serde 1.0.149", "thiserror", "tokio", ] @@ -5508,7 +5574,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c493c09323068c01e54c685f7da41a9ccf9219735c3766fbfd6099806ea08fbc" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", "toml", ] @@ -5519,7 +5585,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a8ff27a350511de30cdabb77147501c36ef02e0451d957abea2f30caffb2b58" dependencies = [ "migrations_internals", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", ] @@ -5616,9 +5682,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86d702a0530a0141cf4ed147cf5ec7be6f2c187d4e37fcbefc39cf34116bfe8f" dependencies = [ "cfg-if", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -5630,10 +5696,10 @@ checksum = "5474f8732dc7e0635ae9df6595bcd39cd30e3cfe8479850d4fa3e69306c19712" [[package]] name = "move-abigen" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heck 0.3.3", "log", "move-binary-format", @@ -5641,13 +5707,13 @@ dependencies = [ "move-command-line-common", "move-core-types", "move-model", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-binary-format" version = "0.0.3" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "arbitrary 1.1.7", @@ -5656,34 +5722,34 @@ dependencies = [ "proptest", "proptest-derive", "ref-cast", - "serde 1.0.144", + "serde 1.0.149", "variant_count", ] [[package]] name = "move-borrow-graph" version = "0.0.1" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" [[package]] name = "move-bytecode-source-map" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "move-binary-format", "move-command-line-common", "move-core-types", "move-ir-types", "move-symbol-pool", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-bytecode-utils" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "move-binary-format", @@ -5695,7 +5761,7 @@ dependencies = [ [[package]] name = "move-bytecode-verifier" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "move-binary-format", @@ -5707,7 +5773,7 @@ dependencies = [ [[package]] name = "move-bytecode-viewer" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "clap 3.2.17", @@ -5724,10 +5790,10 @@ dependencies = [ [[package]] name = "move-cli" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 3.2.17", "codespan-reporting", "colored", @@ -5759,7 +5825,7 @@ dependencies = [ "read-write-set", "read-write-set-dynamic", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_yaml 0.8.26", "tempfile", @@ -5770,7 +5836,7 @@ dependencies = [ [[package]] name = "move-command-line-common" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "difference", @@ -5779,7 +5845,7 @@ dependencies = [ "move-core-types", "num-bigint", "once_cell", - "serde 1.0.144", + "serde 1.0.149", "sha2 0.9.9", "walkdir", ] @@ -5787,10 +5853,10 @@ dependencies = [ [[package]] name = "move-compiler" version = "0.0.1" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 3.2.17", "codespan-reporting", "difference", @@ -5816,28 +5882,32 @@ dependencies = [ [[package]] name = "move-core-types" version = "0.0.4" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "arbitrary 1.1.7", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ethnum", "hex", + "num", "once_cell", + "primitive-types", "proptest", "proptest-derive", "rand 0.8.5", "ref-cast", - "serde 1.0.144", + "serde 1.0.149", "serde_bytes", + "uint", ] [[package]] name = "move-coverage" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 3.2.17", "codespan", "colored", @@ -5848,13 +5918,13 @@ dependencies = [ "move-ir-types", "once_cell", "petgraph 0.5.1", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-disassembler" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "clap 3.2.17", @@ -5872,7 +5942,7 @@ dependencies = [ [[package]] name = "move-docgen" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "codespan", @@ -5884,21 +5954,21 @@ dependencies = [ "num", "once_cell", "regex", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-errmapgen" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log", "move-command-line-common", "move-core-types", "move-model", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -5920,10 +5990,10 @@ dependencies = [ [[package]] name = "move-ir-compiler" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 3.2.17", "move-binary-format", "move-bytecode-source-map", @@ -5939,7 +6009,7 @@ dependencies = [ [[package]] name = "move-ir-to-bytecode" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "codespan-reporting", @@ -5958,7 +6028,7 @@ dependencies = [ [[package]] name = "move-ir-to-bytecode-syntax" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "hex", @@ -5971,7 +6041,7 @@ dependencies = [ [[package]] name = "move-ir-types" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "hex", @@ -5979,13 +6049,13 @@ dependencies = [ "move-core-types", "move-symbol-pool", "once_cell", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-model" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "codespan", @@ -6005,16 +6075,16 @@ dependencies = [ "num", "once_cell", "regex", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-package" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "clap 3.2.17", "colored", "dirs-next", @@ -6035,7 +6105,7 @@ dependencies = [ "ptree", "regex", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_yaml 0.8.26", "sha2 0.9.9", "tempfile", @@ -6047,7 +6117,7 @@ dependencies = [ [[package]] name = "move-prover" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "async-trait", @@ -6074,7 +6144,7 @@ dependencies = [ "once_cell", "pretty", "rand 0.8.5", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "simplelog", "tokio", @@ -6084,7 +6154,7 @@ dependencies = [ [[package]] name = "move-prover-boogie-backend" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "async-trait", @@ -6103,7 +6173,7 @@ dependencies = [ "pretty", "rand 0.8.5", "regex", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "tera", "tokio", @@ -6112,33 +6182,33 @@ dependencies = [ [[package]] name = "move-read-write-set-types" version = "0.0.3" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "move-binary-format", "move-core-types", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-resource-viewer" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "hex", "move-binary-format", "move-bytecode-utils", "move-core-types", "once_cell", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-stackless-bytecode" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "codespan", "codespan-reporting", @@ -6159,13 +6229,13 @@ dependencies = [ "once_cell", "paste", "petgraph 0.5.1", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-stackless-bytecode-interpreter" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "bytecode-interpreter-crypto", @@ -6177,13 +6247,13 @@ dependencies = [ "move-model", "move-stackless-bytecode", "num", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-stdlib" version = "0.1.1" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "hex", @@ -6206,19 +6276,19 @@ dependencies = [ [[package]] name = "move-symbol-pool" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "once_cell", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-table-extension" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "better_any", "move-binary-format", "move-core-types", @@ -6232,7 +6302,7 @@ dependencies = [ [[package]] name = "move-transactional-test-runner" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "clap 3.2.17", @@ -6240,6 +6310,7 @@ dependencies = [ "move-binary-format", "move-bytecode-source-map", "move-bytecode-utils", + "move-bytecode-verifier", "move-cli", "move-command-line-common", "move-compiler", @@ -6263,7 +6334,7 @@ dependencies = [ [[package]] name = "move-unit-test" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "better_any", @@ -6294,7 +6365,7 @@ dependencies = [ [[package]] name = "move-vm-runtime" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "better_any", "fail 0.4.0", @@ -6311,7 +6382,7 @@ dependencies = [ [[package]] name = "move-vm-test-utils" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "move-binary-format", @@ -6319,20 +6390,20 @@ dependencies = [ "move-table-extension", "move-vm-types", "once_cell", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "move-vm-types" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "move-binary-format", "move-core-types", "once_cell", "proptest", - "serde 1.0.144", + "serde 1.0.149", "smallvec", ] @@ -6380,7 +6451,7 @@ dependencies = [ "anyhow", "aptos-aggregator", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "crossbeam", "dashmap", "proptest", @@ -6430,7 +6501,7 @@ dependencies = [ "memsocket", "pin-project", "proxy", - "serde 1.0.144", + "serde 1.0.149", "tokio", "tokio-util 0.7.3", "url", @@ -6455,7 +6526,7 @@ dependencies = [ "aptos-time-service", "aptos-types", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes 1.2.1", "channel", "futures", @@ -6472,7 +6543,7 @@ dependencies = [ "proptest-derive", "rand 0.7.3", "rand_core 0.5.1", - "serde 1.0.144", + "serde 1.0.149", "serde_bytes", "serde_json", "short-hex-str", @@ -6495,14 +6566,14 @@ dependencies = [ "aptos-time-service", "aptos-types", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "channel", "futures", "netcore", "network", "network-discovery", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", "tokio", ] @@ -6520,7 +6591,7 @@ dependencies = [ "aptos-temppath", "aptos-time-service", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "channel", "futures", "netcore", @@ -6628,9 +6699,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -6688,9 +6759,9 @@ dependencies = [ name = "num-variants" version = "0.1.0" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -6766,9 +6837,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -6823,9 +6894,9 @@ checksum = "03f2cb802b5bdfdf52f1ffa0b54ce105e4d346e91990dd571f86c91321ad49e2" dependencies = [ "Inflector", "proc-macro-error", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -6849,6 +6920,32 @@ dependencies = [ "tempfile", ] +[[package]] +name = "parity-scale-codec" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +dependencies = [ + "arrayvec 0.7.2", + "bitvec 0.20.4", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde 1.0.149", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.105", +] + [[package]] name = "parking" version = "2.0.0" @@ -6955,7 +7052,7 @@ dependencies = [ "aptos-logger", "aptos-metrics-core", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes 1.2.1", "channel", "futures", @@ -6963,7 +7060,7 @@ dependencies = [ "network", "once_cell", "peer-monitoring-service-types", - "serde 1.0.144", + "serde 1.0.149", "thiserror", "tokio", ] @@ -6974,7 +7071,7 @@ version = "0.1.0" dependencies = [ "aptos-config", "network", - "serde 1.0.144", + "serde 1.0.149", "thiserror", ] @@ -7032,9 +7129,9 @@ checksum = "5803d8284a629cc999094ecd630f55e91b561a1d1ba75e233b00ae13b91a69ad" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -7137,9 +7234,9 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -7212,7 +7309,7 @@ dependencies = [ "regex", "rfc7239", "rustls-pemfile 1.0.1", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_urlencoded", "smallvec", @@ -7234,9 +7331,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee7e20b5c7c573862cbc21e8f85682cc1f04766a318691837e8aa27df66857e6" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -7254,7 +7351,7 @@ dependencies = [ "poem", "poem-openapi-derive", "regex", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_urlencoded", "serde_yaml 0.9.10", @@ -7274,10 +7371,10 @@ dependencies = [ "indexmap", "mime", "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "regex", - "syn 1.0.99", + "syn 1.0.105", "thiserror", ] @@ -7364,7 +7461,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad9940b913ee56ddd94aec2d3cd179dd47068236f42a1a6415ccf9d880ce2a61" dependencies = [ - "arrayvec", + "arrayvec 0.5.2", "typed-arena", ] @@ -7380,6 +7477,18 @@ dependencies = [ "output_vt100", ] +[[package]] +name = "primitive-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-serde", + "uint", +] + [[package]] name = "proc-macro-crate" version = "1.2.1" @@ -7398,9 +7507,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", "version_check", ] @@ -7410,7 +7519,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "version_check", ] @@ -7432,9 +7541,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] @@ -7481,7 +7590,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ae2f6a3f14ff35c16b51ac796d1dc73c15ad6472c48836c6c467f6d52266648" dependencies = [ "reqwest", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "time 0.3.13", "url", @@ -7548,9 +7657,9 @@ checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -7587,7 +7696,7 @@ dependencies = [ "config", "directories", "petgraph 0.6.2", - "serde 1.0.144", + "serde 1.0.149", "serde-value", "tint", ] @@ -7654,7 +7763,7 @@ version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", ] [[package]] @@ -7674,6 +7783,12 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" +[[package]] +name = "radium" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" + [[package]] name = "rand" version = "0.7.3" @@ -7809,7 +7924,7 @@ dependencies = [ [[package]] name = "read-write-set" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "move-binary-format", @@ -7824,7 +7939,7 @@ dependencies = [ [[package]] name = "read-write-set-dynamic" version = "0.1.0" -source = "git+https://github.com/move-language/move?rev=c8663453b1c1ceed0928e0afeb8a15f7c94e47a6#c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" +source = "git+https://github.com/move-language/move?rev=81d19fce20d73675b7ac129abe6b6797513cc8d0#81d19fce20d73675b7ac129abe6b6797513cc8d0" dependencies = [ "anyhow", "move-binary-format", @@ -7868,9 +7983,9 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5234cd6063258a5e32903b53b1b6ac043a0541c8adc1f610f67b0326c7a578fa" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -7939,7 +8054,7 @@ dependencies = [ "proc-macro-hack", "rustls 0.20.6", "rustls-pemfile 1.0.1", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_urlencoded", "tokio", @@ -7966,7 +8081,7 @@ dependencies = [ "futures", "http", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "task-local-extensions", "thiserror", ] @@ -8063,10 +8178,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5015e68a0685a95ade3eee617ff7101ab6a3fc689203101ca16ebc16f2b89c66" dependencies = [ "cfg-if", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "rustc_version", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -8087,6 +8202,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + [[package]] name = "rustc_version" version = "0.4.0" @@ -8217,7 +8338,7 @@ dependencies = [ "proptest", "rand 0.7.3", "rusty-fork", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "tempfile", "thiserror", @@ -8286,7 +8407,7 @@ dependencies = [ "aptos-infallible", "aptos-metrics-core", "aptos-types", - "bitvec", + "bitvec 0.19.6", "criterion", "itertools", "once_cell", @@ -8370,9 +8491,9 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" -version = "1.0.144" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055" dependencies = [ "serde_derive", ] @@ -8382,12 +8503,12 @@ name = "serde-generate" version = "0.20.6" source = "git+https://github.com/aptos-labs/serde-reflection?rev=839aed62a20ddccf043c08961cfe74875741ccba#839aed62a20ddccf043c08961cfe74875741ccba" dependencies = [ - "bcs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bcs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "bincode", "heck 0.3.3", "include_dir 0.6.2", "maplit", - "serde 1.0.144", + "serde 1.0.149", "serde-reflection", "serde_bytes", "serde_yaml 0.8.26", @@ -8413,7 +8534,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12c47087018ec281d1cdab673d36aea22d816b54d498264029c05d5fa1910da6" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", "thiserror", ] @@ -8423,7 +8544,7 @@ version = "0.3.5" source = "git+https://github.com/aptos-labs/serde-reflection?rev=839aed62a20ddccf043c08961cfe74875741ccba#839aed62a20ddccf043c08961cfe74875741ccba" dependencies = [ "once_cell", - "serde 1.0.144", + "serde 1.0.149", "thiserror", ] @@ -8434,7 +8555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" dependencies = [ "ordered-float", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -8443,7 +8564,7 @@ version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -8453,18 +8574,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ "half", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] name = "serde_derive" -version = "1.0.144" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +checksum = "b4eae9b04cbffdfd550eb462ed33bc6a1b68c935127d008b27444d08380f94e4" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -8476,7 +8597,7 @@ dependencies = [ "indexmap", "itoa 1.0.3", "ryu", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -8486,7 +8607,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8136f1a4ea815d7eac4101cfd0b16dc0cb5e1fe1b8609dfd728058656b7badf" dependencies = [ "regex", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -8495,9 +8616,9 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fe39d9fbb0ebf5eb2c7cb7e2a47e4f462fad1379f1166b8ae49ad9eae89a7ca" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -8509,7 +8630,7 @@ dependencies = [ "form_urlencoded", "itoa 1.0.3", "ryu", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -8520,7 +8641,7 @@ checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ "indexmap", "ryu", - "serde 1.0.144", + "serde 1.0.149", "yaml-rust", ] @@ -8533,7 +8654,7 @@ dependencies = [ "indexmap", "itoa 1.0.3", "ryu", - "serde 1.0.144", + "serde 1.0.149", "unsafe-libyaml", ] @@ -8632,7 +8753,7 @@ dependencies = [ "hex", "mirai-annotations", "proptest", - "serde 1.0.144", + "serde 1.0.149", "static_assertions", "thiserror", ] @@ -8809,7 +8930,7 @@ dependencies = [ "aptos-writeset-generator", "async-trait", "base64 0.13.0", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "diesel", "futures", "hex", @@ -8877,7 +8998,7 @@ dependencies = [ "aptos-vm", "aptosdb", "async-trait", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "channel", "claims", "futures", @@ -8889,7 +9010,7 @@ dependencies = [ "rand 0.7.3", "schemadb", "scratchpad", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", "storage-service-client", "storage-service-types", @@ -8924,14 +9045,14 @@ dependencies = [ "aptos-types", "aptos-vm", "assert_unordered", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "crossbeam-channel", "move-core-types", "once_cell", "parking_lot 0.12.1", "rayon", "scratchpad", - "serde 1.0.144", + "serde 1.0.149", "thiserror", ] @@ -8962,7 +9083,7 @@ dependencies = [ "aptos-metrics-core", "aptos-time-service", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "bytes 1.2.1", "channel", "claims", @@ -8972,7 +9093,7 @@ dependencies = [ "network", "once_cell", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", "storage-interface", "storage-service-types", "thiserror", @@ -8987,11 +9108,11 @@ dependencies = [ "aptos-config", "aptos-crypto", "aptos-types", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "claims", "num-traits 0.2.15", "proptest", - "serde 1.0.144", + "serde 1.0.149", "thiserror", ] @@ -9039,9 +9160,9 @@ checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ "heck 0.3.3", "proc-macro-error", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -9057,10 +9178,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.0", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "rustversion", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -9082,11 +9203,11 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.99" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "unicode-ident", ] @@ -9103,9 +9224,9 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", "unicode-xid 0.2.3", ] @@ -9169,7 +9290,7 @@ dependencies = [ "pest_derive", "rand 0.8.5", "regex", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "slug", "unic-segment", @@ -9266,22 +9387,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -9322,7 +9443,7 @@ dependencies = [ "itoa 1.0.3", "libc", "num_threads", - "serde 1.0.144", + "serde 1.0.149", "time-macros", ] @@ -9375,7 +9496,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", "serde_json", ] @@ -9431,9 +9552,9 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -9551,7 +9672,7 @@ version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -9563,7 +9684,7 @@ dependencies = [ "combine", "indexmap", "itertools", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -9668,9 +9789,9 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -9761,7 +9882,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "reqwest", - "serde 1.0.144", + "serde 1.0.149", "tokio", "url", ] @@ -9789,7 +9910,7 @@ checksum = "e7f408301c7480f9e6294eb779cfc907f54bd901a9660ef24d7f233ed5376485" dependencies = [ "glob", "once_cell", - "serde 1.0.144", + "serde 1.0.149", "serde_derive", "serde_json", "termcolor", @@ -9890,6 +10011,18 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c" +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + [[package]] name = "uncased" version = "0.9.7" @@ -10046,7 +10179,7 @@ dependencies = [ "native-tls", "once_cell", "qstring", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "url", ] @@ -10061,7 +10194,7 @@ dependencies = [ "idna", "matches", "percent-encoding", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -10093,7 +10226,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f" dependencies = [ "getrandom 0.2.7", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -10119,7 +10252,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae2faf80ac463422992abf4de234731279c058aaf33171ca70277c98406b124" dependencies = [ "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", ] [[package]] @@ -10153,14 +10286,14 @@ dependencies = [ "aptos-state-view", "aptos-types", "aptos-vm", - "bcs 0.1.3 (git+https://github.com/aptos-labs/bcs?rev=2cde3e8446c460cb17b0c1d6bac7e27e964ac169)", + "bcs 0.1.4 (git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d)", "move-core-types", "move-vm-types", "once_cell", "proptest", "proptest-derive", "rand 0.7.3", - "serde 1.0.144", + "serde 1.0.149", ] [[package]] @@ -10240,7 +10373,7 @@ dependencies = [ "percent-encoding", "pin-project", "scoped-tls", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "serde_urlencoded", "tokio", @@ -10303,9 +10436,9 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", "wasm-bindgen-shared", ] @@ -10337,9 +10470,9 @@ version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10574,7 +10707,7 @@ dependencies = [ "rustls 0.20.6", "rustls-pemfile 0.3.0", "seahash", - "serde 1.0.144", + "serde 1.0.149", "serde_json", "time 0.3.13", "tokio", @@ -10597,9 +10730,9 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.105", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index 767fabbb7a323..e1dcba329e76e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -288,7 +288,7 @@ async-trait = "0.1.53" axum = "0.5.16" base64 = "0.13.0" backtrace = "0.3.58" -bcs = { git = "https://github.com/aptos-labs/bcs", rev = "2cde3e8446c460cb17b0c1d6bac7e27e964ac169" } +bcs = { git = "https://github.com/aptos-labs/bcs.git", rev = "d31fab9d81748e2594be5cd5cdf845786a30562d" } better_any = "0.1.1" bigdecimal = { version = "0.3.0", features = ["serde"] } bitvec = "0.19.4" @@ -425,7 +425,7 @@ sysinfo = "0.24.2" tempfile = "3.3.0" termcolor = "1.1.2" textwrap = "0.15.0" -thiserror = "1.0.31" +thiserror = "1.0.37" tiny-bip39 = "0.8.2" tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] } tracing = "0.1.34" @@ -449,34 +449,34 @@ x25519-dalek = "1.2.0" # Note: the BEGIN and END comments below are required for external tooling. Do not remove. # BEGIN MOVE DEPENDENCIES -move-abigen = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-binary-format = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-bytecode-verifier = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-bytecode-utils = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-cli = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-command-line-common = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-compiler ={ git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-core-types = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6", features = ["address32"] } -move-docgen = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-ir-compiler = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-model = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-package = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-prover = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-prover-boogie-backend = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-stackless-bytecode = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-prover-test-utils = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-resource-viewer = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-stackless-bytecode-interpreter = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-stdlib = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-symbol-pool = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-table-extension = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-transactional-test-runner = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -move-unit-test = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6", features = ["table-extension"] } -move-vm-runtime = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6", features = ["lazy_natives"] } -move-vm-test-utils = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6", features = ["table-extension"] } -move-vm-types = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -read-write-set = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } -read-write-set-dynamic = { git = "https://github.com/move-language/move", rev = "c8663453b1c1ceed0928e0afeb8a15f7c94e47a6" } +move-abigen = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-binary-format = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-bytecode-verifier = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-bytecode-utils = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-cli = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-command-line-common = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-compiler ={ git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-core-types = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0", features = ["address32"] } +move-docgen = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-ir-compiler = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-model = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-package = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-prover = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-prover-boogie-backend = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-stackless-bytecode = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-prover-test-utils = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-resource-viewer = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-stackless-bytecode-interpreter = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-stdlib = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-symbol-pool = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-table-extension = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-transactional-test-runner = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +move-unit-test = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0", features = ["table-extension"] } +move-vm-runtime = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0", features = ["lazy_natives"] } +move-vm-test-utils = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0", features = ["table-extension"] } +move-vm-types = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +read-write-set = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } +read-write-set-dynamic = { git = "https://github.com/move-language/move", rev = "81d19fce20d73675b7ac129abe6b6797513cc8d0" } # END MOVE DEPENDENCIES [profile.release] diff --git a/api/doc/spec.json b/api/doc/spec.json index 18d81b330fc2c..8afb79ef5710f 100644 --- a/api/doc/spec.json +++ b/api/doc/spec.json @@ -12326,7 +12326,7 @@ }, "MoveStructValue": { "type": "object", - "description": "This is a JSON representation of some data within an account resource. More specifically,\nit is a map of strings to arbitrary JSON values / objects, where the keys are top level\nfields within the given resource.\n\nTo clarify, you might query for 0x1::account::Account and see the example data.\n\nMove `bool` type value is serialized into `boolean`.\n\nMove `u8` type value is serialized into `integer`.\n\nMove `u64` and `u128` type value is serialized into `string`.\n\nMove `address` type value (32 byte Aptos account address) is serialized into a HexEncodedBytes string.\nFor example:\n - `0x1`\n - `0x1668f6be25668c1a17cd8caf6b8d2f25`\n\nMove `vector` type value is serialized into `array`, except `vector` which is serialized into a\nHexEncodedBytes string with `0x` prefix.\nFor example:\n - `vector{255, 255}` => `[\"255\", \"255\"]`\n - `vector{255, 255}` => `0xffff`\n\nMove `struct` type value is serialized into `object` that looks like this (except some Move stdlib types, see the following section):\n ```json\n {\n field1_name: field1_value,\n field2_name: field2_value,\n ......\n }\n ```\n\nFor example:\n `{ \"created\": \"0xa550c18\", \"role_id\": \"0\" }`\n\n**Special serialization for Move stdlib types**:\n - [0x1::string::String](https://github.com/aptos-labs/aptos-core/blob/main/language/move-stdlib/docs/ascii.md)\n is serialized into `string`. For example, struct value `0x1::string::String{bytes: b\"Hello World!\"}`\n is serialized as `\"Hello World!\"` in JSON.\n", + "description": "This is a JSON representation of some data within an account resource. More specifically,\nit is a map of strings to arbitrary JSON values / objects, where the keys are top level\nfields within the given resource.\n\nTo clarify, you might query for 0x1::account::Account and see the example data.\n\nMove `bool` type value is serialized into `boolean`.\n\nMove `u8`, `u16` and `u32` type value is serialized into `integer`.\n\nMove `u64`, `u128` and `u256` type value is serialized into `string`.\n\nMove `address` type value (32 byte Aptos account address) is serialized into a HexEncodedBytes string.\nFor example:\n - `0x1`\n - `0x1668f6be25668c1a17cd8caf6b8d2f25`\n\nMove `vector` type value is serialized into `array`, except `vector` which is serialized into a\nHexEncodedBytes string with `0x` prefix.\nFor example:\n - `vector{255, 255}` => `[\"255\", \"255\"]`\n - `vector{255, 255}` => `0xffff`\n\nMove `struct` type value is serialized into `object` that looks like this (except some Move stdlib types, see the following section):\n ```json\n {\n field1_name: field1_value,\n field2_name: field2_value,\n ......\n }\n ```\n\nFor example:\n `{ \"created\": \"0xa550c18\", \"role_id\": \"0\" }`\n\n**Special serialization for Move stdlib types**:\n - [0x1::string::String](https://github.com/aptos-labs/aptos-core/blob/main/language/move-stdlib/docs/ascii.md)\n is serialized into `string`. For example, struct value `0x1::string::String{bytes: b\"Hello World!\"}`\n is serialized as `\"Hello World!\"` in JSON.\n", "example": { "authentication_key": "0x0000000000000000000000000000000000000000000000000000000000000001", "coin_register_events": { @@ -12344,7 +12344,7 @@ }, "MoveType": { "type": "string", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.\n Values:\n - bool\n - u8\n - u64\n - u128\n - address\n - signer\n - vector: `vector<{non-reference MoveTypeId}>`\n - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`\n\n Vector type value examples:\n - `vector`\n - `vector>`\n - `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`\n\n Struct type value examples:\n - `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>\n - `0x1::account::Account`\n\n Note:\n 1. Empty chars should be ignored when comparing 2 struct tag ids.\n 2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).\n", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.\n Values:\n - bool\n - u8\n - u16\n - u32\n - u64\n - u128\n - u256\n - address\n - signer\n - vector: `vector<{non-reference MoveTypeId}>`\n - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`\n\n Vector type value examples:\n - `vector`\n - `vector>`\n - `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`\n\n Struct type value examples:\n - `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>\n - `0x1::account::Account`\n\n Note:\n 1. Empty chars should be ignored when comparing 2 struct tag ids.\n 2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).\n", "pattern": "^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$" }, "MoveValue": { @@ -12355,12 +12355,23 @@ "type": "integer", "format": "uint8" }, + { + "type": "integer", + "format": "uint16" + }, + { + "type": "integer", + "format": "uint32" + }, { "$ref": "#/components/schemas/U64" }, { "$ref": "#/components/schemas/U128" }, + { + "$ref": "#/components/schemas/U256" + }, { "type": "boolean" }, @@ -12985,8 +12996,14 @@ }, "U128": { "type": "string", - "format": "uint64", - "description": "A string containing a 128-bit unsigned integer.\n\nWe represent u128 values as a string to ensure compatibility with languages such\nas JavaScript that do not parse u64s in JSON natively.\n", + "format": "uint128", + "description": "A string containing a 128-bit unsigned integer.\n\nWe represent u128 values as a string to ensure compatibility with languages such\nas JavaScript that do not parse u128s in JSON natively.\n", + "example": "340282366920938463463374607431768211454" + }, + "U256": { + "type": "string", + "format": "uint256", + "description": "A string containing a 256-bit unsigned integer.\n\nWe represent u256 values as a string to ensure compatibility with languages such\nas JavaScript that do not parse u256s in JSON natively.\n", "example": "340282366920938463463374607431768211454" }, "U64": { diff --git a/api/doc/spec.yaml b/api/doc/spec.yaml index 3c9262a9b9794..ccb28a45922ae 100644 --- a/api/doc/spec.yaml +++ b/api/doc/spec.yaml @@ -9278,9 +9278,9 @@ components: Move `bool` type value is serialized into `boolean`. - Move `u8` type value is serialized into `integer`. + Move `u8`, `u16` and `u32` type value is serialized into `integer`. - Move `u64` and `u128` type value is serialized into `string`. + Move `u64`, `u128` and `u256` type value is serialized into `string`. Move `address` type value (32 byte Aptos account address) is serialized into a HexEncodedBytes string. For example: @@ -9326,8 +9326,11 @@ components: Values: - bool - u8 + - u16 + - u32 - u64 - u128 + - u256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` @@ -9352,8 +9355,13 @@ components: anyOf: - type: integer format: uint8 + - type: integer + format: uint16 + - type: integer + format: uint32 - $ref: '#/components/schemas/U64' - $ref: '#/components/schemas/U128' + - $ref: '#/components/schemas/U256' - type: boolean - $ref: '#/components/schemas/Address' - type: array @@ -9757,12 +9765,21 @@ components: $ref: '#/components/schemas/TransactionsBatchSingleSubmissionFailure' U128: type: string - format: uint64 + format: uint128 description: | A string containing a 128-bit unsigned integer. We represent u128 values as a string to ensure compatibility with languages such - as JavaScript that do not parse u64s in JSON natively. + as JavaScript that do not parse u128s in JSON natively. + example: '340282366920938463463374607431768211454' + U256: + type: string + format: uint256 + description: | + A string containing a 256-bit unsigned integer. + + We represent u256 values as a string to ensure compatibility with languages such + as JavaScript that do not parse u256s in JSON natively. example: '340282366920938463463374607431768211454' U64: type: string diff --git a/api/goldens/aptos_api__tests__state_test__test_get_account_module.json b/api/goldens/aptos_api__tests__state_test__test_get_account_module.json index cc4610433bfad..8392ad0f78ccf 100644 --- a/api/goldens/aptos_api__tests__state_test__test_get_account_module.json +++ b/api/goldens/aptos_api__tests__state_test__test_get_account_module.json @@ -1,5 +1,5 @@ { - "bytecode": "0xa11ceb0b050000000c010002020208030a2805322307557408c9012006e9010a10f30198010a8b030d0c98037e0d9604060f9c040200010002060000030700000400010000050203000006040500000704060000080708000009040300000a090500000b0906000205070301080002050301080101060800010301050206080006080101010106080100076163636f756e740467756964044755494402494406637265617465096372656174655f69640c6372656174696f6e5f6e756d0f63726561746f725f616464726573730565715f69640269640f69645f6372656174696f6e5f6e756d1269645f63726561746f725f616464726573730461646472000000000000000000000000000000000000000000000000000000000000000103080000000000000000126170746f733a3a6d657461646174615f763083010100000000000000001d45475549445f47454e455241544f525f4e4f545f5055424c49534845445b475549442067656e657261746f72206d757374206265207075626c6973686564206168656164206f66206669727374207573616765206f6620606372656174655f776974685f6361706162696c697479602066756e6374696f6e2e00020109080101020206030c0500030000050d0a01140c020a02060100000000000000160b01150b020b001201120002010100000a040b010b00120102020100000a050b00100010011402030100000a050b00100010021402040100000a050b0010000b012102050100000a040b0010001402060100000a040b0010011402070100000a040b0010021402000001000101000000", + "bytecode": "0xa11ceb0b060000000c010002020208030a2805322307557408c9012006e9010a10f30198010a8b030d0c98037e0d9604060f9c040200010002060000030700000400010000050203000006040500000704060000080708000009040300000a090500000b0906000205070301080002050301080101060800010301050206080006080101010106080100076163636f756e740467756964044755494402494406637265617465096372656174655f69640c6372656174696f6e5f6e756d0f63726561746f725f616464726573730565715f69640269640f69645f6372656174696f6e5f6e756d1269645f63726561746f725f616464726573730461646472000000000000000000000000000000000000000000000000000000000000000103080000000000000000126170746f733a3a6d657461646174615f763083010100000000000000001d45475549445f47454e455241544f525f4e4f545f5055424c49534845445b475549442067656e657261746f72206d757374206265207075626c6973686564206168656164206f66206669727374207573616765206f6620606372656174655f776974685f6361706162696c697479602066756e6374696f6e2e00020109080101020206030c0500030000050d0a01140c020a02060100000000000000160b01150b020b001201120002010100000a040b010b00120102020100000a050b00100010011402030100000a050b00100010021402040100000a050b0010000b012102050100000a040b0010001402060100000a040b0010011402070100000a040b0010021402000001000101000000", "abi": { "address": "0x1", "name": "guid", diff --git a/api/goldens/aptos_api__tests__transactions_test__test_get_transactions_output_user_transaction_with_entry_function_payload.json b/api/goldens/aptos_api__tests__transactions_test__test_get_transactions_output_user_transaction_with_entry_function_payload.json index a4feb4611041d..99456f9f8ac75 100644 --- a/api/goldens/aptos_api__tests__transactions_test__test_get_transactions_output_user_transaction_with_entry_function_payload.json +++ b/api/goldens/aptos_api__tests__transactions_test__test_get_transactions_output_user_transaction_with_entry_function_payload.json @@ -114,7 +114,7 @@ "state_change_hash": "", "event_root_hash": "", "state_checkpoint_hash": null, - "gas_used": "1538", + "gas_used": "1537", "success": true, "vm_status": "Executed successfully", "accumulator_root_hash": "", diff --git a/api/goldens/aptos_api__tests__transactions_test__test_get_transactions_returns_last_page_when_start_version_is_not_specified.json b/api/goldens/aptos_api__tests__transactions_test__test_get_transactions_returns_last_page_when_start_version_is_not_specified.json index 7e9baf93247ce..ca84c8aa11340 100644 --- a/api/goldens/aptos_api__tests__transactions_test__test_get_transactions_returns_last_page_when_start_version_is_not_specified.json +++ b/api/goldens/aptos_api__tests__transactions_test__test_get_transactions_returns_last_page_when_start_version_is_not_specified.json @@ -119,7 +119,7 @@ "state_change_hash": "", "event_root_hash": "", "state_checkpoint_hash": null, - "gas_used": "1538", + "gas_used": "1537", "success": true, "vm_status": "Executed successfully", "accumulator_root_hash": "", @@ -397,7 +397,7 @@ "state_change_hash": "", "event_root_hash": "", "state_checkpoint_hash": null, - "gas_used": "1538", + "gas_used": "1537", "success": true, "vm_status": "Executed successfully", "accumulator_root_hash": "", @@ -675,7 +675,7 @@ "state_change_hash": "", "event_root_hash": "", "state_checkpoint_hash": null, - "gas_used": "1538", + "gas_used": "1537", "success": true, "vm_status": "Executed successfully", "accumulator_root_hash": "", @@ -953,7 +953,7 @@ "state_change_hash": "", "event_root_hash": "", "state_checkpoint_hash": null, - "gas_used": "1538", + "gas_used": "1537", "success": true, "vm_status": "Executed successfully", "accumulator_root_hash": "", @@ -1231,7 +1231,7 @@ "state_change_hash": "", "event_root_hash": "", "state_checkpoint_hash": null, - "gas_used": "1538", + "gas_used": "1537", "success": true, "vm_status": "Executed successfully", "accumulator_root_hash": "", @@ -1509,7 +1509,7 @@ "state_change_hash": "", "event_root_hash": "", "state_checkpoint_hash": null, - "gas_used": "1538", + "gas_used": "1537", "success": true, "vm_status": "Executed successfully", "accumulator_root_hash": "", @@ -1787,7 +1787,7 @@ "state_change_hash": "", "event_root_hash": "", "state_checkpoint_hash": null, - "gas_used": "1538", + "gas_used": "1537", "success": true, "vm_status": "Executed successfully", "accumulator_root_hash": "", @@ -2065,7 +2065,7 @@ "state_change_hash": "", "event_root_hash": "", "state_checkpoint_hash": null, - "gas_used": "1538", + "gas_used": "1537", "success": true, "vm_status": "Executed successfully", "accumulator_root_hash": "", diff --git a/api/types/src/bytecode.rs b/api/types/src/bytecode.rs index e8ce6bba5cc5e..e4e8ee614942e 100644 --- a/api/types/src/bytecode.rs +++ b/api/types/src/bytecode.rs @@ -63,8 +63,11 @@ pub trait Bytecode { match token { SignatureToken::Bool => MoveType::Bool, SignatureToken::U8 => MoveType::U8, + SignatureToken::U16 => MoveType::U16, + SignatureToken::U32 => MoveType::U32, SignatureToken::U64 => MoveType::U64, SignatureToken::U128 => MoveType::U128, + SignatureToken::U256 => MoveType::U256, SignatureToken::Address => MoveType::Address, SignatureToken::Signer => MoveType::Signer, SignatureToken::Vector(t) => MoveType::Vector { diff --git a/api/types/src/convert.rs b/api/types/src/convert.rs index 6863ef2403119..acff465639d65 100644 --- a/api/types/src/convert.rs +++ b/api/types/src/convert.rs @@ -600,8 +600,11 @@ impl<'a, R: MoveResolverExt + ?Sized> MoveConverter<'a, R> { Ok(match layout { MoveTypeLayout::Bool => Bool(serde_json::from_value::(val)?), MoveTypeLayout::U8 => U8(serde_json::from_value::(val)?), + MoveTypeLayout::U16 => U16(serde_json::from_value::(val)?), + MoveTypeLayout::U32 => U32(serde_json::from_value::(val)?), MoveTypeLayout::U64 => serde_json::from_value::(val)?.into(), MoveTypeLayout::U128 => serde_json::from_value::(val)?.into(), + MoveTypeLayout::U256 => serde_json::from_value::(val)?.into(), MoveTypeLayout::Address => serde_json::from_value::(val)?.into(), MoveTypeLayout::Vector(item_layout) => { self.try_into_vm_value_vector(item_layout.as_ref(), val)? diff --git a/api/types/src/derives.rs b/api/types/src/derives.rs index f899ea781a108..ff2b81cd65999 100644 --- a/api/types/src/derives.rs +++ b/api/types/src/derives.rs @@ -24,7 +24,7 @@ use serde_json::json; use crate::{ move_types::{MoveAbility, MoveStructValue}, Address, EntryFunctionId, HashValue, HexEncodedBytes, IdentifierWrapper, MoveModuleId, - MoveStructTag, MoveType, StateKeyWrapper, U128, U64, + MoveStructTag, MoveType, StateKeyWrapper, U128, U256, U64, }; use indoc::indoc; @@ -160,9 +160,9 @@ impl_poem_type!( Move `bool` type value is serialized into `boolean`. - Move `u8` type value is serialized into `integer`. + Move `u8`, `u16` and `u32` type value is serialized into `integer`. - Move `u64` and `u128` type value is serialized into `string`. + Move `u64`, `u128` and `u256` type value is serialized into `string`. Move `address` type value (32 byte Aptos account address) is serialized into a HexEncodedBytes string. For example: @@ -206,8 +206,11 @@ impl_poem_type!( Values: - bool - u8 + - u16 + - u32 - u64 - u128 + - u256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` @@ -262,16 +265,33 @@ impl_poem_type!( example = Some(serde_json::Value::String( "340282366920938463463374607431768211454".to_string() )), - format = Some("uint64"), + format = Some("uint128"), description = Some(indoc! {" A string containing a 128-bit unsigned integer. We represent u128 values as a string to ensure compatibility with languages such - as JavaScript that do not parse u64s in JSON natively. + as JavaScript that do not parse u128s in JSON natively. "}) ) ); +impl_poem_type!( + U256, + "string", + ( + example = Some(serde_json::Value::String( + "340282366920938463463374607431768211454".to_string() + )), + format = Some("uint256"), + description = Some(indoc! {" + A string containing a 256-bit unsigned integer. + + We represent u256 values as a string to ensure compatibility with languages such + as JavaScript that do not parse u256s in JSON natively. + "}) + ) +); + impl_poem_parameter!( Address, HashValue, diff --git a/api/types/src/lib.rs b/api/types/src/lib.rs index 11cd4324a99eb..dab8f97baea7b 100644 --- a/api/types/src/lib.rs +++ b/api/types/src/lib.rs @@ -33,7 +33,7 @@ pub use move_types::{ HexEncodedBytes, MoveAbility, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionVisibility, MoveModule, MoveModuleBytecode, MoveModuleId, MoveResource, MoveScriptBytecode, MoveStruct, MoveStructField, MoveStructTag, MoveType, MoveValue, - MAX_RECURSIVE_TYPES_ALLOWED, U128, U64, + MAX_RECURSIVE_TYPES_ALLOWED, U128, U256, U64, }; use serde::{Deserialize, Deserializer}; use std::str::FromStr; diff --git a/api/types/src/move_types.rs b/api/types/src/move_types.rs index 9b44b68e2c7e3..1145bbd174412 100644 --- a/api/types/src/move_types.rs +++ b/api/types/src/move_types.rs @@ -51,129 +51,81 @@ impl TryFrom for MoveResource { } } -/// A string encoded U64 -/// -/// Encoded as a string to encode into JSON -#[derive(Clone, Debug, Default, Eq, PartialEq, Copy)] -pub struct U64(pub u64); - -impl U64 { - pub fn inner(&self) -> &u64 { - &self.0 - } -} - -impl From for U64 { - fn from(d: u64) -> Self { - Self(d) - } -} - -impl From for u64 { - fn from(d: U64) -> Self { - d.0 - } -} - -impl From for move_core_types::value::MoveValue { - fn from(d: U64) -> Self { - move_core_types::value::MoveValue::U64(d.0) - } -} - -impl fmt::Display for U64 { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", &self.0) - } -} - -impl Serialize for U64 { - fn serialize(&self, serializer: S) -> Result { - self.0.to_string().serialize(serializer) - } -} - -impl<'de> Deserialize<'de> for U64 { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let s = ::deserialize(deserializer)?; - s.parse().map_err(D::Error::custom) - } -} - -impl FromStr for U64 { - type Err = anyhow::Error; - - fn from_str(s: &str) -> Result { - let data = s.parse::().map_err(|e| { - format_err!("Parsing u64 string {:?} failed, caused by error: {}", s, e) - })?; +macro_rules! define_integer_type { + ($n: ident, $t: ty, $d: literal) => { + #[doc = $d] + #[doc = "Encoded as a string to encode into JSON."] + #[derive(Clone, Debug, Default, Eq, PartialEq, Copy)] + pub struct $n(pub $t); + + impl $n { + pub fn inner(&self) -> &$t { + &self.0 + } + } - Ok(U64(data)) - } -} + impl From<$t> for $n { + fn from(d: $t) -> Self { + Self(d) + } + } -/// A string encoded U128 -/// -/// Encoded as a string to encode into JSON -#[derive(Clone, Debug, Default, PartialEq, Eq, Copy)] -pub struct U128(pub u128); + impl From<$n> for $t { + fn from(d: $n) -> Self { + d.0 + } + } -impl U128 { - pub fn inner(&self) -> &u128 { - &self.0 - } -} + impl From<$n> for move_core_types::value::MoveValue { + fn from(d: $n) -> Self { + move_core_types::value::MoveValue::$n(d.0) + } + } -impl From for U128 { - fn from(d: u128) -> Self { - Self(d) - } -} + impl fmt::Display for $n { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", &self.0) + } + } -impl From for u128 { - fn from(d: U128) -> Self { - d.0 - } -} + impl Serialize for $n { + fn serialize(&self, serializer: S) -> Result { + self.0.to_string().serialize(serializer) + } + } -impl From for move_core_types::value::MoveValue { - fn from(d: U128) -> Self { - move_core_types::value::MoveValue::U128(d.0) - } -} + impl<'de> Deserialize<'de> for $n { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s = ::deserialize(deserializer)?; + s.parse().map_err(D::Error::custom) + } + } -impl Serialize for U128 { - fn serialize(&self, serializer: S) -> Result { - self.0.to_string().serialize(serializer) - } -} + impl FromStr for $n { + type Err = anyhow::Error; -impl<'de> Deserialize<'de> for U128 { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let s = ::deserialize(deserializer)?; - let data = s.parse::().map_err(D::Error::custom)?; + fn from_str(s: &str) -> Result { + let data = s.parse::<$t>().map_err(|e| { + format_err!( + "Parsing {} string {:?} failed, caused by error: {}", + stringify!($t), + s, + e + ) + })?; - Ok(U128(data)) - } + Ok($n(data)) + } + } + }; } -impl FromStr for U128 { - type Err = anyhow::Error; - - fn from_str(s: &str) -> Result { - let data = s.parse::().map_err(|e| { - format_err!("Parsing u128 string {:?} failed, caused by error: {}", s, e) - })?; - - Ok(U128(data)) - } -} +define_integer_type!(U64, u64, "A string encoded U64."); +define_integer_type!(U128, u128, "A string encoded U128."); +define_integer_type!(U256, move_core_types::u256::U256, "A string encoded U256."); /// Hex encoded bytes to allow for having bytes represented in JSON #[derive(Clone, Debug, PartialEq, Eq)] @@ -282,8 +234,11 @@ impl TryFrom for MoveStructValue { pub enum MoveValue { /// A u8 Move type U8(u8), + U16(u16), + U32(u32), U64(U64), U128(U128), + U256(U256), /// A bool Move type Bool(bool), Address(Address), @@ -330,8 +285,11 @@ impl TryFrom for MoveValue { fn try_from(val: AnnotatedMoveValue) -> anyhow::Result { Ok(match val { AnnotatedMoveValue::U8(v) => MoveValue::U8(v), + AnnotatedMoveValue::U16(v) => MoveValue::U16(v), + AnnotatedMoveValue::U32(v) => MoveValue::U32(v), AnnotatedMoveValue::U64(v) => MoveValue::U64(U64(v)), AnnotatedMoveValue::U128(v) => MoveValue::U128(U128(v)), + AnnotatedMoveValue::U256(v) => MoveValue::U256(U256(v)), AnnotatedMoveValue::Bool(v) => MoveValue::Bool(v), AnnotatedMoveValue::Address(v) => MoveValue::Address(v.into()), AnnotatedMoveValue::Vector(_, vals) => MoveValue::Vector( @@ -355,8 +313,11 @@ impl From for MoveValue { fn from(val: TransactionArgument) -> Self { match val { TransactionArgument::U8(v) => MoveValue::U8(v), + TransactionArgument::U16(v) => MoveValue::U16(v), + TransactionArgument::U32(v) => MoveValue::U32(v), TransactionArgument::U64(v) => MoveValue::U64(U64(v)), TransactionArgument::U128(v) => MoveValue::U128(U128(v)), + TransactionArgument::U256(v) => MoveValue::U256(U256(v)), TransactionArgument::Bool(v) => MoveValue::Bool(v), TransactionArgument::Address(v) => MoveValue::Address(v.into()), TransactionArgument::U8Vector(bytes) => MoveValue::Bytes(HexEncodedBytes(bytes)), @@ -368,8 +329,11 @@ impl Serialize for MoveValue { fn serialize(&self, serializer: S) -> Result { match &self { MoveValue::U8(v) => v.serialize(serializer), + MoveValue::U16(v) => v.serialize(serializer), + MoveValue::U32(v) => v.serialize(serializer), MoveValue::U64(v) => v.serialize(serializer), MoveValue::U128(v) => v.serialize(serializer), + MoveValue::U256(v) => v.serialize(serializer), MoveValue::Bool(v) => v.serialize(serializer), MoveValue::Address(v) => v.serialize(serializer), MoveValue::Vector(v) => v.serialize(serializer), @@ -517,10 +481,16 @@ pub enum MoveType { Bool, /// An 8-bit unsigned int U8, + /// A 16-bit unsigned int + U16, + /// A 32-bit unsigned int + U32, /// A 64-bit unsigned int U64, /// A 128-bit unsigned int U128, + /// A 256-bit unsigned int + U256, /// A 32-byte account address Address, /// An account signer @@ -571,8 +541,11 @@ impl MoveType { pub fn json_type_name(&self) -> String { match self { MoveType::U8 => "integer".to_owned(), + MoveType::U16 => "string".to_owned(), + MoveType::U32 => "string".to_owned(), MoveType::U64 => "string".to_owned(), MoveType::U128 => "string".to_owned(), + MoveType::U256 => "string".to_owned(), MoveType::Signer | MoveType::Address => "string
".to_owned(), MoveType::Bool => "boolean".to_owned(), MoveType::Vector { items } => { @@ -595,8 +568,11 @@ impl fmt::Display for MoveType { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { MoveType::U8 => write!(f, "u8"), + MoveType::U16 => write!(f, "u16"), + MoveType::U32 => write!(f, "u32"), MoveType::U64 => write!(f, "u64"), MoveType::U128 => write!(f, "u128"), + MoveType::U256 => write!(f, "u256"), MoveType::Address => write!(f, "address"), MoveType::Signer => write!(f, "signer"), MoveType::Bool => write!(f, "bool"), @@ -686,7 +662,10 @@ impl From for MoveType { match tag { TypeTag::Bool => MoveType::Bool, TypeTag::U8 => MoveType::U8, + TypeTag::U16 => MoveType::U16, + TypeTag::U32 => MoveType::U32, TypeTag::U64 => MoveType::U64, + TypeTag::U256 => MoveType::U256, TypeTag::U128 => MoveType::U128, TypeTag::Address => MoveType::Address, TypeTag::Signer => MoveType::Signer, @@ -703,8 +682,11 @@ impl From<&TypeTag> for MoveType { match tag { TypeTag::Bool => MoveType::Bool, TypeTag::U8 => MoveType::U8, + TypeTag::U16 => MoveType::U16, + TypeTag::U32 => MoveType::U32, TypeTag::U64 => MoveType::U64, TypeTag::U128 => MoveType::U128, + TypeTag::U256 => MoveType::U256, TypeTag::Address => MoveType::Address, TypeTag::Signer => MoveType::Signer, TypeTag::Vector(v) => MoveType::Vector { diff --git a/aptos-move/aptos-debugger/src/lib.rs b/aptos-move/aptos-debugger/src/lib.rs index 4dac159bbfbaf..620ede6ff0bc1 100644 --- a/aptos-move/aptos-debugger/src/lib.rs +++ b/aptos-move/aptos-debugger/src/lib.rs @@ -156,6 +156,7 @@ impl AptosDebugger { AbstractValueSizeGasParameters::zeros(), LATEST_GAS_FEATURE_VERSION, true, + true, ChainId::test().id(), ) .unwrap(); diff --git a/aptos-move/aptos-gas/src/gas_meter.rs b/aptos-move/aptos-gas/src/gas_meter.rs index 7d3208ac5b4a6..a9afdf54379a1 100644 --- a/aptos-move/aptos-gas/src/gas_meter.rs +++ b/aptos-move/aptos-gas/src/gas_meter.rs @@ -27,6 +27,8 @@ use move_vm_types::{ use std::collections::BTreeMap; // Change log: +// - V5 +// - u16, u32, u256 // - V4 // - Consider memory leaked for event natives // - V3 @@ -41,7 +43,7 @@ use std::collections::BTreeMap; // global operations. // - V1 // - TBA -pub const LATEST_GAS_FEATURE_VERSION: u64 = 4; +pub const LATEST_GAS_FEATURE_VERSION: u64 = 5; pub(crate) const EXECUTION_GAS_MULTIPLIER: u64 = 20; diff --git a/aptos-move/aptos-gas/src/instr.rs b/aptos-move/aptos-gas/src/instr.rs index 45278a275fa3b..947737de95c4a 100644 --- a/aptos-move/aptos-gas/src/instr.rs +++ b/aptos-move/aptos-gas/src/instr.rs @@ -30,8 +30,11 @@ crate::params::define_gas_parameters!( // stack [pop: InternalGas, "pop", 40 * MUL], [ld_u8: InternalGas, "ld_u8", 60 * MUL], + [ld_u16: InternalGas, optional "ld_u16", 60 * MUL], + [ld_u32: InternalGas, optional "ld_u32", 60 * MUL], [ld_u64: InternalGas, "ld_u64", 60 * MUL], [ld_u128: InternalGas, "ld_u128", 80 * MUL], + [ld_u256: InternalGas, optional "ld_u256", 80 * MUL], [ld_true: InternalGas, "ld_true", 60 * MUL], [ld_false: InternalGas, "ld_false", 60 * MUL], [ld_const_base: InternalGas, "ld_const.base", 650 * MUL], @@ -108,8 +111,11 @@ crate::params::define_gas_parameters!( [freeze_ref: InternalGas, "freeze_ref", 10 * MUL], // casting [cast_u8: InternalGas, "cast_u8", 120 * MUL], + [cast_u16: InternalGas, optional "cast_u16", 120 * MUL], + [cast_u32: InternalGas, optional "cast_u32", 120 * MUL], [cast_u64: InternalGas, "cast_u64", 120 * MUL], [cast_u128: InternalGas, "cast_u128", 120 * MUL], + [cast_u256: InternalGas, optional "cast_u256", 120 * MUL], // arithmetic [add: InternalGas, "add", 160 * MUL], [sub: InternalGas, "sub", 160 * MUL], @@ -218,8 +224,11 @@ impl InstructionGasParameters { Branch => self.branch, LdU8 => self.ld_u8, + LdU16 => self.ld_u16, + LdU32 => self.ld_u32, LdU64 => self.ld_u64, LdU128 => self.ld_u128, + LdU256 => self.ld_u256, LdTrue => self.ld_true, LdFalse => self.ld_false, @@ -232,8 +241,11 @@ impl InstructionGasParameters { FreezeRef => self.freeze_ref, CastU8 => self.cast_u8, + CastU16 => self.cast_u16, + CastU32 => self.cast_u32, CastU64 => self.cast_u64, CastU128 => self.cast_u128, + CastU256 => self.cast_u256, Add => self.add, Sub => self.sub, diff --git a/aptos-move/aptos-gas/src/misc.rs b/aptos-move/aptos-gas/src/misc.rs index 3c259c7341b2a..227d36a8c648d 100644 --- a/aptos-move/aptos-gas/src/misc.rs +++ b/aptos-move/aptos-gas/src/misc.rs @@ -5,6 +5,7 @@ use std::collections::BTreeMap; use crate::algebra::{AbstractValueSize, AbstractValueSizePerArg}; use crate::gas_meter::{FromOnChainGasSchedule, InitialGasSchedule, ToOnChainGasSchedule}; +use move_core_types::u256::U256; use move_core_types::{account_address::AccountAddress, gas_algebra::NumArgs}; use move_vm_types::views::{ValueView, ValueVisitor}; @@ -14,20 +15,26 @@ crate::params::define_gas_parameters!( [ // abstract value size [u8: AbstractValueSize, "u8", 40], + [u16: AbstractValueSize, optional "u16", 40], + [u32: AbstractValueSize, optional "u32", 40], [u64: AbstractValueSize, "u64", 40], [u128: AbstractValueSize, "u128", 40], + [u256: AbstractValueSize, optional "u256", 40], [bool: AbstractValueSize, "bool", 40], [address: AbstractValueSize, "address", 40], [struct_: AbstractValueSize, "struct", 40], [vector: AbstractValueSize, "vector", 40], [reference: AbstractValueSize, "reference", 40], [per_u8_packed: AbstractValueSizePerArg, "per_u8_packed", 1], + [per_u16_packed: AbstractValueSizePerArg, optional "per_u16_packed", 2], + [per_u32_packed: AbstractValueSizePerArg, optional "per_u32_packed", 4], [per_u64_packed: AbstractValueSizePerArg, "per_u64_packed", 8], [ per_u128_packed: AbstractValueSizePerArg, "per_u128_packed", 16 ], + [per_u256_packed: AbstractValueSizePerArg, optional "per_u256_packed", 32], [ per_bool_packed: AbstractValueSizePerArg, "per_bool_packed", @@ -79,8 +86,11 @@ where { deref_visitor_delegate_simple!( [visit_u8, u8], + [visit_u16, u16], + [visit_u32, u32], [visit_u64, u64], [visit_u128, u128], + [visit_u256, U256], [visit_bool, bool], [visit_address, AccountAddress], [visit_vec_u8, &[u8]], @@ -134,6 +144,16 @@ impl<'a> ValueVisitor for AbstractValueSizeVisitor<'a> { self.size += self.params.u8; } + #[inline] + fn visit_u16(&mut self, _depth: usize, _val: u16) { + self.size += self.params.u16 + } + + #[inline] + fn visit_u32(&mut self, _depth: usize, _val: u32) { + self.size += self.params.u32 + } + #[inline] fn visit_u64(&mut self, _depth: usize, _val: u64) { self.size += self.params.u64; @@ -144,6 +164,11 @@ impl<'a> ValueVisitor for AbstractValueSizeVisitor<'a> { self.size += self.params.u128; } + #[inline] + fn visit_u256(&mut self, _depth: usize, _val: U256) { + self.size += self.params.u256 + } + #[inline] fn visit_bool(&mut self, _depth: usize, _val: bool) { self.size += self.params.bool; @@ -175,6 +200,18 @@ impl<'a> ValueVisitor for AbstractValueSizeVisitor<'a> { self.size += size; } + #[inline] + fn visit_vec_u16(&mut self, _depth: usize, vals: &[u16]) { + self.size += + self.params.vector + self.params.per_u16_packed * NumArgs::new(vals.len() as u64); + } + + #[inline] + fn visit_vec_u32(&mut self, _depth: usize, vals: &[u32]) { + self.size += + self.params.vector + self.params.per_u32_packed * NumArgs::new(vals.len() as u64); + } + #[inline] fn visit_vec_u64(&mut self, _depth: usize, vals: &[u64]) { let mut size = self.params.per_u64_packed * NumArgs::new(vals.len() as u64); @@ -193,6 +230,12 @@ impl<'a> ValueVisitor for AbstractValueSizeVisitor<'a> { self.size += size; } + #[inline] + fn visit_vec_u256(&mut self, _depth: usize, vals: &[U256]) { + self.size += + self.params.vector + self.params.per_u256_packed * NumArgs::new(vals.len() as u64); + } + #[inline] fn visit_vec_bool(&mut self, _depth: usize, vals: &[bool]) { let mut size = self.params.per_bool_packed * NumArgs::new(vals.len() as u64); @@ -261,6 +304,16 @@ impl AbstractValueSizeGasParameters { self.res = Some(self.params.u8); } + #[inline] + fn visit_u16(&mut self, _depth: usize, _val: u16) { + self.res = Some(self.params.u16); + } + + #[inline] + fn visit_u32(&mut self, _depth: usize, _val: u32) { + self.res = Some(self.params.u32); + } + #[inline] fn visit_u64(&mut self, _depth: usize, _val: u64) { self.res = Some(self.params.u64); @@ -271,6 +324,11 @@ impl AbstractValueSizeGasParameters { self.res = Some(self.params.u128); } + #[inline] + fn visit_u256(&mut self, _depth: usize, _val: U256) { + self.res = Some(self.params.u256); + } + #[inline] fn visit_bool(&mut self, _depth: usize, _val: bool) { self.res = Some(self.params.bool); @@ -310,6 +368,16 @@ impl AbstractValueSizeGasParameters { } } + #[inline] + fn visit_vec_u16(&mut self, depth: usize, vals: &[u16]) { + self.visit_vec(depth, vals.len()); + } + + #[inline] + fn visit_vec_u32(&mut self, depth: usize, vals: &[u32]) { + self.visit_vec(depth, vals.len()); + } + #[inline] fn visit_vec_u64(&mut self, depth: usize, vals: &[u64]) { if self.feature_version < 3 { @@ -328,6 +396,11 @@ impl AbstractValueSizeGasParameters { } } + #[inline] + fn visit_vec_u256(&mut self, depth: usize, vals: &[U256]) { + self.visit_vec(depth, vals.len()); + } + #[inline] fn visit_vec_bool(&mut self, depth: usize, vals: &[bool]) { if self.feature_version < 3 { @@ -368,6 +441,16 @@ impl AbstractValueSizeGasParameters { self.res = Some(self.params.per_u8_packed * NumArgs::from(1)); } + #[inline] + fn visit_u16(&mut self, _depth: usize, _val: u16) { + self.res = Some(self.params.per_u16_packed * NumArgs::from(1)); + } + + #[inline] + fn visit_u32(&mut self, _depth: usize, _val: u32) { + self.res = Some(self.params.per_u32_packed * NumArgs::from(1)); + } + #[inline] fn visit_u64(&mut self, _depth: usize, _val: u64) { self.res = Some(self.params.per_u64_packed * NumArgs::from(1)); @@ -378,6 +461,11 @@ impl AbstractValueSizeGasParameters { self.res = Some(self.params.per_u128_packed * NumArgs::from(1)); } + #[inline] + fn visit_u256(&mut self, _depth: usize, _val: U256) { + self.res = Some(self.params.per_u256_packed * NumArgs::from(1)); + } + #[inline] fn visit_bool(&mut self, _depth: usize, _val: bool) { self.res = Some(self.params.per_bool_packed * NumArgs::from(1)); @@ -415,6 +503,16 @@ impl AbstractValueSizeGasParameters { self.visit_vec(depth, vals.len()); } + #[inline] + fn visit_vec_u16(&mut self, depth: usize, vals: &[u16]) { + self.visit_vec(depth, vals.len()); + } + + #[inline] + fn visit_vec_u32(&mut self, depth: usize, vals: &[u32]) { + self.visit_vec(depth, vals.len()); + } + #[inline] fn visit_vec_u64(&mut self, depth: usize, vals: &[u64]) { self.visit_vec(depth, vals.len()); @@ -425,6 +523,10 @@ impl AbstractValueSizeGasParameters { self.visit_vec(depth, vals.len()); } + fn visit_vec_u256(&mut self, depth: usize, vals: &[U256]) { + self.visit_vec(depth, vals.len()); + } + #[inline] fn visit_vec_bool(&mut self, depth: usize, vals: &[bool]) { self.visit_vec(depth, vals.len()); diff --git a/aptos-move/aptos-release-builder/src/components/feature_flags.rs b/aptos-move/aptos-release-builder/src/components/feature_flags.rs index a890fc48d622c..b0d1f5589630d 100644 --- a/aptos-move/aptos-release-builder/src/components/feature_flags.rs +++ b/aptos-move/aptos-release-builder/src/components/feature_flags.rs @@ -19,6 +19,7 @@ pub struct Features { pub enum FeatureFlag { CodeDependencyCheck, TreatFriendAsPrivate, + VMBinaryFormatV6, } fn generate_features_blob(writer: &CodeWriter, data: &[u64]) { @@ -85,6 +86,7 @@ impl From for AFeatureFlag { match f { FeatureFlag::CodeDependencyCheck => AFeatureFlag::CODE_DEPENDENCY_CHECK, FeatureFlag::TreatFriendAsPrivate => AFeatureFlag::TREAT_FRIEND_AS_PRIVATE, + FeatureFlag::VMBinaryFormatV6 => AFeatureFlag::VM_BINARY_FORMAT_V6, } } } @@ -95,6 +97,7 @@ impl From for FeatureFlag { match f { AFeatureFlag::CODE_DEPENDENCY_CHECK => FeatureFlag::CodeDependencyCheck, AFeatureFlag::TREAT_FRIEND_AS_PRIVATE => FeatureFlag::TreatFriendAsPrivate, + AFeatureFlag::VM_BINARY_FORMAT_V6 => FeatureFlag::VMBinaryFormatV6, } } } diff --git a/aptos-move/aptos-sdk-builder/src/common.rs b/aptos-move/aptos-sdk-builder/src/common.rs index 92625533c79c3..3a0714db221d8 100644 --- a/aptos-move/aptos-sdk-builder/src/common.rs +++ b/aptos-move/aptos-sdk-builder/src/common.rs @@ -31,8 +31,11 @@ fn quote_type_as_format(type_tag: &TypeTag) -> Format { match type_tag { Bool => Format::Bool, U8 => Format::U8, + U16 => Format::U16, + U32 => Format::U32, U64 => Format::U64, U128 => Format::U128, + U256 => Format::TypeName("U256".into()), Address => Format::TypeName("AccountAddress".into()), Vector(type_tag) => Format::Seq(Box::new(quote_type_as_format(type_tag))), Struct(tag) => match tag { @@ -98,8 +101,11 @@ pub(crate) fn mangle_type(type_tag: &TypeTag) -> String { match type_tag { Bool => "bool".into(), U8 => "u8".into(), + U16 => "u16".into(), + U32 => "u32".into(), U64 => "u64".into(), U128 => "u128".into(), + U256 => "u256".into(), Address => "address".into(), Vector(type_tag) => match type_tag.as_ref() { U8 => "u8vector".into(), diff --git a/aptos-move/aptos-sdk-builder/src/golang.rs b/aptos-move/aptos-sdk-builder/src/golang.rs index 36c57061b3810..babca1b26dd0c 100644 --- a/aptos-move/aptos-sdk-builder/src/golang.rs +++ b/aptos-move/aptos-sdk-builder/src/golang.rs @@ -602,8 +602,11 @@ func encode_{}_argument(arg {}) []byte {{ let (constructor, stmt) = match type_tag { Bool => ("Bool", default_stmt), U8 => ("U8", default_stmt), + U16 => ("U16", default_stmt), + U32 => ("U32", default_stmt), U64 => ("U64", default_stmt), U128 => ("U128", default_stmt), + U256 => ("U256", default_stmt), Address => ("Address", "value = arg.Value".into()), Vector(type_tag) => match type_tag.as_ref() { U8 => ("U8Vector", default_stmt), @@ -717,8 +720,11 @@ func decode_{0}_argument(arg aptostypes.TransactionArgument) (value {1}, err err match type_tag { Bool => "bool".into(), U8 => "uint8".into(), + U16 => "uint16".into(), + U32 => "uint32".into(), U64 => "uint64".into(), U128 => "serde.Uint128".into(), + U256 => unimplemented!(), Address => "aptostypes.AccountAddress".into(), Vector(type_tag) => { format!("[]{}", Self::quote_type(type_tag)) @@ -744,8 +750,11 @@ func decode_{0}_argument(arg aptostypes.TransactionArgument) (value {1}, err err match type_tag { Bool => format!("(*aptostypes.TransactionArgument__Bool)(&{})", name), U8 => format!("(*aptostypes.TransactionArgument__U8)(&{})", name), + U16 => format!("(*aptostypes.TransactionArgument__U16)(&{})", name), + U32 => format!("(*aptostypes.TransactionArgument__U32)(&{})", name), U64 => format!("(*aptostypes.TransactionArgument__U64)(&{})", name), U128 => format!("(*aptostypes.TransactionArgument__U128)(&{})", name), + U256 => format!("(*aptostypes.TransactionArgument__U256)(&{})", name), Address => format!("&aptostypes.TransactionArgument__Address{{{}}}", name), Vector(type_tag) => match type_tag.as_ref() { U8 => format!("(*aptostypes.TransactionArgument__U8Vector)(&{})", name), @@ -766,8 +775,11 @@ func decode_{0}_argument(arg aptostypes.TransactionArgument) (value {1}, err err match type_tag { Bool => Some("Bool"), U8 => Some("U8"), + U16 => Some("U16"), + U32 => Some("U32"), U64 => Some("U64"), U128 => Some("U128"), + U256 => None, Address => None, Vector(type_tag) => match type_tag.as_ref() { U8 => Some("Bytes"), diff --git a/aptos-move/aptos-sdk-builder/src/rust.rs b/aptos-move/aptos-sdk-builder/src/rust.rs index a674bd250248a..ccde053826026 100644 --- a/aptos-move/aptos-sdk-builder/src/rust.rs +++ b/aptos-move/aptos-sdk-builder/src/rust.rs @@ -729,8 +729,11 @@ static SCRIPT_FUNCTION_DECODER_MAP: once_cell::sync::Lazy ("Bool", "Some(value)".to_string()), U8 => ("U8", "Some(value)".to_string()), + U16 => ("U16", "Some(value)".to_string()), + U32 => ("U32", "Some(value)".to_string()), U64 => ("U64", "Some(value)".to_string()), U128 => ("U128", "Some(value)".to_string()), + U256 => ("U256", "Some(value)".to_string()), Address => ("Address", "Some(value)".to_string()), Vector(type_tag) => match type_tag.as_ref() { U8 => ("U8Vector", "Some(value)".to_string()), @@ -864,8 +867,11 @@ fn decode_{}_argument(arg: TransactionArgument) -> Option<{}> {{ match type_tag { Bool => "bool".into(), U8 => "u8".into(), + U16 => "u16".into(), + U32 => "u32".into(), U64 => "u64".into(), U128 => "u128".into(), + U256 => "U256".into(), Address => "AccountAddress".into(), Vector(type_tag) => { format!("Vec<{}>", Self::quote_type(type_tag.as_ref(), local_types)) @@ -892,8 +898,11 @@ fn decode_{}_argument(arg: TransactionArgument) -> Option<{}> {{ match type_tag { Bool => format!("TransactionArgument::Bool({})", name), U8 => format!("TransactionArgument::U8({})", name), + U16 => format!("TransactionArgument::U16({})", name), + U32 => format!("TransactionArgument::U32({})", name), U64 => format!("TransactionArgument::U64({})", name), U128 => format!("TransactionArgument::U128({})", name), + U256 => format!("TransactionArgument::U256({})", name), Address => format!("TransactionArgument::Address({})", name), Vector(type_tag) => match type_tag.as_ref() { U8 => format!("TransactionArgument::U8Vector({})", name), diff --git a/aptos-move/aptos-vm/src/aptos_vm.rs b/aptos-move/aptos-vm/src/aptos_vm.rs index d42cfc365fcfe..97986dde494ba 100644 --- a/aptos-move/aptos-vm/src/aptos_vm.rs +++ b/aptos-move/aptos-vm/src/aptos_vm.rs @@ -34,7 +34,7 @@ use aptos_types::{ account_config, account_config::new_block_event_key, block_metadata::BlockMetadata, - on_chain_config::new_epoch_event_key, + on_chain_config::{new_epoch_event_key, FeatureFlag}, transaction::{ ChangeSet, ExecutionStatus, ModuleBundle, SignatureCheckedTransaction, SignedTransaction, Transaction, TransactionOutput, TransactionPayload, TransactionStatus, VMValidatorResult, @@ -46,6 +46,7 @@ use aptos_types::{ use fail::fail_point; use move_binary_format::{ access::ModuleAccess, + compatibility::Compatibility, errors::{verification_error, Location, PartialVMError, VMError, VMResult}, CompiledModule, IndexKind, }; @@ -56,7 +57,6 @@ use move_core_types::{ transaction_argument::convert_txn_args, value::{serialize_values, MoveValue}, }; -use move_vm_runtime::move_vm::RuntimeConfig; use move_vm_types::gas::UnmeteredGasMeter; use num_cpus; use once_cell::sync::OnceCell; @@ -72,7 +72,7 @@ use std::{ static EXECUTION_CONCURRENCY_LEVEL: OnceCell = OnceCell::new(); static NUM_PROOF_READING_THREADS: OnceCell = OnceCell::new(); -static RUNTIME_CHECKS: OnceCell = OnceCell::new(); +static PARANOID_TYPE_CHECKS: OnceCell = OnceCell::new(); static PROCESSED_TRANSACTIONS_DETAILED_COUNTERS: OnceCell = OnceCell::new(); /// Remove this once the bundle is removed from the code. @@ -116,25 +116,16 @@ impl AptosVM { } /// Sets runtime config when invoked the first time. - pub fn set_runtime_config(paranoid_type_checks: bool, paranoid_hot_potato_checks: bool) { + pub fn set_paranoid_type_checks(enable: bool) { // Only the first call succeeds, due to OnceCell semantics. - RUNTIME_CHECKS - .set(RuntimeConfig { - paranoid_type_checks, - paranoid_hot_potato_checks, - }) - .ok(); + PARANOID_TYPE_CHECKS.set(enable).ok(); } - /// Get the concurrency level if already set, otherwise return default true - /// (paranoid execution mode). - pub fn get_runtime_config() -> RuntimeConfig { - match RUNTIME_CHECKS.get() { - Some(config) => *config, - None => RuntimeConfig { - paranoid_type_checks: true, - paranoid_hot_potato_checks: true, - }, + /// Get the paranoid type check flag if already set, otherwise return default true + pub fn get_paranoid_checks() -> bool { + match PARANOID_TYPE_CHECKS.get() { + Some(enable) => *enable, + None => true, } } @@ -528,7 +519,19 @@ impl AptosVM { Self::verify_module_bundle(&mut session, modules)?; session - .publish_module_bundle(modules.clone().into_inner(), txn_data.sender(), gas_meter) + .publish_module_bundle_with_compat_config( + modules.clone().into_inner(), + txn_data.sender(), + gas_meter, + Compatibility::new( + true, + true, + !self + .0 + .get_features() + .is_enabled(FeatureFlag::TREAT_FRIEND_AS_PRIVATE), + ), + ) .map_err(|e| e.into_vm_status())?; // call init function of the each module @@ -585,7 +588,19 @@ impl AptosVM { // Publish the bundle and execute initializers session - .publish_module_bundle(bundle.into_inner(), destination, gas_meter) + .publish_module_bundle_with_compat_config( + bundle.into_inner(), + destination, + gas_meter, + Compatibility::new( + true, + true, + !self + .0 + .get_features() + .is_enabled(FeatureFlag::TREAT_FRIEND_AS_PRIVATE), + ), + ) .and_then(|_| { self.execute_module_initialization( session, diff --git a/aptos-move/aptos-vm/src/aptos_vm_impl.rs b/aptos-move/aptos-vm/src/aptos_vm_impl.rs index 2a8abdc1b3169..c7578f49053b8 100644 --- a/aptos-move/aptos-vm/src/aptos_vm_impl.rs +++ b/aptos-move/aptos-vm/src/aptos_vm_impl.rs @@ -55,6 +55,7 @@ pub struct AptosVMImpl { version: Option, transaction_validation: Option, metadata_cache: DashMap>, + features: Features, } impl AptosVMImpl { @@ -122,6 +123,7 @@ impl AptosVMImpl { abs_val_size_gas_params, gas_feature_version, features.is_enabled(FeatureFlag::TREAT_FRIEND_AS_PRIVATE), + features.is_enabled(FeatureFlag::VM_BINARY_FORMAT_V6), chain_id.id(), ) .expect("should be able to create Move VM; check if there are duplicated natives"); @@ -134,6 +136,7 @@ impl AptosVMImpl { version: None, transaction_validation: None, metadata_cache: Default::default(), + features, }; vm.version = Version::fetch_config(&storage); vm.transaction_validation = Self::get_transaction_validation(&StorageAdapter::new(state)); @@ -208,6 +211,10 @@ impl AptosVMImpl { }) } + pub fn get_features(&self) -> &Features { + &self.features + } + pub fn check_gas( &self, storage: &S, diff --git a/aptos-move/aptos-vm/src/move_vm_ext/mod.rs b/aptos-move/aptos-vm/src/move_vm_ext/mod.rs index 26e2842406647..0b17da2363117 100644 --- a/aptos-move/aptos-vm/src/move_vm_ext/mod.rs +++ b/aptos-move/aptos-vm/src/move_vm_ext/mod.rs @@ -10,6 +10,5 @@ mod vm; pub use crate::move_vm_ext::{ resolver::MoveResolverExt, session::{SessionExt, SessionId, SessionOutput}, - vm::verifier_config, - vm::MoveVmExt, + vm::{verifier_config, MoveVmExt}, }; diff --git a/aptos-move/aptos-vm/src/move_vm_ext/vm.rs b/aptos-move/aptos-vm/src/move_vm_ext/vm.rs index 99567f1029f0c..553f9e4dc5a22 100644 --- a/aptos-move/aptos-vm/src/move_vm_ext/vm.rs +++ b/aptos-move/aptos-vm/src/move_vm_ext/vm.rs @@ -14,6 +14,7 @@ use aptos_gas::{AbstractValueSizeGasParameters, NativeGasParameters}; use move_binary_format::errors::VMResult; use move_bytecode_verifier::VerifierConfig; use move_table_extension::NativeTableContext; +use move_vm_runtime::config::VMConfig; use move_vm_runtime::{move_vm::MoveVM, native_extensions::NativeContextExtensions}; use std::ops::Deref; @@ -28,20 +29,30 @@ impl MoveVmExt { abs_val_size_gas_params: AbstractValueSizeGasParameters, gas_feature_version: u64, treat_friend_as_private: bool, + allow_binary_format_v6: bool, chain_id: u8, ) -> VMResult { - let mut config = verifier_config(); - config.treat_friend_as_private = treat_friend_as_private; + // Note: binary format v6 adds a few new integer types and their corresponding instructions. + // Therefore it depends on a new version of the gas schedule and cannot be allowed if + // the gas schedule hasn't been updated yet. + let max_binary_format_version = if allow_binary_format_v6 && gas_feature_version >= 5 { + 6 + } else { + 5 + }; Ok(Self { - inner: MoveVM::new_with_configs( + inner: MoveVM::new_with_config( aptos_natives( native_gas_params, abs_val_size_gas_params, gas_feature_version, ), - config, - crate::AptosVM::get_runtime_config(), + VMConfig { + verifier: verifier_config(treat_friend_as_private), + max_binary_format_version, + paranoid_type_checks: crate::AptosVM::get_paranoid_checks(), + }, )?, chain_id, }) @@ -92,14 +103,16 @@ impl Deref for MoveVmExt { } } -pub fn verifier_config() -> VerifierConfig { +pub fn verifier_config(treat_friend_as_private: bool) -> VerifierConfig { VerifierConfig { max_loop_depth: Some(5), - treat_friend_as_private: false, + treat_friend_as_private, max_generic_instantiation_length: Some(32), max_function_parameters: Some(128), max_basic_blocks: Some(1024), max_value_stack_size: 1024, max_type_nodes: Some(256), + max_dependency_depth: 256, + max_push_size: Some(10000), } } diff --git a/aptos-move/aptos-vm/src/transaction_arg_validation.rs b/aptos-move/aptos-vm/src/transaction_arg_validation.rs index 0b3af55d2354d..992a7e7771bf1 100644 --- a/aptos-move/aptos-vm/src/transaction_arg_validation.rs +++ b/aptos-move/aptos-vm/src/transaction_arg_validation.rs @@ -106,7 +106,7 @@ fn is_valid_txn_arg(session: &SessionExt, typ: &Type) -> use move_vm_types::loaded_data::runtime_types::Type::*; match typ { - Bool | U8 | U64 | U128 | Address => (true, false), + Bool | U8 | U16 | U32 | U64 | U128 | U256 | Address => (true, false), Vector(inner) => is_valid_txn_arg(session, inner), Struct(idx) | StructInstantiation(idx, _) => { if let Some(st) = session.get_struct_type(*idx) { @@ -201,8 +201,10 @@ fn validate_arg( // this is unreachable given the check in `is_valid_txn_arg` and the // fact we collect all arguments that involve strings and we validate // them and them only - Bool | U8 | U64 | U128 | Address | Signer | Reference(_) | MutableReference(_) - | TyParam(_) => unreachable!("Validation is only for arguments with String"), + Bool | U8 | U16 | U32 | U64 | U128 | U256 | Address | Signer | Reference(_) + | MutableReference(_) | TyParam(_) => { + unreachable!("Validation is only for arguments with String") + } }) } diff --git a/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/configs/features.move b/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/configs/features.move index 4b6eff071c91f..1f6b33d9eb69d 100644 --- a/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/configs/features.move +++ b/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/configs/features.move @@ -69,6 +69,16 @@ module std::features { is_enabled(APTOS_STD_CHAIN_ID_NATIVES) } + /// Whether to allow the use of binary format version v6. + /// Lifetime: transient + const VM_BINARY_FORMAT_V6: u64 = 5; + + public fun get_vm_binary_format_v6(): u64 { VM_BINARY_FORMAT_V6 } + + public fun allow_vm_binary_format_v6(): bool acquires Features { + is_enabled(VM_BINARY_FORMAT_V6) + } + // ============================================================================================ // Feature Flag Implementation diff --git a/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/configs/features.spec.move b/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/configs/features.spec.move index c5dd8e17f50bb..6a5ac146d045b 100644 --- a/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/configs/features.spec.move +++ b/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/configs/features.spec.move @@ -13,4 +13,19 @@ spec std::features { pragma opaque = true; } + spec set { + pragma opaque; + } + + spec contains { + pragma opaque; + } + + spec is_enabled(feature: u64): bool { + pragma opaque; + aborts_if [abstract] false; + ensures [abstract] result == spec_is_enabled(feature); + } + + spec fun spec_is_enabled(feature: u64): bool; } diff --git a/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/string.spec.move b/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/string.spec.move new file mode 100644 index 0000000000000..3089dceca9341 --- /dev/null +++ b/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/string.spec.move @@ -0,0 +1,30 @@ +spec std::string { + spec internal_check_utf8(v: &vector): bool { + pragma opaque; + aborts_if [abstract] false; + ensures [abstract] result == spec_internal_check_utf8(v); + } + + spec internal_is_char_boundary(v: &vector, i: u64): bool { + pragma opaque; + aborts_if [abstract] false; + ensures [abstract] result == spec_internal_is_char_boundary(v, i); + } + spec internal_sub_string(v: &vector, i: u64, j: u64): vector { + pragma opaque; + aborts_if [abstract] false; + ensures [abstract] result == spec_internal_sub_string(v, i, j); + } + spec internal_index_of(v: &vector, r: &vector): u64 { + pragma opaque; + aborts_if [abstract] false; + ensures [abstract] result == spec_internal_index_of(v, r); + } + + spec module { + fun spec_internal_check_utf8(v: vector): bool; + fun spec_internal_is_char_boundary(v: vector, i: u64): bool; + fun spec_internal_sub_string(v: vector, i: u64, j: u64): vector; + fun spec_internal_index_of(v: vector, r: vector): u64; + } +} diff --git a/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/vector.move b/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/vector.move index b027dbeb79e9d..d9bf0a18264e3 100644 --- a/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/vector.move +++ b/aptos-move/e2e-move-tests/src/tests/code_publishing.data/pack_stdlib/sources/vector.move @@ -192,6 +192,11 @@ module std::vector { v1[0..i] == v2[0..i] && v1[i..len(v1)] == v2[i + 1..len(v2)] } + + /// Check if `v` contains `e`. + fun spec_contains(v: vector, e: Element): bool { + exists x in v: x == e + } } } diff --git a/aptos-move/e2e-move-tests/src/tests/mod.rs b/aptos-move/e2e-move-tests/src/tests/mod.rs index 7b0a9cc6014c9..ee5fb72e46ad9 100644 --- a/aptos-move/e2e-move-tests/src/tests/mod.rs +++ b/aptos-move/e2e-move-tests/src/tests/mod.rs @@ -16,6 +16,7 @@ mod lazy_natives; mod max_loop_depth; mod memory_quota; mod mint_nft; +mod new_integer_types; mod offer_signer_capability; mod rotate_auth_key; mod scripts; diff --git a/aptos-move/e2e-move-tests/src/tests/new_integer_types.rs b/aptos-move/e2e-move-tests/src/tests/new_integer_types.rs new file mode 100644 index 0000000000000..8ef71f93019a8 --- /dev/null +++ b/aptos-move/e2e-move-tests/src/tests/new_integer_types.rs @@ -0,0 +1,85 @@ +// Copyright (c) Aptos +// SPDX-License-Identifier: Apache-2.0 + +use crate::{assert_success, MoveHarness}; +use aptos_types::account_address::AccountAddress; +use move_core_types::{u256::U256, value::MoveValue}; +use package_builder::PackageBuilder; + +#[test] +fn use_new_integer_types() { + let mut h = MoveHarness::new(); + + let acc = h.new_account_at(AccountAddress::from_hex_literal("0xcafe").unwrap()); + let mut builder = PackageBuilder::new("test"); + builder.add_source( + "test", + " +module 0xcafe::test { + public entry fun run() { + let x: u16 = 0x8000; + _ = x + 0x7fff; + + let x: u32 = 0x80000000; + _ = x + 0x7fffffff; + + let x: u256 = 0x8000000000000000000000000000000000000000000000000000000000000000; + _ = x + 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; + } +} + ", + ); + let dir = builder.write_to_temp().unwrap(); + assert_success!(h.publish_package(&acc, dir.path())); + + assert_success!(h.run_entry_function( + &acc, + str::parse("0xcafe::test::run").unwrap(), + vec![], + vec![], + )); +} + +#[test] +fn new_integer_types_as_txn_arguments() { + let mut h = MoveHarness::new(); + + let acc = h.new_account_at(AccountAddress::from_hex_literal("0xcafe").unwrap()); + let mut builder = PackageBuilder::new("test"); + builder.add_source( + "test", + " +module 0xcafe::test { + public entry fun run(a: u16, b: u32, c: u256) { + assert!(a == 0x8000, 100); + assert!(b == 0x80000000, 100); + assert!(c == 0x8000000000000000000000000000000000000000000000000000000000000000, 100); + } +} + ", + ); + let dir = builder.write_to_temp().unwrap(); + assert_success!(h.publish_package(&acc, dir.path())); + + let args = [ + MoveValue::U16(0x8000), + MoveValue::U32(0x80000000), + MoveValue::U256( + U256::from_str_radix( + "8000000000000000000000000000000000000000000000000000000000000000", + 16, + ) + .unwrap(), + ), + ] + .into_iter() + .map(|val| val.simple_serialize().unwrap()) + .collect(); + + assert_success!(h.run_entry_function( + &acc, + str::parse("0xcafe::test::run").unwrap(), + vec![], + args, + )); +} diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__create_account__create_account.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__create_account__create_account.exp index 045ffd5a6ef6b..c03d06d848add 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__create_account__create_account.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__create_account__create_account.exp @@ -21,7 +21,7 @@ Ok( events: [ ContractEvent { key: EventKey { creation_number: 0, account_address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1 }, index: 0, type: Struct(StructTag { address: 0000000000000000000000000000000000000000000000000000000000000001, module: Identifier("account"), name: Identifier("CoinRegisterEvent"), type_params: [] }), event_data: "00000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e" }, ], - gas_used: 1538, + gas_used: 1537, status: Keep( Success, ), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__borrow_after_move.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__borrow_after_move.exp index ea957d41bb8c1..40e43bc0f2d58 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__borrow_after_move.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__borrow_after_move.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b05000000090100040204040308190521140735420877400ab701050cbc014f0d8b020200000101000208000003000100000402010000050001000006000100010800040001060c0002060c03010608000105010708000103014d067369676e657202543109626f72726f775f7431096368616e67655f74310972656d6f76655f74310a7075626c6973685f743101760a616464726573735f6f66f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000000000000000000000000000000000000000000000000010002010703000100010003050b0011042b000c0102010100010005090b0011042a000c020b010b020f001502020100010006060b0011042c0013000c01020301000001050b0006030000000000000012002d0002000000), + ): Creation(a11ceb0b06000000090100040204040308190521140735420877400ab701050cbc014f0d8b020200000101000208000003000100000402010000050001000006000100010800040001060c0002060c03010608000105010708000103014d067369676e657202543109626f72726f775f7431096368616e67655f74310972656d6f76655f74310a7075626c6973685f743101760a616464726573735f6f66f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000000000000000000000000000000000000000000000000010002010703000100010003050b0011042b000c0102010100010005090b0011042a000c020b010b020f001502020100010006060b0011042c0013000c01020301000001050b0006030000000000000012002d0002000000), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10b00000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__change_after_move.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__change_after_move.exp index fcb50b054135f..6ec5031af5be4 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__change_after_move.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__change_after_move.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b05000000090100040204040308190521140735420877400ab701050cbc014f0d8b020200000101000208000003000100000402010000050001000006000100010800040001060c0002060c03010608000105010708000103014d067369676e657202543109626f72726f775f7431096368616e67655f74310972656d6f76655f74310a7075626c6973685f743101760a616464726573735f6f66f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000000000000000000000000000000000000000000000000010002010703000100010003050b0011042b000c0102010100010005090b0011042a000c020b010b020f001502020100010006060b0011042c0013000c01020301000001050b0006030000000000000012002d0002000000), + ): Creation(a11ceb0b06000000090100040204040308190521140735420877400ab701050cbc014f0d8b020200000101000208000003000100000402010000050001000006000100010800040001060c0002060c03010608000105010708000103014d067369676e657202543109626f72726f775f7431096368616e67655f74310972656d6f76655f74310a7075626c6973685f743101760a616464726573735f6f66f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000000000000000000000000000000000000000000000000010002010703000100010003050b0011042b000c0102010100010005090b0011042a000c020b010b020f001502020100010006060b0011042c0013000c01020301000001050b0006030000000000000012002d0002000000), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10b00000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__move_from_across_blocks.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__move_from_across_blocks.exp index 716a5a9555381..3c70bf2cbd10e 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__move_from_across_blocks.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__data_store__move_from_across_blocks.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b05000000090100040204040308190521140735420877400ab701050cbc014f0d8b020200000101000208000003000100000402010000050001000006000100010800040001060c0002060c03010608000105010708000103014d067369676e657202543109626f72726f775f7431096368616e67655f74310972656d6f76655f74310a7075626c6973685f743101760a616464726573735f6f66f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000000000000000000000000000000000000000000000000010002010703000100010003050b0011042b000c0102010100010005090b0011042a000c020b010b020f001502020100010006060b0011042c0013000c01020301000001050b0006030000000000000012002d0002000000), + ): Creation(a11ceb0b06000000090100040204040308190521140735420877400ab701050cbc014f0d8b020200000101000208000003000100000402010000050001000006000100010800040001060c0002060c03010608000105010708000103014d067369676e657202543109626f72726f775f7431096368616e67655f74310972656d6f76655f74310a7075626c6973685f743101760a616464726573735f6f66f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000000000000000000000000000000000000000000000000010002010703000100010003050b0011042b000c0102010100010005090b0011042a000c020b010b020f001502020100010006060b0011042c0013000c01020301000001050b0006030000000000000012002d0002000000), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10b00000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__duplicate_module.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__duplicate_module.exp index ef43e9bb23444..a4d370dfa1e1a 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__duplicate_module.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__duplicate_module.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b0500000008010002020204030605050b01070c060812200a32050c3707000000010000000200000000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100020102030001000000010200), + ): Creation(a11ceb0b0600000008010002020204030605050b01070c060812200a32050c3707000000010000000200000000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100020102030001000000010200), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_compatible_module.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_compatible_module.exp index 933e43450f158..291f0c4879bc5 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_compatible_module.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_compatible_module.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b05000000030100020702020804200000014df5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100), + ): Creation(a11ceb0b06000000030100020702020804200000014df5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_changed_field.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_changed_field.exp index 1e5af6e249ff0..702bc969cfb7e 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_changed_field.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_changed_field.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b0500000005010002020204070606080c200a2c05000000010000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1000201020300), + ): Creation(a11ceb0b0600000005010002020204070606080c200a2c05000000010000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1000201020300), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_new_field.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_new_field.exp index 1e5af6e249ff0..702bc969cfb7e 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_new_field.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_new_field.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b0500000005010002020204070606080c200a2c05000000010000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1000201020300), + ): Creation(a11ceb0b0600000005010002020204070606080c200a2c05000000010000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1000201020300), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_removed_field.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_removed_field.exp index 1e5af6e249ff0..702bc969cfb7e 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_removed_field.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_removed_field.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b0500000005010002020204070606080c200a2c05000000010000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1000201020300), + ): Creation(a11ceb0b0600000005010002020204070606080c200a2c05000000010000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1000201020300), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_removed_struct.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_removed_struct.exp index 1e5af6e249ff0..702bc969cfb7e 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_removed_struct.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__layout_incompatible_module_with_removed_struct.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b0500000005010002020204070606080c200a2c05000000010000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1000201020300), + ): Creation(a11ceb0b0600000005010002020204070606080c200a2c05000000010000014d01540166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1000201020300), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_compatible_module.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_compatible_module.exp index 933e43450f158..291f0c4879bc5 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_compatible_module.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_compatible_module.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b05000000030100020702020804200000014df5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100), + ): Creation(a11ceb0b06000000030100020702020804200000014df5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_added_param.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_added_param.exp index 6257197b37591..8c8a28e641254 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_added_param.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_added_param.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b0500000006010002030205050701070804080c200c2c070000000100000000014d0166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10001000000010200), + ): Creation(a11ceb0b0600000006010002030205050701070804080c200c2c070000000100000000014d0166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10001000000010200), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_changed_param.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_changed_param.exp index 9a47d59a23bbc..ea28e7c083d5f 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_changed_param.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_changed_param.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b0500000006010002030205050703070a04080e200c2e0700000001000100010300014d0166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10001000001010200), + ): Creation(a11ceb0b0600000006010002030205050703070a04080e200c2e0700000001000100010300014d0166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10001000001010200), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_removed_pub_fn.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_removed_pub_fn.exp index 6257197b37591..8c8a28e641254 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_removed_pub_fn.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__linking_incompatible_module_with_removed_pub_fn.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b0500000006010002030205050701070804080c200c2c070000000100000000014d0166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10001000000010200), + ): Creation(a11ceb0b0600000006010002030205050701070804080c200c2c070000000100000000014d0166f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10001000000010200), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10300000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__test_publishing_allow_modules.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__test_publishing_allow_modules.exp index 8efdd6658c556..6a99bb3f2ad26 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__test_publishing_allow_modules.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__test_publishing_allow_modules.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b05000000030100020702020804200000014df5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100), + ): Creation(a11ceb0b06000000030100020702020804200000014df5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(20f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10b00000000000000000000000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000100000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__test_publishing_modules_proper_sender.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__test_publishing_modules_proper_sender.exp index acb172ce7d995..46dd0f061ad5b 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__test_publishing_modules_proper_sender.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__module_publishing__test_publishing_modules_proper_sender.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: 000000000000000000000000000000000000000000000000000000000a550c18, path: 00000000000000000000000000000000000000000000000000000000000a550c18014d }, - ): Creation(a11ceb0b05000000030100020702020804200000014d000000000000000000000000000000000000000000000000000000000a550c1800), + ): Creation(a11ceb0b06000000030100020702020804200000014d000000000000000000000000000000000000000000000000000000000a550c1800), AccessPath( AccessPath { address: 000000000000000000000000000000000000000000000000000000000a550c18, path: 010000000000000000000000000000000000000000000000000000000000000001076163636f756e74074163636f756e7400 }, ): Modification(201304972f9242cbc3528a1e286323471ab891baa37e0053b85651693a79854a000100000000000000040000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a550c1800000000000000000100000000000000000000000000000000000000000000000000000000000000000000000a550c180000), diff --git a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__verify_txn__test_open_publishing.exp b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__verify_txn__test_open_publishing.exp index 726fceb6b6f41..54c0e05f75010 100644 --- a/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__verify_txn__test_open_publishing.exp +++ b/aptos-move/e2e-tests/goldens/language_e2e_testsuite__tests__verify_txn__test_open_publishing.exp @@ -7,7 +7,7 @@ Ok( write_set: { AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 00f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1014d }, - ): Creation(a11ceb0b050000000601000203020a050c0607120a081c200c3c23000000010001000002000100020303010300014d036d61780373756df5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10001000002080a000a012403060a01020a00020101000001060a000a01160c020a020200), + ): Creation(a11ceb0b060000000601000203020a050c0607120a081c200c3c23000000010001000002000100020303010300014d036d61780373756df5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe10001000002080a000a012403060a01020a00020101000001060a000a01160c020a020200), AccessPath( AccessPath { address: f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1, path: 01000000000000000000000000000000000000000000000000000000000000000104636f696e09436f696e53746f7265010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e00 }, ): Modification(b63f0f00000000000000000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe100000000000000000000000000000000f5b9d6f01a99e74c790e2f330c092fa05455a8193f1dfc1b113ecc54d067afe1), diff --git a/aptos-move/e2e-tests/src/executor.rs b/aptos-move/e2e-tests/src/executor.rs index 03c777711111b..0b66523d552b1 100644 --- a/aptos-move/e2e-tests/src/executor.rs +++ b/aptos-move/e2e-tests/src/executor.rs @@ -559,6 +559,7 @@ impl FakeExecutor { LATEST_GAS_FEATURE_VERSION, self.features .is_enabled(FeatureFlag::TREAT_FRIEND_AS_PRIVATE), + self.features.is_enabled(FeatureFlag::VM_BINARY_FORMAT_V6), self.chain_id, ) .unwrap(); @@ -606,6 +607,7 @@ impl FakeExecutor { LATEST_GAS_FEATURE_VERSION, self.features .is_enabled(FeatureFlag::TREAT_FRIEND_AS_PRIVATE), + self.features.is_enabled(FeatureFlag::VM_BINARY_FORMAT_V6), self.chain_id, ) .unwrap(); diff --git a/aptos-move/framework/aptos-framework/sources/account.move b/aptos-move/framework/aptos-framework/sources/account.move index 84cb0031a512d..89631984f031e 100644 --- a/aptos-move/framework/aptos-framework/sources/account.move +++ b/aptos-move/framework/aptos-framework/sources/account.move @@ -531,7 +531,7 @@ module aptos_framework::account { } #[test] - #[expected_failure(abort_code = 0x10007)] + #[expected_failure(abort_code = 0x10007, location = Self)] public entry fun test_cannot_control_resource_account_via_auth_key() acquires Account { let alice_pk = x"4141414141414141414141414141414141414141414141414141414141414145"; let alice = create_account_from_ed25519_public_key(alice_pk); @@ -597,7 +597,7 @@ module aptos_framework::account { } #[test(user = @0x1)] - #[expected_failure(abort_code = 0x8000f)] + #[expected_failure(abort_code = 0x8000f, location = Self)] public entry fun test_duplice_create_resource_account(user: signer) acquires Account { create_resource_account(&user, x"01"); create_resource_account(&user, x"01"); @@ -651,7 +651,7 @@ module aptos_framework::account { /////////////////////////////////////////////////////////////////////////// #[test(alice = @0xa11ce)] - #[expected_failure(abort_code = 65537)] + #[expected_failure(abort_code = 65537, location = aptos_framework::ed25519)] public entry fun test_empty_public_key(alice: signer) acquires Account, OriginatingAddress { create_account(signer::address_of(&alice)); let pk = vector::empty(); @@ -660,7 +660,7 @@ module aptos_framework::account { } #[test(alice = @0xa11ce)] - #[expected_failure(abort_code = 262151)] + #[expected_failure(abort_code = 262151, location = Self)] public entry fun test_empty_signature(alice: signer) acquires Account, OriginatingAddress { create_account(signer::address_of(&alice)); let test_signature = vector::empty(); @@ -680,7 +680,7 @@ module aptos_framework::account { /* TODO bring back with generic rotation capability #[test(bob = @0x345)] - #[expected_failure(abort_code = 65544)] + #[expected_failure(abort_code = 65544, location = Self)] public entry fun test_invalid_offer_rotation_capability(bob: signer) acquires Account { let pk = x"f66bf0ce5ceb582b93d6780820c2025b9967aedaa259bdbb9f3d0297eced0e18"; let alice = create_account_from_ed25519_public_key(pk); @@ -696,7 +696,7 @@ module aptos_framework::account { // #[test(bob = @0x345)] - #[expected_failure(abort_code = 65544)] + #[expected_failure(abort_code = 65544, location = Self)] public entry fun test_invalid_offer_signer_capability(bob: signer) acquires Account { let (_alice_sk, alice_pk) = ed25519::generate_keys(); let alice_pk_bytes = ed25519::validated_public_key_to_bytes(&alice_pk); @@ -749,7 +749,7 @@ module aptos_framework::account { } #[test(bob = @0x345, charlie = @0x567)] - #[expected_failure(abort_code = 393230)] + #[expected_failure(abort_code = 393230, location = Self)] public entry fun test_invalid_check_signer_capability_and_create_authorized_signer(bob: signer, charlie: signer) acquires Account { let (alice_sk, alice_pk) = ed25519::generate_keys(); let alice_pk_bytes = ed25519::validated_public_key_to_bytes(&alice_pk); @@ -798,7 +798,7 @@ module aptos_framework::account { } #[test(bob = @0x345, charlie = @0x567)] - #[expected_failure(abort_code = 393230)] + #[expected_failure(abort_code = 393230, location = Self)] public entry fun test_invalid_revoke_signer_capability(bob: signer, charlie: signer) acquires Account { let (alice_sk, alice_pk) = ed25519::generate_keys(); let alice_pk_bytes = ed25519::validated_public_key_to_bytes(&alice_pk); diff --git a/aptos-move/framework/aptos-framework/sources/aggregator/optional_aggregator.move b/aptos-move/framework/aptos-framework/sources/aggregator/optional_aggregator.move index 216750442dbd9..4957770a5522b 100644 --- a/aptos-move/framework/aptos-framework/sources/aggregator/optional_aggregator.move +++ b/aptos-move/framework/aptos-framework/sources/aggregator/optional_aggregator.move @@ -242,7 +242,7 @@ module aptos_framework::optional_aggregator { } #[test(account = @aptos_framework)] - #[expected_failure(abort_code = 0x020001)] + #[expected_failure(abort_code = 0x020001, location = Self)] fun non_parallelizable_aggregator_overflow_test(account: signer) { aggregator_factory::initialize_aggregator_factory(&account); let aggregator = new(15, false); @@ -254,7 +254,7 @@ module aptos_framework::optional_aggregator { } #[test(account = @aptos_framework)] - #[expected_failure(abort_code = 0x020002)] + #[expected_failure(abort_code = 0x020002, location = Self)] fun non_parallelizable_aggregator_underflow_test(account: signer) { aggregator_factory::initialize_aggregator_factory(&account); let aggregator = new(100, false); @@ -267,7 +267,7 @@ module aptos_framework::optional_aggregator { } #[test(account = @aptos_framework)] - #[expected_failure(abort_code = 0x020001)] + #[expected_failure(abort_code = 0x020001, location = aptos_framework::aggregator)] fun parallelizable_aggregator_overflow_test(account: signer) { aggregator_factory::initialize_aggregator_factory(&account); let aggregator = new(15, true); @@ -279,7 +279,7 @@ module aptos_framework::optional_aggregator { } #[test(account = @aptos_framework)] - #[expected_failure(abort_code = 0x020002)] + #[expected_failure(abort_code = 0x020002, location = aptos_framework::aggregator)] fun parallelizable_aggregator_underflow_test(account: signer) { aggregator_factory::initialize_aggregator_factory(&account); let aggregator = new(100, true); diff --git a/aptos-move/framework/aptos-framework/sources/aptos_governance.move b/aptos-move/framework/aptos-framework/sources/aptos_governance.move index 70895131805cf..ccb9e060f8c1a 100644 --- a/aptos-move/framework/aptos-framework/sources/aptos_governance.move +++ b/aptos-move/framework/aptos-framework/sources/aptos_governance.move @@ -557,7 +557,7 @@ module aptos_framework::aptos_governance { } #[test(aptos_framework = @aptos_framework, proposer = @0x123, yes_voter = @0x234, no_voter = @345)] - #[expected_failure(abort_code=0x5000a)] + #[expected_failure(abort_code=0x5000a, location = aptos_framework::voting)] public entry fun test_voting_multi_step_cannot_use_single_step_resolve( aptos_framework: signer, proposer: signer, @@ -637,7 +637,7 @@ module aptos_framework::aptos_governance { } #[test(aptos_framework = @aptos_framework, proposer = @0x123, voter_1 = @0x234, voter_2 = @345)] - #[expected_failure(abort_code = 0x10004)] + #[expected_failure(abort_code = 0x10004, location = aptos_framework::voting)] public entry fun test_cannot_double_vote( aptos_framework: signer, proposer: signer, @@ -660,7 +660,7 @@ module aptos_framework::aptos_governance { } #[test(aptos_framework = @aptos_framework, proposer = @0x123, voter_1 = @0x234, voter_2 = @345)] - #[expected_failure(abort_code = 0x10004)] + #[expected_failure(abort_code = 0x10004, location = aptos_framework::voting)] public entry fun test_cannot_double_vote_with_different_voter_addresses( aptos_framework: signer, proposer: signer, @@ -746,7 +746,7 @@ module aptos_framework::aptos_governance { } #[test(account = @0x123)] - #[expected_failure(abort_code = 0x50003)] + #[expected_failure(abort_code = 0x50003, location = aptos_framework::system_addresses)] public entry fun test_update_governance_config_unauthorized_should_fail( account: signer) acquires GovernanceConfig, GovernanceEvents { initialize(&account, 1, 2, 3); diff --git a/aptos-move/framework/aptos-framework/sources/block.move b/aptos-move/framework/aptos-framework/sources/block.move index c3a6e4f99d4e8..294eb55f6a6fd 100644 --- a/aptos-move/framework/aptos-framework/sources/block.move +++ b/aptos-move/framework/aptos-framework/sources/block.move @@ -217,7 +217,7 @@ module aptos_framework::block { } #[test(aptos_framework = @aptos_framework, account = @0x123)] - #[expected_failure(abort_code = 0x50003)] + #[expected_failure(abort_code = 0x50003, location = aptos_framework::system_addresses)] public entry fun test_update_epoch_interval_unauthorized_should_fail( aptos_framework: signer, account: signer, diff --git a/aptos-move/framework/aptos-framework/sources/coin.move b/aptos-move/framework/aptos-framework/sources/coin.move index 15402706ff560..555078e4ca70a 100644 --- a/aptos-move/framework/aptos-framework/sources/coin.move +++ b/aptos-move/framework/aptos-framework/sources/coin.move @@ -638,7 +638,7 @@ module aptos_framework::coin { } #[test(source = @0x2, framework = @aptos_framework)] - #[expected_failure(abort_code = 0x10001)] + #[expected_failure(abort_code = 0x10001, location = Self)] public fun fail_initialize(source: signer, framework: signer) { aggregator_factory::initialize_aggregator_factory_for_test(&framework); let (burn_cap, freeze_cap, mint_cap) = initialize( @@ -657,7 +657,7 @@ module aptos_framework::coin { } #[test(source = @0x1, destination = @0x2)] - #[expected_failure(abort_code = 0x60005)] + #[expected_failure(abort_code = 0x60005, location = Self)] public entry fun fail_transfer( source: signer, destination: signer, @@ -706,7 +706,7 @@ module aptos_framework::coin { } #[test(source = @0x1)] - #[expected_failure(abort_code = 0x10007)] + #[expected_failure(abort_code = 0x10007, location = Self)] public fun test_destroy_non_zero( source: signer, ) acquires CoinInfo { @@ -789,7 +789,7 @@ module aptos_framework::coin { } #[test(account = @0x1)] - #[expected_failure(abort_code = 0x5000A)] + #[expected_failure(abort_code = 0x5000A, location = Self)] public entry fun withdraw_frozen(account: signer) acquires CoinInfo, CoinStore { let account_addr = signer::address_of(&account); account::create_account_for_test(account_addr); @@ -807,7 +807,7 @@ module aptos_framework::coin { } #[test(account = @0x1)] - #[expected_failure(abort_code = 0x5000A)] + #[expected_failure(abort_code = 0x5000A, location = Self)] public entry fun deposit_frozen(account: signer) acquires CoinInfo, CoinStore { let account_addr = signer::address_of(&account); account::create_account_for_test(account_addr); @@ -880,7 +880,7 @@ module aptos_framework::coin { } #[test(framework = @aptos_framework, other = @0x123)] - #[expected_failure(abort_code = 0x50003)] + #[expected_failure(abort_code = 0x50003, location = aptos_framework::system_addresses)] fun test_supply_initialize_fails(framework: signer, other: signer) { aggregator_factory::initialize_aggregator_factory_for_test(&framework); initialize_with_aggregator(&other); @@ -904,7 +904,7 @@ module aptos_framework::coin { } #[test(framework = @aptos_framework)] - #[expected_failure(abort_code = 0x20001)] + #[expected_failure(abort_code = 0x20001, location = aptos_framework::aggregator)] fun test_supply_overflow(framework: signer) acquires CoinInfo { aggregator_factory::initialize_aggregator_factory_for_test(&framework); initialize_with_aggregator(&framework); @@ -918,7 +918,7 @@ module aptos_framework::coin { } #[test(framework = @aptos_framework)] - #[expected_failure(abort_code = 0x5000B)] + #[expected_failure(abort_code = 0x5000B, location = aptos_framework::coin)] fun test_supply_upgrade_fails(framework: signer) acquires CoinInfo, SupplyConfig { initialize_supply_config(&framework); aggregator_factory::initialize_aggregator_factory_for_test(&framework); diff --git a/aptos-move/framework/aptos-framework/sources/configs/staking_config.move b/aptos-move/framework/aptos-framework/sources/configs/staking_config.move index 61f61fe920790..31fe159bcbaa8 100644 --- a/aptos-move/framework/aptos-framework/sources/configs/staking_config.move +++ b/aptos-move/framework/aptos-framework/sources/configs/staking_config.move @@ -211,55 +211,55 @@ module aptos_framework::staking_config { } #[test(account = @0x123)] - #[expected_failure(abort_code = 0x50003)] + #[expected_failure(abort_code = 0x50003, location = aptos_framework::system_addresses)] public entry fun test_update_required_stake_unauthorized_should_fail(account: signer) acquires StakingConfig { update_required_stake(&account, 1, 2); } #[test(account = @0x123)] - #[expected_failure(abort_code = 0x50003)] + #[expected_failure(abort_code = 0x50003, location = aptos_framework::system_addresses)] public entry fun test_update_required_lockup_unauthorized_should_fail(account: signer) acquires StakingConfig { update_recurring_lockup_duration_secs(&account, 1); } #[test(account = @0x123)] - #[expected_failure(abort_code = 0x50003)] + #[expected_failure(abort_code = 0x50003, location = aptos_framework::system_addresses)] public entry fun test_update_rewards_unauthorized_should_fail(account: signer) acquires StakingConfig { update_rewards_rate(&account, 1, 10); } #[test(account = @0x123)] - #[expected_failure(abort_code = 0x50003)] + #[expected_failure(abort_code = 0x50003, location = aptos_framework::system_addresses)] public entry fun test_update_voting_power_increase_limit_unauthorized_should_fail(account: signer) acquires StakingConfig { update_voting_power_increase_limit(&account, 10); } #[test(aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x10003)] + #[expected_failure(abort_code = 0x10003, location = Self)] public entry fun test_update_required_stake_invalid_range_should_fail(aptos_framework: signer) acquires StakingConfig { update_required_stake(&aptos_framework, 10, 5); } #[test(aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x10003)] + #[expected_failure(abort_code = 0x10003, location = Self)] public entry fun test_update_required_stake_zero_max_stake_should_fail(aptos_framework: signer) acquires StakingConfig { update_required_stake(&aptos_framework, 0, 0); } #[test(aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x10001)] + #[expected_failure(abort_code = 0x10001, location = Self)] public entry fun test_update_required_lockup_to_zero_should_fail(aptos_framework: signer) acquires StakingConfig { update_recurring_lockup_duration_secs(&aptos_framework, 0); } #[test(aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x10002)] + #[expected_failure(abort_code = 0x10002, location = Self)] public entry fun test_update_rewards_invalid_denominator_should_fail(aptos_framework: signer) acquires StakingConfig { update_rewards_rate(&aptos_framework, 1, 0); } #[test(aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x10004)] + #[expected_failure(abort_code = 0x10004, location = Self)] public entry fun test_update_voting_power_increase_limit_to_zero_should_fail( aptos_framework: signer ) acquires StakingConfig { @@ -267,7 +267,7 @@ module aptos_framework::staking_config { } #[test(aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x10004)] + #[expected_failure(abort_code = 0x10004, location = aptos_framework::staking_config)] public entry fun test_update_voting_power_increase_limit_to_more_than_upper_bound_should_fail( aptos_framework: signer ) acquires StakingConfig { diff --git a/aptos-move/framework/aptos-framework/sources/configs/version.move b/aptos-move/framework/aptos-framework/sources/configs/version.move index 0c9cc54693883..201d44dbc267d 100644 --- a/aptos-move/framework/aptos-framework/sources/configs/version.move +++ b/aptos-move/framework/aptos-framework/sources/configs/version.move @@ -73,7 +73,7 @@ module aptos_framework::version { } #[test(aptos_framework = @aptos_framework, random_account = @0x123)] - #[expected_failure(abort_code = 327682)] + #[expected_failure(abort_code = 327682, location = Self)] public entry fun test_set_version_unauthorized_should_fail( aptos_framework: signer, random_account: signer, diff --git a/aptos-move/framework/aptos-framework/sources/managed_coin.move b/aptos-move/framework/aptos-framework/sources/managed_coin.move index 1dd518644ae7d..d2932ddb4edd7 100644 --- a/aptos-move/framework/aptos-framework/sources/managed_coin.move +++ b/aptos-move/framework/aptos-framework/sources/managed_coin.move @@ -159,7 +159,7 @@ module aptos_framework::managed_coin { } #[test(source = @0xa11ce, destination = @0xb0b, mod_account = @0x1)] - #[expected_failure(abort_code = 0x60001)] + #[expected_failure(abort_code = 0x60001, location = Self)] public entry fun fail_mint( source: signer, destination: signer, @@ -181,7 +181,7 @@ module aptos_framework::managed_coin { } #[test(source = @0xa11ce, destination = @0xb0b, mod_account = @0x1)] - #[expected_failure(abort_code = 0x60001)] + #[expected_failure(abort_code = 0x60001, location = Self)] public entry fun fail_burn( source: signer, destination: signer, diff --git a/aptos-move/framework/aptos-framework/sources/resource_account.move b/aptos-move/framework/aptos-framework/sources/resource_account.move index c8f33ffdc47f2..f2c16b31a0b7b 100644 --- a/aptos-move/framework/aptos-framework/sources/resource_account.move +++ b/aptos-move/framework/aptos-framework/sources/resource_account.move @@ -203,7 +203,7 @@ module aptos_framework::resource_account { } #[test(user = @0x1111)] - #[expected_failure(abort_code = 0x10002)] + #[expected_failure(abort_code = 0x10002, location = aptos_std::simple_map)] public entry fun test_create_account_and_retrieve_cap_resource_address_does_not_exist(user: signer) acquires Container { let user_addr = signer::address_of(&user); account::create_account(user_addr); @@ -241,7 +241,7 @@ module aptos_framework::resource_account { } #[test(framework = @0x1, user = @0x2345)] - #[expected_failure(abort_code = 0x60005)] + #[expected_failure(abort_code = 0x60005, location = aptos_framework::coin)] public entry fun without_coin(framework: signer, user: signer) acquires Container { let user_addr = signer::address_of(&user); aptos_framework::aptos_account::create_account(user_addr); diff --git a/aptos-move/framework/aptos-framework/sources/stake.move b/aptos-move/framework/aptos-framework/sources/stake.move index 0fb02819ba945..1f32e8afa996a 100644 --- a/aptos-move/framework/aptos-framework/sources/stake.move +++ b/aptos-move/framework/aptos-framework/sources/stake.move @@ -1496,7 +1496,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x10007)] + #[expected_failure(abort_code = 0x10007, location = Self)] public entry fun test_inactive_validator_can_add_stake_if_exceeding_max_allowed( aptos_framework: &signer, validator: &signer, @@ -1510,7 +1510,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @0x1, validator_1 = @0x123, validator_2 = @0x234)] - #[expected_failure(abort_code = 0x10007)] + #[expected_failure(abort_code = 0x10007, location = Self)] public entry fun test_pending_active_validator_cannot_add_stake_if_exceeding_max_allowed( aptos_framework: &signer, validator_1: &signer, @@ -1530,7 +1530,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x10007)] + #[expected_failure(abort_code = 0x10007, location = Self)] public entry fun test_active_validator_cannot_add_stake_if_exceeding_max_allowed( aptos_framework: &signer, validator: &signer, @@ -1545,7 +1545,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x10007)] + #[expected_failure(abort_code = 0x10007, location = Self)] public entry fun test_active_validator_with_pending_inactive_stake_cannot_add_stake_if_exceeding_max_allowed( aptos_framework: &signer, validator: &signer, @@ -1564,7 +1564,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator_1 = @0x123, validator_2 = @0x234)] - #[expected_failure(abort_code = 0x10007)] + #[expected_failure(abort_code = 0x10007, location = Self)] public entry fun test_pending_inactive_cannot_add_stake_if_exceeding_max_allowed( aptos_framework: &signer, validator_1: &signer, @@ -1666,7 +1666,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x10012)] + #[expected_failure(abort_code = 0x10012, location = Self)] public entry fun test_cannot_reduce_lockup( aptos_framework: &signer, validator: &signer, @@ -1684,7 +1684,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator_1 = @0x123, validator_2 = @0x234)] - #[expected_failure(abort_code = 0x1000D)] + #[expected_failure(abort_code = 0x1000D, location = Self)] public entry fun test_inactive_validator_cannot_join_if_exceed_increase_limit( aptos_framework: &signer, validator_1: &signer, @@ -1728,7 +1728,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator_1 = @0x123, validator_2 = @0x234)] - #[expected_failure(abort_code = 0x1000D)] + #[expected_failure(abort_code = 0x1000D, location = Self)] public entry fun test_pending_active_validator_cannot_add_more_stake_than_limit( aptos_framework: &signer, validator_1: &signer, @@ -1773,7 +1773,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x1000D)] + #[expected_failure(abort_code = 0x1000D, location = Self)] public entry fun test_active_validator_cannot_add_more_stake_than_limit_in_multiple_epochs( aptos_framework: &signer, validator: &signer, @@ -1795,7 +1795,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x1000D)] + #[expected_failure(abort_code = 0x1000D, location = Self)] public entry fun test_active_validator_cannot_add_more_stake_than_limit( aptos_framework: &signer, validator: &signer, @@ -2194,7 +2194,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x1000A)] + #[expected_failure(abort_code = 0x1000A, location = Self)] public entry fun test_validator_cannot_join_post_genesis( aptos_framework: &signer, validator: &signer, @@ -2207,7 +2207,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x1000E)] + #[expected_failure(abort_code = 0x1000E, location = Self)] public entry fun test_invalid_pool_address( aptos_framework: &signer, validator: &signer, @@ -2219,7 +2219,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x1000A)] + #[expected_failure(abort_code = 0x1000A, location = Self)] public entry fun test_validator_cannot_leave_post_genesis( aptos_framework: &signer, validator: &signer, @@ -2389,7 +2389,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @aptos_framework, validator = @0x123)] - #[expected_failure(abort_code = 0x1000B)] + #[expected_failure(abort_code = 0x1000B, location = Self)] public entry fun test_invalid_config( aptos_framework: &signer, validator: &signer, @@ -2558,7 +2558,7 @@ module aptos_framework::stake { } #[test(aptos_framework = @0x1, validator = @0x123)] - #[expected_failure(abort_code = 0x60011)] + #[expected_failure(abort_code = 0x60011, location = Self)] public entry fun test_not_allowed_validators( aptos_framework: &signer, validator: &signer, diff --git a/aptos-move/framework/aptos-framework/sources/staking_contract.move b/aptos-move/framework/aptos-framework/sources/staking_contract.move index edfe930b8ab7b..fdcfbe9fa7f32 100644 --- a/aptos-move/framework/aptos-framework/sources/staking_contract.move +++ b/aptos-move/framework/aptos-framework/sources/staking_contract.move @@ -873,7 +873,7 @@ module aptos_framework::staking_contract { } #[test(aptos_framework = @0x1, staker = @0x123, operator = @0x234)] - #[expected_failure(abort_code = 0x80006)] + #[expected_failure(abort_code = 0x80006, location = Self)] public entry fun test_staker_cannot_create_same_staking_contract_multiple_times( aptos_framework: &signer, staker: &signer, @@ -886,7 +886,7 @@ module aptos_framework::staking_contract { } #[test(aptos_framework = @0x1, staker = @0x123, operator = @0x234)] - #[expected_failure(abort_code = 0x10002)] + #[expected_failure(abort_code = 0x10002, location = Self)] public entry fun test_staker_cannot_create_staking_contract_with_invalid_commission( aptos_framework: &signer, staker: &signer, @@ -896,7 +896,7 @@ module aptos_framework::staking_contract { } #[test(aptos_framework = @0x1, staker = @0x123, operator = @0x234)] - #[expected_failure(abort_code = 0x10001)] + #[expected_failure(abort_code = 0x10001, location = Self)] public entry fun test_staker_cannot_create_staking_contract_with_less_than_min_stake_required( aptos_framework: &signer, staker: &signer, diff --git a/aptos-move/framework/aptos-framework/sources/vesting.move b/aptos-move/framework/aptos-framework/sources/vesting.move index fdeed2bb24b3f..d7a2c632f2af0 100644 --- a/aptos-move/framework/aptos-framework/sources/vesting.move +++ b/aptos-move/framework/aptos-framework/sources/vesting.move @@ -1052,7 +1052,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123)] - #[expected_failure(abort_code = 0x1000C)] + #[expected_failure(abort_code = 0x1000C, location = Self)] public entry fun test_create_vesting_contract_with_zero_grant_should_fail( aptos_framework: &signer, admin: &signer, @@ -1063,7 +1063,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123)] - #[expected_failure(abort_code = 0x10004)] + #[expected_failure(abort_code = 0x10004, location = Self)] public entry fun test_create_vesting_contract_with_no_shareholders_should_fail( aptos_framework: &signer, admin: &signer, @@ -1074,7 +1074,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123)] - #[expected_failure(abort_code = 0x10005)] + #[expected_failure(abort_code = 0x10005, location = Self)] public entry fun test_create_vesting_contract_with_mistmaching_shareholders_should_fail( aptos_framework: &signer, admin: &signer, @@ -1085,7 +1085,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123)] - #[expected_failure(abort_code = 0x60001)] + #[expected_failure(abort_code = 0x60001, location = aptos_framework::aptos_account)] public entry fun test_create_vesting_contract_with_invalid_withdrawal_address_should_fail( aptos_framework: &signer, admin: &signer, @@ -1096,7 +1096,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123)] - #[expected_failure(abort_code = 0x60001)] + #[expected_failure(abort_code = 0x60001, location = aptos_framework::aptos_account)] public entry fun test_create_vesting_contract_with_missing_withdrawal_account_should_fail( aptos_framework: &signer, admin: &signer, @@ -1107,7 +1107,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123)] - #[expected_failure(abort_code = 0x60002)] + #[expected_failure(abort_code = 0x60002, location = aptos_framework::aptos_account)] public entry fun test_create_vesting_contract_with_unregistered_withdrawal_account_should_fail( aptos_framework: &signer, admin: &signer, @@ -1119,21 +1119,21 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1)] - #[expected_failure(abort_code = 0x10002)] + #[expected_failure(abort_code = 0x10002, location = Self)] public entry fun test_create_empty_vesting_schedule_should_fail(aptos_framework: &signer) { setup(aptos_framework, &vector[]); create_vesting_schedule(vector[], 1, 1); } #[test(aptos_framework = @0x1)] - #[expected_failure(abort_code = 0x10003)] + #[expected_failure(abort_code = 0x10003, location = Self)] public entry fun test_create_vesting_schedule_with_zero_period_duration_should_fail(aptos_framework: &signer) { setup(aptos_framework, &vector[]); create_vesting_schedule(vector[fixed_point32::create_from_rational(1, 1)], 1, 0); } #[test(aptos_framework = @0x1, admin = @0x123)] - #[expected_failure(abort_code = 0x10006)] + #[expected_failure(abort_code = 0x10006, location = Self)] public entry fun test_create_vesting_schedule_with_invalid_vesting_start_should_fail(aptos_framework: &signer) { setup(aptos_framework, &vector[]); timestamp::update_global_time_for_test_secs(1000); @@ -1266,7 +1266,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123, shareholder = @0x234)] - #[expected_failure(abort_code = 0x30008)] + #[expected_failure(abort_code = 0x30008, location = Self)] public entry fun test_cannot_unlock_rewards_after_contract_is_terminated( aptos_framework: &signer, admin: &signer, @@ -1375,7 +1375,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123, shareholder = @0x234)] - #[expected_failure(abort_code = 0x30008)] + #[expected_failure(abort_code = 0x30008, location = Self)] public entry fun test_cannot_vest_after_contract_is_terminated( aptos_framework: &signer, admin: &signer, @@ -1393,7 +1393,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123, shareholder = @0x234)] - #[expected_failure(abort_code = 0x30008)] + #[expected_failure(abort_code = 0x30008, location = Self)] public entry fun test_cannot_terminate_twice( aptos_framework: &signer, admin: &signer, @@ -1411,7 +1411,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123, shareholder = @0x234)] - #[expected_failure(abort_code = 0x30009)] + #[expected_failure(abort_code = 0x30009, location = Self)] public entry fun test_cannot_call_admin_withdraw_if_contract_is_not_terminated( aptos_framework: &signer, admin: &signer, @@ -1428,7 +1428,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123)] - #[expected_failure(abort_code = 0x60001)] + #[expected_failure(abort_code = 0x60001, location = aptos_framework::aptos_account)] public entry fun test_set_beneficiary_with_missing_account_should_fail( aptos_framework: &signer, admin: &signer, @@ -1441,7 +1441,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123)] - #[expected_failure(abort_code = 0x60002)] + #[expected_failure(abort_code = 0x60002, location = aptos_framework::aptos_account)] public entry fun test_set_beneficiary_with_unregistered_account_should_fail( aptos_framework: &signer, admin: &signer, @@ -1545,7 +1545,7 @@ module aptos_framework::vesting { } #[test(aptos_framework = @0x1, admin = @0x123, resetter = @0x234, random = @0x345)] - #[expected_failure(abort_code = 0x5000F)] + #[expected_failure(abort_code = 0x5000F, location = Self)] public entry fun test_reset_beneficiary_with_unauthorized( aptos_framework: &signer, admin: &signer, diff --git a/aptos-move/framework/aptos-framework/sources/voting.move b/aptos-move/framework/aptos-framework/sources/voting.move index 38a6b33366a08..fdc8bb28e7172 100644 --- a/aptos-move/framework/aptos-framework/sources/voting.move +++ b/aptos-move/framework/aptos-framework/sources/voting.move @@ -684,13 +684,13 @@ module aptos_framework::voting { } #[test(governance = @0x123)] - #[expected_failure(abort_code = 0x10004)] + #[expected_failure(abort_code = 0x10004, location = Self)] public fun create_proposal_with_empty_execution_hash_should_fail(governance: &signer) acquires VotingForum { create_proposal_with_empty_execution_hash_should_fail_generic(governance, false); } #[test(governance = @0x123)] - #[expected_failure(abort_code = 0x10004)] + #[expected_failure(abort_code = 0x10004, location = Self)] public fun create_proposal_with_empty_execution_hash_should_fail_multi_step(governance: &signer) acquires VotingForum { create_proposal_with_empty_execution_hash_should_fail_generic(governance, true); } @@ -738,7 +738,7 @@ module aptos_framework::voting { } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code=0x5000a)] + #[expected_failure(abort_code=0x5000a, location = Self)] public entry fun test_voting_passed_multi_step_cannot_use_single_step_resolve_function(aptos_framework: &signer, governance: &signer) acquires VotingForum { test_voting_passed_generic(aptos_framework, governance, true, false); } @@ -772,13 +772,13 @@ module aptos_framework::voting { } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x30003)] + #[expected_failure(abort_code = 0x30003, location = Self)] public entry fun test_cannot_resolve_twice(aptos_framework: &signer, governance: &signer) acquires VotingForum { test_cannot_resolve_twice_generic(aptos_framework, governance, false); } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x30003)] + #[expected_failure(abort_code = 0x30003, location = Self)] public entry fun test_cannot_resolve_twice_multi_step(aptos_framework: &signer, governance: &signer) acquires VotingForum { test_cannot_resolve_twice_generic(aptos_framework, governance, true); } @@ -862,7 +862,7 @@ module aptos_framework::voting { } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x30008)] + #[expected_failure(abort_code = 0x30008, location = Self)] public entry fun test_voting_passed_early_in_same_tx_should_fail( aptos_framework: &signer, governance: &signer @@ -871,7 +871,7 @@ module aptos_framework::voting { } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x30008)] + #[expected_failure(abort_code = 0x30008, location = Self)] public entry fun test_voting_passed_early_in_same_tx_should_fail_multi_step( aptos_framework: &signer, governance: &signer @@ -902,19 +902,19 @@ module aptos_framework::voting { } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x30002)] + #[expected_failure(abort_code = 0x30002, location = Self)] public entry fun test_voting_failed(aptos_framework: &signer, governance: &signer) acquires VotingForum { test_voting_failed_generic(aptos_framework, governance, false); } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x30002)] + #[expected_failure(abort_code = 0x30002, location = Self)] public entry fun test_voting_failed_multi_step(aptos_framework: &signer, governance: &signer) acquires VotingForum { test_voting_failed_generic(aptos_framework, governance, true); } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x30005)] + #[expected_failure(abort_code = 0x30005, location = Self)] public entry fun test_cannot_vote_after_voting_period_is_over( aptos_framework: signer, governance: signer @@ -932,7 +932,7 @@ module aptos_framework::voting { } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code=0x30009)] + #[expected_failure(abort_code=0x30009, location = Self)] public entry fun test_cannot_vote_after_multi_step_proposal_starts_executing( aptos_framework: signer, governance: signer @@ -981,13 +981,13 @@ module aptos_framework::voting { } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x30002)] + #[expected_failure(abort_code = 0x30002, location = Self)] public entry fun test_voting_failed_early(aptos_framework: &signer, governance: &signer) acquires VotingForum { test_voting_failed_early_generic(aptos_framework, governance, true); } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x30002)] + #[expected_failure(abort_code = 0x30002, location = Self)] public entry fun test_voting_failed_early_multi_step(aptos_framework: &signer, governance: &signer) acquires VotingForum { test_voting_failed_early_generic(aptos_framework, governance, false); } @@ -1006,7 +1006,7 @@ module aptos_framework::voting { } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x10007)] + #[expected_failure(abort_code = 0x10007, location = Self)] public entry fun test_cannot_set_min_threshold_higher_than_early_resolution( aptos_framework: &signer, governance: &signer, @@ -1015,7 +1015,7 @@ module aptos_framework::voting { } #[test(aptos_framework = @aptos_framework, governance = @0x123)] - #[expected_failure(abort_code = 0x10007)] + #[expected_failure(abort_code = 0x10007, location = Self)] public entry fun test_cannot_set_min_threshold_higher_than_early_resolution_multi_step( aptos_framework: &signer, governance: &signer, diff --git a/aptos-move/framework/aptos-framework/tests/aggregator_tests.move b/aptos-move/framework/aptos-framework/tests/aggregator_tests.move index 677cc31b47728..9350c245268d7 100644 --- a/aptos-move/framework/aptos-framework/tests/aggregator_tests.move +++ b/aptos-move/framework/aptos-framework/tests/aggregator_tests.move @@ -27,7 +27,7 @@ module aptos_framework::aggregator_tests { } #[test(account = @aptos_framework)] - #[expected_failure(abort_code = 0x020001)] + #[expected_failure(abort_code = 0x020001, location = aptos_framework::aggregator)] fun test_overflow(account: signer) { aggregator_factory::initialize_aggregator_factory_for_test(&account); let aggregator = aggregator_factory::create_aggregator(&account, 10); @@ -39,7 +39,7 @@ module aptos_framework::aggregator_tests { } #[test(account = @aptos_framework)] - #[expected_failure(abort_code = 0x020002)] + #[expected_failure(abort_code = 0x020002, location = aptos_framework::aggregator)] fun test_underflow(account: signer) { aggregator_factory::initialize_aggregator_factory_for_test(&account); let aggregator = aggregator_factory::create_aggregator(&account, 10); diff --git a/aptos-move/framework/aptos-stdlib/sources/cryptography/bls12381.move b/aptos-move/framework/aptos-stdlib/sources/cryptography/bls12381.move index da0b6bb69ba5b..de7d05ad8b18b 100644 --- a/aptos-move/framework/aptos-stdlib/sources/cryptography/bls12381.move +++ b/aptos-move/framework/aptos-stdlib/sources/cryptography/bls12381.move @@ -516,7 +516,7 @@ module aptos_std::bls12381 { } #[test] - #[expected_failure(abort_code = 65537)] + #[expected_failure(abort_code = 65537, location = Self)] fun test_empty_pubkey_aggregation() { // First, make sure if no inputs are given, the function returns None // assert!(aggregate_pop_verified_pubkeys(vector::empty()) == option::none(), 1); diff --git a/aptos-move/framework/aptos-stdlib/sources/from_bcs.move b/aptos-move/framework/aptos-stdlib/sources/from_bcs.move index e4af71c7f6204..2e321108175f9 100644 --- a/aptos-move/framework/aptos-stdlib/sources/from_bcs.move +++ b/aptos-move/framework/aptos-stdlib/sources/from_bcs.move @@ -67,7 +67,7 @@ module aptos_std::from_bcs { } #[test] - #[expected_failure(abort_code = 0x10001)] + #[expected_failure(abort_code = 0x10001, location = Self)] fun test_address_fail() { let bad_vec = b"01"; to_address(bad_vec); diff --git a/aptos-move/framework/aptos-stdlib/sources/pool_u64.move b/aptos-move/framework/aptos-stdlib/sources/pool_u64.move index b9d95ac0391c9..9f24839e0728e 100644 --- a/aptos-move/framework/aptos-stdlib/sources/pool_u64.move +++ b/aptos-move/framework/aptos-stdlib/sources/pool_u64.move @@ -327,7 +327,7 @@ module aptos_std::pool_u64 { } #[test] - #[expected_failure(abort_code = 196611)] + #[expected_failure(abort_code = 196611, location = Self)] public entry fun test_destroy_empty_should_fail_if_not_empty() { let pool = create(1); update_total_coins(&mut pool, 100); @@ -428,7 +428,7 @@ module aptos_std::pool_u64 { } #[test] - #[expected_failure(abort_code = 196610)] + #[expected_failure(abort_code = 196610, location = Self)] public entry fun test_add_shares_should_enforce_shareholder_limit() { let pool = create(2); add_shares(&mut pool, @1, 1); @@ -449,7 +449,7 @@ module aptos_std::pool_u64 { } #[test] - #[expected_failure(abort_code = 65537)] + #[expected_failure(abort_code = 65537, location = Self)] public entry fun test_redeem_shares_non_existent_shareholder() { let pool = create(1); add_shares(&mut pool, @1, 1); @@ -458,7 +458,7 @@ module aptos_std::pool_u64 { } #[test] - #[expected_failure(abort_code = 65540)] + #[expected_failure(abort_code = 65540, location = Self)] public entry fun test_redeem_shares_insufficient_shares() { let pool = create(1); add_shares(&mut pool, @1, 1); @@ -488,7 +488,7 @@ module aptos_std::pool_u64 { } #[test] - #[expected_failure(abort_code = 65537)] + #[expected_failure(abort_code = 65537, location = Self)] public entry fun test_deduct_shares_non_existent_shareholder() { let pool = create(1); add_shares(&mut pool, @1, 1); @@ -497,7 +497,7 @@ module aptos_std::pool_u64 { } #[test] - #[expected_failure(abort_code = 65540)] + #[expected_failure(abort_code = 65540, location = Self)] public entry fun test_deduct_shares_insufficient_shares() { let pool = create(1); add_shares(&mut pool, @1, 1); diff --git a/aptos-move/framework/aptos-token/sources/token.move b/aptos-move/framework/aptos-token/sources/token.move index 23b23fde88905..fe88bc8721142 100644 --- a/aptos-move/framework/aptos-token/sources/token.move +++ b/aptos-move/framework/aptos-token/sources/token.move @@ -2001,7 +2001,7 @@ module aptos_token::token { } #[test(creator = @0xcafe, owner = @0xafe)] - #[expected_failure(abort_code = 327696)] + #[expected_failure(abort_code = 327696, location = Self)] fun test_opt_in_direct_transfer_fail( creator: &signer, owner: &signer, @@ -2026,7 +2026,7 @@ module aptos_token::token { } #[test(creator = @0xcafe, owner = @0xafe)] - #[expected_failure(abort_code = 327696)] + #[expected_failure(abort_code = 327696, location = Self)] fun test_opt_in_direct_deposit_fail( creator: &signer, owner: &signer, @@ -2068,7 +2068,7 @@ module aptos_token::token { } #[test(creator = @0xcafe, owner = @0x456)] - #[expected_failure(abort_code = 327710)] + #[expected_failure(abort_code = 327710, location = Self)] fun test_burn_token_by_owner_without_burnable_config( creator: &signer, owner: &signer, @@ -2263,7 +2263,7 @@ module aptos_token::token { } #[test(creator = @0xcafe)] - #[expected_failure(abort_code = 65572)] + #[expected_failure(abort_code = 65572, location = Self)] fun test_mutate_tokendata_maximum_from_zero( creator: &signer, ) acquires Collections, TokenStore { @@ -2429,7 +2429,7 @@ module aptos_token::token { } #[test(creator = @0xcafe)] - #[expected_failure(abort_code = 65569)] + #[expected_failure(abort_code = 65569, location = Self)] fun test_no_zero_balance_token_deposit( creator: &signer, ) acquires Collections, TokenStore { @@ -2449,7 +2449,7 @@ module aptos_token::token { } #[test(creator = @0xcafe)] - #[expected_failure(abort_code = 65548)] + #[expected_failure(abort_code = 65548, location = Self)] fun test_split_out_zero_token( creator: &signer, ) acquires Collections, TokenStore { @@ -2481,7 +2481,7 @@ module aptos_token::token { } #[test] - #[expected_failure(abort_code = 65570)] + #[expected_failure(abort_code = 65570, location = Self)] public fun test_enter_illegal_royalty(){ create_royalty(101, 100, @0xcafe); } diff --git a/aptos-move/framework/move-stdlib/doc/features.md b/aptos-move/framework/move-stdlib/doc/features.md index 6b568ab3dfc7a..c6430f2f3dde6 100644 --- a/aptos-move/framework/move-stdlib/doc/features.md +++ b/aptos-move/framework/move-stdlib/doc/features.md @@ -15,6 +15,8 @@ the Move stdlib, the Aptos stdlib, and the Aptos framework. - [Function `sha_512_and_ripemd_160_enabled`](#0x1_features_sha_512_and_ripemd_160_enabled) - [Function `get_aptos_stdlib_chain_id_feature`](#0x1_features_get_aptos_stdlib_chain_id_feature) - [Function `aptos_stdlib_chain_id_enabled`](#0x1_features_aptos_stdlib_chain_id_enabled) +- [Function `get_vm_binary_format_v6`](#0x1_features_get_vm_binary_format_v6) +- [Function `allow_vm_binary_format_v6`](#0x1_features_allow_vm_binary_format_v6) - [Function `change_feature_flags`](#0x1_features_change_feature_flags) - [Function `is_enabled`](#0x1_features_is_enabled) - [Function `set`](#0x1_features_set) @@ -124,6 +126,17 @@ Lifetime: ephemeral + + +Whether to allow the use of binary format version v6. +Lifetime: transient + + +
const VM_BINARY_FORMAT_V6: u64 = 5;
+
+ + + ## Function `code_dependency_check_enabled` @@ -262,6 +275,52 @@ Lifetime: ephemeral + + + + +## Function `get_vm_binary_format_v6` + + + +
public fun get_vm_binary_format_v6(): u64
+
+ + + +
+Implementation + + +
public fun get_vm_binary_format_v6(): u64 { VM_BINARY_FORMAT_V6 }
+
+ + + +
+ + + +## Function `allow_vm_binary_format_v6` + + + +
public fun allow_vm_binary_format_v6(): bool
+
+ + + +
+Implementation + + +
public fun allow_vm_binary_format_v6(): bool acquires Features {
+    is_enabled(VM_BINARY_FORMAT_V6)
+}
+
+ + +
diff --git a/aptos-move/framework/move-stdlib/sources/configs/features.move b/aptos-move/framework/move-stdlib/sources/configs/features.move index 4b6eff071c91f..1f6b33d9eb69d 100644 --- a/aptos-move/framework/move-stdlib/sources/configs/features.move +++ b/aptos-move/framework/move-stdlib/sources/configs/features.move @@ -69,6 +69,16 @@ module std::features { is_enabled(APTOS_STD_CHAIN_ID_NATIVES) } + /// Whether to allow the use of binary format version v6. + /// Lifetime: transient + const VM_BINARY_FORMAT_V6: u64 = 5; + + public fun get_vm_binary_format_v6(): u64 { VM_BINARY_FORMAT_V6 } + + public fun allow_vm_binary_format_v6(): bool acquires Features { + is_enabled(VM_BINARY_FORMAT_V6) + } + // ============================================================================================ // Feature Flag Implementation diff --git a/aptos-move/framework/move-stdlib/tests/bcs_tests.move b/aptos-move/framework/move-stdlib/tests/bcs_tests.move index 4250a96a986c8..ded62d55d1420 100644 --- a/aptos-move/framework/move-stdlib/tests/bcs_tests.move +++ b/aptos-move/framework/move-stdlib/tests/bcs_tests.move @@ -80,7 +80,7 @@ module std::bcs_tests { } #[test] - #[expected_failure(abort_code = 453)] + #[expected_failure(abort_code = 453, location = Self)] fun encode_129() { bcs::to_bytes(&Box { x: box127(true) }); } diff --git a/aptos-move/framework/move-stdlib/tests/bit_vector_tests.move b/aptos-move/framework/move-stdlib/tests/bit_vector_tests.move index 23f3b529aedda..f6b70e2d64fd2 100644 --- a/aptos-move/framework/move-stdlib/tests/bit_vector_tests.move +++ b/aptos-move/framework/move-stdlib/tests/bit_vector_tests.move @@ -32,21 +32,21 @@ module std::bit_vector_tests { } #[test] - #[expected_failure(abort_code = 0x20000)] + #[expected_failure(abort_code = 0x20000, location = Self)] fun set_bit_out_of_bounds() { let bitvector = bit_vector::new(bit_vector::word_size()); bit_vector::set(&mut bitvector, bit_vector::word_size()); } #[test] - #[expected_failure(abort_code = 0x20000)] + #[expected_failure(abort_code = 0x20000, location = Self)] fun unset_bit_out_of_bounds() { let bitvector = bit_vector::new(bit_vector::word_size()); bit_vector::unset(&mut bitvector, bit_vector::word_size()); } #[test] - #[expected_failure(abort_code = 0x20000)] + #[expected_failure(abort_code = 0x20000, location = Self)] fun index_bit_out_of_bounds() { let bitvector = bit_vector::new(bit_vector::word_size()); bit_vector::is_index_set(&mut bitvector, bit_vector::word_size()); @@ -210,7 +210,7 @@ module std::bit_vector_tests { } #[test] - #[expected_failure(abort_code = 0x20001)] + #[expected_failure(abort_code = 0x20001, location = Self)] fun empty_bitvector() { bit_vector::new(0); } diff --git a/aptos-move/framework/move-stdlib/tests/fixedpoint32_tests.move b/aptos-move/framework/move-stdlib/tests/fixedpoint32_tests.move index ece9704098ab9..af2e361f4aa8c 100644 --- a/aptos-move/framework/move-stdlib/tests/fixedpoint32_tests.move +++ b/aptos-move/framework/move-stdlib/tests/fixedpoint32_tests.move @@ -3,14 +3,14 @@ module std::fixed_point32_tests { use std::fixed_point32; #[test] - #[expected_failure(abort_code = 0x10001)] + #[expected_failure(abort_code = 0x10001, location = Self)] fun create_div_zero() { // A denominator of zero should cause an arithmetic error. fixed_point32::create_from_rational(2, 0); } #[test] - #[expected_failure(abort_code = 0x20005)] + #[expected_failure(abort_code = 0x20005, location = Self)] fun create_overflow() { // The maximum value is 2^32 - 1. Check that anything larger aborts // with an overflow. @@ -18,7 +18,7 @@ module std::fixed_point32_tests { } #[test] - #[expected_failure(abort_code = 0x20005)] + #[expected_failure(abort_code = 0x20005, location = Self)] fun create_underflow() { // The minimum non-zero value is 2^-32. Check that anything smaller // aborts. @@ -32,7 +32,7 @@ module std::fixed_point32_tests { } #[test] - #[expected_failure(abort_code = 0x10004)] + #[expected_failure(abort_code = 0x10004, location = Self)] fun divide_by_zero() { // Dividing by zero should cause an arithmetic error. let f = fixed_point32::create_from_raw_value(0); @@ -40,7 +40,7 @@ module std::fixed_point32_tests { } #[test] - #[expected_failure(abort_code = 0x20002)] + #[expected_failure(abort_code = 0x20002, location = Self)] fun divide_overflow_small_divisore() { let f = fixed_point32::create_from_raw_value(1); // 0x0.00000001 // Divide 2^32 by the minimum fractional value. This should overflow. @@ -48,7 +48,7 @@ module std::fixed_point32_tests { } #[test] - #[expected_failure(abort_code = 0x20002)] + #[expected_failure(abort_code = 0x20002, location = Self)] fun divide_overflow_large_numerator() { let f = fixed_point32::create_from_rational(1, 2); // 0.5 // Divide the maximum u64 value by 0.5. This should overflow. @@ -56,7 +56,7 @@ module std::fixed_point32_tests { } #[test] - #[expected_failure(abort_code = 0x20003)] + #[expected_failure(abort_code = 0x20003, location = Self)] fun multiply_overflow_small_multiplier() { let f = fixed_point32::create_from_rational(3, 2); // 1.5 // Multiply the maximum u64 value by 1.5. This should overflow. @@ -64,7 +64,7 @@ module std::fixed_point32_tests { } #[test] - #[expected_failure(abort_code = 0x20003)] + #[expected_failure(abort_code = 0x20003, location = Self)] fun multiply_overflow_large_multiplier() { let f = fixed_point32::create_from_raw_value(18446744073709551615); // Multiply 2^33 by the maximum fixed-point value. This should overflow. diff --git a/aptos-move/framework/move-stdlib/tests/option_tests.move b/aptos-move/framework/move-stdlib/tests/option_tests.move index 859934c55a61d..735dee0e0f165 100644 --- a/aptos-move/framework/move-stdlib/tests/option_tests.move +++ b/aptos-move/framework/move-stdlib/tests/option_tests.move @@ -37,7 +37,7 @@ module std::option_tests { } #[test] - #[expected_failure(abort_code = 0x40001)] + #[expected_failure(abort_code = 0x40001, location = Self)] fun option_borrow_none() { option::borrow(&option::none()); } @@ -51,7 +51,7 @@ module std::option_tests { } #[test] - #[expected_failure(abort_code = 0x40001)] + #[expected_failure(abort_code = 0x40001, location = Self)] fun borrow_mut_none() { option::borrow_mut(&mut option::none()); } @@ -80,7 +80,7 @@ module std::option_tests { } #[test] - #[expected_failure(abort_code = 0x40001)] + #[expected_failure(abort_code = 0x40001, location = Self)] fun extract_none() { option::extract(&mut option::none()); } @@ -107,7 +107,7 @@ module std::option_tests { } #[test] - #[expected_failure(abort_code = 0x40001)] + #[expected_failure(abort_code = 0x40001, location = Self)] fun swap_none() { option::swap(&mut option::none(), 1); } @@ -121,7 +121,7 @@ module std::option_tests { } #[test] - #[expected_failure(abort_code = 0x40000)] + #[expected_failure(abort_code = 0x40000, location = Self)] fun fill_some() { option::fill(&mut option::some(3), 0); } @@ -138,7 +138,7 @@ module std::option_tests { } #[test] - #[expected_failure(abort_code = 0x40001)] + #[expected_failure(abort_code = 0x40001, location = Self)] fun destroy_some_none() { option::destroy_some(option::none()); } @@ -149,7 +149,7 @@ module std::option_tests { } #[test] - #[expected_failure(abort_code = 0x40000)] + #[expected_failure(abort_code = 0x40000, location = Self)] fun destroy_none_some() { option::destroy_none(option::some(0)); } diff --git a/aptos-move/framework/move-stdlib/tests/string_tests.move b/aptos-move/framework/move-stdlib/tests/string_tests.move index 3e631d26c18cf..1d89379b1dff4 100644 --- a/aptos-move/framework/move-stdlib/tests/string_tests.move +++ b/aptos-move/framework/move-stdlib/tests/string_tests.move @@ -10,7 +10,7 @@ module std::string_tests { } #[test] - #[expected_failure(abort_code = 1)] + #[expected_failure(abort_code = 1, location = Self)] fun test_invalid_utf8() { let no_sparkle_heart = vector[0, 159, 146, 150]; let s = string::utf8(no_sparkle_heart); @@ -25,7 +25,7 @@ module std::string_tests { } #[test] - #[expected_failure(abort_code = 2)] + #[expected_failure(abort_code = 2, location = Self)] fun test_sub_string_invalid_boundary() { let sparkle_heart = vector[240, 159, 146, 150]; let s = string::utf8(sparkle_heart); @@ -33,7 +33,7 @@ module std::string_tests { } #[test] - #[expected_failure(abort_code = 2)] + #[expected_failure(abort_code = 2, location = Self)] fun test_sub_string_invalid_index() { let s = string::utf8(b"abcd"); let _sub = string::sub_string(&s, 4, 5); diff --git a/aptos-move/framework/move-stdlib/tests/vector_tests.move b/aptos-move/framework/move-stdlib/tests/vector_tests.move index ed069b3552d8a..34f343434395e 100644 --- a/aptos-move/framework/move-stdlib/tests/vector_tests.move +++ b/aptos-move/framework/move-stdlib/tests/vector_tests.move @@ -90,7 +90,7 @@ module std::vector_tests { } #[test] - #[expected_failure(abort_code = 1)] + #[expected_failure(abort_code = 1, location = Self)] fun borrow_out_of_range() { let v = V::empty(); V::push_back(&mut v, 7); @@ -133,7 +133,7 @@ module std::vector_tests { } #[test] - #[expected_failure(abort_code = 3)] + #[expected_failure(abort_code = 3, location = Self)] fun destroy_non_empty() { let v = V::empty(); V::push_back(&mut v, 42); @@ -154,7 +154,7 @@ module std::vector_tests { } #[test] - #[expected_failure(abort_code = 2)] + #[expected_failure(abort_code = 2, location = Self)] fun pop_out_of_range() { let v = V::empty(); V::pop_back(&mut v); @@ -228,14 +228,14 @@ module std::vector_tests { } #[test] - #[expected_failure(abort_code = 0x20000)] + #[expected_failure(abort_code = 0x20000, location = Self)] fun remove_empty_vector() { let v = V::empty(); V::remove(&mut v, 0); } #[test] - #[expected_failure(abort_code = 0x20000)] + #[expected_failure(abort_code = 0x20000, location = Self)] fun remove_out_of_bound_index() { let v = V::empty(); V::push_back(&mut v, 0); @@ -299,14 +299,14 @@ module std::vector_tests { } #[test] - #[expected_failure(abort_code = 1)] + #[expected_failure(abort_code = 1, location = Self)] fun swap_empty() { let v = V::empty(); V::swap(&mut v, 0, 0); } #[test] - #[expected_failure(abort_code = 1)] + #[expected_failure(abort_code = 1, location = Self)] fun swap_out_of_range() { let v = V::empty(); @@ -319,7 +319,7 @@ module std::vector_tests { } #[test] - #[expected_failure(abort_code = 0x20000)] + #[expected_failure(abort_code = 0x20000, location = Self)] fun swap_remove_empty() { let v = V::empty(); V::swap_remove(&mut v, 0); @@ -377,7 +377,7 @@ module std::vector_tests { } #[test] - #[expected_failure(abort_code = 1)] + #[expected_failure(abort_code = 1, location = Self)] fun swap_remove_out_of_range() { let v = V::empty(); V::push_back(&mut v, 0); diff --git a/aptos-move/move-examples/defi/sources/locked_coins.move b/aptos-move/move-examples/defi/sources/locked_coins.move index bb87ee372dd1b..6ccde28ff0020 100644 --- a/aptos-move/move-examples/defi/sources/locked_coins.move +++ b/aptos-move/move-examples/defi/sources/locked_coins.move @@ -236,7 +236,7 @@ module defi::locked_coins { } #[test(aptos_framework = @0x1, sponsor = @0x123, recipient = @0x234)] - #[expected_failure(abort_code = 0x30002)] + #[expected_failure(abort_code = 0x30002, location = Self)] public entry fun test_recipient_cannot_claim_coins_if_lockup_has_not_expired( aptos_framework: &signer, sponsor: &signer, recipient: &signer) acquires Locks { let recipient_addr = signer::address_of(recipient); @@ -249,7 +249,7 @@ module defi::locked_coins { } #[test(aptos_framework = @0x1, sponsor = @0x123, recipient = @0x234)] - #[expected_failure(abort_code = 0x60001)] + #[expected_failure(abort_code = 0x60001, location = Self)] public entry fun test_recipient_cannot_claim_twice( aptos_framework: &signer, sponsor: &signer, recipient: &signer) acquires Locks { let recipient_addr = signer::address_of(recipient); diff --git a/aptos-move/move-examples/marketplace/sources/marketplace_bid_utils.move b/aptos-move/move-examples/marketplace/sources/marketplace_bid_utils.move index 34729e50d2e27..830dc1773331c 100644 --- a/aptos-move/move-examples/marketplace/sources/marketplace_bid_utils.move +++ b/aptos-move/move-examples/marketplace/sources/marketplace_bid_utils.move @@ -583,7 +583,7 @@ module marketplace::marketplace_bid_utils { } #[test(owner = @0xAF, bidder_a = @0xBB, aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 1)] + #[expected_failure(abort_code = 1, location = marketplace::marketplace_bid_utils)] public fun test_wrong_coin_amount( owner: signer, bidder_a: signer, @@ -601,7 +601,7 @@ module marketplace::marketplace_bid_utils { } #[test(owner = @0xAF, bidder_a = @0xBB, aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 5)] + #[expected_failure(abort_code = 5, location = marketplace::marketplace_bid_utils)] public fun test_wrong_token_amount( owner: signer, bidder_a: signer, @@ -717,7 +717,7 @@ module marketplace::marketplace_bid_utils { } #[test(owner = @0x12, buyer = @0x34, framework = @aptos_framework)] - #[expected_failure(abort_code = 65538)] + #[expected_failure(abort_code = 65538, location = aptos_framework::timestamp)] fun test_buy_before_start( owner: &signer, buyer: &signer, @@ -736,7 +736,7 @@ module marketplace::marketplace_bid_utils { } #[test(owner = @0x12, buyer = @0x34, framework = @aptos_framework)] - #[expected_failure(abort_code = 65547)] + #[expected_failure(abort_code = 65547, location = marketplace::marketplace_bid_utils)] fun test_buy_after_expire( owner: &signer, buyer: &signer, @@ -755,7 +755,7 @@ module marketplace::marketplace_bid_utils { } #[test(owner = @0xAF, bidder_a = @0xBB, framework = @aptos_framework, buyer = @0xee)] - #[expected_failure(abort_code = 65546)] + #[expected_failure(abort_code = 65546, location = marketplace::marketplace_bid_utils)] fun test_buy_from_auction_listing( owner: &signer, bidder_a: &signer, diff --git a/aptos-move/move-examples/message_board/sources/acl_message_board.move b/aptos-move/move-examples/message_board/sources/acl_message_board.move index 69d1481d0eda7..a31f68fe8073e 100644 --- a/aptos-move/move-examples/message_board/sources/acl_message_board.move +++ b/aptos-move/move-examples/message_board/sources/acl_message_board.move @@ -152,7 +152,7 @@ module message_board::MessageBoardTests { } #[test] - #[expected_failure(abort_code = 1)] + #[expected_failure(abort_code = 1, location = message_board::acl_based_mb)] public entry fun test_add_new_participant() { let (alice, bob) = create_two_signers(); acl_based_mb::message_board_init(&alice); diff --git a/aptos-move/move-examples/mint_nft/4-Getting-Production-Ready/sources/create_nft_getting_production_ready.move b/aptos-move/move-examples/mint_nft/4-Getting-Production-Ready/sources/create_nft_getting_production_ready.move index 1978fbc4a8f6e..454ac29189fc0 100644 --- a/aptos-move/move-examples/mint_nft/4-Getting-Production-Ready/sources/create_nft_getting_production_ready.move +++ b/aptos-move/move-examples/mint_nft/4-Getting-Production-Ready/sources/create_nft_getting_production_ready.move @@ -358,7 +358,7 @@ module mint_nft::create_nft_getting_production_ready { } #[test (origin_account = @0xcafe, resource_account = @0xc3bb8488ab1a5815a9d543d7e41b0e0df46a7396f89b22821f07a4362f75ddc5, nft_receiver = @0x123, aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x50002)] + #[expected_failure(abort_code = 0x50002, location = mint_nft::create_nft_getting_production_ready)] public entry fun test_minting_expired(origin_account: signer, resource_account: signer, nft_receiver: signer, aptos_framework: signer) acquires ModuleData { let (admin_sk, admin_pk) = ed25519::generate_keys(); set_up_test(origin_account, &resource_account, &admin_pk, aptos_framework, &nft_receiver, 100000000001); @@ -373,7 +373,7 @@ module mint_nft::create_nft_getting_production_ready { } #[test (origin_account = @0xcafe, resource_account = @0xc3bb8488ab1a5815a9d543d7e41b0e0df46a7396f89b22821f07a4362f75ddc5, admin = @admin_addr, nft_receiver = @0x123, aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x50002)] + #[expected_failure(abort_code = 0x50002, location = mint_nft::create_nft_getting_production_ready)] public entry fun test_update_expiration_time(origin_account: signer, resource_account: signer, admin: signer, nft_receiver: signer, aptos_framework: signer) acquires ModuleData { let (admin_sk, admin_pk) = ed25519::generate_keys(); set_up_test(origin_account, &resource_account, &admin_pk, aptos_framework, &nft_receiver, 10); @@ -392,7 +392,7 @@ module mint_nft::create_nft_getting_production_ready { } #[test (origin_account = @0xcafe, resource_account = @0xc3bb8488ab1a5815a9d543d7e41b0e0df46a7396f89b22821f07a4362f75ddc5, admin = @admin_addr, nft_receiver = @0x123, aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x50003)] + #[expected_failure(abort_code = 0x50003, location = mint_nft::create_nft_getting_production_ready)] public entry fun test_update_minting_enabled(origin_account: signer, resource_account: signer, admin: signer, nft_receiver: signer, aptos_framework: signer) acquires ModuleData { let (admin_sk, admin_pk) = ed25519::generate_keys(); set_up_test(origin_account, &resource_account, &admin_pk, aptos_framework, &nft_receiver, 10); @@ -411,7 +411,7 @@ module mint_nft::create_nft_getting_production_ready { } #[test (origin_account = @0xcafe, resource_account = @0xc3bb8488ab1a5815a9d543d7e41b0e0df46a7396f89b22821f07a4362f75ddc5, nft_receiver = @0x123, aptos_framework = @aptos_framework)] - #[expected_failure(abort_code = 0x10006)] + #[expected_failure(abort_code = 0x10006, location = mint_nft::create_nft_getting_production_ready)] public entry fun test_invalid_signature(origin_account: signer, resource_account: signer, nft_receiver: signer, aptos_framework: signer) acquires ModuleData { let (admin_sk, admin_pk) = ed25519::generate_keys(); set_up_test(origin_account, &resource_account, &admin_pk, aptos_framework, &nft_receiver, 10); diff --git a/aptos-move/vm-genesis/src/lib.rs b/aptos-move/vm-genesis/src/lib.rs index a848fd20f83a7..a0df35cc7defd 100644 --- a/aptos-move/vm-genesis/src/lib.rs +++ b/aptos-move/vm-genesis/src/lib.rs @@ -107,6 +107,7 @@ pub fn encode_aptos_mainnet_genesis_transaction( AbstractValueSizeGasParameters::zeros(), LATEST_GAS_FEATURE_VERSION, Features::default().is_enabled(FeatureFlag::TREAT_FRIEND_AS_PRIVATE), + Features::default().is_enabled(FeatureFlag::VM_BINARY_FORMAT_V6), ChainId::test().id(), ) .unwrap(); @@ -212,6 +213,7 @@ pub fn encode_genesis_change_set( AbstractValueSizeGasParameters::zeros(), LATEST_GAS_FEATURE_VERSION, Features::default().is_enabled(FeatureFlag::TREAT_FRIEND_AS_PRIVATE), + Features::default().is_enabled(FeatureFlag::VM_BINARY_FORMAT_V6), ChainId::test().id(), ) .unwrap(); @@ -391,7 +393,7 @@ fn initialize( } fn initialize_features(session: &mut SessionExt) { - let features: Vec = vec![1, 2]; + let features: Vec = vec![1, 2, 5]; let mut serialized_values = serialize_values(&vec![MoveValue::Signer(CORE_CODE_ADDRESS)]); serialized_values.push(bcs::to_bytes(&features).unwrap()); @@ -862,6 +864,7 @@ pub fn test_genesis_module_publishing() { AbstractValueSizeGasParameters::zeros(), LATEST_GAS_FEATURE_VERSION, false, + true, ChainId::test().id(), ) .unwrap(); diff --git a/aptos-move/writeset-transaction-generator/src/writeset_builder.rs b/aptos-move/writeset-transaction-generator/src/writeset_builder.rs index 1e0fe52bd41ab..0ae9d85fe61aa 100644 --- a/aptos-move/writeset-transaction-generator/src/writeset_builder.rs +++ b/aptos-move/writeset-transaction-generator/src/writeset_builder.rs @@ -111,6 +111,7 @@ where AbstractValueSizeGasParameters::zeros(), LATEST_GAS_FEATURE_VERSION, Features::default().is_enabled(FeatureFlag::TREAT_FRIEND_AS_PRIVATE), + Features::default().is_enabled(FeatureFlag::VM_BINARY_FORMAT_V6), chain_id, ) .unwrap(); diff --git a/aptos-node/src/lib.rs b/aptos-node/src/lib.rs index e9d0afeaa64e0..9d371e9d5a0d9 100644 --- a/aptos-node/src/lib.rs +++ b/aptos-node/src/lib.rs @@ -651,10 +651,7 @@ pub fn setup_environment( } else { info!("Genesis txn not provided, it's fine if you don't expect to apply it otherwise please double check config"); } - AptosVM::set_runtime_config( - node_config.execution.paranoid_type_verification, - node_config.execution.paranoid_hot_potato_verification, - ); + AptosVM::set_paranoid_type_checks(node_config.execution.paranoid_type_verification); AptosVM::set_concurrency_level_once(node_config.execution.concurrency_level as usize); AptosVM::set_num_proof_reading_threads_once( node_config.execution.num_proof_reading_threads as usize, diff --git a/crates/aptos/Cargo.toml b/crates/aptos/Cargo.toml index 16eec4ff992ea..4d646c874c0d7 100644 --- a/crates/aptos/Cargo.toml +++ b/crates/aptos/Cargo.toml @@ -47,6 +47,7 @@ dirs = { workspace = true } futures = { workspace = true } hex = { workspace = true } itertools = { workspace = true } +move-binary-format = { workspace = true } move-cli = { workspace = true } move-command-line-common = { workspace = true } move-core-types = { workspace = true } diff --git a/crates/aptos/src/common/types.rs b/crates/aptos/src/common/types.rs index 6140b26f675e2..6fa786123682a 100644 --- a/crates/aptos/src/common/types.rs +++ b/crates/aptos/src/common/types.rs @@ -919,6 +919,10 @@ pub struct MovePackageDir { /// this for local development. #[clap(long)] pub(crate) skip_fetch_latest_git_deps: bool, + + /// Specify the version of the bytecode the compiler is going to emit. + #[clap(long)] + pub bytecode_version: Option, } impl MovePackageDir { @@ -928,6 +932,7 @@ impl MovePackageDir { output_dir: None, named_addresses: Default::default(), skip_fetch_latest_git_deps: true, + bytecode_version: None, } } diff --git a/crates/aptos/src/move_tool/mod.rs b/crates/aptos/src/move_tool/mod.rs index aa180987a3ff4..0209ac153af5b 100644 --- a/crates/aptos/src/move_tool/mod.rs +++ b/crates/aptos/src/move_tool/mod.rs @@ -50,6 +50,7 @@ use std::ops::Deref; use std::{ collections::BTreeMap, convert::TryFrom, + env, path::{Path, PathBuf}, str::FromStr, }; @@ -111,6 +112,20 @@ impl MoveTool { } } +const VAR_BYTECODE_VERSION: &str = "MOVE_BYTECODE_VERSION"; + +fn set_bytecode_version(version: Option) { + // Note: this is a bit of a hack to get the compiler emit bytecode with the right + // version. In the future, we should add an option to the Move package system + // that would allow us to configure this directly instead of relying on + // environment variables. + if let Some(ver) = version { + env::set_var(VAR_BYTECODE_VERSION, ver.to_string()); + } else if env::var(VAR_BYTECODE_VERSION) == Err(env::VarError::NotPresent) { + env::set_var(VAR_BYTECODE_VERSION, "5"); + } +} + #[derive(Parser)] pub struct FrameworkPackageArgs { /// Git revision or branch for the Aptos framework @@ -281,6 +296,7 @@ impl CliCommand> for CompilePackage { } async fn execute(self) -> CliTypedResult> { + set_bytecode_version(self.move_options.bytecode_version); let build_options = BuildOptions { install_dir: self.move_options.output_dir.clone(), ..self @@ -339,6 +355,7 @@ impl CliCommand<&'static str> for TestPackage { } async fn execute(self) -> CliTypedResult<&'static str> { + set_bytecode_version(self.move_options.bytecode_version); let config = BuildConfig { additional_named_addresses: self.move_options.named_addresses(), test_mode: true, @@ -411,6 +428,7 @@ impl CliCommand<&'static str> for ProvePackage { } async fn execute(self) -> CliTypedResult<&'static str> { + set_bytecode_version(self.move_options.bytecode_version); let ProvePackage { move_options, prover_options, @@ -450,6 +468,7 @@ impl CliCommand<&'static str> for DocumentPackage { } async fn execute(self) -> CliTypedResult<&'static str> { + set_bytecode_version(self.move_options.bytecode_version); let DocumentPackage { move_options, docgen_options, @@ -581,6 +600,7 @@ impl CliCommand for PublishPackage { } async fn execute(self) -> CliTypedResult { + set_bytecode_version(self.move_options.bytecode_version); let PublishPackage { move_options, txn_options, @@ -646,6 +666,7 @@ impl CliCommand for CreateResourceAccountAndPublishPackage { } async fn execute(self) -> CliTypedResult { + set_bytecode_version(self.move_options.bytecode_version); let CreateResourceAccountAndPublishPackage { seed, address_name, @@ -796,6 +817,7 @@ impl CliCommand<&'static str> for VerifyPackage { } async fn execute(self) -> CliTypedResult<&'static str> { + set_bytecode_version(self.move_options.bytecode_version); // First build the package locally to get the package metadata let build_options = BuildOptions { install_dir: self.move_options.output_dir.clone(), @@ -916,6 +938,7 @@ impl CliCommand<&'static str> for CleanPackage { } async fn execute(self) -> CliTypedResult<&'static str> { + set_bytecode_version(self.move_options.bytecode_version); let path = self.move_options.get_package_path()?; let build_dir = path.join("build"); // Only remove the build dir if it exists, allowing for users to still clean their cache diff --git a/crates/aptos/src/test/mod.rs b/crates/aptos/src/test/mod.rs index a40514ea97d76..55cebd391eabb 100644 --- a/crates/aptos/src/test/mod.rs +++ b/crates/aptos/src/test/mod.rs @@ -56,10 +56,10 @@ use serde_json::Value; use std::collections::HashMap; use std::{collections::BTreeMap, mem, path::PathBuf, str::FromStr, time::Duration}; use tempfile::TempDir; -use thiserror::private::PathAsDisplay; +use thiserror::__private::PathAsDisplay; #[cfg(feature = "cli-framework-test-move")] -use thiserror::private::PathAsDisplay; +use thiserror::__private::PathAsDisplay; use tokio::time::{sleep, Instant}; @@ -951,6 +951,7 @@ impl CliTestFramework { output_dir: None, named_addresses: Self::named_addresses(account_strs), skip_fetch_latest_git_deps: true, + bytecode_version: None, } } diff --git a/developer-docs-site/docs/cli-tools/install-move-prover.md b/developer-docs-site/docs/cli-tools/install-move-prover.md index a2d7ccf6ccebd..a5cf3abde6dee 100644 --- a/developer-docs-site/docs/cli-tools/install-move-prover.md +++ b/developer-docs-site/docs/cli-tools/install-move-prover.md @@ -39,7 +39,7 @@ These instructions have been tested on macOS Monterey (12.6) ```bash aptos move prove --package-dir aptos-move/move-examples/hello_prover/ ``` - +
@@ -47,7 +47,7 @@ These instructions have been tested on macOS Monterey (12.6) ### Linux -:::tip +:::tip Some Linux distributions are not supported. Currently, OpenSUSE and Amazon Linux do not support the automatic installation via the `dev_setup.sh` script. ::: diff --git a/ecosystem/python/sdk/aptos_sdk/bcs.py b/ecosystem/python/sdk/aptos_sdk/bcs.py index 155bd6b595f1d..d7aac79d9bdba 100644 --- a/ecosystem/python/sdk/aptos_sdk/bcs.py +++ b/ecosystem/python/sdk/aptos_sdk/bcs.py @@ -17,7 +17,7 @@ MAX_U32 = 2**32 - 1 MAX_U64 = 2**64 - 1 MAX_U128 = 2**128 - 1 - +MAX_U256 = 2**256 - 1 class Deserializer: _input: io.BytesIO @@ -89,6 +89,9 @@ def u64(self) -> int: def u128(self) -> int: return self._read_int(16) + def u256(self) -> int: + return self._read_int(32) + def uleb128(self) -> int: value = 0 shift = 0 @@ -207,6 +210,12 @@ def u128(self, value: int): self._write_int(value, 16) + def u256(self, value: int): + if value > MAX_U256: + raise Exception(f"Cannot encode {value} into u256") + + self._write_int(value, 32) + def uleb128(self, value: int): if value > MAX_U32: raise Exception(f"Cannot encode {value} into uleb128") @@ -361,6 +370,16 @@ def test_u128(self): self.assertEqual(in_value, out_value) + def test_u256(self): + in_value = 111111111111111111111111111111111111111111111111111111111111111111111111111115 + + ser = Serializer() + ser.u256(in_value) + der = Deserializer(ser.output()) + out_value = der.u256() + + self.assertEqual(in_value, out_value) + def test_uleb128(self): in_value = 1111111115 diff --git a/ecosystem/python/sdk/aptos_sdk/transactions.py b/ecosystem/python/sdk/aptos_sdk/transactions.py index eb738fcc8d0ee..bacd12455785f 100644 --- a/ecosystem/python/sdk/aptos_sdk/transactions.py +++ b/ecosystem/python/sdk/aptos_sdk/transactions.py @@ -256,6 +256,9 @@ class ScriptArgument: ADDRESS: int = 3 U8_VECTOR: int = 4 BOOL: int = 5 + U16: int = 6 + U32: int = 7 + U256: int = 8 variant: int value: typing.Any @@ -272,10 +275,16 @@ def deserialize(deserializer: Deserializer) -> ScriptArgument: variant = deserializer.u8() if variant == ScriptArgument.U8: value: typing.Any = deserializer.u8() + elif variant == ScriptArgument.U16: + value = deserializer.u16() + elif variant == ScriptArgument.U32: + value = deserializer.u32() elif variant == ScriptArgument.U64: value = deserializer.u64() elif variant == ScriptArgument.U128: value = deserializer.u128() + elif variant == ScriptArgument.U256: + value = deserializer.u256() elif variant == ScriptArgument.ADDRESS: value = AccountAddress.deserialize(deserializer) elif variant == ScriptArgument.U8_VECTOR: @@ -290,10 +299,16 @@ def serialize(self, serializer: Serializer): serializer.u8(self.variant) if self.variant == ScriptArgument.U8: serializer.u8(self.value) + if self.variant == ScriptArgument.U16: + serializer.u16(self.value) + if self.variant == ScriptArgument.U32: + serializer.u32(self.value) elif self.variant == ScriptArgument.U64: serializer.u64(self.value) elif self.variant == ScriptArgument.U128: serializer.u128(self.value) + if self.variant == ScriptArgument.U256: + serializer.u256(self.value) elif self.variant == ScriptArgument.ADDRESS: serializer.struct(self.value) elif self.variant == ScriptArgument.U8_VECTOR: diff --git a/ecosystem/python/sdk/aptos_sdk/type_tag.py b/ecosystem/python/sdk/aptos_sdk/type_tag.py index 6a03f2e2ddec7..4ae11278fadfd 100644 --- a/ecosystem/python/sdk/aptos_sdk/type_tag.py +++ b/ecosystem/python/sdk/aptos_sdk/type_tag.py @@ -21,6 +21,9 @@ class TypeTag: SIGNER: int = 5 VECTOR: int = 6 STRUCT: int = 7 + U16: int = 8 + U32: int = 9 + U256: int = 10 value: typing.Any @@ -47,10 +50,16 @@ def deserialize(deserializer: Deserializer) -> TypeTag: return TypeTag(BoolTag.deserialize(deserializer)) elif variant == TypeTag.U8: return TypeTag(U8Tag.deserialize(deserializer)) + elif variant == TypeTag.U16: + return TypeTag(U16Tag.deserialize(deserializer)) + elif variant == TypeTag.U32: + return TypeTag(U32Tag.deserialize(deserializer)) elif variant == TypeTag.U64: return TypeTag(U64Tag.deserialize(deserializer)) elif variant == TypeTag.U128: return TypeTag(U128Tag.deserialize(deserializer)) + elif variant == TypeTag.U256: + return TypeTag(U256Tag.deserialize(deserializer)) elif variant == TypeTag.ACCOUNT_ADDRESS: return TypeTag(AccountAddressTag.deserialize(deserializer)) elif variant == TypeTag.SIGNER: @@ -115,6 +124,53 @@ def deserialize(deserializer: Deserializer) -> U8Tag: def serialize(self, serializer: Serializer): serializer.u8(self.value) +class U16Tag: + value: int + + def __init__(self, value: int): + self.value = value + + def __eq__(self, other: object) -> bool: + if not isinstance(other, U16Tag): + return NotImplemented + return self.value == other.value + + def __str__(self): + return self.value.__str__() + + def variant(self): + return TypeTag.U16 + + @staticmethod + def deserialize(deserializer: Deserializer) -> U16Tag: + return U16Tag(deserializer.u16()) + + def serialize(self, serializer: Serializer): + serializer.u16(self.value) + +class U32Tag: + value: int + + def __init__(self, value: int): + self.value = value + + def __eq__(self, other: object) -> bool: + if not isinstance(other, U32Tag): + return NotImplemented + return self.value == other.value + + def __str__(self): + return self.value.__str__() + + def variant(self): + return TypeTag.U32 + + @staticmethod + def deserialize(deserializer: Deserializer) -> U32Tag: + return U32Tag(deserializer.u32()) + + def serialize(self, serializer: Serializer): + serializer.u32(self.value) class U64Tag: value: int @@ -165,6 +221,29 @@ def deserialize(deserializer: Deserializer) -> U128Tag: def serialize(self, serializer: Serializer): serializer.u128(self.value) +class U256Tag: + value: int + + def __init__(self, value: int): + self.value = value + + def __eq__(self, other: object) -> bool: + if not isinstance(other, U256Tag): + return NotImplemented + return self.value == other.value + + def __str__(self): + return self.value.__str__() + + def variant(self): + return TypeTag.U256 + + @staticmethod + def deserialize(deserializer: Deserializer) -> U256Tag: + return U256Tag(deserializer.u256()) + + def serialize(self, serializer: Serializer): + serializer.u256(self.value) class AccountAddressTag: value: AccountAddress diff --git a/ecosystem/typescript/sdk/src/aptos_types/transaction.ts b/ecosystem/typescript/sdk/src/aptos_types/transaction.ts index 150bc60697e49..785d31f014f49 100644 --- a/ecosystem/typescript/sdk/src/aptos_types/transaction.ts +++ b/ecosystem/typescript/sdk/src/aptos_types/transaction.ts @@ -18,6 +18,8 @@ import { deserializeVector, serializeVector, bcsToBytes, + Uint16, + Uint256, } from "../bcs"; import { AccountAddress } from "./account_address"; import { TransactionAuthenticator } from "./authenticator"; @@ -420,6 +422,12 @@ export abstract class TransactionArgument { return TransactionArgumentU8Vector.load(deserializer); case 5: return TransactionArgumentBool.load(deserializer); + case 6: + return TransactionArgumentU16.load(deserializer); + case 7: + return TransactionArgumentU32.load(deserializer); + case 8: + return TransactionArgumentU256.load(deserializer); default: throw new Error(`Unknown variant index for TransactionArgument: ${index}`); } @@ -442,6 +450,38 @@ export class TransactionArgumentU8 extends TransactionArgument { } } +export class TransactionArgumentU16 extends TransactionArgument { + constructor(public readonly value: Uint16) { + super(); + } + + serialize(serializer: Serializer): void { + serializer.serializeU32AsUleb128(6); + serializer.serializeU16(this.value); + } + + static load(deserializer: Deserializer): TransactionArgumentU16 { + const value = deserializer.deserializeU16(); + return new TransactionArgumentU16(value); + } +} + +export class TransactionArgumentU32 extends TransactionArgument { + constructor(public readonly value: Uint16) { + super(); + } + + serialize(serializer: Serializer): void { + serializer.serializeU32AsUleb128(7); + serializer.serializeU32(this.value); + } + + static load(deserializer: Deserializer): TransactionArgumentU32 { + const value = deserializer.deserializeU32(); + return new TransactionArgumentU32(value); + } +} + export class TransactionArgumentU64 extends TransactionArgument { constructor(public readonly value: Uint64) { super(); @@ -474,6 +514,22 @@ export class TransactionArgumentU128 extends TransactionArgument { } } +export class TransactionArgumentU256 extends TransactionArgument { + constructor(public readonly value: Uint256) { + super(); + } + + serialize(serializer: Serializer): void { + serializer.serializeU32AsUleb128(8); + serializer.serializeU256(this.value); + } + + static load(deserializer: Deserializer): TransactionArgumentU256 { + const value = deserializer.deserializeU256(); + return new TransactionArgumentU256(value); + } +} + export class TransactionArgumentAddress extends TransactionArgument { constructor(public readonly value: AccountAddress) { super(); diff --git a/ecosystem/typescript/sdk/src/aptos_types/type_tag.ts b/ecosystem/typescript/sdk/src/aptos_types/type_tag.ts index 2b41513de981f..05fcea4c4c4fe 100644 --- a/ecosystem/typescript/sdk/src/aptos_types/type_tag.ts +++ b/ecosystem/typescript/sdk/src/aptos_types/type_tag.ts @@ -3,6 +3,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable class-methods-use-this */ +/* eslint-disable max-classes-per-file */ import { Deserializer, Seq, Serializer, deserializeVector, serializeVector } from "../bcs"; import { AccountAddress } from "./account_address"; import { Identifier } from "./identifier"; @@ -29,6 +30,12 @@ export abstract class TypeTag { return TypeTagVector.load(deserializer); case 7: return TypeTagStruct.load(deserializer); + case 8: + return TypeTagU16.load(deserializer); + case 9: + return TypeTagU32.load(deserializer); + case 10: + return TypeTagU256.load(deserializer); default: throw new Error(`Unknown variant index for TypeTag: ${index}`); } @@ -55,6 +62,26 @@ export class TypeTagU8 extends TypeTag { } } +export class TypeTagU16 extends TypeTag { + serialize(serializer: Serializer): void { + serializer.serializeU32AsUleb128(1); + } + + static load(_deserializer: Deserializer): TypeTagU16 { + return new TypeTagU16(); + } +} + +export class TypeTagU32 extends TypeTag { + serialize(serializer: Serializer): void { + serializer.serializeU32AsUleb128(1); + } + + static load(_deserializer: Deserializer): TypeTagU32 { + return new TypeTagU32(); + } +} + export class TypeTagU64 extends TypeTag { serialize(serializer: Serializer): void { serializer.serializeU32AsUleb128(2); @@ -75,6 +102,16 @@ export class TypeTagU128 extends TypeTag { } } +export class TypeTagU256 extends TypeTag { + serialize(serializer: Serializer): void { + serializer.serializeU32AsUleb128(1); + } + + static load(_deserializer: Deserializer): TypeTagU256 { + return new TypeTagU256(); + } +} + export class TypeTagAddress extends TypeTag { serialize(serializer: Serializer): void { serializer.serializeU32AsUleb128(4); diff --git a/ecosystem/typescript/sdk/src/bcs/consts.ts b/ecosystem/typescript/sdk/src/bcs/consts.ts index e9571c95bcf25..30e00c7b86594 100644 --- a/ecosystem/typescript/sdk/src/bcs/consts.ts +++ b/ecosystem/typescript/sdk/src/bcs/consts.ts @@ -1,7 +1,7 @@ // Copyright (c) Aptos // SPDX-License-Identifier: Apache-2.0 -import { Uint128, Uint16, Uint32, Uint64, Uint8 } from "./types"; +import { Uint128, Uint16, Uint32, Uint64, Uint8, Uint256 } from "./types"; // Upper bound values for uint8, uint16, uint64 and uint128 export const MAX_U8_NUMBER: Uint8 = 2 ** 8 - 1; @@ -9,3 +9,4 @@ export const MAX_U16_NUMBER: Uint16 = 2 ** 16 - 1; export const MAX_U32_NUMBER: Uint32 = 2 ** 32 - 1; export const MAX_U64_BIG_INT: Uint64 = BigInt(2 ** 64) - BigInt(1); export const MAX_U128_BIG_INT: Uint128 = BigInt(2 ** 128) - BigInt(1); +export const MAX_U256_BIG_INT: Uint256 = BigInt(2 ** 256) - BigInt(1); diff --git a/ecosystem/typescript/sdk/src/bcs/deserializer.test.ts b/ecosystem/typescript/sdk/src/bcs/deserializer.test.ts index 12e8611dd6aa1..b7d1691266efe 100644 --- a/ecosystem/typescript/sdk/src/bcs/deserializer.test.ts +++ b/ecosystem/typescript/sdk/src/bcs/deserializer.test.ts @@ -89,6 +89,17 @@ describe("BCS Deserializer", () => { ); expect(deserializer.deserializeU128()).toEqual(BigInt("1311768467750121216")); }); + it("deserializes a uint256", () => { + let deserializer = new Deserializer( + new Uint8Array([ + 0x31, 0x30, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, + 0x13, 0x12, 0x11, 0x10, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, + ]), + ); + expect(deserializer.deserializeU256()).toEqual( + BigInt("0x0001020304050607080910111213141516171819202122232425262728293031"), + ); + }); it("deserializes a uleb128", () => { let deserializer = new Deserializer(new Uint8Array([0xcd, 0xea, 0xec, 0x31])); diff --git a/ecosystem/typescript/sdk/src/bcs/deserializer.ts b/ecosystem/typescript/sdk/src/bcs/deserializer.ts index 239d24630e72e..575906ffbe528 100644 --- a/ecosystem/typescript/sdk/src/bcs/deserializer.ts +++ b/ecosystem/typescript/sdk/src/bcs/deserializer.ts @@ -3,7 +3,7 @@ /* eslint-disable no-bitwise */ import { MAX_U32_NUMBER } from "./consts"; -import { Bytes, Uint128, Uint16, Uint32, Uint64, Uint8 } from "./types"; +import { Bytes, Uint128, Uint16, Uint256, Uint32, Uint64, Uint8 } from "./types"; export class Deserializer { private buffer: ArrayBuffer; @@ -147,6 +147,19 @@ export class Deserializer { return BigInt((high << BigInt(64)) | low); } + /** + * Deserializes a uint256 number. + * + * BCS layout for "uint256": Thirty-two bytes. Binary format in little-endian representation. + */ + deserializeU256(): Uint256 { + const low = this.deserializeU128(); + const high = this.deserializeU128(); + + // combine the two 128-bit values and return (little endian) + return BigInt((high << BigInt(128)) | low); + } + /** * Deserializes a uleb128 encoded uint32 number. * diff --git a/ecosystem/typescript/sdk/src/bcs/serializer.ts b/ecosystem/typescript/sdk/src/bcs/serializer.ts index b92d2cc0acdeb..e8ae2340059aa 100644 --- a/ecosystem/typescript/sdk/src/bcs/serializer.ts +++ b/ecosystem/typescript/sdk/src/bcs/serializer.ts @@ -2,7 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 /* eslint-disable no-bitwise */ -import { MAX_U128_BIG_INT, MAX_U16_NUMBER, MAX_U32_NUMBER, MAX_U64_BIG_INT, MAX_U8_NUMBER } from "./consts"; +import { + MAX_U128_BIG_INT, + MAX_U16_NUMBER, + MAX_U32_NUMBER, + MAX_U64_BIG_INT, + MAX_U8_NUMBER, + MAX_U256_BIG_INT, +} from "./consts"; import { AnyNumber, Bytes, Uint16, Uint32, Uint8 } from "./types"; export class Serializer { @@ -171,6 +178,21 @@ export class Serializer { this.serializeU64(high); } + /** + * Serializes a uint256 number. + * + * BCS layout for "uint256": Sixteen bytes. Binary format in little-endian representation. + */ + @checkNumberRange(BigInt(0), MAX_U256_BIG_INT) + serializeU256(value: AnyNumber): void { + const low = BigInt(value.toString()) & MAX_U128_BIG_INT; + const high = BigInt(value.toString()) >> BigInt(128); + + // write little endian number + this.serializeU128(low); + this.serializeU128(high); + } + /** * Serializes a uint32 number with uleb128. * diff --git a/ecosystem/typescript/sdk/src/bcs/types.ts b/ecosystem/typescript/sdk/src/bcs/types.ts index 8084190b0ee80..735a6999921ab 100644 --- a/ecosystem/typescript/sdk/src/bcs/types.ts +++ b/ecosystem/typescript/sdk/src/bcs/types.ts @@ -8,5 +8,6 @@ export type Uint16 = number; export type Uint32 = number; export type Uint64 = bigint; export type Uint128 = bigint; +export type Uint256 = bigint; export type AnyNumber = bigint | number; export type Bytes = Uint8Array; diff --git a/ecosystem/typescript/sdk/src/generated/index.ts b/ecosystem/typescript/sdk/src/generated/index.ts index 1c4403eb7b876..bf8377770dc51 100644 --- a/ecosystem/typescript/sdk/src/generated/index.ts +++ b/ecosystem/typescript/sdk/src/generated/index.ts @@ -84,6 +84,7 @@ export type { TransactionSignature_Ed25519Signature } from './models/Transaction export type { TransactionSignature_MultiAgentSignature } from './models/TransactionSignature_MultiAgentSignature'; export type { TransactionSignature_MultiEd25519Signature } from './models/TransactionSignature_MultiEd25519Signature'; export type { U128 } from './models/U128'; +export type { U256 } from './models/U256'; export type { U64 } from './models/U64'; export type { UserTransaction } from './models/UserTransaction'; export type { VersionedEvent } from './models/VersionedEvent'; @@ -177,6 +178,7 @@ export { $TransactionSignature_Ed25519Signature } from './schemas/$TransactionSi export { $TransactionSignature_MultiAgentSignature } from './schemas/$TransactionSignature_MultiAgentSignature'; export { $TransactionSignature_MultiEd25519Signature } from './schemas/$TransactionSignature_MultiEd25519Signature'; export { $U128 } from './schemas/$U128'; +export { $U256 } from './schemas/$U256'; export { $U64 } from './schemas/$U64'; export { $UserTransaction } from './schemas/$UserTransaction'; export { $VersionedEvent } from './schemas/$VersionedEvent'; diff --git a/ecosystem/typescript/sdk/src/generated/models/MoveStructValue.ts b/ecosystem/typescript/sdk/src/generated/models/MoveStructValue.ts index 2f82dc158e742..11d4da45739bc 100644 --- a/ecosystem/typescript/sdk/src/generated/models/MoveStructValue.ts +++ b/ecosystem/typescript/sdk/src/generated/models/MoveStructValue.ts @@ -11,9 +11,9 @@ * * Move `bool` type value is serialized into `boolean`. * - * Move `u8` type value is serialized into `integer`. + * Move `u8`, `u16` and `u32` type value is serialized into `integer`. * - * Move `u64` and `u128` type value is serialized into `string`. + * Move `u64`, `u128` and `u256` type value is serialized into `string`. * * Move `address` type value (32 byte Aptos account address) is serialized into a HexEncodedBytes string. * For example: diff --git a/ecosystem/typescript/sdk/src/generated/models/MoveType.ts b/ecosystem/typescript/sdk/src/generated/models/MoveType.ts index f2ed8aba8a951..226183770b27c 100644 --- a/ecosystem/typescript/sdk/src/generated/models/MoveType.ts +++ b/ecosystem/typescript/sdk/src/generated/models/MoveType.ts @@ -7,8 +7,11 @@ * Values: * - bool * - u8 + * - u16 + * - u32 * - u64 * - u128 + * - u256 * - address * - signer * - vector: `vector<{non-reference MoveTypeId}>` diff --git a/ecosystem/typescript/sdk/src/generated/models/MoveValue.ts b/ecosystem/typescript/sdk/src/generated/models/MoveValue.ts index a49375824991d..899490be8b4da 100644 --- a/ecosystem/typescript/sdk/src/generated/models/MoveValue.ts +++ b/ecosystem/typescript/sdk/src/generated/models/MoveValue.ts @@ -6,10 +6,11 @@ import type { Address } from './Address'; import type { HexEncodedBytes } from './HexEncodedBytes'; import type { MoveStructValue } from './MoveStructValue'; import type { U128 } from './U128'; +import type { U256 } from './U256'; import type { U64 } from './U64'; /** * An enum of the possible Move value types */ -export type MoveValue = (number | U64 | U128 | boolean | Address | Array | HexEncodedBytes | MoveStructValue | string); +export type MoveValue = (number | U64 | U128 | U256 | boolean | Address | Array | HexEncodedBytes | MoveStructValue | string); diff --git a/ecosystem/typescript/sdk/src/generated/models/U128.ts b/ecosystem/typescript/sdk/src/generated/models/U128.ts index 3c88afbf9c8a9..d391d4afb9c24 100644 --- a/ecosystem/typescript/sdk/src/generated/models/U128.ts +++ b/ecosystem/typescript/sdk/src/generated/models/U128.ts @@ -6,7 +6,7 @@ * A string containing a 128-bit unsigned integer. * * We represent u128 values as a string to ensure compatibility with languages such - * as JavaScript that do not parse u64s in JSON natively. + * as JavaScript that do not parse u128s in JSON natively. * */ export type U128 = string; diff --git a/ecosystem/typescript/sdk/src/generated/models/U256.ts b/ecosystem/typescript/sdk/src/generated/models/U256.ts new file mode 100644 index 0000000000000..092d56d8eb4be --- /dev/null +++ b/ecosystem/typescript/sdk/src/generated/models/U256.ts @@ -0,0 +1,12 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +/** + * A string containing a 256-bit unsigned integer. + * + * We represent u256 values as a string to ensure compatibility with languages such + * as JavaScript that do not parse u256s in JSON natively. + * + */ +export type U256 = string; diff --git a/ecosystem/typescript/sdk/src/generated/schemas/$MoveStructValue.ts b/ecosystem/typescript/sdk/src/generated/schemas/$MoveStructValue.ts index 6e39810a1b96a..bff113d6260f7 100644 --- a/ecosystem/typescript/sdk/src/generated/schemas/$MoveStructValue.ts +++ b/ecosystem/typescript/sdk/src/generated/schemas/$MoveStructValue.ts @@ -10,9 +10,9 @@ export const $MoveStructValue = { Move \`bool\` type value is serialized into \`boolean\`. - Move \`u8\` type value is serialized into \`integer\`. + Move \`u8\`, \`u16\` and \`u32\` type value is serialized into \`integer\`. - Move \`u64\` and \`u128\` type value is serialized into \`string\`. + Move \`u64\`, \`u128\` and \`u256\` type value is serialized into \`string\`. Move \`address\` type value (32 byte Aptos account address) is serialized into a HexEncodedBytes string. For example: diff --git a/ecosystem/typescript/sdk/src/generated/schemas/$MoveType.ts b/ecosystem/typescript/sdk/src/generated/schemas/$MoveType.ts index 1bcc2d3504cc3..56f4279bdc913 100644 --- a/ecosystem/typescript/sdk/src/generated/schemas/$MoveType.ts +++ b/ecosystem/typescript/sdk/src/generated/schemas/$MoveType.ts @@ -7,8 +7,11 @@ export const $MoveType = { Values: - bool - u8 + - u16 + - u32 - u64 - u128 + - u256 - address - signer - vector: \`vector<{non-reference MoveTypeId}>\` diff --git a/ecosystem/typescript/sdk/src/generated/schemas/$MoveValue.ts b/ecosystem/typescript/sdk/src/generated/schemas/$MoveValue.ts index 354f255b3e489..c4ac27bf7cd5e 100644 --- a/ecosystem/typescript/sdk/src/generated/schemas/$MoveValue.ts +++ b/ecosystem/typescript/sdk/src/generated/schemas/$MoveValue.ts @@ -7,10 +7,18 @@ export const $MoveValue = { contains: [{ type: 'number', format: 'uint8', + }, { + type: 'number', + format: 'uint16', + }, { + type: 'number', + format: 'uint32', }, { type: 'U64', }, { type: 'U128', + }, { + type: 'U256', }, { type: 'boolean', }, { diff --git a/ecosystem/typescript/sdk/src/generated/schemas/$U128.ts b/ecosystem/typescript/sdk/src/generated/schemas/$U128.ts index 7aa4060394a65..6452485486bab 100644 --- a/ecosystem/typescript/sdk/src/generated/schemas/$U128.ts +++ b/ecosystem/typescript/sdk/src/generated/schemas/$U128.ts @@ -6,7 +6,7 @@ export const $U128 = { description: `A string containing a 128-bit unsigned integer. We represent u128 values as a string to ensure compatibility with languages such - as JavaScript that do not parse u64s in JSON natively. + as JavaScript that do not parse u128s in JSON natively. `, - format: 'uint64', + format: 'uint128', } as const; diff --git a/ecosystem/typescript/sdk/src/generated/schemas/$U256.ts b/ecosystem/typescript/sdk/src/generated/schemas/$U256.ts new file mode 100644 index 0000000000000..20e7c0e14e04b --- /dev/null +++ b/ecosystem/typescript/sdk/src/generated/schemas/$U256.ts @@ -0,0 +1,12 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export const $U256 = { + type: 'string', + description: `A string containing a 256-bit unsigned integer. + + We represent u256 values as a string to ensure compatibility with languages such + as JavaScript that do not parse u256s in JSON natively. + `, + format: 'uint256', +} as const; diff --git a/ecosystem/typescript/sdk/src/transaction_builder/builder.ts b/ecosystem/typescript/sdk/src/transaction_builder/builder.ts index 6d44b1c142954..59289e68ae865 100644 --- a/ecosystem/typescript/sdk/src/transaction_builder/builder.ts +++ b/ecosystem/typescript/sdk/src/transaction_builder/builder.ts @@ -273,8 +273,11 @@ export class TransactionBuilderABI { * vector<0x1::aptos_coin::AptosCoin> * bool * u8 + * u16 + * u32 * u64 * u128 + * u256 * address * ``` * @param args Function arguments diff --git a/ecosystem/typescript/sdk/src/transaction_builder/builder_utils.test.ts b/ecosystem/typescript/sdk/src/transaction_builder/builder_utils.test.ts index 5800abcf878e8..548e960af10ab 100644 --- a/ecosystem/typescript/sdk/src/transaction_builder/builder_utils.test.ts +++ b/ecosystem/typescript/sdk/src/transaction_builder/builder_utils.test.ts @@ -16,6 +16,9 @@ import { TypeTagBool, TypeTagStruct, TypeTagU128, + TypeTagU16, + TypeTagU256, + TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, @@ -39,6 +42,14 @@ describe("BuilderUtils", () => { expect(new TypeTagParser("u8").parseTypeTag() instanceof TypeTagU8).toBeTruthy(); }); + it("parses a u16 TypeTag", async () => { + expect(new TypeTagParser("u16").parseTypeTag() instanceof TypeTagU16).toBeTruthy(); + }); + + it("parses a u32 TypeTag", async () => { + expect(new TypeTagParser("u32").parseTypeTag() instanceof TypeTagU32).toBeTruthy(); + }); + it("parses a u64 TypeTag", async () => { expect(new TypeTagParser("u64").parseTypeTag() instanceof TypeTagU64).toBeTruthy(); }); @@ -47,6 +58,10 @@ describe("BuilderUtils", () => { expect(new TypeTagParser("u128").parseTypeTag() instanceof TypeTagU128).toBeTruthy(); }); + it("parses a u256 TypeTag", async () => { + expect(new TypeTagParser("u256").parseTypeTag() instanceof TypeTagU256).toBeTruthy(); + }); + it("parses a address TypeTag", async () => { expect(new TypeTagParser("address").parseTypeTag() instanceof TypeTagAddress).toBeTruthy(); }); @@ -143,7 +158,7 @@ describe("BuilderUtils", () => { }).toThrow("Invalid type tag."); expect(() => { - new TypeTagParser("u32").parseTypeTag(); + new TypeTagParser("u3").parseTypeTag(); }).toThrow("Invalid type tag."); }); @@ -168,6 +183,28 @@ describe("BuilderUtils", () => { }).toThrow(/Invalid number string/); }); + it("serializes a u16 arg", async () => { + let serializer = new Serializer(); + serializeArg(0x7fff, new TypeTagU16(), serializer); + expect(serializer.getBytes()).toEqual(new Uint8Array([0xff, 0x7f])); + + serializer = new Serializer(); + expect(() => { + serializeArg("u16", new TypeTagU16(), serializer); + }).toThrow(/Invalid number string/); + }); + + it("serializes a u32 arg", async () => { + let serializer = new Serializer(); + serializeArg(0x01020304, new TypeTagU32(), serializer); + expect(serializer.getBytes()).toEqual(new Uint8Array([0x04, 0x03, 0x02, 0x01])); + + serializer = new Serializer(); + expect(() => { + serializeArg("u32", new TypeTagU32(), serializer); + }).toThrow(/Invalid number string/); + }); + it("serializes a u64 arg", async () => { let serializer = new Serializer(); serializeArg(BigInt("18446744073709551615"), new TypeTagU64(), serializer); @@ -192,6 +229,26 @@ describe("BuilderUtils", () => { }).toThrow(/^Cannot convert/); }); + it("serializes a u256 arg", async () => { + let serializer = new Serializer(); + serializeArg( + BigInt("0x0001020304050607080910111213141516171819202122232425262728293031"), + new TypeTagU256(), + serializer, + ); + expect(serializer.getBytes()).toEqual( + new Uint8Array([ + 0x31, 0x30, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, + 0x13, 0x12, 0x11, 0x10, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, + ]), + ); + + serializer = new Serializer(); + expect(() => { + serializeArg("u256", new TypeTagU256(), serializer); + }).toThrow(/^Cannot convert/); + }); + it("serializes an AccountAddress arg", async () => { let serializer = new Serializer(); serializeArg("0x1", new TypeTagAddress(), serializer); diff --git a/ecosystem/typescript/sdk/src/transaction_builder/builder_utils.ts b/ecosystem/typescript/sdk/src/transaction_builder/builder_utils.ts index 394709c61f3cc..8a455c6263ce9 100644 --- a/ecosystem/typescript/sdk/src/transaction_builder/builder_utils.ts +++ b/ecosystem/typescript/sdk/src/transaction_builder/builder_utils.ts @@ -6,8 +6,11 @@ import { TypeTag, TypeTagBool, TypeTagU8, + TypeTagU16, + TypeTagU32, TypeTagU64, TypeTagU128, + TypeTagU256, TypeTagAddress, AccountAddress, TypeTagVector, @@ -16,8 +19,11 @@ import { Identifier, TransactionArgument, TransactionArgumentBool, + TransactionArgumentU16, + TransactionArgumentU32, TransactionArgumentU64, TransactionArgumentU128, + TransactionArgumentU256, TransactionArgumentAddress, TransactionArgumentU8, TransactionArgumentU8Vector, @@ -167,12 +173,21 @@ export class TypeTagParser { if (tokenVal === "u8") { return new TypeTagU8(); } + if (tokenVal === "u16") { + return new TypeTagU16(); + } + if (tokenVal === "u32") { + return new TypeTagU32(); + } if (tokenVal === "u64") { return new TypeTagU64(); } if (tokenVal === "u128") { return new TypeTagU128(); } + if (tokenVal === "u256") { + return new TypeTagU256(); + } if (tokenVal === "bool") { return new TypeTagBool(); } @@ -263,6 +278,14 @@ export function serializeArg(argVal: any, argType: TypeTag, serializer: Serializ serializer.serializeU8(ensureNumber(argVal)); return; } + if (argType instanceof TypeTagU16) { + serializer.serializeU16(ensureNumber(argVal)); + return; + } + if (argType instanceof TypeTagU32) { + serializer.serializeU32(ensureNumber(argVal)); + return; + } if (argType instanceof TypeTagU64) { serializer.serializeU64(ensureBigInt(argVal)); return; @@ -271,6 +294,10 @@ export function serializeArg(argVal: any, argType: TypeTag, serializer: Serializ serializer.serializeU128(ensureBigInt(argVal)); return; } + if (argType instanceof TypeTagU256) { + serializer.serializeU256(ensureBigInt(argVal)); + return; + } if (argType instanceof TypeTagAddress) { let addr: AccountAddress; if (typeof argVal === "string" || argVal instanceof HexString) { @@ -330,12 +357,21 @@ export function argToTransactionArgument(argVal: any, argType: TypeTag): Transac if (argType instanceof TypeTagU8) { return new TransactionArgumentU8(ensureNumber(argVal)); } + if (argType instanceof TypeTagU16) { + return new TransactionArgumentU16(ensureNumber(argVal)); + } + if (argType instanceof TypeTagU32) { + return new TransactionArgumentU32(ensureNumber(argVal)); + } if (argType instanceof TypeTagU64) { return new TransactionArgumentU64(ensureBigInt(argVal)); } if (argType instanceof TypeTagU128) { return new TransactionArgumentU128(ensureBigInt(argVal)); } + if (argType instanceof TypeTagU256) { + return new TransactionArgumentU256(ensureBigInt(argVal)); + } if (argType instanceof TypeTagAddress) { let addr: AccountAddress; if (typeof argVal === "string" || argVal instanceof HexString) { diff --git a/ecosystem/typescript/sdk/src/transaction_builder/transaction_builder.test.ts b/ecosystem/typescript/sdk/src/transaction_builder/transaction_builder.test.ts index 72b5ca0907ba5..b4958610ccbdf 100644 --- a/ecosystem/typescript/sdk/src/transaction_builder/transaction_builder.test.ts +++ b/ecosystem/typescript/sdk/src/transaction_builder/transaction_builder.test.ts @@ -22,6 +22,9 @@ import { TransactionPayloadScript, TransactionPayloadEntryFunction, TypeTagStruct, + TransactionArgumentU16, + TransactionArgumentU32, + TransactionArgumentU256, } from "../aptos_types"; const ADDRESS_1 = "0x1222"; @@ -232,3 +235,31 @@ test("serialize script payload with one type arg and two function args", () => { "000000000000000000000000000000000000000000000000000000000a550c1800000000000000000026a11ceb0b030000000105000100000000050601000000000000000600000000000000001a0102010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e000204080100000000000000030000000000000000000000000000000000000000000000000000000000000001d0070000000000000000000000000000ffffffffffffffff040020b9c6ee1630ef3e711144a648db06bbb2284f7274cfbee53ffcee503cc1a492004055c7499795ea68d7acfa64a58f19efa2ba3b977fa58ae93ae8c0732c0f6d6dd084d92bbe4edc2a0d687031cae90da117abfac16ebd902e764bdc38a2154a2102", ); }); + +test("serialize script payload with new integer types (u16, u32, u256) as args", () => { + const argU16 = new TransactionArgumentU16(0xf111); + const argU32 = new TransactionArgumentU32(0xf1111111); + const argU256 = new TransactionArgumentU256( + BigInt("0xf111111111111111111111111111111111111111111111111111111111111111"), + ); + + const script = hexToBytes(""); + + const scriptPayload = new TransactionPayloadScript(new Script(script, [], [argU16, argU32, argU256])); + + const rawTxn = new RawTransaction( + AccountAddress.fromHex(ADDRESS_3), + BigInt(0), + scriptPayload, + BigInt(2000), + BigInt(0), + BigInt(TXN_EXPIRE), + new ChainId(4), + ); + + const signedTxn = sign(rawTxn); + + expect(hexSignedTxn(signedTxn)).toBe( + "000000000000000000000000000000000000000000000000000000000a550c180000000000000000000000030611f107111111f10811111111111111111111111111111111111111111111111111111111111111f1d0070000000000000000000000000000ffffffffffffffff040020b9c6ee1630ef3e711144a648db06bbb2284f7274cfbee53ffcee503cc1a49200409402b773f66cf5444efe4de38a026cf9b34e0327798ea01f0695db8e8e0888e20387b08f504b620dcffbc382e3ac141c0ec9a820c5f58b5da2eec589a9e86b0b", + ); +}); diff --git a/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs b/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs index 81d44adf7455f..ed6ac6bd97bc9 100644 --- a/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs +++ b/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs @@ -219,7 +219,7 @@ impl StateSnapshotRestoreController { } fn validate_modules(blob: &[(StateKey, StateValue)]) { - let config = verifier_config(); + let config = verifier_config(false); for (key, value) in blob { if let StateKey::AccessPath(p) = key { if let Path::Code(module_id) = p.get_path() { diff --git a/storage/indexer/src/lib.rs b/storage/indexer/src/lib.rs index 13e3b95a93d01..2337e6ad4b865 100644 --- a/storage/indexer/src/lib.rs +++ b/storage/indexer/src/lib.rs @@ -231,8 +231,11 @@ impl<'a> TableInfoParser<'a> { // there won't be tables in primitives AnnotatedMoveValue::U8(_) => {} + AnnotatedMoveValue::U16(_) => {} + AnnotatedMoveValue::U32(_) => {} AnnotatedMoveValue::U64(_) => {} AnnotatedMoveValue::U128(_) => {} + AnnotatedMoveValue::U256(_) => {} AnnotatedMoveValue::Bool(_) => {} AnnotatedMoveValue::Address(_) => {} AnnotatedMoveValue::Bytes(_) => {} diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/move_vm.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/move_vm.rs index 9dfcf7d290011..c38307f190024 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/move_vm.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/move_vm.rs @@ -43,7 +43,9 @@ fn is_valid_layout(layout: &MoveTypeLayout) -> bool { use MoveTypeLayout as L; match layout { - L::Bool | L::U8 | L::U64 | L::U128 | L::Address | L::Signer => true, + L::Bool | L::U8 | L::U16 | L::U32 | L::U64 | L::U128 | L::U256 | L::Address | L::Signer => { + true + } L::Vector(layout) => is_valid_layout(layout), diff --git a/testsuite/generate-format/tests/staged/api.yaml b/testsuite/generate-format/tests/staged/api.yaml index 2c23a5a6350d5..774d07c493b17 100644 --- a/testsuite/generate-format/tests/staged/api.yaml +++ b/testsuite/generate-format/tests/staged/api.yaml @@ -265,6 +265,18 @@ TransactionArgument: 5: Bool: NEWTYPE: BOOL + 6: + U16: + NEWTYPE: U16 + 7: + U32: + NEWTYPE: U32 + 8: + U256: + NEWTYPE: + TUPLEARRAY: + CONTENT: U8 + SIZE: 32 TransactionAuthenticator: ENUM: 0: @@ -375,6 +387,12 @@ TypeTag: struct: NEWTYPE: TYPENAME: StructTag + 8: + u16: UNIT + 9: + u32: UNIT + 10: + u256: UNIT WithdrawEvent: STRUCT: - amount: U64 diff --git a/testsuite/generate-format/tests/staged/aptos.yaml b/testsuite/generate-format/tests/staged/aptos.yaml index a4ba455265007..10e56b1cf1075 100644 --- a/testsuite/generate-format/tests/staged/aptos.yaml +++ b/testsuite/generate-format/tests/staged/aptos.yaml @@ -201,6 +201,18 @@ TransactionArgument: 5: Bool: NEWTYPE: BOOL + 6: + U16: + NEWTYPE: U16 + 7: + U32: + NEWTYPE: U32 + 8: + U256: + NEWTYPE: + TUPLEARRAY: + CONTENT: U8 + SIZE: 32 TransactionAuthenticator: ENUM: 0: @@ -264,6 +276,12 @@ TypeTag: struct: NEWTYPE: TYPENAME: StructTag + 8: + u16: UNIT + 9: + u32: UNIT + 10: + u256: UNIT WriteOp: ENUM: 0: diff --git a/testsuite/generate-format/tests/staged/consensus.yaml b/testsuite/generate-format/tests/staged/consensus.yaml index 1c8b1ec85fced..277bf23ea47c2 100644 --- a/testsuite/generate-format/tests/staged/consensus.yaml +++ b/testsuite/generate-format/tests/staged/consensus.yaml @@ -440,6 +440,18 @@ TransactionArgument: 5: Bool: NEWTYPE: BOOL + 6: + U16: + NEWTYPE: U16 + 7: + U32: + NEWTYPE: U32 + 8: + U256: + NEWTYPE: + TUPLEARRAY: + CONTENT: U8 + SIZE: 32 TransactionAuthenticator: ENUM: 0: @@ -515,6 +527,12 @@ TypeTag: struct: NEWTYPE: TYPENAME: StructTag + 8: + u16: UNIT + 9: + u32: UNIT + 10: + u256: UNIT ValidatorConsensusInfo: STRUCT: - address: diff --git a/testsuite/generate-format/tests/staged/move_abi.yaml b/testsuite/generate-format/tests/staged/move_abi.yaml index ead2b848cb67e..8cd6dcd8b77ec 100644 --- a/testsuite/generate-format/tests/staged/move_abi.yaml +++ b/testsuite/generate-format/tests/staged/move_abi.yaml @@ -86,3 +86,9 @@ TypeTag: struct: NEWTYPE: TYPENAME: StructTag + 8: + u16: UNIT + 9: + u32: UNIT + 10: + u256: UNIT diff --git a/types/src/on_chain_config/aptos_features.rs b/types/src/on_chain_config/aptos_features.rs index 04cb1aa29be14..d9738dbf904cd 100644 --- a/types/src/on_chain_config/aptos_features.rs +++ b/types/src/on_chain_config/aptos_features.rs @@ -10,15 +10,24 @@ use serde::{Deserialize, Serialize}; pub enum FeatureFlag { CODE_DEPENDENCY_CHECK = 1, TREAT_FRIEND_AS_PRIVATE = 2, + VM_BINARY_FORMAT_V6 = 5, } /// Representation of features on chain as a bitset. -#[derive(Default, Clone, Debug, Deserialize, PartialEq, Eq, PartialOrd, Ord, Serialize)] +#[derive(Clone, Debug, Deserialize, PartialEq, Eq, PartialOrd, Ord, Serialize)] pub struct Features { #[serde(with = "serde_bytes")] pub features: Vec, } +impl Default for Features { + fn default() -> Self { + Features { + features: vec![0b00100000], + } + } +} + impl OnChainConfig for Features { const MODULE_IDENTIFIER: &'static str = "features"; const TYPE_IDENTIFIER: &'static str = "Features";