diff --git a/.cursorrules b/.cursorrules new file mode 100644 index 0000000000000..fd8b71bdf3040 --- /dev/null +++ b/.cursorrules @@ -0,0 +1,32 @@ +# Supra Move Development Rules + +CRITICAL: This is a Supra Move project, NOT Aptos Move. Never use aptos_framework. + +## Framework Rules: +1. ALWAYS use supra_framework:: instead of aptos_framework:: +2. Available namespaces: supra_framework::, std:: +3. Main modules in supra_framework: config_buffer, create_signer, system_addresses, block, reconfiguration, reconfiguration_with_dkg, genesis, automation_registry, event, randomness, state_storage, transaction_fee, util, fungible_asset, multisig_account, function_info, validator_consensus_info, dispatchable_fungible_asset, aggregator_v2, aggregator_factory, chain_id, chain_status, consensus_config, execution_config, gas_schedule, pbo_delegation_pool, staking_config, staking_contract, storage_gas, supra_config, supra_governance, timestamp, transaction_validation, version, vesting, vesting_without_staking, supra_coin, account, supra_account +4. Standard library modules: vector, table, borrow_mut, error, features, option, signer, string, fixed_point32 + +## Code Generation Rules: +- Use supra_framework::account for account operations +- Use supra_framework::supra_coin for native token operations +- Use supra_framework::timestamp for time operations +- Use supra_framework::event for event handling +- Use std::vector for vector operations +- Use std::table for table operations + +## Example Patterns: +```move +module supra_framework::example { + use supra_framework::account; + use supra_framework::signer; + use std::vector; + + public fun init(account: &signer) { + // Supra Move code + } +} +``` + +When generating Move code, ALWAYS use the Supra Move framework patterns above. \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 8e4aa24a6aadb..fc2193783d393 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -31,18 +31,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aead" @@ -56,9 +56,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -96,19 +96,19 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.17", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.2.11", + "getrandom 0.3.4", "once_cell", "version_check", "zerocopy", @@ -116,9 +116,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -131,15 +131,9 @@ checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" [[package]] name = "allocator-api2" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" - -[[package]] -name = "android-tzdata" -version = "0.1.1" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android_system_properties" @@ -167,50 +161,52 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.5" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] @@ -221,9 +217,9 @@ checksum = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" dependencies = [ "backtrace", ] @@ -277,9 +273,9 @@ dependencies = [ "bcs 0.1.4", "bollard", "chrono", - "clap 4.4.14", + "clap 4.5.58", "clap_complete", - "dashmap", + "dashmap 5.5.3", "diesel", "diesel-async", "dirs", @@ -314,7 +310,7 @@ dependencies = [ "shadow-rs", "supra-aptos", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", "toml 0.7.8", "tonic", @@ -362,7 +358,7 @@ dependencies = [ "aptos-system-utils", "aptos-types", "bcs 0.1.4", - "http", + "http 0.2.12", "hyper", "sha256", "tokio", @@ -552,7 +548,7 @@ dependencies = [ "async-trait", "bcs 0.1.4", "bytes", - "clap 4.4.14", + "clap 4.5.58", "csv", "futures", "itertools 0.12.1", @@ -568,11 +564,11 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-io-timeout", "tokio-stream", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "warp", ] @@ -641,7 +637,7 @@ dependencies = [ "concurrent-queue", "criterion", "crossbeam", - "dashmap", + "dashmap 5.5.3", "derivative", "fail", "itertools 0.12.1", @@ -650,7 +646,7 @@ dependencies = [ "move-vm-types", "num_cpus", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "proptest", "proptest-derive", "rand 0.7.3", @@ -668,9 +664,9 @@ dependencies = [ "aptos-metrics-core", "aptos-types", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "criterion", - "dashmap", + "dashmap 5.5.3", "itertools 0.12.1", "jemallocator", "move-core-types", @@ -718,10 +714,10 @@ dependencies = [ "anyhow", "camino", "chrono", - "clap 4.4.14", + "clap 4.5.58", "clap-verbosity-flag", "determinator", - "env_logger", + "env_logger 0.10.2", "guppy", "log", "reqwest", @@ -745,7 +741,7 @@ name = "aptos-cli-common" version = "1.0.0" dependencies = [ "anstyle", - "clap 4.4.14", + "clap 4.5.58", "clap_complete", ] @@ -765,7 +761,7 @@ dependencies = [ "aptos-validator-interface", "aptos-vm", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "futures", "itertools 0.12.1", "move-compiler", @@ -792,7 +788,7 @@ dependencies = [ "once_cell", "rand 0.7.3", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -822,7 +818,7 @@ dependencies = [ "serde_merge", "serde_yaml 0.8.26", "tempfile", - "thiserror", + "thiserror 1.0.69", "url", ] @@ -875,8 +871,8 @@ dependencies = [ "bytes", "chrono", "claims", - "clap 4.4.14", - "dashmap", + "clap 4.5.58", + "dashmap 5.5.3", "enum_dispatch", "fail", "futures", @@ -904,7 +900,7 @@ dependencies = [ "sha3 0.9.1", "strum_macros 0.24.3", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-retry", "tokio-stream", @@ -922,7 +918,7 @@ dependencies = [ "futures", "move-core-types", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -993,7 +989,7 @@ dependencies = [ "curve25519-dalek-ng", "digest 0.9.0", "ed25519-dalek 1.0.1", - "ff 0.13.0", + "ff 0.13.1", "hex", "hkdf 0.10.0", "libsecp256k1", @@ -1014,12 +1010,12 @@ dependencies = [ "serde-name", "serde_bytes", "serde_json", - "sha2 0.10.8", + "sha2 0.10.9", "sha2 0.9.9", "sha3 0.9.1", "signature 2.2.0", "static_assertions", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", "trybuild", "typenum", @@ -1061,7 +1057,7 @@ dependencies = [ "async-trait", "bcs 0.1.4", "claims", - "dashmap", + "dashmap 5.5.3", "futures", "itertools 0.12.1", "maplit", @@ -1069,7 +1065,7 @@ dependencies = [ "ordered-float 3.9.2", "rand 0.8.5", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -1096,7 +1092,7 @@ dependencies = [ "once_cell", "rand 0.7.3", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -1131,9 +1127,9 @@ dependencies = [ "bcs 0.1.4", "byteorder", "claims", - "clap 4.4.14", + "clap 4.5.58", "crossbeam-channel", - "dashmap", + "dashmap 5.5.3", "either", "hex", "indicatif 0.15.0", @@ -1168,7 +1164,7 @@ dependencies = [ "aptos-types", "bcs 0.1.4", "bytes", - "dashmap", + "dashmap 5.5.3", "move-core-types", "rand 0.7.3", ] @@ -1208,7 +1204,7 @@ dependencies = [ "aptos-types", "aptos-vm", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "itertools 0.12.1", "tokio", ] @@ -1223,7 +1219,7 @@ dependencies = [ "aptos-logger", "aptos-move-debugger", "aptos-push-metrics", - "clap 4.4.14", + "clap 4.5.58", "jemallocator", "tokio", ] @@ -1240,7 +1236,7 @@ dependencies = [ "blst", "blstrs 0.7.1", "criterion", - "ff 0.13.0", + "ff 0.13.1", "group 0.13.0", "hex", "merlin", @@ -1339,7 +1335,7 @@ dependencies = [ "move-binary-format", "move-core-types", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1350,7 +1346,7 @@ dependencies = [ "aptos-logger", "aptos-types", "claims", - "dashmap", + "dashmap 5.5.3", "proptest", "proptest-derive", "rayon", @@ -1387,7 +1383,7 @@ dependencies = [ "arr_macro", "bcs 0.1.4", "bytes", - "dashmap", + "dashmap 5.5.3", "fail", "itertools 0.12.1", "move-core-types", @@ -1429,7 +1425,7 @@ dependencies = [ "async-trait", "bcs 0.1.4", "chrono", - "clap 4.4.14", + "clap 4.5.58", "derivative", "indicatif 0.15.0", "itertools 0.12.1", @@ -1462,16 +1458,16 @@ dependencies = [ "aptos-types", "aptos-vm", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "crossbeam-channel", "ctrlc", - "dashmap", + "dashmap 5.5.3", "itertools 0.12.1", "num_cpus", "once_cell", "rayon", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1511,7 +1507,7 @@ dependencies = [ "itertools 0.12.1", "once_cell", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1542,7 +1538,7 @@ dependencies = [ "aptos-vm", "aptos-vm-logging", "aptos-vm-types", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "move-core-types", "once_cell", "rayon", @@ -1564,7 +1560,7 @@ dependencies = [ name = "aptos-fallible" version = "0.1.0" dependencies = [ - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1575,7 +1571,7 @@ dependencies = [ "aptos-faucet-core", "aptos-logger", "aptos-sdk", - "clap 4.4.14", + "clap 4.5.58", "tokio", ] @@ -1591,7 +1587,7 @@ dependencies = [ "aptos-sdk", "async-trait", "captcha", - "clap 4.4.14", + "clap 4.5.58", "deadpool-redis", "enum_dispatch", "futures", @@ -1632,7 +1628,7 @@ dependencies = [ "anyhow", "aptos-faucet-core", "aptos-logger", - "clap 4.4.14", + "clap 4.5.58", "tokio", ] @@ -1644,8 +1640,8 @@ dependencies = [ "aptos-logger", "aptos-node-checker", "aptos-sdk", - "clap 4.4.14", - "env_logger", + "clap 4.5.58", + "env_logger 0.10.2", "futures", "gcp-bigquery-client", "reqwest", @@ -1681,7 +1677,7 @@ dependencies = [ "aptos-transaction-generator-lib", "async-trait", "chrono", - "clap 4.4.14", + "clap 4.5.58", "either", "futures", "hex", @@ -1701,7 +1697,7 @@ dependencies = [ "serde_yaml 0.8.26", "tempfile", "termcolor", - "thiserror", + "thiserror 1.0.69", "tokio", "url", ] @@ -1721,7 +1717,7 @@ dependencies = [ "aptos-testcases", "async-trait", "chrono", - "clap 4.4.14", + "clap 4.5.58", "futures", "jemallocator", "once_cell", @@ -1764,8 +1760,9 @@ dependencies = [ "bulletproofs 5.0.0", "byteorder", "claims", - "clap 4.4.14", + "clap 4.5.58", "codespan-reporting", + "crypto", "curve25519-dalek-ng", "either", "eth_trie", @@ -1800,13 +1797,13 @@ dependencies = [ "rlp", "serde", "serde_bytes", - "sha2 0.10.8", + "sha2 0.10.9", "sha2 0.9.9", "sha3 0.9.1", - "siphasher", + "siphasher 0.3.11", "smallvec", "tempfile", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", ] @@ -1831,12 +1828,12 @@ dependencies = [ "aptos-language-e2e-tests", "aptos-types", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "float-cmp", "move-binary-format", "move-core-types", "move-ir-compiler", - "nalgebra", + "nalgebra 0.32.6", "walkdir", ] @@ -1895,7 +1892,7 @@ dependencies = [ "aptos-package-builder", "aptos-types", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "move-core-types", "move-model", "tempfile", @@ -1933,7 +1930,7 @@ dependencies = [ "base64 0.13.1", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "ureq", ] @@ -1989,7 +1986,7 @@ dependencies = [ "aptos-moving-average", "aptos-protos", "async-trait", - "clap 4.4.14", + "clap 4.5.58", "futures", "futures-core", "jemallocator", @@ -2017,7 +2014,7 @@ dependencies = [ "aptos-protos", "aptos-transaction-filter", "async-trait", - "clap 4.4.14", + "clap 4.5.58", "futures", "jemallocator", "once_cell", @@ -2043,7 +2040,7 @@ dependencies = [ "aptos-metrics-core", "aptos-moving-average", "async-trait", - "clap 4.4.14", + "clap 4.5.58", "futures", "jemallocator", "once_cell", @@ -2157,7 +2154,7 @@ dependencies = [ "aptos-system-utils", "async-trait", "backtrace", - "clap 4.4.14", + "clap 4.5.58", "prometheus", "serde", "serde_yaml 0.8.26", @@ -2197,7 +2194,7 @@ dependencies = [ "tempfile", "tokio", "tokio-stream", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "tonic", ] @@ -2213,7 +2210,7 @@ dependencies = [ "base64 0.13.1", "chrono", "cloud-storage", - "dashmap", + "dashmap 5.5.3", "futures", "itertools 0.12.1", "lz4", @@ -2226,7 +2223,7 @@ dependencies = [ "serde", "serde_json", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "tonic", "tracing", "url", @@ -2289,7 +2286,7 @@ dependencies = [ "rand 0.7.3", "rayon", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2333,7 +2330,7 @@ version = "0.1.0" dependencies = [ "anyhow", "aptos-types", - "http", + "http 0.2.12", "move-core-types", "reqwest", "serde", @@ -2368,7 +2365,7 @@ dependencies = [ "num-traits", "rand 0.7.3", "rand_chacha 0.3.1", - "rsa 0.9.6", + "rsa 0.9.10", "serde_json", "sha2 0.9.9", "tempfile", @@ -2418,7 +2415,7 @@ dependencies = [ "regex", "serde", "serde-big-array", - "sha2 0.10.8", + "sha2 0.10.9", ] [[package]] @@ -2454,7 +2451,7 @@ dependencies = [ "ark-ff", "ark-serialize", "bcs 0.1.4", - "dashmap", + "dashmap 5.5.3", "hex", "hyper", "jsonwebtoken 8.3.0", @@ -2522,7 +2519,7 @@ dependencies = [ "hex", "ledger-apdu", "ledger-transport-hid", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2609,7 +2606,7 @@ dependencies = [ "rand 0.7.3", "rayon", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -2624,7 +2621,7 @@ dependencies = [ "claims", "futures", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -2662,7 +2659,7 @@ dependencies = [ "aptos-vm-logging", "aptos-vm-types", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "regex", "reqwest", "tokio", @@ -2689,7 +2686,7 @@ dependencies = [ "aptos-gas-schedule", "aptos-types", "aptos-vm", - "clap 4.4.14", + "clap 4.5.58", "move-cli", "move-package", "move-prover", @@ -2738,7 +2735,7 @@ dependencies = [ "bytes", "claims", "crossbeam", - "dashmap", + "dashmap 5.5.3", "derivative", "move-binary-format", "move-core-types", @@ -2778,7 +2775,7 @@ dependencies = [ "pin-project", "serde", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "url", ] @@ -2824,11 +2821,11 @@ dependencies = [ "serde", "serde_bytes", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-retry", "tokio-stream", - "tokio-util 0.7.10", + "tokio-util 0.7.18", ] [[package]] @@ -2882,7 +2879,7 @@ dependencies = [ "aptos-logger", "aptos-network", "aptos-types", - "clap 4.4.14", + "clap 4.5.58", "futures", "serde", "tokio", @@ -2926,7 +2923,7 @@ dependencies = [ "backoff", "bytes", "chrono", - "clap 4.4.14", + "clap 4.5.58", "diesel", "diesel_migrations", "field_count", @@ -3002,7 +2999,7 @@ dependencies = [ "aptos-validator-transaction-pool", "aptos-vm", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "either", "fail", "futures", @@ -3032,7 +3029,7 @@ dependencies = [ "aptos-sdk", "aptos-transaction-emitter-lib", "async-trait", - "clap 4.4.14", + "clap 4.5.58", "futures", "once_cell", "poem", @@ -3042,7 +3039,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "tokio", "url", ] @@ -3103,7 +3100,7 @@ dependencies = [ "aptos-mempool", "aptos-storage-interface", "aptos-types", - "clap 4.4.14", + "clap 4.5.58", ] [[package]] @@ -3143,7 +3140,7 @@ dependencies = [ "rand 0.7.3", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -3175,7 +3172,7 @@ dependencies = [ "once_cell", "rand 0.7.3", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -3187,7 +3184,7 @@ dependencies = [ "aptos-types", "bcs 0.1.4", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3249,7 +3246,7 @@ dependencies = [ "futures", "pin-project", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.18", ] [[package]] @@ -3271,7 +3268,7 @@ dependencies = [ "aptos-temppath", "aptos-types", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "futures", "git2 0.16.1", "handlebars", @@ -3336,13 +3333,13 @@ dependencies = [ "aptos-types", "bcs 0.1.4", "bytes", - "clap 4.4.14", + "clap 4.5.58", "hex", "move-core-types", "reqwest", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "url", ] @@ -3380,7 +3377,7 @@ dependencies = [ "aptos-types", "aptos-warp-webserver", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "futures", "hex", "itertools 0.12.1", @@ -3404,7 +3401,7 @@ dependencies = [ "aptos-logger", "aptos-rosetta", "aptos-types", - "clap 4.4.14", + "clap 4.5.58", "serde", "serde_json", "tokio", @@ -3445,7 +3442,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3484,7 +3481,7 @@ dependencies = [ "proptest", "rand 0.7.3", "rayon", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3521,7 +3518,7 @@ dependencies = [ "aptos-framework", "aptos-types", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "heck 0.4.1", "move-core-types", "once_cell", @@ -3545,7 +3542,7 @@ dependencies = [ "crossbeam-channel", "once_cell", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic", "tonic-reflection", @@ -3569,7 +3566,7 @@ dependencies = [ "rand 0.7.3", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3581,7 +3578,7 @@ dependencies = [ "proptest", "serde", "static_assertions", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3592,7 +3589,7 @@ dependencies = [ "aptos-infallible", "claims", "crossbeam", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "proptest", "proptest-derive", "rayon", @@ -3642,7 +3639,7 @@ dependencies = [ "once_cell", "rand 0.7.3", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] @@ -3663,14 +3660,14 @@ dependencies = [ "assert_unordered", "bcs 0.1.4", "crossbeam-channel", - "dashmap", + "dashmap 5.5.3", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "proptest", "proptest-derive", "rayon", "serde", - "thiserror", + "thiserror 1.0.69", "threadpool", ] @@ -3681,7 +3678,7 @@ dependencies = [ "aptos-config", "aptos-network", "aptos-storage-service-types", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3694,7 +3691,7 @@ dependencies = [ "claims", "futures", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -3721,7 +3718,7 @@ dependencies = [ "bcs 0.1.4", "bytes", "claims", - "dashmap", + "dashmap 5.5.3", "futures", "maplit", "mini-moka", @@ -3729,7 +3726,7 @@ dependencies = [ "once_cell", "rand 0.7.3", "serde", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -3748,7 +3745,7 @@ dependencies = [ "proptest", "rand 0.7.3", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3758,7 +3755,7 @@ dependencies = [ "anyhow", "aptos-profiler", "async-mutex", - "http", + "http 0.2.12", "hyper", "lazy_static", "mime", @@ -3842,7 +3839,7 @@ dependencies = [ "bcs 0.1.4", "chrono", "claims", - "clap 4.4.14", + "clap 4.5.58", "debug-ignore", "flate2", "futures", @@ -3859,7 +3856,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", "url", @@ -3913,7 +3910,7 @@ dependencies = [ "enum_dispatch", "futures", "pin-project", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-test", ] @@ -3934,7 +3931,7 @@ dependencies = [ "aptos-types", "aptos-vm", "aptos-vm-logging", - "clap 4.4.14", + "clap 4.5.58", "criterion", "criterion-cpu-time", "num_cpus", @@ -3952,7 +3949,7 @@ dependencies = [ "aptos-logger", "aptos-sdk", "aptos-transaction-emitter-lib", - "clap 4.4.14", + "clap 4.5.58", "futures", "rand 0.7.3", "tokio", @@ -3974,7 +3971,7 @@ dependencies = [ "aptos-transaction-generator-lib", "aptos-types", "async-trait", - "clap 4.4.14", + "clap 4.5.58", "futures", "itertools 0.12.1", "once_cell", @@ -3998,7 +3995,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4011,7 +4008,7 @@ dependencies = [ "aptos-logger", "aptos-sdk", "async-trait", - "clap 4.4.14", + "clap 4.5.58", "move-binary-format", "once_cell", "rand 0.7.3", @@ -4036,7 +4033,7 @@ dependencies = [ "aptos-vm", "aptos-vm-genesis", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "codespan-reporting", "datatest-stable", "hex", @@ -4059,7 +4056,7 @@ dependencies = [ name = "aptos-types" version = "0.0.3" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.12", "anyhow", "aptos-bitvec", "aptos-crypto", @@ -4081,12 +4078,13 @@ dependencies = [ "claims", "coset", "criterion", + "crypto", "derivative", "derive-getters", - "derive_more 2.0.1", + "derive_more 2.1.1", "fixed", "fxhash", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "itertools 0.12.1", "jsonwebtoken 8.3.0", @@ -4114,7 +4112,7 @@ dependencies = [ "regex", "reqwest", "ring 0.16.20", - "rsa 0.9.6", + "rsa 0.9.10", "serde", "serde-big-array", "serde_bytes", @@ -4123,7 +4121,7 @@ dependencies = [ "serde_yaml 0.8.26", "strum 0.24.1", "strum_macros 0.24.3", - "thiserror", + "thiserror 1.0.69", "tokio", "url", ] @@ -4178,7 +4176,7 @@ dependencies = [ "proptest", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "ureq", ] @@ -4216,7 +4214,8 @@ dependencies = [ "bytes", "claims", "crossbeam-channel", - "derive_more 2.0.1", + "crypto", + "derive_more 2.1.1", "fail", "futures", "hex", @@ -4244,7 +4243,7 @@ dependencies = [ "aptos-language-e2e-tests", "aptos-types", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "move-binary-format", "move-core-types", ] @@ -4300,7 +4299,7 @@ dependencies = [ "aptos-types", "aptos-vm", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "glob", "move-binary-format", "move-core-types", @@ -4388,18 +4387,21 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" dependencies = [ "derive_arbitrary", ] [[package]] name = "arc-swap" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "9ded5f9a03ac8f24d1b8a25101ee812cd32cdc8c50a4c50237de2c4915850e73" +dependencies = [ + "rustversion", +] [[package]] name = "ark-bls12-381" @@ -4439,7 +4441,7 @@ dependencies = [ "blake2", "derivative", "digest 0.10.7", - "sha2 0.10.8", + "sha2 0.10.9", ] [[package]] @@ -4472,7 +4474,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools 0.10.5", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -4495,7 +4497,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -4550,7 +4552,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint 0.4.6", ] [[package]] @@ -4610,9 +4612,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -4631,9 +4633,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii-canvas" @@ -4641,7 +4643,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" dependencies = [ - "term", + "term 0.7.0", ] [[package]] @@ -4682,12 +4684,11 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.1.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" dependencies = [ "concurrent-queue", - "event-listener 4.0.3", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -4695,15 +4696,15 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.8.0" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" dependencies = [ - "async-lock 3.2.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.2.0", + "fastrand 2.3.0", + "futures-lite 2.6.1", + "pin-project-lite", "slab", ] @@ -4713,154 +4714,125 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.1.1", + "async-channel 2.5.0", "async-executor", - "async-io 2.2.2", - "async-lock 3.2.0", + "async-io", + "async-lock", "blocking", - "futures-lite 2.2.0", + "futures-lite 2.6.1", "once_cell", ] [[package]] name = "async-io" -version = "1.13.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" dependencies = [ - "async-lock 2.8.0", "autocfg", "cfg-if", "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" -dependencies = [ - "async-lock 3.2.0", - "cfg-if", - "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.6.1", "parking", - "polling 3.3.1", - "rustix 0.38.28", + "polling 3.11.0", + "rustix 1.1.3", "slab", - "tracing", - "windows-sys 0.52.0", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", + "windows-sys 0.61.2", ] [[package]] name = "async-lock" -version = "3.2.0" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" dependencies = [ - "event-listener 4.0.3", + "event-listener 5.4.1", "event-listener-strategy", "pin-project-lite", ] [[package]] name = "async-mutex" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +checksum = "73112ce9e1059d8604242af62c7ec8e5975ac58ac251686c8403b45e8a6fe778" dependencies = [ "event-listener 2.5.3", ] [[package]] name = "async-object-pool" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb901c30ebc2fc4ab46395bbfbdba9542c16559d853645d75190c3056caf3bc" +checksum = "333c456b97c3f2d50604e8b2624253b7f787208cb72eb75e64b0ad11b221652c" dependencies = [ "async-std", ] [[package]] name = "async-process" -version = "1.8.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", + "async-channel 2.5.0", + "async-io", + "async-lock", "async-signal", + "async-task", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.28", - "windows-sys 0.48.0", + "event-listener 5.4.1", + "futures-lite 2.6.1", + "rustix 1.1.3", ] [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "async-signal" -version = "0.2.5" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" dependencies = [ - "async-io 2.2.2", - "async-lock 2.8.0", + "async-io", + "async-lock", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.28", + "rustix 1.1.3", "signal-hook-registry", "slab", - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] name = "async-std" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +checksum = "2c8e079a4ab67ae52b7403632e4618815d6db36d2a010cfe41b02c1b1578f93b" dependencies = [ "async-channel 1.9.0", "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", + "async-io", + "async-lock", "async-process", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite 1.13.0", + "futures-lite 2.6.1", "gloo-timers", "kv-log-macro", "log", @@ -4874,9 +4846,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -4885,30 +4857,30 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -4942,9 +4914,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axum" @@ -4957,7 +4929,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", + "http 0.2.12", "http-body", "hyper", "itoa", @@ -4988,7 +4960,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", + "http 0.2.12", "http-body", "hyper", "itoa", @@ -5014,7 +4986,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", + "http 0.2.12", "http-body", "mime", "tower-layer", @@ -5030,7 +5002,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", + "http 0.2.12", "http-body", "mime", "rustversion", @@ -5048,9 +5020,9 @@ dependencies = [ [[package]] name = "az" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" +checksum = "be5eb007b7cacc6c660343e96f650fedf4b5a77512399eb952ca6642cf8d13f7" [[package]] name = "backoff" @@ -5059,7 +5031,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "futures-core", - "getrandom 0.2.11", + "getrandom 0.2.17", "instant", "pin-project-lite", "rand 0.8.5", @@ -5068,17 +5040,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-link", ] [[package]] @@ -5101,9 +5073,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.6" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" @@ -5113,40 +5085,30 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.6.0" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "basic-cookies" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb53b6b315f924c7f113b162e53b3901c05fc9966baf84d201dfcc7432a4bb38" +checksum = "67bd8fd42c16bdb08688243dc5f0cc117a3ca9efeeaba3a345a18a6159ad96f7" dependencies = [ "lalrpop", "lalrpop-util", "regex", ] -[[package]] -name = "basic-toml" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" -dependencies = [ - "serde", -] - [[package]] name = "bb8" -version = "0.8.1" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b4b0f25f18bcdc3ac72bdb486ed0acf7e185221fd4dc985bc15db5800b0ba2" +checksum = "d89aabfae550a5c44b43ab941844ffcd2e993cb6900b342debf59e9ea74acdb8" dependencies = [ "async-trait", - "futures-channel", "futures-util", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "tokio", ] @@ -5156,7 +5118,7 @@ version = "0.1.4" source = "git+https://github.com/aptos-labs/bcs.git?rev=d31fab9d81748e2594be5cd5cdf845786a30562d#d31fab9d81748e2594be5cd5cdf845786a30562d" dependencies = [ "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -5166,7 +5128,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b6598a2f5d564fb7855dc6b06fd1c38cff5a72bd8b863a4d021938497b440a" dependencies = [ "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -5177,7 +5139,7 @@ checksum = "9ae286c2cb403324ab644c7cc68dceb25fe52ca9429908a726d7ed272c1edf7b" dependencies = [ "bellpepper-core", "byteorder", - "ff 0.13.0", + "ff 0.13.1", ] [[package]] @@ -5188,9 +5150,9 @@ checksum = "1d8abb418570756396d722841b19edfec21d4e89e1cf8990610663040ecb1aea" dependencies = [ "blake2s_simd", "byteorder", - "ff 0.13.0", + "ff 0.13.1", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -5213,15 +5175,28 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bicycl_rs" +version = "0.1.0" +source = "git+ssh://git@github.com/Entropy-Foundation/bicycl-rs?rev=c10dd9fc98917bf7bebf95a96e4b99b7c32922c9#c10dd9fc98917bf7bebf95a96e4b99b7c32922c9" +dependencies = [ + "gmp-mpfr-sys", + "libc", + "rand 0.8.5", + "serde", + "serde_bytes", + "sha3 0.10.8", +] + [[package]] name = "bigdecimal" -version = "0.4.2" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06619be423ea5bb86c95f087d5707942791a08a85530df0db2209a3ecfb8bc9" +checksum = "4d6867f1565b3aad85681f1015055b087fcfd840d6aeee6eee7f2da317603695" dependencies = [ "autocfg", "libm", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-integer", "num-traits", "serde", @@ -5238,11 +5213,11 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.69.4" +version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.10.0", "cexpr", "clang-sys", "itertools 0.12.1", @@ -5253,7 +5228,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -5262,7 +5237,16 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ - "bit-vec", + "bit-vec 0.6.3", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec 0.8.0", ] [[package]] @@ -5271,11 +5255,17 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + [[package]] name = "bit_field" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" [[package]] name = "bitflags" @@ -5285,9 +5275,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bitmaps" @@ -5343,24 +5333,24 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +checksum = "b79834656f71332577234b50bfc009996f7449e0c056884e6a02492ded0ca2f3" dependencies = [ "arrayref", - "arrayvec 0.7.4", - "constant_time_eq 0.3.0", + "arrayvec 0.7.6", + "constant_time_eq 0.4.2", ] [[package]] name = "blake2s_simd" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" +checksum = "ee29928bad1e3f94c9d1528da29e07a1d3d04817ae8332de1e8b846c8439f4b3" dependencies = [ "arrayref", - "arrayvec 0.7.4", - "constant_time_eq 0.3.0", + "arrayvec 0.7.6", + "constant_time_eq 0.4.2", ] [[package]] @@ -5409,27 +5399,33 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" dependencies = [ - "async-channel 2.1.1", - "async-lock 3.2.0", + "async-channel 2.5.0", "async-task", - "fastrand 2.0.1", "futures-io", - "futures-lite 2.2.0", + "futures-lite 2.6.1", "piper", - "tracing", ] [[package]] name = "blst" -version = "0.3.11" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +checksum = "dcdb4c7013139a150f9fc55d123186dbfaba0d912817466282c73ac49e71fb45" dependencies = [ "cc", "glob", @@ -5461,7 +5457,7 @@ checksum = "7a8a8ed6fefbeef4a8c7b460e4110e12c5e22a5b7cf32621aae6ad650c4dcf29" dependencies = [ "blst", "byte-slice-cast", - "ff 0.13.0", + "ff 0.13.1", "group 0.13.0", "pairing 0.23.0", "rand_core 0.6.4", @@ -5485,7 +5481,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "serde", - "thiserror", + "thiserror 1.0.69", "tiny-keccak", "zeroize", ] @@ -5496,13 +5492,13 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f03db470b3c0213c47e978da93200259a1eb4dae2e5512cba9955e2b540a6fc6" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "bollard-stubs", "bytes", "futures-core", "futures-util", "hex", - "http", + "http 0.2.12", "hyper", "hyperlocal", "log", @@ -5512,9 +5508,9 @@ dependencies = [ "serde_json", "serde_repr", "serde_urlencoded", - "thiserror", + "thiserror 1.0.69", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "url", "winapi 0.3.9", ] @@ -5532,22 +5528,12 @@ dependencies = [ [[package]] name = "bstr" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" -dependencies = [ - "lazy_static", - "memchr", - "regex-automata 0.1.10", -] - -[[package]] -name = "bstr" -version = "1.9.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", + "regex-automata", "serde", ] @@ -5568,7 +5554,7 @@ dependencies = [ "serde_derive", "sha3 0.9.1", "subtle-ng", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -5589,20 +5575,20 @@ dependencies = [ "serde_derive", "sha3 0.10.8", "subtle", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "byte-slice-cast" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "byte-tools" @@ -5645,15 +5631,15 @@ dependencies = [ [[package]] name = "bytecount" -version = "0.6.7" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" [[package]] name = "byteorder" @@ -5663,21 +5649,20 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" dependencies = [ "serde", ] [[package]] name = "bzip2-sys" -version = "0.1.11+1.0.8" +version = "0.1.13+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" dependencies = [ "cc", - "libc", "pkg-config", ] @@ -5692,7 +5677,7 @@ name = "calc-dep-sizes" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.14", + "clap 4.5.58", "futures", "move-binary-format", "move-core-types", @@ -5702,11 +5687,11 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -5725,11 +5710,21 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.6" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +checksum = "87a0c0e6148f11f01f32650a2ea02d532b2ad4e81d8bd41e6e565b5adc5e6082" dependencies = [ "serde", + "serde_core", ] [[package]] @@ -5739,24 +5734,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", - "cargo-platform", - "semver", + "cargo-platform 0.1.9", + "semver 1.0.27", "serde", "serde_json", ] [[package]] name = "cargo_metadata" -version = "0.18.1" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", - "cargo-platform", - "semver", + "cargo-platform 0.3.2", + "semver 1.0.27", "serde", "serde_json", - "thiserror", + "thiserror 2.0.18", ] [[package]] @@ -5779,12 +5774,14 @@ checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" [[package]] name = "cc" -version = "1.0.83" +version = "1.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29" dependencies = [ + "find-msvc-tools", "jobserver", "libc", + "shlex", ] [[package]] @@ -5798,9 +5795,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.6" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" +checksum = "78cef5b5a1a6827c7322ae2a636368a573006b27cfa76c7ebd53e834daeaab6a" dependencies = [ "smallvec", "target-lexicon", @@ -5808,44 +5805,49 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-link", ] [[package]] name = "chrono-tz" -version = "0.8.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d7b79e99bfaa0d47da0687c43aa3b7381938a62ad3a6498599039321f660b7" +checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", "chrono-tz-build", - "phf", + "phf 0.11.3", ] [[package]] name = "chrono-tz-build" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" +checksum = "0c088aee841df9c3041febbb73934cfc39708749bf96dc827e3359cd39ef11b1" dependencies = [ "parse-zoneinfo", - "phf", + "phf 0.11.3", "phf_codegen", ] @@ -5857,9 +5859,9 @@ checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" [[package]] name = "ciborium" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -5868,18 +5870,18 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 1.8.2", + "half 2.7.1", ] [[package]] @@ -5903,9 +5905,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -5923,7 +5925,7 @@ dependencies = [ "bitflags 1.3.2", "strsim 0.8.0", "textwrap 0.11.0", - "unicode-width 0.1.11", + "unicode-width 0.1.14", "vec_map", ] @@ -5941,48 +5943,48 @@ dependencies = [ "once_cell", "strsim 0.10.0", "termcolor", - "textwrap 0.16.0", + "textwrap 0.16.2", ] [[package]] name = "clap" -version = "4.4.14" +version = "4.5.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e92c5c1a78c62968ec57dbc2440366a2d6e5a23faf829970ff1585dc6b18e2" +checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806" dependencies = [ "clap_builder", - "clap_derive 4.4.7", + "clap_derive 4.5.55", ] [[package]] name = "clap-verbosity-flag" -version = "2.1.1" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c90e95e5bd4e8ac34fa6f37c774b0c6f8ed06ea90c79931fd448fcf941a9767" +checksum = "34c77f67047557f62582784fd7482884697731b2932c7d37ced54bce2312e1e2" dependencies = [ - "clap 4.4.14", + "clap 4.5.58", "log", ] [[package]] name = "clap_builder" -version = "4.4.14" +version = "4.5.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4323769dc8a61e2c39ad7dc26f6f2800524691a44d74fe3d1071a5c24db6370" +checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2" dependencies = [ "anstream", "anstyle", - "clap_lex 0.6.0", - "strsim 0.10.0", + "clap_lex 1.0.0", + "strsim 0.11.1", ] [[package]] name = "clap_complete" -version = "4.4.6" +version = "4.5.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97aeaa95557bd02f23fbb662f981670c3d20c5a26e69f7354b28f57092437fcd" +checksum = "c757a3b7e39161a4e56f9365141ada2a6c915a8622c408ab6bb4b5d047371031" dependencies = [ - "clap 4.4.14", + "clap 4.5.58", ] [[package]] @@ -6000,14 +6002,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -6021,9 +6023,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" [[package]] name = "clear_on_drop" @@ -6076,7 +6078,7 @@ checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ "serde", "termcolor", - "unicode-width 0.1.11", + "unicode-width 0.1.14", ] [[package]] @@ -6087,32 +6089,32 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "colored" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "futures-core", "memchr", "pin-project-lite", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.18", ] [[package]] @@ -6120,7 +6122,7 @@ name = "compute-module-expansion-size" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.14", + "clap 4.5.58", "futures", "move-binary-format", "move-core-types", @@ -6130,24 +6132,37 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] [[package]] name = "console" -version = "0.15.7" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" dependencies = [ - "encode_unicode 0.3.6", - "lazy_static", + "encode_unicode", "libc", - "unicode-width 0.1.11", - "windows-sys 0.45.0", + "once_cell", + "unicode-width 0.2.2", + "windows-sys 0.59.0", +] + +[[package]] +name = "console" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width 0.2.2", + "windows-sys 0.61.2", ] [[package]] @@ -6202,24 +6217,24 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_fn" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" +checksum = "2f8a2ca5ac02d09563609681103aada9e1777d54fc57a5acd7a41404f9c93b6e" [[package]] name = "const_format" -version = "0.2.32" +version = "0.2.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.32" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" dependencies = [ "proc-macro2", "quote", @@ -6234,9 +6249,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" [[package]] name = "convert_case" @@ -6246,24 +6261,13 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "convert_case" -version = "0.7.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" dependencies = [ "unicode-segmentation", ] -[[package]] -name = "cookie" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" -dependencies = [ - "percent-encoding", - "time", - "version_check", -] - [[package]] name = "cookie" version = "0.17.0" @@ -6271,12 +6275,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" dependencies = [ "aes-gcm", - "base64 0.21.6", + "base64 0.21.7", "hkdf 0.12.4", "hmac 0.12.1", "percent-encoding", "rand 0.8.5", - "sha2 0.10.8", + "sha2 0.10.9", "subtle", "time", "version_check", @@ -6284,12 +6288,12 @@ dependencies = [ [[package]] name = "cookie_store" -version = "0.16.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d606d0fba62e13cf04db20536c05cb7f13673c161cb47a47a82b9b9e7d3f1daa" +checksum = "387461abbc748185c3a6e1673d826918b450b87ff22639429c694619a83b6cf6" dependencies = [ - "cookie 0.16.2", - "idna 0.2.3", + "cookie", + "idna 0.3.0", "log", "publicsuffix", "serde", @@ -6311,15 +6315,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core_affinity" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622892f5635ce1fc38c8f16dfc938553ed64af482edb5e150bf4caedbfcb2304" +checksum = "a034b3a7b624016c6e13f5df875747cc25f884156aad2abd12b6c46797971342" dependencies = [ "libc", "num_cpus", @@ -6328,37 +6332,56 @@ dependencies = [ [[package]] name = "coset" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c214bbc5c8b4518856d79cae4d323feaa881ecf3e31b5af6572bb5313c11d5" +checksum = "f4c8cc80f631f8307b887faca24dcc3abc427cd0367f6eb6188f6e8f5b7ad8fb" dependencies = [ "ciborium", "ciborium-io", ] [[package]] -name = "cpp_demangle" -version = "0.4.3" +name = "cpp_core" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119" +checksum = "e3a4fc172d5c7797a79e4f0e976bec2d4b80b39989d48d58386aaa9a533ff389" dependencies = [ - "cfg-if", + "libc", ] [[package]] -name = "cpufeatures" -version = "0.2.12" +name = "cpp_demangle" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "f2bb79cb74d735044c972aae58ed0aaa9a837e85b01106a54c39e42e97f62253" dependencies = [ - "libc", + "cfg-if", ] [[package]] -name = "crc32fast" -version = "1.3.2" +name = "cpp_std" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "dc6acdfb694abd411532cd836467462172cf3f9b78d3d3aff28a69d676665339" +dependencies = [ + "cpp_core", + "ritual_build", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -6424,18 +6447,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.11" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -6452,18 +6475,18 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crossterm" @@ -6474,8 +6497,8 @@ dependencies = [ "bitflags 1.3.2", "crossterm_winapi", "libc", - "mio", - "parking_lot 0.12.1", + "mio 0.8.11", + "parking_lot 0.12.5", "signal-hook", "signal-hook-mio", "winapi 0.3.9", @@ -6490,8 +6513,8 @@ dependencies = [ "bitflags 1.3.2", "crossterm_winapi", "libc", - "mio", - "parking_lot 0.12.1", + "mio 0.8.11", + "parking_lot 0.12.5", "signal-hook", "signal-hook-mio", "winapi 0.3.9", @@ -6508,9 +6531,36 @@ dependencies = [ [[package]] name = "crunchy" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto" +version = "0.1.0" +source = "git+ssh://git@github.com/Entropy-Foundation/crypto?rev=8fa2ea498c1cdef637aff135ce77852d77fcc487#8fa2ea498c1cdef637aff135ce77852d77fcc487" +dependencies = [ + "base64 0.22.1", + "bicycl_rs", + "bincode", + "blst", + "blsttc", + "cpp_std", + "ed25519-dalek 2.2.0", + "hex", + "lazy_static", + "miracl_core_bls12381", + "rand 0.8.5", + "rand_chacha 0.2.2", + "rand_core 0.6.4", + "rayon", + "serde", + "sha3 0.10.8", + "statrs", + "thiserror 1.0.69", + "tiny-keccak", + "zeroize", +] [[package]] name = "crypto-bigint" @@ -6536,9 +6586,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", @@ -6567,21 +6617,21 @@ dependencies = [ [[package]] name = "csv" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938" dependencies = [ "csv-core", "itoa", "ryu", - "serde", + "serde_core", ] [[package]] name = "csv-core" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" dependencies = [ "memchr", ] @@ -6597,34 +6647,35 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.2" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b467862cc8610ca6fc9a1532d7777cee0804e678ab45410897b9396495994a0b" +checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790" dependencies = [ - "nix 0.27.1", - "windows-sys 0.52.0", + "dispatch2", + "nix 0.30.1", + "windows-sys 0.61.2", ] [[package]] name = "curl" -version = "0.4.44" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" +checksum = "79fc3b6dd0b87ba36e565715bf9a2ced221311db47bd18011676f24a6066edbc" dependencies = [ "curl-sys", "libc", "openssl-probe", "openssl-sys", "schannel", - "socket2 0.4.10", - "winapi 0.3.9", + "socket2 0.6.2", + "windows-sys 0.59.0", ] [[package]] name = "curl-sys" -version = "0.4.70+curl-8.5.0" +version = "0.4.85+curl-8.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0333d8849afe78a4c8102a429a446bfdd055832af071945520e835ae2d841e" +checksum = "c0efa6142b5ecc05f6d3eaa39e6af4888b9d3939273fb592c92b7088a8cf3fdb" dependencies = [ "cc", "libc", @@ -6633,7 +6684,7 @@ dependencies = [ "openssl-sys", "pkg-config", "vcpkg", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -6673,7 +6724,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -6712,12 +6763,22 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ - "darling_core 0.20.9", - "darling_macro 0.20.9", + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core 0.21.3", + "darling_macro 0.21.3", ] [[package]] @@ -6750,16 +6811,30 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.114", +] + +[[package]] +name = "darling_core" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -6786,13 +6861,24 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core 0.20.11", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ - "darling_core 0.20.9", + "darling_core 0.21.3", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -6802,17 +6888,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.3", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core 0.9.12", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.12", ] [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" [[package]] name = "datatest-stable" @@ -6850,9 +6950,9 @@ dependencies = [ [[package]] name = "deadpool-runtime" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63dfa964fe2a66f3fde91fc70b267fe193d822c7e603e2a675a49a7f46ad3f49" +checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" dependencies = [ "tokio", ] @@ -6888,9 +6988,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "const-oid 0.9.6", "pem-rfc7468 0.7.0", @@ -6899,12 +6999,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "cc3dc5ad92c2e2d1c193bbbbdf2ea477cb81331de4f3103f267ca18368b988c4" dependencies = [ "powerfmt", - "serde", + "serde_core", ] [[package]] @@ -6932,83 +7032,84 @@ checksum = "74ef43543e701c01ad77d3a5922755c6a1d71b22d942cb8042be4994b380caff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "derive_builder" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ - "darling 0.20.9", + "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "derive_builder_macro" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.114", ] [[package]] name = "derive_more" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "convert_case 0.7.1", + "convert_case 0.10.0", "proc-macro2", "quote", - "syn 2.0.48", + "rustc_version", + "syn 2.0.114", "unicode-xid", ] @@ -7023,7 +7124,7 @@ dependencies = [ "guppy", "guppy-workspace-hack", "once_cell", - "petgraph 0.6.4", + "petgraph 0.6.5", "rayon", "serde", "toml 0.5.11", @@ -7031,23 +7132,23 @@ dependencies = [ [[package]] name = "deunicode" -version = "1.4.2" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae2a35373c5c74340b79ae6780b498b2b183915ec5dacf263aac5a099bf485a" +checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" [[package]] name = "diesel" -version = "2.1.4" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62c6fcf842f17f8c78ecf7c81d75c5ce84436b41ee07e03f490fbb5f5a8731d8" +checksum = "ff236accb9a5069572099f0b350a92e9560e8e63a9b8d546162f4a5e03026bb2" dependencies = [ "bigdecimal", - "bitflags 2.4.1", + "bitflags 2.10.0", "byteorder", "chrono", "diesel_derives", "itoa", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-integer", "num-traits", "pq-sys", @@ -7071,14 +7172,14 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.1.2" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8337737574f55a468005a83499da720f20c65586241ffea339db9ecdfd2b44" +checksum = "14701062d6bed917b5c7103bdffaee1e4609279e240488ad24e7bd979ca6866c" dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -7098,7 +7199,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -7209,11 +7310,34 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "dispatch2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags 2.10.0", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "doc-comment" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +checksum = "780955b8b195a21ab8e4ac6b60dd1dbdcec1dc6c51c0617964b08c81785e12c9" [[package]] name = "dotenv" @@ -7229,9 +7353,9 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dw" @@ -7256,9 +7380,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "e2e-move-tests" @@ -7301,7 +7425,7 @@ version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der 0.7.8", + "der 0.7.10", "digest 0.10.7", "elliptic-curve", "rfc6979", @@ -7346,14 +7470,15 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek 4.1.3", "ed25519 2.2.3", + "rand_core 0.6.4", "serde", - "sha2 0.10.8", + "sha2 0.10.9", "signature 2.2.0", "subtle", "zeroize", @@ -7368,14 +7493,14 @@ dependencies = [ "derivation-path", "ed25519-dalek 1.0.1", "hmac 0.12.1", - "sha2 0.10.8", + "sha2 0.10.9", ] [[package]] name = "either" -version = "1.9.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "elliptic-curve" @@ -7387,7 +7512,7 @@ dependencies = [ "base64ct", "crypto-bigint 0.5.5", "digest 0.10.7", - "ff 0.13.0", + "ff 0.13.1", "generic-array 0.14.7", "group 0.13.0", "pem-rfc7468 0.7.0", @@ -7402,19 +7527,13 @@ dependencies = [ [[package]] name = "ena" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +checksum = "eabffdaee24bd1bf95c5ef7cec31260444317e72ea56c4c91750e8b7ee58d5f1" dependencies = [ "log", ] -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - [[package]] name = "encode_unicode" version = "1.0.0" @@ -7423,30 +7542,39 @@ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] [[package]] name = "enum_dispatch" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", +] + +[[package]] +name = "env_filter" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a1c3cc8e57274ec99de65301228b537f1e4eedc1b8e0f9411c6caac8ae7308f" +dependencies = [ + "log", ] [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -7455,6 +7583,16 @@ dependencies = [ "termcolor", ] +[[package]] +name = "env_logger" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2daee4ea451f429a58296525ddf28b45a3b64f1acf6587e2067437bb11e218d" +dependencies = [ + "env_filter", + "log", +] + [[package]] name = "environmental" version = "1.1.4" @@ -7463,9 +7601,9 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "erased-serde" @@ -7478,12 +7616,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.8" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -7502,10 +7640,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3aeb0284b473041df2419a28e3cdf0c64a78d2b9511af4b6e40bad3964b172" dependencies = [ "ethereum-types 0.14.1", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "keccak-hash", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "rlp", ] @@ -7522,7 +7660,7 @@ dependencies = [ "serde", "serde_json", "sha3 0.10.8", - "thiserror", + "thiserror 1.0.69", "uint", ] @@ -7603,9 +7741,9 @@ dependencies = [ [[package]] name = "ethnum" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" +checksum = "ca81e6b4777c89fd810c25a4be2b1bd93ea034fbe58e6a75216a34c6b82c539b" [[package]] name = "event-listener" @@ -7615,20 +7753,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "4.0.3" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", @@ -7637,11 +7764,11 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "event-listener 4.0.3", + "event-listener 5.4.1", "pin-project-lite", ] @@ -7719,13 +7846,12 @@ dependencies = [ [[package]] name = "exr" -version = "1.71.0" +version = "1.74.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832a761f35ab3e6664babfbdc6cef35a4860e816ec3916dcfd0882954e98a8a8" +checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be" dependencies = [ "bit_field", - "flume", - "half 2.2.1", + "half 2.7.1", "lebe", "miniz_oxide", "rayon-core", @@ -7739,7 +7865,7 @@ version = "0.1.0" dependencies = [ "anyhow", "atty", - "clap 4.4.14", + "clap 4.5.58", "codespan-reporting", "move-to-yul", "serde_json", @@ -7757,20 +7883,33 @@ dependencies = [ ] [[package]] -name = "fallible-iterator" -version = "0.2.0" +name = "failure" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] [[package]] -name = "fallible_collections" -version = "0.4.9" +name = "failure_derive" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88c69768c0a15262df21899142bc6df9b9b823546d4b4b9a7bc2d6c448ec6fd" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "hashbrown 0.13.2", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure 0.12.6", ] +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + [[package]] name = "fastrand" version = "1.9.0" @@ -7782,15 +7921,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fdeflate" -version = "0.3.3" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209098dd6dfc4445aa6111f0e98653ac323eaa4dfd212c9ca3931bf9955c31bd" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" dependencies = [ "simd-adler32", ] @@ -7808,9 +7947,9 @@ dependencies = [ [[package]] name = "ff" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" dependencies = [ "bitvec 1.0.1", "byteorder", @@ -7821,12 +7960,11 @@ dependencies = [ [[package]] name = "ff_derive" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" +checksum = "f10d12652036b0e99197587c6ba87a8fc3031986499973c030d8b44fcc151b60" dependencies = [ "addchain", - "cfg-if", "num-bigint 0.3.3", "num-integer", "num-traits", @@ -7868,16 +8006,21 @@ checksum = "31a7a908b8f32538a2143e59a6e4e2508988832d5d4d6f7c156b3cbc762643a5" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + [[package]] name = "findshlibs" version = "0.10.2" @@ -7890,21 +8033,15 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "fixed" -version = "1.25.1" +version = "1.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e29e5681dc8556fb9df1409e95eae050e12e8776394313da3546dcb8cf390c73" +checksum = "c566da967934c6c7ee0458a9773de9b2a685bd2ce26a3b28ddfc740e640182f5" dependencies = [ "az", "bytemuck", - "half 2.2.1", + "half 2.7.1", "typenum", ] @@ -7944,14 +8081,21 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flate2" -version = "1.0.28" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -7967,7 +8111,7 @@ dependencies = [ "log", "nu-ansi-term 0.49.0", "regex", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -7979,21 +8123,18 @@ dependencies = [ "num-traits", ] -[[package]] -name = "flume" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" -dependencies = [ - "spin 0.9.8", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -8021,7 +8162,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -8038,18 +8179,18 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] [[package]] name = "fragile" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" [[package]] name = "fst" @@ -8071,9 +8212,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -8086,9 +8227,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -8096,15 +8237,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -8113,9 +8254,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -8134,11 +8275,11 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.2.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" dependencies = [ - "fastrand 2.0.1", + "fastrand 2.3.0", "futures-core", "futures-io", "parking", @@ -8147,38 +8288,38 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -8246,7 +8387,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tokio-stream", @@ -8267,7 +8408,7 @@ dependencies = [ "aptos-network", "aptos-types", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "move-core-types", "rand 0.7.3", "serde", @@ -8332,32 +8473,57 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] [[package]] -name = "ghash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", + "wasip3", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", "polyval", ] [[package]] name = "gif" -version = "0.12.0" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" dependencies = [ "color_quant", "weezl", @@ -8365,9 +8531,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" [[package]] name = "git2" @@ -8399,39 +8565,39 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" dependencies = [ "aho-corasick", - "bstr 1.9.0", + "bstr", "log", - "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-automata", + "regex-syntax", ] [[package]] name = "globwalk" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" +checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.10.0", "ignore", "walkdir", ] [[package]] name = "gloo-timers" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" dependencies = [ "futures-channel", "futures-core", @@ -8439,16 +8605,27 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gmp-mpfr-sys" +version = "1.6.8" +source = "git+ssh://git@github.com/Entropy-Foundation/bicycl-rs?rev=c10dd9fc98917bf7bebf95a96e4b99b7c32922c9#c10dd9fc98917bf7bebf95a96e4b99b7c32922c9" +dependencies = [ + "cc", + "libc", + "windows-sys 0.60.2", +] + [[package]] name = "goldenfile" -version = "1.6.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a67453a3b358bd8213aedafd4feed75eecab9fb04bed26ba6fdf94694be560" +checksum = "4ce2238f730d493a06ef6746713fe0b56acecc88485892ae65c50d2db9bf977b" dependencies = [ "scopeguard", "similar-asserts", + "static_assertions", "tempfile", - "yansi 1.0.0-rc.1", + "yansi", ] [[package]] @@ -8458,7 +8635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "931bedb2264cb00f914b0a6a5c304e34865c34306632d3932e0951a073e4a67d" dependencies = [ "async-trait", - "base64 0.21.6", + "base64 0.21.7", "google-cloud-metadata", "google-cloud-token", "home", @@ -8466,7 +8643,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tracing", @@ -8480,7 +8657,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96e4ad0802d3f416f62e7ce01ac1460898ee0efc98f8b45cd4aab7611607012f" dependencies = [ "reqwest", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -8491,7 +8668,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22c57ca1d971d7c6f852c02eda4e87e88b1247b6ed8be9fa5b2768c68b0f2ca5" dependencies = [ "async-stream", - "base64 0.21.6", + "base64 0.21.7", "bytes", "futures-util", "google-cloud-auth", @@ -8506,8 +8683,8 @@ dependencies = [ "rsa 0.6.1", "serde", "serde_json", - "sha2 0.10.8", - "thiserror", + "sha2 0.10.9", + "thiserror 1.0.69", "time", "tokio", "tracing", @@ -8532,7 +8709,7 @@ dependencies = [ "ff 0.12.1", "rand 0.8.5", "rand_core 0.6.4", - "rand_xorshift", + "rand_xorshift 0.3.0", "subtle", ] @@ -8542,35 +8719,35 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff 0.13.1", "rand 0.8.5", "rand_core 0.6.4", - "rand_xorshift", + "rand_xorshift 0.3.0", "subtle", ] [[package]] name = "guppy" -version = "0.17.5" +version = "0.17.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e99a7734579b834a076ef11789783c153c6eb5fb3520ed15bc41f483f0f317" +checksum = "a502977572076a42d585dd12f04bccf9c9cafdd4546e99878c072460b904e115" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.12", "camino", - "cargo_metadata 0.18.1", + "cargo_metadata 0.23.1", "cfg-if", "debug-ignore", - "fixedbitset 0.4.2", + "fixedbitset 0.5.7", "guppy-summaries", "guppy-workspace-hack", - "indexmap 2.2.5", - "itertools 0.12.1", + "indexmap 2.13.0", + "itertools 0.14.0", "nested", "once_cell", - "pathdiff", - "petgraph 0.6.4", + "pathdiff 0.2.3", + "petgraph 0.8.3", "rayon", - "semver", + "semver 1.0.27", "serde", "serde_json", "smallvec", @@ -8589,7 +8766,7 @@ dependencies = [ "cfg-if", "diffus", "guppy-workspace-hack", - "semver", + "semver 1.0.27", "serde", "toml 0.5.11", ] @@ -8602,36 +8779,38 @@ checksum = "92620684d99f750bae383ecb3be3748142d6095760afd5cbcf2261e9a279d780" [[package]] name = "h2" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.2.5", + "http 0.2.12", + "indexmap 2.13.0", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "tracing", ] [[package]] name = "half" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "half" -version = "2.2.1" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ + "cfg-if", "crunchy", + "zerocopy", ] [[package]] @@ -8645,7 +8824,7 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -8678,26 +8857,41 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.12", ] [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.12", "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + [[package]] name = "hdrhistogram" version = "7.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "byteorder", "flate2", "nom", @@ -8710,10 +8904,10 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "bytes", "headers-core", - "http", + "http 0.2.12", "httpdate", "mime", "sha1", @@ -8725,7 +8919,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http", + "http 0.2.12", ] [[package]] @@ -8760,9 +8954,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hermit-abi" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -8858,11 +9058,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -8884,15 +9084,25 @@ checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", "itoa", ] +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -8900,7 +9110,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", "pin-project-lite", ] @@ -8912,9 +9122,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -8931,7 +9141,7 @@ dependencies = [ "assert-json-diff", "async-object-pool", "async-trait", - "base64 0.21.6", + "base64 0.21.7", "basic-cookies", "crossbeam-utils", "form_urlencoded", @@ -8961,28 +9171,28 @@ dependencies = [ [[package]] name = "humantime" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -8995,7 +9205,7 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ - "http", + "http 0.2.12", "hyper", "log", "rustls 0.20.9", @@ -9011,10 +9221,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", + "http 0.2.12", "hyper", "log", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs 0.6.3", "tokio", "tokio-rustls 0.24.1", @@ -9060,14 +9270,15 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -9082,22 +9293,98 @@ dependencies = [ ] [[package]] -name = "ident_case" -version = "1.0.1" +name = "icu_collections" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "idna" -version = "0.2.3" +name = "icu_locale_core" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", ] +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.3.0" @@ -9118,17 +9405,38 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" dependencies = [ "crossbeam-deque", "globset", "log", "memchr", - "regex-automata 0.4.6", + "regex-automata", "same-file", "walkdir", "winapi-util", @@ -9150,9 +9458,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.7" +version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" dependencies = [ "bytemuck", "byteorder", @@ -9160,7 +9468,6 @@ dependencies = [ "exr", "gif", "jpeg-decoder", - "num-rational 0.4.1", "num-traits", "png", "qoi", @@ -9182,7 +9489,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.6.9", + "parity-scale-codec 3.7.5", ] [[package]] @@ -9214,13 +9521,13 @@ dependencies = [ [[package]] name = "impl-trait-for-tuples" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.114", ] [[package]] @@ -9260,13 +9567,14 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.16.1", "serde", + "serde_core", ] [[package]] @@ -9275,7 +9583,7 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" dependencies = [ - "console", + "console 0.16.2", "lazy_static", "number_prefix 0.3.0", "regex", @@ -9287,10 +9595,10 @@ version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" dependencies = [ - "console", + "console 0.15.11", "number_prefix 0.4.0", "portable-atomic", - "unicode-width 0.2.0", + "unicode-width 0.2.2", "web-time", ] @@ -9302,17 +9610,17 @@ checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" [[package]] name = "inferno" -version = "0.11.19" +version = "0.11.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321f0f839cd44a4686e9504b0a62b4d69a50b62072144c71c68f5873c167b8d9" +checksum = "232929e1d75fe899576a3d5c7416ad0d88dbfbb3c3d6aa00873a7408a50ddb88" dependencies = [ - "ahash 0.8.11", - "clap 4.4.14", + "ahash 0.8.12", + "clap 4.5.58", "crossbeam-channel", "crossbeam-utils", - "dashmap", - "env_logger", - "indexmap 2.2.5", + "dashmap 6.1.0", + "env_logger 0.11.9", + "indexmap 2.13.0", "is-terminal", "itoa", "log", @@ -9325,18 +9633,18 @@ dependencies = [ [[package]] name = "inout" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ "generic-array 0.14.7", ] [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", "js-sys", @@ -9351,10 +9659,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ab388864246d58a276e60e7569a833d9cc4cd75c66e5ca77c177dad38e59996" dependencies = [ "ahash 0.7.8", - "dashmap", + "dashmap 5.5.3", "hashbrown 0.12.3", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.5", ] [[package]] @@ -9372,16 +9680,16 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iprange" @@ -9394,20 +9702,26 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ - "hermit-abi 0.3.3", - "rustix 0.38.28", - "windows-sys 0.52.0", + "hermit-abi 0.5.2", + "libc", + "windows-sys 0.61.2", ] [[package]] name = "is_debug" -version = "1.0.1" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fe266d2e243c931d8190177f20bf7f24eed45e96f39e87dc49a27b32d12d407" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06d198e9919d9822d5f7083ba8530e04de87841eaf21ead9af8f2304efd57c89" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isahc" @@ -9423,7 +9737,7 @@ dependencies = [ "encoding_rs", "event-listener 2.5.3", "futures-lite 1.13.0", - "http", + "http 0.2.12", "log", "mime", "once_cell", @@ -9436,6 +9750,15 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "itertools" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.10.5" @@ -9463,11 +9786,20 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jemalloc-sys" @@ -9491,28 +9823,30 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ + "getrandom 0.3.4", "libc", ] [[package]] name = "jpeg-decoder" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" dependencies = [ "rayon", ] [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -9558,12 +9892,12 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "pem 1.1.1", "ring 0.16.20", "serde", "serde_json", - "simple_asn1 0.6.2", + "simple_asn1 0.6.3", ] [[package]] @@ -9578,7 +9912,7 @@ dependencies = [ "hmac 0.12.1", "serde", "serde_json", - "sha2 0.10.8", + "sha2 0.10.9", ] [[package]] @@ -9597,9 +9931,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -9614,6 +9948,16 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "kube" version = "0.65.0" @@ -9638,7 +9982,7 @@ dependencies = [ "dirs-next", "either", "futures", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-rustls 0.23.2", @@ -9653,7 +9997,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util 0.6.10", "tower", @@ -9669,13 +10013,13 @@ checksum = "c52b6ab05d160691083430f6f431707a4e05b64903f2ffa0095ee5efde759117" dependencies = [ "chrono", "form_urlencoded", - "http", + "http 0.2.12", "json-patch", "k8s-openapi", "once_cell", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -9702,33 +10046,33 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.19.12" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" dependencies = [ "ascii-canvas", - "bit-set", - "diff", + "bit-set 0.5.3", "ena", - "is-terminal", - "itertools 0.10.5", + "itertools 0.11.0", "lalrpop-util", - "petgraph 0.6.4", + "petgraph 0.6.5", + "pico-args", "regex", - "regex-syntax 0.6.29", + "regex-syntax", "string_cache", - "term", + "term 0.7.0", "tiny-keccak", "unicode-xid", + "walkdir", ] [[package]] name = "lalrpop-util" -version = "0.19.12" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex", + "regex-automata", ] [[package]] @@ -9758,11 +10102,11 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin 0.9.8", ] [[package]] @@ -9771,11 +10115,17 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "lebe" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" +checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" [[package]] name = "ledger-apdu" @@ -9811,7 +10161,7 @@ dependencies = [ "ledger-transport", "libc", "log", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -9822,19 +10172,18 @@ checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" [[package]] name = "libc" -version = "0.2.152" +version = "0.2.181" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" [[package]] name = "libfuzzer-sys" -version = "0.4.7" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d" dependencies = [ "arbitrary", "cc", - "once_cell", ] [[package]] @@ -9853,25 +10202,25 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-link", ] [[package]] name = "libm" -version = "0.2.8" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libnghttp2-sys" -version = "0.1.9+1.58.0" +version = "0.1.11+1.64.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b57e858af2798e167e709b9d969325b6d8e9d50232fcbc494d7d54f976854a64" +checksum = "1b6c24e48a7167cffa7119da39d577fa482e66c688a4aac016bee862e1a713c4" dependencies = [ "cc", "libc", @@ -9879,13 +10228,13 @@ dependencies = [ [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.10.0", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.7.1", ] [[package]] @@ -9905,12 +10254,12 @@ dependencies = [ [[package]] name = "libsecp256k1" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +checksum = "e79019718125edc905a079a70cfa5f3820bc76139fc91d6f9abc27ea2a887139" dependencies = [ "arrayref", - "base64 0.13.1", + "base64 0.22.1", "digest 0.9.0", "hmac-drbg", "libsecp256k1-core", @@ -9978,9 +10327,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.13" +version = "1.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f526fdd09d99e19742883e43de41e1aa9e36db0c7ab7f935165d611c5cccc66" +checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" dependencies = [ "cc", "libc", @@ -10002,43 +10351,47 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "listener" version = "0.1.0" dependencies = [ "bytes", - "clap 4.4.14", + "clap 4.5.58", "tokio", ] +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "lodepng" -version = "3.9.2" +version = "3.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f56ff9bcd5721ab172b73eac8a7d4e9439f47a98581e666178dbe7df97e13" +checksum = "77a32335d22e44238e2bb0b4d726964d18952ce1f1279ec3305305d2c61539eb" dependencies = [ "crc32fast", - "fallible_collections", "flate2", "libc", "rgb", @@ -10046,11 +10399,11 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" dependencies = [ - "serde", + "serde_core", "value-bag", ] @@ -10074,19 +10427,18 @@ dependencies = [ [[package]] name = "lz4" -version = "1.25.0" +version = "1.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6eab492fe7f8651add23237ea56dbf11b3c4ff762ab83d40a47f11433421f91" +checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4" dependencies = [ - "libc", "lz4-sys", ] [[package]] name = "lz4-sys" -version = "1.9.5" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9764018d143cc854c9f17f0b907de70f14393b1f502da6375dce70f00514eb3" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ "cc", "libc", @@ -10106,19 +10458,13 @@ checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.5.0" @@ -10133,9 +10479,9 @@ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "matrixmultiply" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" +checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" dependencies = [ "autocfg", "rawpointer", @@ -10153,9 +10499,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memmap2" @@ -10168,12 +10514,12 @@ dependencies = [ [[package]] name = "memory-stats" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34f79cf9964c5c9545493acda1263f1912f8d2c56c8a2ffee2606cb960acaacc" +checksum = "c73f5c649995a115e1a0220b35e4df0a1294500477f97a91d0660fb5abeb574a" dependencies = [ "libc", - "winapi 0.3.9", + "windows-sys 0.52.0", ] [[package]] @@ -10216,9 +10562,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -10232,7 +10578,7 @@ checksum = "c325dfab65f261f386debee8b0969da215b3fa0037e74c8a1234db7ba986d803" dependencies = [ "crossbeam-channel", "crossbeam-utils", - "dashmap", + "dashmap 5.5.3", "skeptic", "smallvec", "tagptr", @@ -10247,11 +10593,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ - "adler", + "adler2", "simd-adler32", ] @@ -10263,17 +10609,34 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.48.0", ] [[package]] -name = "mirai-annotations" -version = "1.12.0" +name = "mio" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" - -[[package]] +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.61.2", +] + +[[package]] +name = "miracl_core_bls12381" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07cbe42e2a8dd41df582fb8e00fc24d920b5561cc301fcb6d14e2e0434b500f" + +[[package]] +name = "mirai-annotations" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" + +[[package]] name = "mockall" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -10320,7 +10683,7 @@ dependencies = [ "anyhow", "aptos-framework", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "move-binary-format", ] @@ -10450,7 +10813,7 @@ name = "move-bytecode-viewer" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.14", + "clap 4.5.58", "crossterm 0.26.1", "move-binary-format", "move-bytecode-source-map", @@ -10464,7 +10827,7 @@ name = "move-cli" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.14", + "clap 4.5.58", "codespan-reporting", "colored", "datatest-stable", @@ -10512,7 +10875,7 @@ version = "0.0.1" dependencies = [ "anyhow", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "codespan-reporting", "datatest-stable", "hex", @@ -10548,7 +10911,7 @@ dependencies = [ "abstract-domain-derive", "anyhow", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "codespan-reporting", "datatest-stable", "ethnum", @@ -10569,7 +10932,7 @@ dependencies = [ "move-stackless-bytecode", "move-stdlib", "move-symbol-pool", - "num 0.4.1", + "num 0.4.3", "once_cell", "petgraph 0.5.1", "walkdir", @@ -10599,9 +10962,9 @@ dependencies = [ "bcs 0.1.4", "bytes", "ethnum", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", - "num 0.4.1", + "num 0.4.3", "once_cell", "primitive-types 0.10.1", "proptest", @@ -10612,7 +10975,7 @@ dependencies = [ "serde", "serde_bytes", "serde_json", - "thiserror", + "thiserror 1.0.69", "uint", ] @@ -10622,7 +10985,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "codespan", "colored", "move-binary-format", @@ -10639,7 +11002,7 @@ name = "move-disassembler" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.14", + "clap 4.5.58", "colored", "move-binary-format", "move-bytecode-source-map", @@ -10655,7 +11018,7 @@ name = "move-docgen" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.14", + "clap 4.5.58", "codespan", "codespan-reporting", "datatest-stable", @@ -10708,7 +11071,7 @@ name = "move-explain" version = "0.1.0" dependencies = [ "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "move-command-line-common", "move-core-types", ] @@ -10719,7 +11082,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bcs 0.1.4", - "clap 4.4.14", + "clap 4.5.58", "move-binary-format", "move-bytecode-source-map", "move-bytecode-verifier", @@ -10797,7 +11160,7 @@ dependencies = [ "move-ir-types", "move-prover-test-utils", "move-symbol-pool", - "num 0.4.1", + "num 0.4.3", "num-traits", "once_cell", "regex", @@ -10809,7 +11172,7 @@ name = "move-package" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.14", + "clap 4.5.58", "colored", "datatest-stable", "evm-exec-utils", @@ -10839,7 +11202,7 @@ dependencies = [ "termcolor", "toml 0.7.8", "walkdir", - "whoami", + "whoami 1.6.1", ] [[package]] @@ -10848,7 +11211,7 @@ version = "0.1.0" dependencies = [ "anyhow", "atty", - "clap 4.4.14", + "clap 4.5.58", "codespan-reporting", "datatest-stable", "itertools 0.12.1", @@ -10866,7 +11229,7 @@ dependencies = [ "move-stackless-bytecode", "once_cell", "serde", - "shell-words", + "shell-words 1.1.1", "simplelog", "tempfile", "toml 0.7.8", @@ -10891,7 +11254,7 @@ dependencies = [ "move-model", "move-prover-bytecode-pipeline", "move-stackless-bytecode", - "num 0.4.1", + "num 0.4.3", "once_cell", "pretty", "rand 0.7.3", @@ -10917,7 +11280,7 @@ dependencies = [ "move-stackless-bytecode", "move-stackless-bytecode-test-utils", "serde", - "shell-words", + "shell-words 1.1.1", "tempfile", "walkdir", ] @@ -10960,7 +11323,7 @@ dependencies = [ "move-core-types", "move-model", "move-stackless-bytecode-test-utils", - "num 0.4.1", + "num 0.4.3", "paste", "petgraph 0.5.1", ] @@ -11042,7 +11405,7 @@ version = "0.1.0" dependencies = [ "anyhow", "atty", - "clap 4.4.14", + "clap 4.5.58", "codespan", "codespan-reporting", "datatest-stable", @@ -11073,7 +11436,7 @@ name = "move-transactional-test-runner" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.14", + "clap 4.5.58", "datatest-stable", "difference", "move-binary-format", @@ -11105,7 +11468,7 @@ version = "0.1.0" dependencies = [ "anyhow", "better_any", - "clap 4.4.14", + "clap 4.5.58", "codespan-reporting", "colored", "datatest-stable", @@ -11168,7 +11531,7 @@ dependencies = [ "better_any", "bytes", "fail", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "lazy_static", "lru 0.7.8", @@ -11179,7 +11542,7 @@ dependencies = [ "move-ir-compiler", "move-vm-types", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "proptest", "serde", "sha3 0.9.1", @@ -11238,7 +11601,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http", + "http 0.2.12", "httparse", "log", "memchr", @@ -11250,29 +11613,46 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.3" +version = "0.32.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +checksum = "7b5c17de023a86f59ed79891b2e5d5a94c705dbe904a5b5c9c952ea6221b03e4" dependencies = [ "approx", "matrixmultiply", "nalgebra-macros", - "num-complex 0.4.4", - "num-rational 0.4.1", + "num-complex 0.4.6", + "num-rational 0.4.2", + "num-traits", + "simba 0.8.1", + "typenum", +] + +[[package]] +name = "nalgebra" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" +dependencies = [ + "approx", + "matrixmultiply", + "num-complex 0.4.6", + "num-rational 0.4.2", "num-traits", - "simba", + "rand 0.8.5", + "rand_distr", + "simba 0.9.1", "typenum", ] [[package]] name = "nalgebra-macros" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.114", ] [[package]] @@ -11283,19 +11663,18 @@ checksum = "40a3eb6b7c682b65d1f631ec3176829d72ab450b3aacdd3f719bf220822e59ac" dependencies = [ "libc", "once_cell", - "parking_lot 0.12.1", - "thiserror", + "parking_lot 0.12.5", + "thiserror 1.0.69", "widestring", "winapi 0.3.9", ] [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -11318,7 +11697,7 @@ dependencies = [ "blake2s_simd", "blstrs 0.7.1", "byteorder", - "ff 0.13.0", + "ff 0.13.1", "generic-array 0.14.7", "log", "pasta_curves", @@ -11334,9 +11713,9 @@ checksum = "ca2b420f638f07fe83056b55ea190bb815f609ec5a35e7017884a10f78839c9e" [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" @@ -11355,8 +11734,20 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.10.0", + "cfg-if", + "libc", +] + +[[package]] +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags 2.10.0", "cfg-if", + "cfg_aliases", "libc", ] @@ -11390,18 +11781,18 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "ntapi" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" dependencies = [ "winapi 0.3.9", ] [[package]] name = "ntest" -version = "0.9.0" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da8ec6d2b73d45307e926f5af46809768581044384637af6b3f3fe7c3c88f512" +checksum = "54d1aa56874c2152c24681ed0df95ee155cc06c5c61b78e2d1e8c0cae8bc5326" dependencies = [ "ntest_test_cases", "ntest_timeout", @@ -11409,9 +11800,9 @@ dependencies = [ [[package]] name = "ntest_test_cases" -version = "0.9.0" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be7d33be719c6f4d09e64e27c1ef4e73485dc4cc1f4d22201f89860a7fe22e22" +checksum = "6913433c6319ef9b2df316bb8e3db864a41724c2bb8f12555e07dc4ec69d3db1" dependencies = [ "proc-macro2", "quote", @@ -11420,11 +11811,11 @@ dependencies = [ [[package]] name = "ntest_timeout" -version = "0.9.0" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "066b468120587a402f0b47d8f80035c921f6a46f8209efd0632a89a16f5188a4" +checksum = "9224be3459a0c1d6e9b0f42ab0e76e98b29aef5aba33c0487dfcf47ea08b5150" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.4.0", "proc-macro2", "quote", "syn 1.0.109", @@ -11432,21 +11823,20 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" dependencies = [ - "overload", - "winapi 0.3.9", + "windows-sys 0.48.0", ] [[package]] name = "nu-ansi-term" -version = "0.49.0" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] @@ -11465,15 +11855,15 @@ dependencies = [ [[package]] name = "num" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ - "num-bigint 0.4.4", - "num-complex 0.4.4", + "num-bigint 0.4.6", + "num-complex 0.4.6", "num-integer", "num-iter", - "num-rational 0.4.1", + "num-rational 0.4.2", "num-traits", ] @@ -11502,22 +11892,20 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-bigint-dig" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" dependencies = [ - "byteorder", "lazy_static", "libm", "num-integer", @@ -11539,13 +11927,19 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" + [[package]] name = "num-derive" version = "0.3.3" @@ -11563,25 +11957,24 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "itoa", ] [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -11594,7 +11987,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17bb261bf36fa7d83f4c294f834e91256769097b3cb505d44831e0a179ac647f" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-integer", "num-traits", ] @@ -11613,21 +12006,20 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -11635,19 +12027,19 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.5.2", "libc", ] [[package]] name = "num_threads" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ "libc", ] @@ -11672,29 +12064,68 @@ checksum = "60080faccd4ca50ad0b801b2be686136376b13f691f6eac84817e40973b2e1bb" dependencies = [ "anyhow", "itertools 0.10.5", - "num 0.4.1", + "num 0.4.3", +] + +[[package]] +name = "objc2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.10.0", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-system-configuration" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7216bd11cbda54ccabcab84d523dc93b858ec75ecfb3a7d89513fa22464da396" +dependencies = [ + "objc2-core-foundation", ] [[package]] name = "object" -version = "0.32.2" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "opaque-debug" @@ -11704,17 +12135,17 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.62" +version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.10.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -11731,20 +12162,20 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.98" +version = "0.9.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", @@ -11805,12 +12236,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "owo-colors" version = "3.5.0" @@ -11826,7 +12251,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "sha2 0.10.8", + "sha2 0.10.9", ] [[package]] @@ -11835,7 +12260,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2ad9b889f1b12e0b9ee24db044b5129150d5eada288edc800f789928dc8c0e3" dependencies = [ - "unicode-width 0.1.11", + "unicode-width 0.1.14", ] [[package]] @@ -11862,7 +12287,7 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bitvec 0.20.4", "byte-slice-cast", "impl-trait-for-tuples", @@ -11872,15 +12297,17 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bitvec 1.0.1", "byte-slice-cast", + "const_format", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.6.9", + "parity-scale-codec-derive 3.7.5", + "rustversion", "serde", ] @@ -11898,21 +12325,21 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.114", ] [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -11927,12 +12354,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.12", ] [[package]] @@ -11951,22 +12378,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.18", "smallvec", - "windows-targets 0.48.5", + "windows-link", ] [[package]] name = "parse-zoneinfo" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" +checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" dependencies = [ "regex", ] @@ -12010,15 +12437,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "499cff8432e71c5f8784d9645aac0f9fca604d67f59b68a606170b5e229c6538" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.10.0", "ciborium", "coset", "data-encoding", - "indexmap 2.2.5", + "indexmap 2.13.0", "rand 0.8.5", "serde", "serde_json", - "sha2 0.10.8", + "sha2 0.10.9", "strum 0.25.0", "typeshare", ] @@ -12030,7 +12457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" dependencies = [ "blake2b_simd", - "ff 0.13.0", + "ff 0.13.1", "group 0.13.0", "hex", "lazy_static", @@ -12042,15 +12469,21 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" -version = "0.2.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "a3bf70094d203e07844da868b634207e71bfab254fe713171fae9a6e751ccf31" + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" dependencies = [ "camino", ] @@ -12124,26 +12557,25 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.7.6" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" dependencies = [ "memchr", - "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.6" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" dependencies = [ "pest", "pest_generator", @@ -12151,26 +12583,25 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.6" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "pest_meta" -version = "2.7.6" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" dependencies = [ - "once_cell", "pest", - "sha2 0.10.8", + "sha2 0.10.9", ] [[package]] @@ -12185,86 +12616,113 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.2.5", + "indexmap 2.13.0", +] + +[[package]] +name = "petgraph" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +dependencies = [ + "fixedbitset 0.5.7", + "hashbrown 0.15.5", + "indexmap 2.13.0", ] [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_shared 0.11.3", +] + +[[package]] +name = "phf" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ - "phf_shared 0.11.2", + "phf_shared 0.13.1", + "serde", ] [[package]] name = "phf_codegen" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" dependencies = [ "phf_generator", - "phf_shared 0.11.2", + "phf_shared 0.11.3", ] [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared 0.11.2", + "phf_shared 0.11.3", "rand 0.8.5", ] [[package]] name = "phf_shared" -version = "0.10.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ - "siphasher", + "siphasher 1.0.2", ] [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" dependencies = [ - "siphasher", + "siphasher 1.0.2", ] +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -12274,12 +12732,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand 2.3.0", "futures-io", ] @@ -12300,7 +12758,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" dependencies = [ - "der 0.7.8", + "der 0.7.10", "pkcs8 0.10.2", "spki 0.7.3", ] @@ -12322,21 +12780,21 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.8", + "der 0.7.10", "spki 0.7.3", ] [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -12347,24 +12805,24 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] [[package]] name = "png" -version = "0.17.10" +version = "0.17.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -12383,15 +12841,15 @@ dependencies = [ "async-trait", "bytes", "chrono", - "cookie 0.17.0", + "cookie", "futures-util", "headers", - "http", + "http 0.2.12", "hyper", "mime", "multer", "nix 0.27.1", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "percent-encoding", "pin-project-lite", "poem-derive", @@ -12404,12 +12862,12 @@ dependencies = [ "serde_urlencoded", "smallvec", "tempfile", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tokio-rustls 0.24.1", "tokio-stream", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "tracing", "wildmatch", ] @@ -12420,10 +12878,10 @@ version = "1.3.59" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ddcf4680d8d867e1e375116203846acb088483fa2070244f90589f458bbb31" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -12434,7 +12892,7 @@ checksum = "e69c569eb0671cc85e65cfb6bd960d0168d24732ff58825227b4d2a10167ba91" dependencies = [ "base64 0.13.1", "bytes", - "derive_more 0.99.17", + "derive_more 0.99.20", "futures-util", "mime", "num-traits", @@ -12445,8 +12903,8 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "serde_yaml 0.9.30", - "thiserror", + "serde_yaml 0.9.34+deprecated", + "thiserror 1.0.69", "tokio", "url", ] @@ -12458,7 +12916,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "274cf13f710999977a3c1e396c2a5000d104075a7127ce6470fbdae4706be621" dependencies = [ "darling 0.14.4", - "http", + "http 0.2.12", "indexmap 1.9.3", "mime", "proc-macro-crate 1.3.1", @@ -12466,7 +12924,7 @@ dependencies = [ "quote", "regex", "syn 1.0.109", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -12487,27 +12945,27 @@ dependencies = [ [[package]] name = "polling" -version = "3.3.1" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" dependencies = [ "cfg-if", "concurrent-queue", + "hermit-abi 0.5.2", "pin-project-lite", - "rustix 0.38.28", - "tracing", - "windows-sys 0.52.0", + "rustix 1.1.3", + "windows-sys 0.61.2", ] [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", "universal-hash", ] @@ -12533,9 +12991,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.11.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "poseidon-ark" @@ -12549,33 +13007,42 @@ dependencies = [ [[package]] name = "postgres-protocol" -version = "0.6.6" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" +checksum = "3ee9dd5fe15055d2b6806f4736aa0c9637217074e224bbec46d4041b91bb9491" dependencies = [ - "base64 0.21.6", + "base64 0.22.1", "byteorder", "bytes", "fallible-iterator", "hmac 0.12.1", "md-5", "memchr", - "rand 0.8.5", - "sha2 0.10.8", + "rand 0.9.2", + "sha2 0.10.9", "stringprep", ] [[package]] name = "postgres-types" -version = "0.2.6" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" +checksum = "54b858f82211e84682fecd373f68e1ceae642d8d751a1ebd13f33de6257b3e20" dependencies = [ "bytes", "fallible-iterator", "postgres-protocol", ] +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -12596,20 +13063,23 @@ dependencies = [ "log", "nix 0.26.4", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "protobuf", "protobuf-codegen-pure", "smallvec", "symbolic-demangle", "tempfile", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] [[package]] name = "pq-sys" @@ -12642,15 +13112,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "cad38746f3166b4031b1a0d39ad9f954dd291e7854fcc0eed52ee41a0b50d144" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "d0de1b847b39c8131db0467e9df1ff60e6d0562ab8e9a16e568ad0fdb372e2f2" dependencies = [ "predicates-core", "termtree", @@ -12668,12 +13138,12 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", - "yansi 0.5.1", + "yansi", ] [[package]] @@ -12688,6 +13158,16 @@ dependencies = [ "structopt", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.114", +] + [[package]] name = "prettytable-rs" version = "0.10.0" @@ -12695,11 +13175,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" dependencies = [ "csv", - "encode_unicode 1.0.0", + "encode_unicode", "is-terminal", "lazy_static", - "term", - "unicode-width 0.1.11", + "term 0.7.0", + "unicode-width 0.1.14", ] [[package]] @@ -12750,14 +13230,23 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" dependencies = [ - "toml_datetime", + "toml_datetime 0.6.3", "toml_edit 0.20.2", ] +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit 0.23.10+spec-1.0.0", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -12796,9 +13285,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -12826,16 +13315,16 @@ checksum = "8bccbff07d5ed689c4087d20d7307a52ab6141edeedf487c3876a55b86cf63df" [[package]] name = "prometheus" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ "cfg-if", "fnv", "lazy_static", "memchr", - "parking_lot 0.12.1", - "thiserror", + "parking_lot 0.12.5", + "thiserror 1.0.69", ] [[package]] @@ -12865,19 +13354,18 @@ dependencies = [ [[package]] name = "proptest" -version = "1.4.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "37566cb3fdacef14c0737f9546df7cfeadbfbc9fef10991038bf5015d0c80532" dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.4.1", - "lazy_static", + "bit-set 0.8.0", + "bit-vec 0.8.0", + "bitflags 2.10.0", "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax 0.8.2", + "rand 0.9.2", + "rand_chacha 0.9.0", + "rand_xorshift 0.4.0", + "regex-syntax", "rusty-fork", "tempfile", "unarray", @@ -12896,9 +13384,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", "prost-derive", @@ -12906,22 +13394,22 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "prost-types" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ "prost", ] @@ -12957,7 +13445,7 @@ version = "0.1.0" dependencies = [ "anyhow", "chrono", - "clap 4.4.14", + "clap 4.5.58", "codespan-reporting", "itertools 0.12.1", "log", @@ -12978,27 +13466,27 @@ checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" [[package]] name = "public-suffix" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca346b8ff0739660876c8d96a6f9de5cd9b4cd87500bb0ce92485318c674afe" +checksum = "51315bca45305dd8aa64b831b33e71abac528ca8058c0651346a39b8d3009498" [[package]] name = "publicsuffix" -version = "2.2.3" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457" +checksum = "6f42ea446cab60335f76979ec15e12619a2165b5ae2c12166bef27d283a9fadf" dependencies = [ - "idna 0.3.0", + "idna 1.1.0", "psl-types", ] [[package]] name = "pulldown-cmark" -version = "0.9.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.10.0", "memchr", "unicase", ] @@ -13058,25 +13546,31 @@ dependencies = [ [[package]] name = "quick_cache" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347e1a588d1de074eeb3c00eadff93db4db65aeb62aee852b1efd0949fe65b6c" +checksum = "eb55a1aa7668676bb93926cd4e9cdfe60f03bb866553bcca9112554911b6d3dc" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.12", "equivalent", - "hashbrown 0.14.3", - "parking_lot 0.12.1", + "hashbrown 0.14.5", + "parking_lot 0.12.5", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "r2d2" version = "0.8.10" @@ -13084,7 +13578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "scheduled-thread-pool", ] @@ -13125,6 +13619,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -13145,6 +13649,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + [[package]] name = "rand_core" version = "0.5.1" @@ -13160,11 +13674,30 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.17", ] [[package]] -name = "rand_hc" +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" @@ -13190,6 +13723,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.5", +] + [[package]] name = "rand_xoshiro" version = "0.6.0" @@ -13217,9 +13759,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -13227,9 +13769,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -13253,7 +13795,7 @@ dependencies = [ "ryu", "sha1_smol", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "url", ] @@ -13278,103 +13820,97 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.10.0", +] + +[[package]] +name = "redox_syscall" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b" +dependencies = [ + "bitflags 2.10.0", ] [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.17", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "ref-cast" -version = "1.0.22" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.22" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" [[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "bytes", - "cookie 0.16.2", + "cookie", "cookie_store", "encoding_rs", "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-rustls 0.24.2", @@ -13388,16 +13924,17 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "tower-service", "url", "wasm-bindgen", @@ -13410,17 +13947,17 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a3e86aa6053e59030e7ce2d2a3b258dd08fc2d337d52f73f6cb480f5858690" +checksum = "5a735987236a8e238bf0296c7e351b999c188ccc11477f311b82b55c93984216" dependencies = [ "anyhow", "async-trait", - "http", + "http 0.2.12", "reqwest", "serde", "task-local-extensions", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -13433,8 +13970,8 @@ dependencies = [ "async-trait", "chrono", "futures", - "getrandom 0.2.11", - "http", + "getrandom 0.2.17", + "http 0.2.12", "hyper", "parking_lot 0.11.2", "reqwest", @@ -13475,18 +14012,18 @@ dependencies = [ [[package]] name = "rfc7239" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "087317b3cf7eb481f13bd9025d729324b7cd068d6f470e2d76d049e191f5ba47" +checksum = "4a82f1d1e38e9a85bb58ffcfadf22ed6f2c94e8cd8581ec2b0f80a2a6858350f" dependencies = [ "uncased", ] [[package]] name = "rgb" -version = "0.8.37" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" +checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" dependencies = [ "bytemuck", ] @@ -13508,16 +14045,16 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", - "getrandom 0.2.11", + "cfg-if", + "getrandom 0.2.17", "libc", - "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -13529,6 +14066,40 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "ritual_build" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f86c36bf720176c6d573d0827cd5b2b9f1c6a3450dc237374a35ce0f2268835" +dependencies = [ + "log", + "ritual_common", +] + +[[package]] +name = "ritual_common" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d30de34c9683bedc6f0b1f5a3ef0bb613df7ff7e1833c767eeed45f1a9d2af" +dependencies = [ + "bincode", + "dunce", + "failure", + "itertools 0.8.2", + "lazy_static", + "log", + "num_cpus", + "pathdiff 0.1.0", + "regex", + "semver 0.9.0", + "serde", + "serde_derive", + "serde_json", + "shell-words 0.1.0", + "term-painter", + "toml 0.4.10", +] + [[package]] name = "rlp" version = "0.5.2" @@ -13582,9 +14153,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" dependencies = [ "const-oid 0.9.6", "digest 0.10.7", @@ -13594,7 +14165,7 @@ dependencies = [ "pkcs1 0.7.5", "pkcs8 0.10.2", "rand_core 0.6.4", - "sha2 0.10.8", + "sha2 0.10.9", "signature 2.2.0", "spki 0.7.3", "subtle", @@ -13656,9 +14227,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" [[package]] name = "rustc-hash" @@ -13674,11 +14245,11 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver", + "semver 1.0.27", ] [[package]] @@ -13697,29 +14268,28 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.27" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.10.0", "errno", - "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", ] [[package]] name = "rustix" -version = "0.38.28" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.10.0", "errno", "libc", - "linux-raw-sys 0.4.12", - "windows-sys 0.52.0", + "linux-raw-sys 0.11.0", + "windows-sys 0.61.2", ] [[package]] @@ -13736,12 +14306,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.14", "rustls-webpki 0.101.7", "sct", ] @@ -13753,24 +14323,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.14", "rustls-pki-types", - "rustls-webpki 0.102.2", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] [[package]] name = "rustls" -version = "0.23.7" +version = "0.23.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebbbdb961df0ad3f2652da8f3fdc4b36122f568f968f45ad3316f26c025c677b" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" dependencies = [ "log", "once_cell", - "ring 0.17.7", + "ring 0.17.14", "rustls-pki-types", - "rustls-webpki 0.102.2", + "rustls-webpki 0.103.9", "subtle", "zeroize", ] @@ -13789,12 +14359,12 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.1", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -13815,24 +14385,26 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", ] [[package]] name = "rustls-pemfile" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f48172685e6ff52a556baa527774f61fcaa884f59daf3375c62a3f1cd2549dab" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.21.6", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.3.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ede67b28608b4c60685c7d54122d4400d90f62b40caee7700e700380a390fa8" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "zeroize", +] [[package]] name = "rustls-webpki" @@ -13840,32 +14412,43 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.7", + "ring 0.17.14", + "untrusted 0.9.0", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring 0.17.14", + "rustls-pki-types", "untrusted 0.9.0", ] [[package]] name = "rustls-webpki" -version = "0.102.2" +version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ - "ring 0.17.7", + "ring 0.17.14", "rustls-pki-types", "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rusty-fork" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +checksum = "cc6bf79ff24e648f6da1f8d1f011e9cac26491b619e6b9280f2b47f1774e6ee2" dependencies = [ "fnv", "quick-error", @@ -13875,15 +14458,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "safe_arch" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" dependencies = [ "bytemuck", ] @@ -13905,7 +14488,7 @@ checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ "bitvec 0.20.4", "cfg-if", - "derive_more 0.99.17", + "derive_more 0.99.20", "parity-scale-codec 2.3.1", "scale-info-derive", ] @@ -13924,11 +14507,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -13937,17 +14520,40 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot 0.12.1", + "parking_lot 0.12.5", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", ] [[package]] name = "scoped-futures" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1473e24c637950c9bd38763220bea91ec3e095a89f672bbd7a10d03e77ba467" +checksum = "1b24aae2d0636530f359e9d5ef0c04669d11c5e756699b27a6a6d845d8329091" dependencies = [ - "cfg-if", - "pin-utils", + "pin-project-lite", ] [[package]] @@ -13968,7 +14574,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.7", + "ring 0.17.14", "untrusted 0.9.0", ] @@ -13985,7 +14591,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", - "der 0.7.8", + "der 0.7.10", "generic-array 0.14.7", "pkcs8 0.10.2", "serdect", @@ -13995,11 +14601,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.10.0", "core-foundation", "core-foundation-sys", "libc", @@ -14008,9 +14614,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", @@ -14018,13 +14624,13 @@ dependencies = [ [[package]] name = "self-replace" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7828a58998685d8bf5a3c5e7a3379a5867289c20828c3ee436280b44b598515" +checksum = "03ec815b5eab420ab893f63393878d89c90fdd94c0bcc44c07abb8ad95552fb7" dependencies = [ - "fastrand 1.9.0", + "fastrand 2.3.0", "tempfile", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -14039,7 +14645,7 @@ dependencies = [ "regex", "reqwest", "self-replace", - "semver", + "semver 1.0.27", "serde_json", "tempfile", "urlencoding", @@ -14049,29 +14655,46 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" dependencies = [ "serde", + "serde_core", ] +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + [[package]] name = "sender" version = "0.1.0" dependencies = [ "bytes", - "clap 4.4.14", + "clap 4.5.58", "event-listener 2.5.3", "tokio", ] [[package]] name = "serde" -version = "1.0.197" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ + "serde_core", "serde_derive", ] @@ -14109,7 +14732,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12c47087018ec281d1cdab673d36aea22d816b54d498264029c05d5fa1910da6" dependencies = [ "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -14119,7 +14742,7 @@ source = "git+https://github.com/aptos-labs/serde-reflection?rev=73b6bbf748334b7 dependencies = [ "once_cell", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -14134,11 +14757,12 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" dependencies = [ "serde", + "serde_core", ] [[package]] @@ -14147,31 +14771,42 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ - "half 1.8.2", + "half 1.8.3", "serde", ] +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.13.0", "itoa", - "ryu", + "memchr", "serde", + "serde_core", + "zmij", ] [[package]] @@ -14182,7 +14817,7 @@ checksum = "606e91878516232ac3b16c12e063d4468d762f16d77e7aef14a1f2326c5f409b" dependencies = [ "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -14197,24 +14832,33 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.18" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +dependencies = [ + "serde_core", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -14229,16 +14873,18 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.4.0" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" dependencies = [ - "base64 0.21.6", + "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.5", - "serde", + "indexmap 2.13.0", + "schemars 0.9.0", + "schemars 1.2.1", + "serde_core", "serde_json", "serde_with_macros", "time", @@ -14246,14 +14892,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.4.0" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" dependencies = [ - "darling 0.20.9", + "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -14270,11 +14916,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.30" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.13.0", "itoa", "ryu", "serde", @@ -14314,9 +14960,9 @@ dependencies = [ [[package]] name = "sha1_smol" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" [[package]] name = "sha2" @@ -14328,14 +14974,14 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -14344,14 +14990,14 @@ dependencies = [ [[package]] name = "sha256" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18278f6a914fa3070aa316493f7d2ddfb9ac86ebc06fa3b83bffda487e9065b0" +checksum = "f880fc8562bdeb709793f00eb42a2ad0e672c4f883bbe59122b926eca935c8f6" dependencies = [ "async-trait", "bytes", "hex", - "sha2 0.10.8", + "sha2 0.10.9", "tokio", ] @@ -14377,7 +15023,7 @@ dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", "keccak", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -14414,9 +15060,15 @@ dependencies = [ [[package]] name = "shell-words" -version = "1.1.0" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39acde55a154c4cd3ae048ac78cc21c25f3a0145e44111b523279113dce0d94a" + +[[package]] +name = "shell-words" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" [[package]] name = "shlex" @@ -14426,9 +15078,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" dependencies = [ "libc", "signal-hook-registry", @@ -14436,21 +15088,22 @@ dependencies = [ [[package]] name = "signal-hook-mio" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" dependencies = [ "libc", - "mio", + "mio 0.8.11", "signal-hook", ] [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] @@ -14477,7 +15130,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ "approx", - "num-complex 0.4.4", + "num-complex 0.4.6", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "simba" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c99284beb21666094ba2b75bbceda012e610f5479dfcc2d6e2426f53197ffd95" +dependencies = [ + "approx", + "num-complex 0.4.6", "num-traits", "paste", "wide", @@ -14485,27 +15151,27 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "similar" -version = "2.4.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" +checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" dependencies = [ - "bstr 0.2.17", + "bstr", "unicode-segmentation", ] [[package]] name = "similar-asserts" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e041bb827d1bfca18f213411d51b665309f1afb37a04a5d1464530e13779fc0f" +checksum = "b5b441962c817e33508847a22bd82f03a30cff43642dc2fae8b050566121eb9a" dependencies = [ - "console", + "console 0.15.11", "similar", ] @@ -14522,13 +15188,13 @@ dependencies = [ [[package]] name = "simple_asn1" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", - "thiserror", + "thiserror 2.0.18", "time", ] @@ -14549,6 +15215,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" + [[package]] name = "sized-chunks" version = "0.6.5" @@ -14576,18 +15248,15 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "slug" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd94acec9c8da640005f8e135a39fc0372e74535e6b368b7a04b875f784c8c4" +checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" dependencies = [ "deunicode", "wasm-bindgen", @@ -14606,15 +15275,15 @@ dependencies = [ [[package]] name = "smallbitvec" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ce4f9dc4a41b4c3476cc925f1efb11b66df373a8fde5d4b8915fa91b5d995e" +checksum = "d31d263dd118560e1a492922182ab6ca6dc1d03a3bf54e7699993f31a4150e3f" [[package]] name = "smallvec" -version = "1.13.1" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "smawk" @@ -14722,22 +15391,22 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.10" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", - "winapi 0.3.9", + "windows-sys 0.52.0", ] [[package]] name = "socket2" -version = "0.5.5" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.60.2", ] [[package]] @@ -14751,9 +15420,6 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] [[package]] name = "spki" @@ -14772,14 +15438,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.8", + "der 0.7.10", ] [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "static_assertions" @@ -14787,6 +15453,18 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "statrs" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3fe7c28c6512e766b0874335db33c94ad7b8f9054228ae1c2abd47ce7d335e" +dependencies = [ + "approx", + "nalgebra 0.33.2", + "num-traits", + "rand 0.8.5", +] + [[package]] name = "status-line" version = "0.2.0" @@ -14805,26 +15483,25 @@ checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb" [[package]] name = "string_cache" -version = "0.8.7" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", - "once_cell", - "parking_lot 0.12.1", - "phf_shared 0.10.0", + "parking_lot 0.12.5", + "phf_shared 0.11.3", "precomputed-hash", ] [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -14886,9 +15563,9 @@ dependencies = [ [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" [[package]] name = "strum_macros" @@ -14913,7 +15590,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -14926,14 +15603,14 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subtle-ng" @@ -14948,7 +15625,7 @@ dependencies = [ "anyhow", "aptos-types", "async-trait", - "clap 4.4.14", + "clap 4.5.58", "reqwest", ] @@ -14988,9 +15665,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", @@ -15004,10 +15681,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "sysinfo" -version = "0.28.4" +name = "synstructure" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2f3ca6693feb29a89724516f016488e9aafc7f37264f898593ee4b942f31b" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "sysinfo" +version = "0.28.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c2f3ca6693feb29a89724516f016488e9aafc7f37264f898593ee4b942f31b" dependencies = [ "cfg-if", "core-foundation-sys", @@ -15053,9 +15753,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.40" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" dependencies = [ "filetime", "libc", @@ -15064,23 +15764,28 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" [[package]] name = "target-spec" -version = "3.1.0" +version = "3.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a8e795b1824524d13cdf04f73cf8b4f244ce86c96b4d2a83a6ca1a753d2752" +checksum = "585c173ce474b6257cfb2a107949e48eb1ab9cae21cecbdf13401ae3be4a411a" dependencies = [ "cfg-expr", "guppy-workspace-hack", "serde", "target-lexicon", - "unicode-ident", ] +[[package]] +name = "target-triple" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "591ef38edfb78ca4771ee32cf494cb8771944bee237a9b91fc9c1424ac4b777b" + [[package]] name = "task-local-extensions" version = "0.1.4" @@ -15092,22 +15797,22 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.9.0" +version = "3.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" dependencies = [ - "cfg-if", - "fastrand 2.0.1", - "redox_syscall 0.4.1", - "rustix 0.38.28", - "windows-sys 0.52.0", + "fastrand 2.3.0", + "getrandom 0.4.1", + "once_cell", + "rustix 1.1.3", + "windows-sys 0.61.2", ] [[package]] name = "tera" -version = "1.19.1" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970dff17c11e884a4a09bc76e3a17ef71e01bb13447a11e85226e254fe6d10b8" +checksum = "e8004bca281f2d32df3bacd59bc67b312cb4c70cea46cbd79dbe8ac5ed206722" dependencies = [ "chrono", "chrono-tz", @@ -15122,7 +15827,17 @@ dependencies = [ "serde", "serde_json", "slug", - "unic-segment", + "unicode-segmentation", +] + +[[package]] +name = "term" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1" +dependencies = [ + "kernel32-sys", + "winapi 0.2.8", ] [[package]] @@ -15136,6 +15851,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "term-painter" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcaa948f0e3e38470cd8dc8dcfe561a75c9e43f28075bb183845be2b9b3c08cf" +dependencies = [ + "term 0.4.6", +] + [[package]] name = "termcolor" version = "1.1.3" @@ -15147,9 +15871,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "test-case" @@ -15169,7 +15893,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -15180,7 +15904,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", "test-case-core", ] @@ -15188,9 +15912,9 @@ dependencies = [ name = "test-generation" version = "0.1.0" dependencies = [ - "clap 4.4.14", + "clap 4.5.58", "crossbeam-channel", - "getrandom 0.2.11", + "getrandom 0.2.17", "hex", "itertools 0.12.1", "module-generation", @@ -15214,7 +15938,7 @@ name = "testdiff" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.14", + "clap 4.5.58", "once_cell", "regex", "walkdir", @@ -15226,7 +15950,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width 0.1.11", + "unicode-width 0.1.14", ] [[package]] @@ -15236,7 +15960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd05616119e612a8041ef58f2b578906cc2531a6069047ae092cfb86a325d835" dependencies = [ "smawk", - "unicode-width 0.1.11", + "unicode-width 0.1.14", ] [[package]] @@ -15247,43 +15971,62 @@ checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" dependencies = [ "smawk", "unicode-linebreak", - "unicode-width 0.1.11", + "unicode-width 0.1.14", ] [[package]] name = "textwrap" -version = "0.16.0" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" + +[[package]] +name = "thiserror" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] [[package]] name = "thiserror" -version = "1.0.61" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.114", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -15297,9 +16040,9 @@ dependencies = [ [[package]] name = "tiff" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" dependencies = [ "flate2", "jpeg-decoder", @@ -15308,32 +16051,34 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", "libc", + "num-conv", "num_threads", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ + "num-conv", "time-core", ] @@ -15350,7 +16095,7 @@ dependencies = [ "rand 0.7.3", "rustc-hash", "sha2 0.9.9", - "thiserror", + "thiserror 1.0.69", "unicode-normalization", "wasm-bindgen", "zeroize", @@ -15365,6 +16110,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -15377,9 +16132,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -15392,29 +16147,27 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" dependencies = [ - "backtrace", "bytes", "libc", - "mio", - "num_cpus", - "parking_lot 0.12.1", + "mio 1.1.1", + "parking_lot 0.12.5", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2 0.6.2", "tokio-macros", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-io-timeout" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +checksum = "0bd86198d9ee903fedd2f9a2e72014287c0d9167e4ae43b5853007205dda1b76" dependencies = [ "pin-project-lite", "tokio", @@ -15422,13 +16175,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] @@ -15443,9 +16196,9 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.10" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" +checksum = "dcea47c8f71744367793f16c2db1f11cb859d28f436bdb4ca9193eb1f787ee42" dependencies = [ "async-trait", "byteorder", @@ -15454,17 +16207,17 @@ dependencies = [ "futures-channel", "futures-util", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.5", "percent-encoding", - "phf", + "phf 0.13.1", "pin-project-lite", "postgres-protocol", "postgres-types", - "rand 0.8.5", - "socket2 0.5.5", + "rand 0.9.2", + "socket2 0.6.2", "tokio", - "tokio-util 0.7.10", - "whoami", + "tokio-util 0.7.18", + "whoami 2.1.1", ] [[package]] @@ -15495,21 +16248,31 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.23.7", + "rustls 0.22.4", "rustls-pki-types", "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls 0.23.36", + "tokio", +] + [[package]] name = "tokio-scoped" version = "0.2.0" @@ -15522,9 +16285,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ "futures-core", "pin-project-lite", @@ -15533,12 +16296,10 @@ dependencies = [ [[package]] name = "tokio-test" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b3cbabd3ae862100094ae433e1def582cf86451b4e9bf83aa7ac1d8a7d719" +checksum = "3f6d24790a10a7af737693a3e8f1d03faef7e6ca0cc99aae5066f533766de545" dependencies = [ - "async-stream", - "bytes", "futures-core", "tokio", "tokio-stream", @@ -15546,9 +16307,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", @@ -15572,9 +16333,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -15582,7 +16343,15 @@ dependencies = [ "futures-sink", "pin-project-lite", "tokio", - "tracing", +] + +[[package]] +name = "toml" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" +dependencies = [ + "serde", ] [[package]] @@ -15602,11 +16371,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", - "serde_spanned", - "toml_datetime", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", "toml_edit 0.19.15", ] +[[package]] +name = "toml" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap 2.13.0", + "serde_core", + "serde_spanned 1.0.4", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.14", +] + [[package]] name = "toml_datetime" version = "0.6.3" @@ -15616,17 +16400,26 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + [[package]] name = "toml_edit" version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.13.0", "serde", - "serde_spanned", - "toml_datetime", - "winnow", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "winnow 0.5.40", ] [[package]] @@ -15635,11 +16428,38 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.2.5", - "toml_datetime", - "winnow", + "indexmap 2.13.0", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.23.10+spec-1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +dependencies = [ + "indexmap 2.13.0", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "winnow 0.7.14", +] + +[[package]] +name = "toml_parser" +version = "1.0.7+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "247eaa3197818b831697600aadf81514e577e0cba5eab10f7e064e78ae154df1" +dependencies = [ + "winnow 0.7.14", ] +[[package]] +name = "toml_writer" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" + [[package]] name = "tonic" version = "0.11.0" @@ -15652,19 +16472,19 @@ dependencies = [ "bytes", "flate2", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-timeout", "percent-encoding", "pin-project", "prost", - "rustls-native-certs 0.7.0", - "rustls-pemfile 2.1.1", - "strum 0.26.2", + "rustls-native-certs 0.7.3", + "rustls-pemfile 2.2.0", + "strum 0.26.3", "strum_macros 0.26.4", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls 0.26.4", "tokio-stream", "tower", "tower-layer", @@ -15700,7 +16520,7 @@ dependencies = [ "rand 0.8.5", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "tower-layer", "tower-service", "tracing", @@ -15717,7 +16537,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", + "http 0.2.12", "http-body", "http-range-header", "pin-project-lite", @@ -15736,7 +16556,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", + "http 0.2.12", "http-body", "http-range-header", "pin-project-lite", @@ -15747,21 +16567,21 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", @@ -15771,20 +16591,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -15813,9 +16633,9 @@ dependencies = [ [[package]] name = "tracing-serde" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" dependencies = [ "serde", "tracing-core", @@ -15823,14 +16643,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "matchers", - "nu-ansi-term 0.46.0", + "nu-ansi-term 0.50.3", "once_cell", - "regex", + "regex-automata", "serde", "serde_json", "sharded-slab", @@ -15874,9 +16694,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.11" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +checksum = "dd69c5aa8f924c7519d6372789a74eac5b94fb0f8fcf0d4a97eb0bfc3e785f39" dependencies = [ "serde", "stable_deref_trait", @@ -15890,17 +16710,17 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trybuild" -version = "1.0.88" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76de4f783e610194f6c98bfd53f9fc52bb2e0d02c947621e8a0f4ecc799b2880" +checksum = "5f614c21bd3a61bad9501d75cbb7686f00386c806d7f456778432c25cf86948a" dependencies = [ - "basic-toml", "glob", - "once_cell", "serde", "serde_derive", "serde_json", + "target-triple", "termcolor", + "toml 0.9.12+spec-1.1.0", ] [[package]] @@ -15913,24 +16733,24 @@ dependencies = [ "cassowary", "crossterm 0.25.0", "unicode-segmentation", - "unicode-width 0.1.11", + "unicode-width 0.1.14", ] [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.4.0", "httparse", "log", "rand 0.8.5", "sha1", - "thiserror", + "thiserror 1.0.69", "url", "utf-8", ] @@ -15943,15 +16763,15 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" [[package]] name = "typenum" -version = "1.17.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "typeshare" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44d1a2f454cb35fbe05b218c410792697e76bd868f48d3a418f2cd1a7d527d6" +checksum = "da1bf9fe204f358ffea7f8f779b53923a20278b3ab8e8d97962c5e1b3a54edb7" dependencies = [ "chrono", "serde", @@ -15961,12 +16781,12 @@ dependencies = [ [[package]] name = "typeshare-annotation" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc670d0e358428857cc3b4bf504c691e572fccaec9542ff09212d3f13d74b7a9" +checksum = "621963e302416b389a1ec177397e9e62de849a78bd8205d428608553def75350" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.114", ] [[package]] @@ -15992,18 +16812,18 @@ dependencies = [ [[package]] name = "tzdb_data" -version = "0.1.1" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629555d2921f3f0dc0de98699415a8b2b61dfcd3a0b082a327f7ed748bbb2b76" +checksum = "310d19de36af75a78ec83fdb325bf4e3a13ab0ab77b7b1a13fabbd059e9b525b" dependencies = [ "tz-rs", ] [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "uint" @@ -16025,83 +16845,30 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "uncased" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b9bc53168a4be7402ab86c3aad243a84dd7381d09be0eddc81280c1da95ca68" +checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" dependencies = [ "version_check", ] -[[package]] -name = "unic-char-property" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" -dependencies = [ - "unic-char-range", -] - -[[package]] -name = "unic-char-range" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" - -[[package]] -name = "unic-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" - -[[package]] -name = "unic-segment" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" -dependencies = [ - "unic-ucd-segment", -] - -[[package]] -name = "unic-ucd-segment" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" -dependencies = [ - "unic-char-property", - "unic-char-range", - "unic-ucd-version", -] - -[[package]] -name = "unic-ucd-version" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" -dependencies = [ - "unic-common", -] - [[package]] name = "unicase" -version = "2.7.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" [[package]] name = "unicode-linebreak" @@ -16111,36 +16878,42 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" + [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "universal-hash" @@ -16154,9 +16927,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "untrusted" @@ -16189,14 +16962,15 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna 1.1.0", "percent-encoding", "serde", + "serde_derive", ] [[package]] @@ -16207,17 +16981,17 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utcnow" -version = "0.2.4" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10d49a98e3bbd9b73084a7b15f96c5b2136d5a2e2799b99d19a2774d8519d1f" +checksum = "c3d1b903f7711bad0f9c1716c1497bf3db4289c53a2985ba42ac2f2e04047bd9" dependencies = [ - "autocfg", "const_fn", "errno", "js-sys", "libc", - "rustix 0.38.28", - "wasi 0.11.0+wasi-snapshot-preview1", + "rustix 0.38.44", + "rustversion", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", "winapi 0.3.9", ] @@ -16228,42 +17002,51 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.6.1" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ - "getrandom 0.2.11", - "serde", + "getrandom 0.3.4", + "js-sys", + "serde_core", + "wasm-bindgen", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "value-bag" -version = "1.5.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd65ff0de3304a013e6dfeb7324e1cd389a8a000e582e3c9c9fae82ced778e26" +checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0" [[package]] name = "variant_count" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae2faf80ac463422992abf4de234731279c058aaf33171ca70277c98406b124" +checksum = "a1935e10c6f04d22688d07c0790f2fc0e1b1c5c2c55bc0cc87ed67656e587dd8" dependencies = [ + "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.114", ] [[package]] @@ -16286,30 +17069,30 @@ checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ "libc", ] [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -16326,15 +17109,15 @@ dependencies = [ [[package]] name = "warp" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e92e22e03ff1230c03a1a8ee37d2f89cd489e2e541b7550d6afad96faed169" +checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" dependencies = [ "bytes", "futures-channel", "futures-util", "headers", - "http", + "http 0.2.12", "hyper", "log", "mime", @@ -16342,16 +17125,15 @@ dependencies = [ "multer", "percent-encoding", "pin-project", - "rustls-pemfile 1.0.4", + "rustls-pemfile 2.2.0", "scoped-tls", "serde", "serde_json", "serde_urlencoded", "tokio", - "tokio-rustls 0.24.1", - "tokio-stream", + "tokio-rustls 0.25.0", "tokio-tungstenite", - "tokio-util 0.7.10", + "tokio-util 0.7.18", "tower-service", "tracing", ] @@ -16365,7 +17147,7 @@ dependencies = [ "hyper", "once_cell", "reqwest", - "thiserror", + "thiserror 1.0.69", "unicase", "warp", ] @@ -16378,58 +17160,84 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasite" -version = "0.1.0" +name = "wasi" +version = "0.14.7+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasite" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] -name = "wasm-bindgen" -version = "0.2.89" +name = "wasite" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "66fe902b4a6b8028a753d5424909b764ccf79b7a209eac9bf97e59cda9f71a42" dependencies = [ - "cfg-if", - "wasm-bindgen-macro", + "wasi 0.14.7+wasi-0.2.4", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.89" +name = "wasm-bindgen" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ - "bumpalo", - "log", + "cfg-if", "once_cell", - "proc-macro2", - "quote", - "syn 2.0.48", + "rustversion", + "wasm-bindgen-macro", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -16437,28 +17245,53 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.48", - "wasm-bindgen-backend", + "syn 2.0.114", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap 2.13.0", + "wasm-encoder", + "wasmparser", +] [[package]] name = "wasm-streams" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -16482,11 +17315,23 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.10.0", + "hashbrown 0.15.5", + "indexmap 2.13.0", + "semver 1.0.27", +] + [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -16508,21 +17353,21 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.7", + "ring 0.17.14", "untrusted 0.9.0", ] [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "which" @@ -16533,25 +17378,38 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.28", + "rustix 0.38.44", ] [[package]] name = "whoami" -version = "1.5.0" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" +dependencies = [ + "libredox", + "wasite 0.1.0", + "web-sys", +] + +[[package]] +name = "whoami" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fec781d48b41f8163426ed18e8fc2864c12937df9ce54c88ede7bd47270893e" +checksum = "d6a5b12f9df4f978d2cfdb1bd3bac52433f44393342d7ee9c25f5a1c14c0f45d" dependencies = [ - "redox_syscall 0.4.1", - "wasite", + "libc", + "libredox", + "objc2-system-configuration", + "wasite 1.0.2", "web-sys", ] [[package]] name = "wide" -version = "0.7.13" +version = "0.7.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" +checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" dependencies = [ "bytemuck", "safe_arch", @@ -16565,9 +17423,9 @@ checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" [[package]] name = "wildmatch" -version = "2.3.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495ec47bf3c1345005f40724f0269362c8556cbc43aed0526ed44cae1d35fceb" +checksum = "29333c3ea1ba8b17211763463ff24ee84e41c78224c16b001cd907e663a38c68" [[package]] name = "winapi" @@ -16585,6 +17443,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -16593,11 +17457,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "winapi 0.3.9", + "windows-sys 0.61.2", ] [[package]] @@ -16608,11 +17472,61 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.52.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-targets 0.52.0", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", ] [[package]] @@ -16639,7 +17553,34 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", ] [[package]] @@ -16674,17 +17615,35 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -16701,9 +17660,15 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" @@ -16719,9 +17684,15 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" @@ -16737,9 +17708,27 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" @@ -16755,9 +17744,15 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" @@ -16773,9 +17768,15 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" @@ -16791,9 +17792,15 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" @@ -16809,15 +17816,30 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.5.33" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7520bbdec7211caa7c4e682eb1fbe07abe20cee6756b6e00f537c82c11816aa" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] @@ -16832,6 +17854,100 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap 2.13.0", + "prettyplease", + "syn 2.0.114", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.114", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.10.0", + "indexmap 2.13.0", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.13.0", + "log", + "semver 1.0.27", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + [[package]] name = "wyz" version = "0.2.0" @@ -16859,13 +17975,12 @@ dependencies = [ [[package]] name = "xattr" -version = "1.2.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914566e6413e7fa959cc394fb30e563ba80f3541fbd40816d4c05a0fc3f2a0f1" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" dependencies = [ "libc", - "linux-raw-sys 0.4.12", - "rustix 0.38.28", + "rustix 1.1.3", ] [[package]] @@ -16879,15 +17994,32 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] -name = "yansi" -version = "1.0.0-rc.1" +name = "yoke" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", + "synstructure 0.13.2", +] [[package]] name = "yup-oauth2" @@ -16897,9 +18029,9 @@ checksum = "b61da40aeb0907a65f7fb5c1de83c5a224d6a9ebb83bf918588a2bb744d636b8" dependencies = [ "anyhow", "async-trait", - "base64 0.21.6", + "base64 0.21.7", "futures", - "http", + "http 0.2.12", "hyper", "hyper-rustls 0.24.2", "itertools 0.12.1", @@ -16924,47 +18056,101 @@ checksum = "57b52f3d4b300ffa9400cd78caebaaa6ef5a0189d08ec134624e2b8f3890b6e0" dependencies = [ "smt2parser", "structopt", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.8.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.8.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", + "synstructure 0.13.2", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.114", +] + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", ] [[package]] @@ -16982,37 +18168,49 @@ dependencies = [ [[package]] name = "zipsign-api" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413a546ada9dbcd0b9a3e0b0880581279e35047bce9797e523b3408e1df607c" +checksum = "dba6063ff82cdbd9a765add16d369abe81e520f836054e997c2db217ceca40c0" dependencies = [ - "ed25519-dalek 2.1.1", - "thiserror", + "ed25519-dalek 2.2.0", + "thiserror 2.0.18", ] +[[package]] +name = "zlib-rs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7948af682ccbc3342b6e9420e8c51c1fe5d7bf7756002b4a3c6cabfe96a7e3c" + +[[package]] +name = "zmij" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7" + [[package]] name = "zstd" -version = "0.13.0" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.0.0" +version = "7.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.16+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index c40673ebf1082..c2035b94637e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -536,6 +536,7 @@ criterion-cpu-time = "0.1.0" crossbeam = "0.8.1" crossbeam-channel = "0.5.4" crossterm = "0.26.1" +crypto = { git = "ssh://git@github.com/Entropy-Foundation/crypto", rev = "8fa2ea498c1cdef637aff135ce77852d77fcc487" } csv = "1.2.1" curve25519-dalek = "3" curve25519-dalek-ng = "4" @@ -741,7 +742,7 @@ shell-words = "1.0.0" siphasher = "0.3.10" serde = { version = "1.0.193", features = ["derive", "rc"] } serde-big-array = "0.5.1" -serde_bytes = "0.11.6" +serde_bytes = "0.11.19" serde_json = { version = "1.0.81", features = [ "preserve_order", "arbitrary_precision", diff --git a/api/src/tests/multisig_transactions_test.rs b/api/src/tests/multisig_transactions_test.rs index a01ccf1c9f547..43dcb4aa4534b 100644 --- a/api/src/tests/multisig_transactions_test.rs +++ b/api/src/tests/multisig_transactions_test.rs @@ -98,16 +98,12 @@ async fn test_multisig_transaction_to_update_owners() { // There should be 4 owners now. assert_multisig_tx_executed(&mut context, multisig_account, add_owners_payload, 1).await; - assert_owners( - &context, - multisig_account, - vec![ - owner_account_1.address(), - owner_account_2.address(), - owner_account_3.address(), - owner_account_4.address(), - ], - ) + assert_owners(&context, multisig_account, vec![ + owner_account_1.address(), + owner_account_2.address(), + owner_account_3.address(), + owner_account_4.address(), + ]) .await; let remove_owners_payload = bcs::to_bytes(&MultisigTransactionPayload::EntryFunction( @@ -136,15 +132,11 @@ async fn test_multisig_transaction_to_update_owners() { .await; // There should be 3 owners now that owner 4 has been kicked out. assert_multisig_tx_executed(&mut context, multisig_account, remove_owners_payload, 2).await; - assert_owners( - &context, - multisig_account, - vec![ - owner_account_1.address(), - owner_account_2.address(), - owner_account_3.address(), - ], - ) + assert_owners(&context, multisig_account, vec![ + owner_account_1.address(), + owner_account_2.address(), + owner_account_3.address(), + ]) .await; } diff --git a/api/src/transactions.rs b/api/src/transactions.rs index b2e647ada3251..ee7a7768d9945 100644 --- a/api/src/transactions.rs +++ b/api/src/transactions.rs @@ -1080,8 +1080,7 @@ impl TransactionsApi { ledger_info, params.automated_function(), )?; - - } + }, } } }, @@ -1418,7 +1417,7 @@ impl TransactionsApi { auto_payload.module_id(), &auto_payload.function().into(), ) - } + }, } } else { "Multisig::unknown".to_string() diff --git a/api/test-context/move/Move.toml b/api/test-context/move/Move.toml index bb81e10e4a519..e9934c35cdfc9 100644 --- a/api/test-context/move/Move.toml +++ b/api/test-context/move/Move.toml @@ -3,7 +3,7 @@ name = "TransactationTests" version = "0.0.0" [addresses] -entry_func_failed= "0x1" +entry_func_failed = "0x1" [dependencies] AptosFramework = { local = "../../../aptos-move/framework/aptos-framework" } diff --git a/api/types/src/convert.rs b/api/types/src/convert.rs index 6d19271536028..2675a19bcb41c 100644 --- a/api/types/src/convert.rs +++ b/api/types/src/convert.rs @@ -3,14 +3,13 @@ // Parts of the project are originally copyright © Meta Platforms, Inc. // SPDX-License-Identifier: Apache-2.0 -use crate::transaction::{ - AutomationRegistrationParams, AutomationRegistrationParamsV1, AutomationRegistrationParamsV2, -}; use crate::{ transaction::{ - BlockEpilogueTransaction, DecodedTableData, DeleteModule, DeleteResource, DeleteTableItem, - DeletedTableData, MultisigPayload, MultisigTransactionPayload, StateCheckpointTransaction, - UserTransactionRequestInner, WriteModule, WriteResource, WriteTableItem, + AutomationRegistrationParams, AutomationRegistrationParamsV1, + AutomationRegistrationParamsV2, BlockEpilogueTransaction, DecodedTableData, DeleteModule, + DeleteResource, DeleteTableItem, DeletedTableData, MultisigPayload, + MultisigTransactionPayload, StateCheckpointTransaction, UserTransactionRequestInner, + WriteModule, WriteResource, WriteTableItem, }, view::{ViewFunction, ViewRequest}, Address, Bytecode, DirectWriteSet, EntryFunctionId, EntryFunctionPayload, Event, @@ -25,10 +24,6 @@ use aptos_crypto::{hash::CryptoHash, HashValue}; use aptos_logger::{sample, sample::SampleRate}; use aptos_resource_viewer::AptosValueAnnotator; use aptos_storage_interface::DbReader; -use aptos_types::transaction::automation::RegistrationParams; -use aptos_types::transaction::Transaction::{ - AutomationRegistryTransaction, SystemAutomatedTransaction, -}; use aptos_types::{ access_path::{AccessPath, Path}, chain_id::ChainId, @@ -40,8 +35,11 @@ use aptos_types::{ StateView, }, transaction::{ + automation::RegistrationParams, BlockEndInfo, BlockEpiloguePayload, EntryFunction, ExecutionStatus, Multisig, - RawTransaction, Script, SignedTransaction, TransactionAuxiliaryData, + RawTransaction, Script, SignedTransaction, + Transaction::{AutomationRegistryTransaction, SystemAutomatedTransaction}, + TransactionAuxiliaryData, }, vm_status::AbortLocation, write_set::WriteOp, diff --git a/api/types/src/transaction.rs b/api/types/src/transaction.rs index 69481e060cbb9..f9b7eb205a5c8 100755 --- a/api/types/src/transaction.rs +++ b/api/types/src/transaction.rs @@ -19,10 +19,11 @@ use aptos_crypto::{ use aptos_types::{ account_address::AccountAddress, aggregate_signature::AggregateSignature, + aptos_dkg::{DKGTranscript, DKGTranscriptMetadata}, block_metadata::BlockMetadata, block_metadata_ext::BlockMetadataExt, contract_event::{ContractEvent, EventWithVersion}, - dkg::{DKGTranscript, DKGTranscriptMetadata}, + dkg::transactions::DKGTransactionData, jwks::{jwk::JWK, ProviderJWKs, QuorumCertifiedUpdate}, keyless, transaction::{ @@ -683,6 +684,7 @@ pub struct BlockMetadataTransaction { )] pub enum ValidatorTransaction { ObservedJwkUpdate(JWKUpdateTransaction), + Dkg(DKGTransaction), DkgResult(DKGResultTransaction), } @@ -693,6 +695,7 @@ impl ValidatorTransaction { "validator_transaction__observed_jwk_update" }, ValidatorTransaction::DkgResult(_) => "validator_transaction__dkg_result", + ValidatorTransaction::Dkg(_) => "validator_transaction__dkg", } } @@ -700,6 +703,7 @@ impl ValidatorTransaction { match self { ValidatorTransaction::ObservedJwkUpdate(t) => &t.info, ValidatorTransaction::DkgResult(t) => &t.info, + ValidatorTransaction::Dkg(t) => &t.info, } } @@ -707,6 +711,7 @@ impl ValidatorTransaction { match self { ValidatorTransaction::ObservedJwkUpdate(t) => &mut t.info, ValidatorTransaction::DkgResult(t) => &mut t.info, + ValidatorTransaction::Dkg(t) => &mut t.info, } } @@ -714,6 +719,7 @@ impl ValidatorTransaction { match self { ValidatorTransaction::ObservedJwkUpdate(t) => t.timestamp, ValidatorTransaction::DkgResult(t) => t.timestamp, + ValidatorTransaction::Dkg(t) => t.timestamp, } } @@ -721,6 +727,7 @@ impl ValidatorTransaction { match self { ValidatorTransaction::ObservedJwkUpdate(t) => &t.events, ValidatorTransaction::DkgResult(t) => &t.events, + ValidatorTransaction::Dkg(t) => &t.events, } } } @@ -742,6 +749,14 @@ impl ), ) -> Self { match txn { + aptos_types::validator_txn::ValidatorTransaction::DKG(dkg_transaction_data) => { + Self::Dkg(DKGTransaction { + info, + events, + timestamp: U64::from(timestamp), + dkg_transaction_data: dkg_transaction_data.into(), + }) + }, aptos_types::validator_txn::ValidatorTransaction::DKGResult(dkg_transcript) => { Self::DkgResult(DKGResultTransaction { info, @@ -841,17 +856,17 @@ pub struct DKGResultTransaction { pub info: TransactionInfo, pub events: Vec, pub timestamp: U64, - pub dkg_transcript: ExportedDKGTranscript, + pub dkg_transcript: ExportedDKGResultTranscript, } #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Object)] -pub struct ExportedDKGTranscript { +pub struct ExportedDKGResultTranscript { pub epoch: U64, pub author: Address, pub payload: HexEncodedBytes, } -impl From for ExportedDKGTranscript { +impl From for ExportedDKGResultTranscript { fn from(value: DKGTranscript) -> Self { let DKGTranscript { metadata, @@ -866,6 +881,53 @@ impl From for ExportedDKGTranscript { } } +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Object)] +pub struct ExportedDKGTransactionData { + /// The epoch number for the dkg + pub epoch: U64, + /// The author of the dkg transaction + pub author: Address, + /// The bls multi signature of the clan committee certifying the payload of the transaction + pub bls_aggregate_signature: Vec, + /// indices of the clan committee nodes that signed the bls multisignature + pub signer_indices_clan_committee: Vec, + /// type of the dkg transaction: (DKGMeta = 0), (PublicKeyShares = 1) + pub transaction_type: u8, + /// raw serialized payload of the transaction + pub payload: HexEncodedBytes, +} + +impl From for ExportedDKGTransactionData { + fn from(value: DKGTransactionData) -> Self { + let epoch = *value.metadata().epoch(); + let author = *value.metadata().author(); + let bls_aggregate_signature = value.metadata().bls_aggregate_signature().clone(); + let signer_indices_clan_committee = + value.metadata().signer_indices_clan_committee().clone(); + let transaction_type = value.metadata().transaction_type().clone(); + let transcript_bytes = value.data_bytes().clone(); + + Self { + epoch: epoch.into(), + author: author.into(), + bls_aggregate_signature: bls_aggregate_signature.into(), + signer_indices_clan_committee: signer_indices_clan_committee.into(), + payload: HexEncodedBytes::from(transcript_bytes), + transaction_type: transaction_type as u8, + } + } +} + +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Object)] +pub struct DKGTransaction { + #[serde(flatten)] + #[oai(flatten)] + info: TransactionInfo, + events: Vec, + timestamp: U64, + pub dkg_transaction_data: ExportedDKGTransactionData, +} + /// An event from a transaction #[derive(Clone, Debug, Deserialize, Eq, Object, PartialEq, Serialize)] pub struct Event { @@ -1090,6 +1152,7 @@ impl AutomationRegistrationParams { }; Some(params_v1) } + pub fn into_v2(self) -> Option { let AutomationRegistrationParams::V2(params_v2) = self else { return None; diff --git a/aptos-move/aptos-debugger/src/execute_pending_block.rs b/aptos-move/aptos-debugger/src/execute_pending_block.rs index 8611f2978dd75..767caea0a96f0 100644 --- a/aptos-move/aptos-debugger/src/execute_pending_block.rs +++ b/aptos-move/aptos-debugger/src/execute_pending_block.rs @@ -73,13 +73,13 @@ impl Command { // "Getting block {:?} from {consensus_db_path:?}.", // self.block_id // ); - // let cmd = aptos_consensus::util::db_tool::Command { - // db_dir: consensus_db_path, - // block_id: self.block_id, - // }; - // cmd.dump_pending_txns()? + // let cmd = aptos_consensus::util::db_tool::Command { + // db_dir: consensus_db_path, + // block_id: self.block_id, + // }; + // cmd.dump_pending_txns()? // } - else { + else { unreachable!("Must provide one target."); }; diff --git a/aptos-move/aptos-e2e-comparison-testing/Cargo.toml b/aptos-move/aptos-e2e-comparison-testing/Cargo.toml index e28cf89d1a5d4..6f2738929ac70 100644 --- a/aptos-move/aptos-e2e-comparison-testing/Cargo.toml +++ b/aptos-move/aptos-e2e-comparison-testing/Cargo.toml @@ -31,4 +31,3 @@ serde = { workspace = true } tempfile = { workspace = true } tokio = { workspace = true } url = { workspace = true } - diff --git a/aptos-move/aptos-gas-algebra/src/algebra.rs b/aptos-move/aptos-gas-algebra/src/algebra.rs index 2a317eb79ecb4..3a27496c0c477 100644 --- a/aptos-move/aptos-gas-algebra/src/algebra.rs +++ b/aptos-move/aptos-gas-algebra/src/algebra.rs @@ -20,7 +20,7 @@ pub type AbstractValueSizePerArg = GasQuantity>; pub enum GasUnit {} /// Unit of the Aptos network's native coin. -pub enum SUPRA {} +pub enum SUPRA {} /// Alternative unit of the Aptos network's native coin. 1 quant = 10^-8 Supra coins. pub enum Quant {} diff --git a/aptos-move/aptos-gas-profiling/src/erased.rs b/aptos-move/aptos-gas-profiling/src/erased.rs index 7fbf230d7f9e4..e32c810e2e71f 100644 --- a/aptos-move/aptos-gas-profiling/src/erased.rs +++ b/aptos-move/aptos-gas-profiling/src/erased.rs @@ -296,7 +296,11 @@ impl StorageFees { TypeErasedStorageFees { total: self.total, - tree: Node::new_with_children("storage fees (SUPRA)", (Fee::zero(), Fee::zero()), nodes), + tree: Node::new_with_children( + "storage fees (SUPRA)", + (Fee::zero(), Fee::zero()), + nodes, + ), } } } diff --git a/aptos-move/aptos-gas-schedule/src/gas_schedule/aptos_framework.rs b/aptos-move/aptos-gas-schedule/src/gas_schedule/aptos_framework.rs index 44e9352546cdb..80de653e89da1 100644 --- a/aptos-move/aptos-gas-schedule/src/gas_schedule/aptos_framework.rs +++ b/aptos-move/aptos-gas-schedule/src/gas_schedule/aptos_framework.rs @@ -7,7 +7,9 @@ use crate::{ gas_feature_versions::{RELEASE_V1_14, RELEASE_V1_8, RELEASE_V1_9_SKIPPED}, gas_schedule::NativeGasParameters, - ver::gas_feature_versions::{RELEASE_V1_12, RELEASE_V1_13, RELEASE_V1_16_SUPRA_V1_6_0, RELEASE_V1_16_SUPRA_V1_7_14}, + ver::gas_feature_versions::{ + RELEASE_V1_12, RELEASE_V1_13, RELEASE_V1_16_SUPRA_V1_6_0, RELEASE_V1_16_SUPRA_V1_7_14, + }, }; use aptos_gas_algebra::{ InternalGas, InternalGasPerAbstractValueUnit, InternalGasPerArg, InternalGasPerByte, diff --git a/aptos-move/aptos-gas-schedule/src/gas_schedule/mod.rs b/aptos-move/aptos-gas-schedule/src/gas_schedule/mod.rs index e38b7e0878e39..d5a69f786b312 100644 --- a/aptos-move/aptos-gas-schedule/src/gas_schedule/mod.rs +++ b/aptos-move/aptos-gas-schedule/src/gas_schedule/mod.rs @@ -9,6 +9,7 @@ mod instr; mod macros; mod misc; mod move_stdlib; +mod supra_stdlib; mod table; mod transaction; @@ -16,6 +17,7 @@ pub use aptos_framework::AptosFrameworkGasParameters; pub use instr::InstructionGasParameters; pub use misc::{AbstractValueSizeGasParameters, MiscGasParameters}; pub use move_stdlib::MoveStdlibGasParameters; +pub use supra_stdlib::SupraStdlibGasParameters; pub use table::TableGasParameters; pub use transaction::TransactionGasParameters; @@ -29,6 +31,7 @@ pub mod gas_params { use super::*; pub use aptos_framework::gas_params as aptos_framework; pub use move_stdlib::gas_params as move_stdlib; + pub use supra_stdlib::gas_params as supra_stdlib; pub use table::gas_params as table; } } @@ -140,6 +143,7 @@ impl InitialGasSchedule for VMGasParameters { #[derive(Debug, Clone)] pub struct NativeGasParameters { pub move_stdlib: MoveStdlibGasParameters, + pub supra_stdlib: SupraStdlibGasParameters, pub table: TableGasParameters, pub aptos_framework: AptosFrameworkGasParameters, } @@ -154,6 +158,10 @@ impl FromOnChainGasSchedule for NativeGasParameters { gas_schedule, feature_version, )?, + supra_stdlib: FromOnChainGasSchedule::from_on_chain_gas_schedule( + gas_schedule, + feature_version, + )?, table: FromOnChainGasSchedule::from_on_chain_gas_schedule( gas_schedule, feature_version, @@ -170,6 +178,7 @@ impl ToOnChainGasSchedule for NativeGasParameters { fn to_on_chain_gas_schedule(&self, feature_version: u64) -> Vec<(String, u64)> { let mut entries = self.move_stdlib.to_on_chain_gas_schedule(feature_version); entries.extend(self.table.to_on_chain_gas_schedule(feature_version)); + entries.extend(self.supra_stdlib.to_on_chain_gas_schedule(feature_version)); entries.extend( self.aptos_framework .to_on_chain_gas_schedule(feature_version), @@ -182,6 +191,7 @@ impl NativeGasParameters { pub fn zeros() -> Self { Self { move_stdlib: MoveStdlibGasParameters::zeros(), + supra_stdlib: SupraStdlibGasParameters::zeros(), table: TableGasParameters::zeros(), aptos_framework: AptosFrameworkGasParameters::zeros(), } @@ -192,6 +202,7 @@ impl InitialGasSchedule for NativeGasParameters { fn initial() -> Self { Self { move_stdlib: InitialGasSchedule::initial(), + supra_stdlib: InitialGasSchedule::initial(), table: InitialGasSchedule::initial(), aptos_framework: InitialGasSchedule::initial(), } diff --git a/aptos-move/aptos-gas-schedule/src/gas_schedule/supra_stdlib.rs b/aptos-move/aptos-gas-schedule/src/gas_schedule/supra_stdlib.rs new file mode 100644 index 0000000000000..2c1423e801d31 --- /dev/null +++ b/aptos-move/aptos-gas-schedule/src/gas_schedule/supra_stdlib.rs @@ -0,0 +1,21 @@ +// Copyright (c) 2025 Supra. + +//! This module defines the gas parameters for Supra Stdlib. + +use crate::{ + gas_schedule::NativeGasParameters, ver::gas_feature_versions::RELEASE_V1_16_SUPRA_V1_8_0, +}; +use aptos_gas_algebra::{InternalGas, InternalGasPerArg}; + +crate::gas_schedule::macros::define_gas_parameters!( + SupraStdlibGasParameters, + "supra_stdlib", + NativeGasParameters => .supra_stdlib, + [ + // Note(Gas): this initial value is guesswork. + [class_groups_per_pubkey_deserialize: InternalGasPerArg, { RELEASE_V1_16_SUPRA_V1_8_0.. => "class.groups.per_pubkey_deserialize" }, 400684], + // Note(Gas): this initial value is guesswork. + [class_groups_pop: InternalGas, { RELEASE_V1_16_SUPRA_V1_8_0.. => "class.groups.pop" }, 206000000], + + ] +); diff --git a/aptos-move/aptos-gas-schedule/src/ver.rs b/aptos-move/aptos-gas-schedule/src/ver.rs index b1c44ddeca24b..0aad7bc6e0246 100644 --- a/aptos-move/aptos-gas-schedule/src/ver.rs +++ b/aptos-move/aptos-gas-schedule/src/ver.rs @@ -73,7 +73,7 @@ /// global operations. /// - V1 /// - TBA -pub const LATEST_GAS_FEATURE_VERSION: u64 = gas_feature_versions::RELEASE_V1_16_SUPRA_V1_7_14; +pub const LATEST_GAS_FEATURE_VERSION: u64 = gas_feature_versions::RELEASE_V1_16_SUPRA_V1_8_0; pub mod gas_feature_versions { pub const RELEASE_V1_8: u64 = 11; @@ -89,4 +89,5 @@ pub mod gas_feature_versions { pub const RELEASE_V1_16_SUPRA_V1_5_1: u64 = 22; pub const RELEASE_V1_16_SUPRA_V1_6_0: u64 = 23; pub const RELEASE_V1_16_SUPRA_V1_7_14: u64 = 24; + pub const RELEASE_V1_16_SUPRA_V1_8_0: u64 = 25; } diff --git a/aptos-move/aptos-release-builder/Cargo.toml b/aptos-move/aptos-release-builder/Cargo.toml index a42cff88383d2..a3a361bcf3421 100644 --- a/aptos-move/aptos-release-builder/Cargo.toml +++ b/aptos-move/aptos-release-builder/Cargo.toml @@ -14,7 +14,7 @@ rust-version = { workspace = true } [dependencies] anyhow = { workspace = true } -aptos = { workspace = true, features = [ "no-upload-proposal" ] } +aptos = { workspace = true, features = ["no-upload-proposal"] } aptos-api-types = { workspace = true } aptos-build-info = { workspace = true } aptos-crypto = { workspace = true } 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 8cfc9b1a410f1..868ce2ec1a9a9 100644 --- a/aptos-move/aptos-release-builder/src/components/feature_flags.rs +++ b/aptos-move/aptos-release-builder/src/components/feature_flags.rs @@ -130,6 +130,9 @@ pub enum FeatureFlag { SupraRLPEncode, SupraDelegationPoolIdentity, SupraAutomationV2, + SupraBlsKeys, + SupraBcftCertificates, + SUPRA_DKG, } fn generate_features_blob(writer: &CodeWriter, data: &[u64]) { @@ -340,6 +343,9 @@ impl From for AptosFeatureFlag { AptosFeatureFlag::SUPRA_DELEGATION_POOL_IDENTITY }, FeatureFlag::SupraAutomationV2 => AptosFeatureFlag::SUPRA_AUTOMATION_V2, + FeatureFlag::SupraBlsKeys => AptosFeatureFlag::SUPRA_BLS_KEYS, + FeatureFlag::SupraBcftCertificates => AptosFeatureFlag::SUPRA_BCFT_CERTIFICATES, + FeatureFlag::SUPRA_DKG => AptosFeatureFlag::SUPRA_DKG, } } } @@ -479,6 +485,9 @@ impl From for FeatureFlag { FeatureFlag::SupraDelegationPoolIdentity }, AptosFeatureFlag::SUPRA_AUTOMATION_V2 => FeatureFlag::SupraAutomationV2, + AptosFeatureFlag::SUPRA_BLS_KEYS => FeatureFlag::SupraBlsKeys, + AptosFeatureFlag::SUPRA_BCFT_CERTIFICATES => FeatureFlag::SupraBcftCertificates, + AptosFeatureFlag::SUPRA_DKG => FeatureFlag::SUPRA_DKG, } } } diff --git a/aptos-move/aptos-release-builder/src/components/mod.rs b/aptos-move/aptos-release-builder/src/components/mod.rs index 378404cbb6227..f7eb27c7163e8 100644 --- a/aptos-move/aptos-release-builder/src/components/mod.rs +++ b/aptos-move/aptos-release-builder/src/components/mod.rs @@ -3,11 +3,12 @@ use self::framework::FrameworkReleaseConfig; use crate::{ - aptos_core_path, supra_framework_path, + aptos_core_path, components::{ feature_flags::Features, oidc_providers::OidcProviderOp, randomness_config::ReleaseFriendlyRandomnessConfig, }, + supra_framework_path, }; use anyhow::{anyhow, bail, Context, Result}; use aptos::governance::GenerateExecutionHash; diff --git a/aptos-move/aptos-release-builder/src/validate.rs b/aptos-move/aptos-release-builder/src/validate.rs index 6ef044e123e32..a3a51dcd8d36a 100644 --- a/aptos-move/aptos-release-builder/src/validate.rs +++ b/aptos-move/aptos-release-builder/src/validate.rs @@ -1,7 +1,7 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -use crate::{supra_framework_path, components::ProposalMetadata, ExecutionMode, ReleaseConfig}; +use crate::{components::ProposalMetadata, supra_framework_path, ExecutionMode, ReleaseConfig}; use anyhow::Result; use aptos::{ common::types::CliCommand, diff --git a/aptos-move/aptos-transaction-benchmarks/Cargo.toml b/aptos-move/aptos-transaction-benchmarks/Cargo.toml index 4bb90c07a41ae..546fce69899af 100644 --- a/aptos-move/aptos-transaction-benchmarks/Cargo.toml +++ b/aptos-move/aptos-transaction-benchmarks/Cargo.toml @@ -21,7 +21,7 @@ aptos-language-e2e-tests = { workspace = true } aptos-logger = { workspace = true } aptos-metrics-core = { workspace = true } aptos-node-resource-metrics = { workspace = true } -aptos-push-metrics = { workspace = true } +aptos-push-metrics = { workspace = true } aptos-types = { workspace = true } aptos-vm = { workspace = true } aptos-vm-logging = { workspace = true } diff --git a/aptos-move/aptos-validator-interface/src/rest_interface.rs b/aptos-move/aptos-validator-interface/src/rest_interface.rs index 87697d7f2a180..e8c7cebf38363 100644 --- a/aptos-move/aptos-validator-interface/src/rest_interface.rs +++ b/aptos-move/aptos-validator-interface/src/rest_interface.rs @@ -284,11 +284,12 @@ impl AptosValidatorInterface for RestDebuggerInterface { TransactionPayload::Multisig(multi_sig) if multi_sig.transaction_payload.is_some() => { - match multi_sig.transaction_payload.clone().unwrap() { - aptos_types::transaction::MultisigTransactionPayload::EntryFunction(e) => - Some(e.clone()), - _ => None, - } + match multi_sig.transaction_payload.clone().unwrap() { + aptos_types::transaction::MultisigTransactionPayload::EntryFunction(e) => { + Some(e.clone()) + }, + _ => None, + } }, TransactionPayload::EntryFunction(e) => Some(e.clone()), _ => None, diff --git a/aptos-move/aptos-vm-benchmarks/samples/do-nothing/Move.toml b/aptos-move/aptos-vm-benchmarks/samples/do-nothing/Move.toml index aedf01f521f95..f2d30f35457c6 100644 --- a/aptos-move/aptos-vm-benchmarks/samples/do-nothing/Move.toml +++ b/aptos-move/aptos-vm-benchmarks/samples/do-nothing/Move.toml @@ -3,4 +3,4 @@ name = 'do-nothing' version = '1.0.0' [dependencies] AptosFramework = { local = "../../../framework/aptos-framework" } -AptosStdlib = { local = "../../../framework/aptos-stdlib" } \ No newline at end of file +AptosStdlib = { local = "../../../framework/aptos-stdlib" } diff --git a/aptos-move/aptos-vm-profiling/Cargo.toml b/aptos-move/aptos-vm-profiling/Cargo.toml index 68bfadfcd39ea..fd466f4389777 100644 --- a/aptos-move/aptos-vm-profiling/Cargo.toml +++ b/aptos-move/aptos-vm-profiling/Cargo.toml @@ -35,7 +35,7 @@ move-vm-types = { workspace = true } [[bin]] name = "main" -path = "src/main.rs" +path = "src/main.rs" [[bin]] name = "run-move" diff --git a/aptos-move/aptos-vm/Cargo.toml b/aptos-move/aptos-vm/Cargo.toml index c2755c5530282..16ffdb366ae54 100644 --- a/aptos-move/aptos-vm/Cargo.toml +++ b/aptos-move/aptos-vm/Cargo.toml @@ -20,7 +20,7 @@ aptos-block-partitioner = { workspace = true } aptos-crypto = { workspace = true } aptos-crypto-derive = { workspace = true } aptos-experimental-runtimes = { workspace = true } -aptos-framework = { workspace = true } +aptos-framework = { workspace = true } aptos-gas-algebra = { workspace = true } aptos-gas-meter = { workspace = true } aptos-gas-schedule = { workspace = true } @@ -42,6 +42,7 @@ bcs = { workspace = true } bytes = { workspace = true } claims = { workspace = true } crossbeam-channel = { workspace = true } +crypto = { workspace = true } derive_more = { workspace = true } fail = { workspace = true } futures = { workspace = true } @@ -68,6 +69,12 @@ rand_core = { workspace = true } [features] default = [] -fuzzing = ["move-core-types/fuzzing", "move-binary-format/fuzzing", "move-vm-types/fuzzing", "aptos-framework/fuzzing", "aptos-types/fuzzing"] +fuzzing = [ + "move-core-types/fuzzing", + "move-binary-format/fuzzing", + "move-vm-types/fuzzing", + "aptos-framework/fuzzing", + "aptos-types/fuzzing", +] failpoints = ["fail/failpoints", "move-vm-runtime/failpoints"] testing = ["move-unit-test", "aptos-framework/testing"] diff --git a/aptos-move/aptos-vm/src/aptos_vm.rs b/aptos-move/aptos-vm/src/aptos_vm.rs index b861c82d6e952..3d0fcaca4f578 100644 --- a/aptos-move/aptos-vm/src/aptos_vm.rs +++ b/aptos-move/aptos-vm/src/aptos_vm.rs @@ -3,8 +3,8 @@ // Parts of the project are originally copyright © Meta Platforms, Inc. // SPDX-License-Identifier: Apache-2.0 -use crate::automated_transaction_processor::AutomatedTransactionProcessor; use crate::{ + automated_transaction_processor::AutomatedTransactionProcessor, block_executor::{AptosTransactionOutput, BlockAptosVM}, counters::*, data_cache::{AsMoveResolver, StorageAdapter}, @@ -27,7 +27,10 @@ use crate::{ }; use anyhow::anyhow; use aptos_block_executor::txn_commit_hook::NoOpTransactionCommitHook; -use aptos_crypto::HashValue; +use aptos_crypto::{ + bls12381::{PublicKey, Signature}, + HashValue, +}; use aptos_framework::{ natives::{code::PublishRequest, randomness::RandomnessContext}, RuntimeModuleMetadataV1, @@ -39,7 +42,6 @@ use aptos_logger::{enabled, prelude::*, Level}; use aptos_metrics_core::TimerHelper; #[cfg(any(test, feature = "testing"))] use aptos_types::state_store::StateViewId; -use aptos_types::transaction::automation::{AutomationTaskType, RegistrationParams}; use aptos_types::{ account_config::{self, new_block_event_key, AccountResource}, block_executor::{ @@ -49,16 +51,22 @@ use aptos_types::{ block_metadata::BlockMetadata, block_metadata_ext::{BlockMetadataExt, BlockMetadataWithRandomness}, chain_id::ChainId, + dkg::{ + state::DKGState, + transactions::{DKGTransactionData, DKGTransactionType}, + }, fee_statement::FeeStatement, move_utils::as_move_value::AsMoveValue, on_chain_config::{ - new_epoch_event_key, ApprovedExecutionHashes, ConfigStorage, FeatureFlag, Features, - OnChainConfig, TimedFeatureFlag, TimedFeatures, + new_epoch_event_key, ApprovedExecutionHashes, ConfigStorage, ConfigurationResource, + FeatureFlag, Features, OnChainConfig, TimedFeatureFlag, TimedFeatures, }, randomness::Randomness, state_store::{StateView, TStateView}, transaction::{ - authenticator::AnySignature, signature_verified_transaction::SignatureVerifiedTransaction, + authenticator::AnySignature, + automation::{AutomationTaskType, RegistrationParams}, + signature_verified_transaction::SignatureVerifiedTransaction, BlockOutput, EntryFunction, ExecutionError, ExecutionStatus, ModuleBundle, Multisig, MultisigTransactionPayload, Script, SignedTransaction, Transaction, TransactionAuxiliaryData, TransactionOutput, TransactionPayload, TransactionStatus, @@ -152,8 +160,10 @@ macro_rules! unwrap_or_discard { }; } -use crate::automation_registry_transaction_processor::AutomationRegistryTransactionProcessor; -use crate::gas::check_automation_task_gas; +use crate::{ + automation_registry_transaction_processor::AutomationRegistryTransactionProcessor, + gas::check_automation_task_gas, +}; pub(crate) use unwrap_or_discard; pub(crate) fn get_system_transaction_output( @@ -1013,8 +1023,11 @@ impl AptosVM { [(module_id.address(), module_id.name())], )?; } - let args = registration_params - .serialized_args_with_sender_and_parent_hash(sender, txn_metadata.txn_app_hash.clone(), self.features()); + let args = registration_params.serialized_args_with_sender_and_parent_hash( + sender, + txn_metadata.txn_app_hash.clone(), + self.features(), + ); session.execute_function_bypass_visibility( registration_params.module_id(), @@ -2345,11 +2358,17 @@ impl AptosVM { randomness .as_ref() .map(Randomness::randomness_cloned) + .unwrap_or_default() .as_move_value(), ]; let storage = TraversalStorage::new(); + session + .get_native_extensions() + .get_mut::() + .mark_unbiasable(); + session .execute_function_bypass_visibility( &BLOCK_MODULE, @@ -2693,14 +2712,14 @@ impl AptosVM { self.process_validator_transaction(resolver, txn.clone(), log_context)?; (vm_status, output) }, - Transaction::AutomatedTransaction(txn) => AutomatedTransactionProcessor::new( - self, AutomationTaskType::User, - ) - .execute_transaction(resolver, txn, log_context), - Transaction::SystemAutomatedTransaction(txn) => AutomatedTransactionProcessor::new( - self, AutomationTaskType::System, - ) - .execute_transaction(resolver, txn, log_context), + Transaction::AutomatedTransaction(txn) => { + AutomatedTransactionProcessor::new(self, AutomationTaskType::User) + .execute_transaction(resolver, txn, log_context) + }, + Transaction::SystemAutomatedTransaction(txn) => { + AutomatedTransactionProcessor::new(self, AutomationTaskType::System) + .execute_transaction(resolver, txn, log_context) + }, Transaction::AutomationRegistryTransaction(txn) => { AutomationRegistryTransactionProcessor::new(self).execute_transaction( resolver, @@ -2724,10 +2743,7 @@ impl AptosVM { } fn check_multisig_task_registration_support(&self) -> Result<(), VMStatus> { - if !self - .features() - .is_enabled(FeatureFlag::SUPRA_AUTOMATION_V2) - { + if !self.features().is_enabled(FeatureFlag::SUPRA_AUTOMATION_V2) { return Err(VMStatus::Error { status_code: StatusCode::FEATURE_UNDER_GATING, sub_status: None, @@ -2907,6 +2923,111 @@ impl VMValidator for AptosVM { result } + + fn validate_dkg_validator_transaction( + &self, + dkg_transaction: DKGTransactionData, + resolver: &impl AptosMoveResolver, + ) -> VMValidatorResult { + if !self.features().is_enabled(FeatureFlag::SUPRA_DKG) { + return VMValidatorResult::error(StatusCode::FEATURE_UNDER_GATING); + } + + let dkg_state = match OnChainConfig::fetch_config(resolver) { + Some(state) => state, + None => return VMValidatorResult::error(StatusCode::RESOURCE_DOES_NOT_EXIST), + }; + + let config_resource = match ConfigurationResource::fetch_config(resolver) { + Some(cfg) => cfg, + None => return VMValidatorResult::error(StatusCode::RESOURCE_DOES_NOT_EXIST), + }; + + let DKGState { in_progress, .. } = dkg_state; + let in_progress_session_state = match in_progress { + Some(session) => session, + None => return VMValidatorResult::error(StatusCode::DKG_SESSION_NOT_IN_PROGRESS), + }; + + // Check epoch number. + if *dkg_transaction.metadata().epoch() > config_resource.epoch() { + return VMValidatorResult::error(StatusCode::DKG_TRANSACTION_FUTURE_EPOCH_NUM); + } + if *dkg_transaction.metadata().epoch() < config_resource.epoch() { + return VMValidatorResult::error(StatusCode::DKG_TRANSACTION_PAST_EPOCH_NUM); + } + + match dkg_transaction.metadata().transaction_type() { + DKGTransactionType::DKGMeta => { + // dkg meta should not be already set + if in_progress_session_state.dkg_meta_transcript.len() != 0 { + return VMValidatorResult::error(StatusCode::DKG_META_ALREADY_SET); + } + }, + DKGTransactionType::PublicKeyShares => { + // for public shares trasaction, dkg meta should be already set + // but it is possible due to network asynchrony, that public shares transaction is processed before dkg meta transaction + // in which case, dkg meta is not set yet + // so we cannot impose this condition + }, + } + + let dealer_committee = &in_progress_session_state.metadata.dealer_committee; + let randomness_seed = &in_progress_session_state.metadata.randomness_seed; + + if dkg_transaction.data_bytes().is_empty() + || dkg_transaction + .metadata() + .bls_aggregate_signature() + .is_empty() + || dkg_transaction + .metadata() + .signer_indices_clan_committee() + .is_empty() + { + return VMValidatorResult::error(StatusCode::DKG_TRANSACTION_NOT_VALID); + } + + // verify clan committee multi-signature on the transaction data + let signer_bls_pubkeys = match aptos_types::dkg::get_clan_nodes_bls_keys_from_indices( + dealer_committee, + &dkg_transaction.metadata().signer_indices_clan_committee(), + randomness_seed, + ) { + Ok(bls_keys) => bls_keys, + Err(_) => { + return VMValidatorResult::error(StatusCode::DKG_FAILED_TO_GET_CLAN_NODE_PUBKEYS); + }, + }; + + let agg_sig = match Signature::try_from( + dkg_transaction + .metadata() + .bls_aggregate_signature() + .as_slice(), + ) { + Ok(sig) => sig, + Err(_) => { + return VMValidatorResult::error(StatusCode::DKG_FAILED_TO_DESER_AGG_SIG); + }, + }; + + let agg_pk = match PublicKey::aggregate(signer_bls_pubkeys.iter().collect()) { + Ok(pk) => pk, + Err(_) => { + return VMValidatorResult::error(StatusCode::DKG_FAILED_TO_AGGREGATE_PUBLIC_KEYS); + }, + }; + + if agg_sig + .verify_aggregate_arbitrary_msg(&[dkg_transaction.data_bytes().as_slice()], &[&agg_pk]) + .is_err() + { + return VMValidatorResult::error(StatusCode::DKG_AGG_SIG_VERIFICATION_FAILED); + } + + VMValidatorResult::new(None, 0) + } } // Ensure encapsulation of AptosVM APIs by using a wrapper. @@ -2942,7 +3063,6 @@ impl AptosSimulationVM { .expect("Materializing aggregator V1 deltas should never fail"); (vm_status, txn_output) } - } fn create_account_if_does_not_exist( diff --git a/aptos-move/aptos-vm/src/aptos_vm_viewer.rs b/aptos-move/aptos-vm/src/aptos_vm_viewer.rs index ca71dcc958eea..a5ce78285ef32 100644 --- a/aptos-move/aptos-vm/src/aptos_vm_viewer.rs +++ b/aptos-move/aptos-vm/src/aptos_vm_viewer.rs @@ -1,12 +1,19 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. // SPDX-License-Identifier: Apache-2.0 -use crate::aptos_vm::get_or_vm_startup_failure; -use crate::gas::{make_prod_gas_meter, ProdGasMeter}; -use crate::move_vm_ext::SessionId::Void; -use crate::AptosVM; -use aptos_types::state_store::StateView; -use aptos_types::transaction::{ViewFunction, ViewFunctionOutput}; +use crate::{ + aptos_vm::get_or_vm_startup_failure, + gas::{make_prod_gas_meter, ProdGasMeter}, + move_vm_ext::SessionId::Void, + AptosVM, +}; +use aptos_types::{ + state_store::StateView, + transaction::{ViewFunction, ViewFunctionOutput}, +}; use aptos_vm_logging::log_schema::AdapterLogSchema; /// Move VM with only view function API. diff --git a/aptos-move/aptos-vm/src/automated_transaction_processor.rs b/aptos-move/aptos-vm/src/automated_transaction_processor.rs index 91a3ce4f2daea..84d3eb7643030 100644 --- a/aptos-move/aptos-vm/src/automated_transaction_processor.rs +++ b/aptos-move/aptos-vm/src/automated_transaction_processor.rs @@ -1,31 +1,40 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. // SPDX-License-Identifier: Apache-2.0 -use crate::aptos_vm::{get_or_vm_startup_failure, unwrap_or_discard}; -use crate::counters::TXN_GAS_USAGE; -use crate::errors::discarded_output; -use crate::gas::{check_gas, make_prod_gas_meter}; -use crate::move_vm_ext::session::user_transaction_sessions::epilogue::EpilogueSession; -use crate::move_vm_ext::session::user_transaction_sessions::prologue::PrologueSession; -use crate::move_vm_ext::session::user_transaction_sessions::user::UserSession; -use crate::move_vm_ext::{AptosMoveResolver, SessionExt}; -use crate::transaction_metadata::TransactionMetadata; -use crate::{transaction_validation, AptosVM}; +use crate::{ + aptos_vm::{get_or_vm_startup_failure, unwrap_or_discard}, + counters::TXN_GAS_USAGE, + errors::discarded_output, + gas::{check_gas, make_prod_gas_meter}, + move_vm_ext::{ + session::user_transaction_sessions::{ + epilogue::EpilogueSession, prologue::PrologueSession, user::UserSession, + }, + AptosMoveResolver, SessionExt, + }, + transaction_metadata::TransactionMetadata, + transaction_validation, AptosVM, +}; use aptos_gas_algebra::Gas; use aptos_gas_meter::{AptosGasMeter, GasAlgebra}; use aptos_gas_schedule::VMGasParameters; -use aptos_types::fee_statement::FeeStatement; -use aptos_types::on_chain_config::FeatureFlag; -use aptos_types::transaction::automated_transaction::AutomatedTransaction; -use aptos_types::transaction::automation::AutomationTaskType; -use aptos_types::transaction::{ - EntryFunction, ExecutionStatus, TransactionAuxiliaryData, TransactionPayload, TransactionStatus, +use aptos_types::{ + fee_statement::FeeStatement, + on_chain_config::FeatureFlag, + transaction::{ + automated_transaction::AutomatedTransaction, automation::AutomationTaskType, EntryFunction, + ExecutionStatus, TransactionAuxiliaryData, TransactionPayload, TransactionStatus, + }, }; use aptos_vm_logging::log_schema::AdapterLogSchema; -use aptos_vm_types::change_set::VMChangeSet; -use aptos_vm_types::output::VMOutput; -use aptos_vm_types::storage::change_set_configs::ChangeSetConfigs; -use aptos_vm_types::storage::StorageGasParameters; +use aptos_vm_types::{ + change_set::VMChangeSet, + output::VMOutput, + storage::{change_set_configs::ChangeSetConfigs, StorageGasParameters}, +}; use fail::fail_point; use move_binary_format::errors::Location; use move_core_types::vm_status::{StatusCode, VMStatus}; @@ -75,10 +84,7 @@ impl<'m> AutomatedTransactionProcessor<'m> { log_context, )?; - if self - .features() - .is_enabled(FeatureFlag::SUPRA_AUTOMATION_V2) - { + if self.features().is_enabled(FeatureFlag::SUPRA_AUTOMATION_V2) { transaction_validation::run_automated_transaction_prologue_v2( session, transaction_data, @@ -245,6 +251,7 @@ impl<'m> AutomatedTransactionProcessor<'m> { traversal_context, ) } + pub(crate) fn execute_transaction_impl<'a>( &self, resolver: &impl AptosMoveResolver, @@ -506,12 +513,8 @@ impl<'m> AutomatedTransactionProcessor<'m> { /// This function is utilized to define fee-statement of VMOutput. fn get_fee_statement_for_output(&self, fee_statement: FeeStatement) -> FeeStatement { match self.task_type { - AutomationTaskType::User => { - fee_statement - } - AutomationTaskType::System => { - FeeStatement::zero() - } + AutomationTaskType::User => fee_statement, + AutomationTaskType::System => FeeStatement::zero(), } } } diff --git a/aptos-move/aptos-vm/src/automation_registry_transaction_processor.rs b/aptos-move/aptos-vm/src/automation_registry_transaction_processor.rs index 60dd1f27510cd..71125163f6d30 100644 --- a/aptos-move/aptos-vm/src/automation_registry_transaction_processor.rs +++ b/aptos-move/aptos-vm/src/automation_registry_transaction_processor.rs @@ -1,24 +1,29 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2025 Supra. // SPDX-License-Identifier: Apache-2.0 -use crate::aptos_vm::{get_or_vm_startup_failure, get_system_transaction_output}; -use crate::counters::SYSTEM_TRANSACTIONS_EXECUTED; -use crate::errors::discarded_output; -use crate::move_vm_ext::{AptosMoveResolver, SessionExt, SessionId}; -use crate::AptosVM; -use aptos_types::account_config; -use aptos_types::fee_statement::FeeStatement; -use aptos_types::on_chain_config::FeatureFlag; -use aptos_types::transaction::automation::AutomationRegistryRecord; -use aptos_types::transaction::{ExecutionStatus, TransactionStatus}; +use crate::{ + aptos_vm::{get_or_vm_startup_failure, get_system_transaction_output}, + counters::SYSTEM_TRANSACTIONS_EXECUTED, + errors::discarded_output, + gas::make_prod_gas_meter, + move_vm_ext::{AptosMoveResolver, SessionExt, SessionId}, + AptosVM, +}; +use aptos_types::{ + account_config, + fee_statement::FeeStatement, + on_chain_config::FeatureFlag, + transaction::{automation::AutomationRegistryRecord, ExecutionStatus, TransactionStatus}, +}; use aptos_vm_logging::log_schema::AdapterLogSchema; -use aptos_vm_types::output::VMOutput; -use aptos_vm_types::storage::change_set_configs::ChangeSetConfigs; +use aptos_vm_types::{output::VMOutput, storage::change_set_configs::ChangeSetConfigs}; use move_binary_format::errors::VMError; use move_core_types::vm_status::{StatusCode, VMStatus}; use move_vm_runtime::module_traversal::{TraversalContext, TraversalStorage}; use std::ops::Deref; -use crate::gas::make_prod_gas_meter; pub struct AutomationRegistryTransactionProcessor<'m> { aptos_vm: &'m AptosVM, @@ -57,10 +62,9 @@ impl<'m> AutomationRegistryTransactionProcessor<'m> { discarded_output(StatusCode::FEATURE_UNDER_GATING), )); } - let gas_params = - get_or_vm_startup_failure(&self.gas_params_internal(), log_context)? - .vm - .clone(); + let gas_params = get_or_vm_startup_failure(&self.gas_params_internal(), log_context)? + .vm + .clone(); let max_gas_amount = gas_params.txn.maximum_number_of_gas_units; let mut gas_meter = make_prod_gas_meter( self.gas_feature_version(), diff --git a/aptos-move/aptos-vm/src/gas.rs b/aptos-move/aptos-vm/src/gas.rs index 8f7ff2a35b01c..d3c3d7649d9a7 100644 --- a/aptos-move/aptos-vm/src/gas.rs +++ b/aptos-move/aptos-vm/src/gas.rs @@ -11,18 +11,20 @@ use aptos_gas_schedule::{ }; use aptos_logger::{enabled, Level}; use aptos_memory_usage_tracker::MemoryTrackedGasMeter; -use aptos_types::on_chain_config::{ConfigStorage, FeatureFlag, Features, GasSchedule, GasScheduleV2, OnChainConfig}; -use aptos_types::transaction::{RawTransaction, TransactionPayload}; -use aptos_types::transaction::automation::RegistrationParams; +use aptos_types::{ + on_chain_config::{ + ConfigStorage, FeatureFlag, Features, GasSchedule, GasScheduleV2, OnChainConfig, + }, + transaction::{automation::RegistrationParams, RawTransaction, TransactionPayload}, +}; use aptos_vm_logging::{log_schema::AdapterLogSchema, speculative_log, speculative_warn}; use aptos_vm_types::storage::{ io_pricing::IoPricing, space_pricing::DiskSpacePricing, StorageGasParameters, }; use move_core_types::{ - gas_algebra::NumArgs, + gas_algebra::{NumArgs, NumBytes}, vm_status::{StatusCode, VMStatus}, }; -use move_core_types::gas_algebra::NumBytes; /// This is used until gas version 18, which introduces a configurable entry for this. const MAXIMUM_APPROVED_TRANSACTION_SIZE_LEGACY: u64 = 1024 * 1024; @@ -123,7 +125,7 @@ pub fn make_prod_gas_meter( } /// Invariants facilitating gas checks of the transactions. -pub (crate) struct TransactionGasCheckInvariants { +pub(crate) struct TransactionGasCheckInvariants { pub(crate) gas_unit_price: FeePerGasUnit, pub(crate) max_gas_amount: Gas, pub(crate) transaction_size: NumBytes, @@ -147,9 +149,21 @@ pub(crate) fn check_gas( transaction_size: txn_metadata.transaction_size, script_size: txn_metadata.script_size, is_keyless: txn_metadata.is_keyless(), - is_account_init_for_sponsored_transaction: crate::aptos_vm::is_account_init_for_sponsored_transaction(txn_metadata, features, resolver)?, + is_account_init_for_sponsored_transaction: + crate::aptos_vm::is_account_init_for_sponsored_transaction( + txn_metadata, + features, + resolver, + )?, }; - check_gas_for_parameters(gas_params, gas_feature_version, features, txn_gas_metadata, is_approved_gov_script, log_context) + check_gas_for_parameters( + gas_params, + gas_feature_version, + features, + txn_gas_metadata, + is_approved_gov_script, + log_context, + ) } /// Checks gas parameters and maps the gas related error status code to Automation invariants. @@ -165,11 +179,11 @@ pub(crate) fn check_automation_task_gas( log_context: &AdapterLogSchema, ) -> Result<(), VMStatus> { if !features.is_enabled(FeatureFlag::SUPRA_AUTOMATION_PAYLOAD_GAS_CHECK) { - return Ok(()) + return Ok(()); } - let size_in_bytes = RawTransaction::estimate_size_in_bytes( - TransactionPayload::EntryFunction(registration_params.automated_function().clone()), - ); + let size_in_bytes = RawTransaction::estimate_size_in_bytes(TransactionPayload::EntryFunction( + registration_params.automated_function().clone(), + )); let gas_check_invariants = TransactionGasCheckInvariants { gas_unit_price: registration_params.gas_price_cap().into(), max_gas_amount: registration_params.max_gas_amount().into(), @@ -189,33 +203,35 @@ pub(crate) fn check_automation_task_gas( match results { Ok(_) => Ok(()), Err(VMStatus::Error { - status_code, sub_status, message - } )=> { + status_code, + sub_status, + message, + }) => { let mapped_status = match status_code { StatusCode::EXCEEDED_MAX_TRANSACTION_SIZE => { StatusCode::AUTOMATION_PAYLOAD_EXCEEDED_MAX_TRANSACTION_SIZE - } + }, StatusCode::MAX_GAS_UNITS_EXCEEDS_MAX_GAS_UNITS_BOUND => { StatusCode::AUTOMATION_TASK_MAX_GAS_UNITS_EXCEEDS_MAX_GAS_UNITS_BOUND - } + }, StatusCode::MAX_GAS_UNITS_BELOW_MIN_TRANSACTION_GAS_UNITS => { StatusCode::AUTOMATION_TASK_MAX_GAS_UNITS_BELOW_MIN_TRANSACTION_GAS_UNITS - } + }, StatusCode::GAS_UNIT_PRICE_BELOW_MIN_BOUND => { StatusCode::AUTOMATION_TASK_GAS_PRICE_CAP_BELOW_MIN_BOUND - } + }, StatusCode::GAS_UNIT_PRICE_ABOVE_MAX_BOUND => { StatusCode::AUTOMATION_TASK_GAS_PRICE_CAP_ABOVE_MAX_BOUND - } - _ => status_code + }, + _ => status_code, }; Err(VMStatus::Error { status_code: mapped_status, sub_status, message, }) - } - Err(v) => Err(v), + }, + Err(v) => Err(v), } } @@ -278,8 +294,7 @@ pub(crate) fn check_gas_for_parameters( log_context, format!( "[VM] Gas unit error; max {}, submitted {}", - txn_gas_params.maximum_number_of_gas_units, - txn_gas_metadata.max_gas_amount + txn_gas_params.maximum_number_of_gas_units, txn_gas_metadata.max_gas_amount ), ); return Err(VMStatus::error( @@ -306,8 +321,7 @@ pub(crate) fn check_gas_for_parameters( log_context, format!( "[VM] Gas unit error; min {}, submitted {}", - total_rounded, - txn_gas_metadata.max_gas_amount + total_rounded, txn_gas_metadata.max_gas_amount ), ); return Err(VMStatus::error( @@ -326,8 +340,7 @@ pub(crate) fn check_gas_for_parameters( log_context, format!( "[VM] Gas unit error; min {}, submitted {}", - txn_gas_params.min_price_per_gas_unit, - txn_gas_metadata.gas_unit_price + txn_gas_params.min_price_per_gas_unit, txn_gas_metadata.gas_unit_price ), ); return Err(VMStatus::error( @@ -342,8 +355,7 @@ pub(crate) fn check_gas_for_parameters( log_context, format!( "[VM] Gas unit error; min {}, submitted {}", - txn_gas_params.max_price_per_gas_unit, - txn_gas_metadata.gas_unit_price + txn_gas_params.max_price_per_gas_unit, txn_gas_metadata.gas_unit_price ), ); return Err(VMStatus::error( @@ -356,7 +368,7 @@ pub(crate) fn check_gas_for_parameters( // gas to cover storage, execution, and IO costs. // TODO: This isn't the cleaning code, thus we localize it just here and will remove it // once accountv2 is available and we no longer need to create accounts. - if txn_gas_metadata.is_account_init_for_sponsored_transaction { + if txn_gas_metadata.is_account_init_for_sponsored_transaction { let gas_unit_price: u64 = txn_gas_metadata.gas_unit_price.into(); let max_gas_amount: u64 = txn_gas_metadata.max_gas_amount.into(); let pricing = DiskSpacePricing::new(gas_feature_version, features); diff --git a/aptos-move/aptos-vm/src/lib.rs b/aptos-move/aptos-vm/src/lib.rs index 06b851ff393ed..b5575c49fbfc2 100644 --- a/aptos-move/aptos-vm/src/lib.rs +++ b/aptos-move/aptos-vm/src/lib.rs @@ -107,6 +107,9 @@ pub mod counters; pub mod data_cache; pub mod aptos_vm; +pub mod aptos_vm_viewer; +mod automated_transaction_processor; +mod automation_registry_transaction_processor; pub mod block_executor; mod errors; pub mod gas; @@ -123,16 +126,17 @@ pub mod transaction_metadata; mod transaction_validation; pub mod validator_txns; pub mod verifier; -mod automated_transaction_processor; -pub mod aptos_vm_viewer; -mod automation_registry_transaction_processor; pub use crate::aptos_vm::{AptosSimulationVM, AptosVM}; -use crate::sharded_block_executor::{executor_client::ExecutorClient, ShardedBlockExecutor}; +use crate::{ + move_vm_ext::AptosMoveResolver, + sharded_block_executor::{executor_client::ExecutorClient, ShardedBlockExecutor}, +}; use aptos_types::{ block_executor::{ config::BlockExecutorConfigFromOnchain, partitioner::PartitionedTransactions, }, + dkg::transactions::DKGTransactionData, state_store::StateView, transaction::{ signature_verified_transaction::SignatureVerifiedTransaction, BlockOutput, @@ -151,6 +155,12 @@ pub trait VMValidator { transaction: SignedTransaction, state_view: &impl StateView, ) -> VMValidatorResult; + + fn validate_dkg_validator_transaction( + &self, + dkg_transaction: DKGTransactionData, + resolver: &impl AptosMoveResolver, + ) -> VMValidatorResult; } /// This trait describes the VM's execution interface. diff --git a/aptos-move/aptos-vm/src/move_vm_ext/session/session_id.rs b/aptos-move/aptos-vm/src/move_vm_ext/session/session_id.rs index f4888975447ef..e678dbac98208 100644 --- a/aptos-move/aptos-vm/src/move_vm_ext/session/session_id.rs +++ b/aptos-move/aptos-vm/src/move_vm_ext/session/session_id.rs @@ -6,11 +6,10 @@ use aptos_crypto::{hash::CryptoHash, HashValue}; use aptos_crypto_derive::{BCSCryptoHash, CryptoHasher}; use aptos_types::{ block_metadata::BlockMetadata, block_metadata_ext::BlockMetadataExt, - validator_txn::ValidatorTransaction, + transaction::automation::AutomationRegistryRecord, validator_txn::ValidatorTransaction, }; use move_core_types::account_address::AccountAddress; use serde::{Deserialize, Serialize}; -use aptos_types::transaction::automation::AutomationRegistryRecord; #[derive(BCSCryptoHash, Clone, CryptoHasher, Deserialize, Serialize)] pub enum SessionId { @@ -53,7 +52,7 @@ pub enum SessionId { }, AutomationRegistryTxn { id: HashValue, - } + }, } impl SessionId { @@ -90,9 +89,7 @@ impl SessionId { } pub fn automation_registry_action(record: &AutomationRegistryRecord) -> Self { - Self::AutomationRegistryTxn { - id: record.hash() - } + Self::AutomationRegistryTxn { id: record.hash() } } pub fn run_on_abort(txn_metadata: &TransactionMetadata) -> Self { diff --git a/aptos-move/aptos-vm/src/system_module_names.rs b/aptos-move/aptos-vm/src/system_module_names.rs index e921704b64e5f..04223d8dd898c 100644 --- a/aptos-move/aptos-vm/src/system_module_names.rs +++ b/aptos-move/aptos-vm/src/system_module_names.rs @@ -38,6 +38,7 @@ pub static RECONFIGURATION_WITH_DKG_MODULE: Lazy = Lazy::new(|| { }); pub const FINISH_WITH_DKG_RESULT: &IdentStr = ident_str!("finish_with_dkg_result"); +pub const SET_DKG_META: &IdentStr = ident_str!("set_dkg_meta"); pub static JWKS_MODULE: Lazy = Lazy::new(|| { ModuleId::new( diff --git a/aptos-move/aptos-vm/src/transaction_metadata.rs b/aptos-move/aptos-vm/src/transaction_metadata.rs index 5d9947af7bf4e..5c5575aff260c 100644 --- a/aptos-move/aptos-vm/src/transaction_metadata.rs +++ b/aptos-move/aptos-vm/src/transaction_metadata.rs @@ -5,16 +5,17 @@ use aptos_crypto::HashValue; use aptos_gas_algebra::{FeePerGasUnit, Gas, NumBytes}; -use aptos_types::transaction::automated_transaction::AutomatedTransaction; use aptos_types::{ account_address::AccountAddress, chain_id::ChainId, transaction::{ - user_transaction_context::UserTransactionContext, EntryFunction, Multisig, - SignedTransaction, TransactionPayload, + automated_transaction::AutomatedTransaction, + user_transaction_context::{ + PayloadTypeReference, PayloadTypeReferenceContext, UserTransactionContext, + }, + EntryFunction, Multisig, SignedTransaction, TransactionPayload, }, }; -use aptos_types::transaction::user_transaction_context::{PayloadTypeReference, PayloadTypeReferenceContext}; pub type PayloadTypeReferenceMeta = PayloadTypeReference; pub struct TransactionMetadata { @@ -40,11 +41,16 @@ pub struct TransactionMetadata { impl TransactionMetadata { pub fn new(txn: &SignedTransaction) -> Self { let payload_type_reference = match txn.payload() { - TransactionPayload::Script(_) | - TransactionPayload::ModuleBundle(_) => PayloadTypeReferenceMeta::Other, - TransactionPayload::EntryFunction(e) => PayloadTypeReferenceMeta::UserEntryFunction(e.clone()), + TransactionPayload::Script(_) | TransactionPayload::ModuleBundle(_) => { + PayloadTypeReferenceMeta::Other + }, + TransactionPayload::EntryFunction(e) => { + PayloadTypeReferenceMeta::UserEntryFunction(e.clone()) + }, TransactionPayload::Multisig(m) => PayloadTypeReferenceMeta::Multisig(m.clone()), - TransactionPayload::AutomationRegistration(_) => PayloadTypeReferenceMeta::AutomationRegistration, + TransactionPayload::AutomationRegistration(_) => { + PayloadTypeReferenceMeta::AutomationRegistration + }, }; Self { sender: txn.sender(), @@ -161,9 +167,15 @@ impl TransactionMetadata { pub fn as_user_transaction_context(&self) -> UserTransactionContext { let payload_type_reference = match &self.payload_type_reference { PayloadTypeReferenceMeta::Other => PayloadTypeReferenceContext::Other, - PayloadTypeReferenceMeta::UserEntryFunction(e) => PayloadTypeReferenceContext::UserEntryFunction(e.as_entry_function_payload()), - PayloadTypeReferenceMeta::Multisig(m) => PayloadTypeReferenceContext::Multisig(m.as_multisig_payload()), - PayloadTypeReferenceMeta::AutomationRegistration => PayloadTypeReferenceContext::AutomationRegistration, + PayloadTypeReferenceMeta::UserEntryFunction(e) => { + PayloadTypeReferenceContext::UserEntryFunction(e.as_entry_function_payload()) + }, + PayloadTypeReferenceMeta::Multisig(m) => { + PayloadTypeReferenceContext::Multisig(m.as_multisig_payload()) + }, + PayloadTypeReferenceMeta::AutomationRegistration => { + PayloadTypeReferenceContext::AutomationRegistration + }, }; UserTransactionContext::new( self.sender, @@ -195,7 +207,9 @@ impl From<&AutomatedTransaction> for TransactionMetadata { script_hash: vec![], script_size: NumBytes::zero(), is_keyless: false, - payload_type_reference: PayloadTypeReferenceMeta::UserEntryFunction(txn.payload().clone().into_entry_function()), + payload_type_reference: PayloadTypeReferenceMeta::UserEntryFunction( + txn.payload().clone().into_entry_function(), + ), txn_app_hash: txn.hash().to_vec(), } } diff --git a/aptos-move/aptos-vm/src/transaction_validation.rs b/aptos-move/aptos-vm/src/transaction_validation.rs index b6e8d5fd3a6f1..30bb859ec2b44 100644 --- a/aptos-move/aptos-vm/src/transaction_validation.rs +++ b/aptos-move/aptos-vm/src/transaction_validation.rs @@ -5,7 +5,7 @@ use crate::{ errors::{convert_epilogue_error, convert_prologue_error, expect_only_successful_execution}, move_vm_ext::SessionExt, system_module_names::{ - EMIT_FEE_STATEMENT, MULTISIG_ACCOUNT_MODULE, TRANSACTION_FEE_MODULE, + EMIT_FEE_STATEMENT, EMIT_GAS_ASSESSMENT, MULTISIG_ACCOUNT_MODULE, TRANSACTION_FEE_MODULE, VALIDATE_MULTISIG_TRANSACTION, }, testing::{maybe_raise_injected_error, InjectedError}, @@ -13,8 +13,10 @@ use crate::{ }; use aptos_gas_algebra::Gas; use aptos_types::{ - account_config::constants::CORE_CODE_ADDRESS, fee_statement::FeeStatement, - on_chain_config::Features, transaction::Multisig, + account_config::constants::CORE_CODE_ADDRESS, + fee_statement::FeeStatement, + on_chain_config::Features, + transaction::{automation::AutomationTaskType, Multisig}, }; use aptos_vm_logging::log_schema::AdapterLogSchema; use fail::fail_point; @@ -30,8 +32,6 @@ use move_core_types::{ use move_vm_runtime::{logging::expect_no_verification_errors, module_traversal::TraversalContext}; use move_vm_types::gas::UnmeteredGasMeter; use once_cell::sync::Lazy; -use aptos_types::transaction::automation::AutomationTaskType; -use crate::system_module_names::EMIT_GAS_ASSESSMENT; pub static APTOS_TRANSACTION_VALIDATION: Lazy = Lazy::new(|| TransactionValidation { @@ -41,7 +41,8 @@ pub static APTOS_TRANSACTION_VALIDATION: Lazy = script_prologue_name: Identifier::new("script_prologue").unwrap(), multi_agent_prologue_name: Identifier::new("multi_agent_script_prologue").unwrap(), automated_txn_prologue_name: Identifier::new("automated_transaction_prologue").unwrap(), - automated_txn_prologue_v2_name: Identifier::new("automated_transaction_prologue_v2").unwrap(), + automated_txn_prologue_v2_name: Identifier::new("automated_transaction_prologue_v2") + .unwrap(), user_epilogue_name: Identifier::new("epilogue").unwrap(), user_epilogue_gas_payer_name: Identifier::new("epilogue_gas_payer").unwrap(), automated_txn_epilogue_name: Identifier::new("automated_transaction_epilogue").unwrap(), @@ -387,10 +388,10 @@ fn run_automated_txn_epilogue( match task_type { AutomationTaskType::User => { emit_fee_statement(session, fee_statement, traversal_context)?; - } + }, AutomationTaskType::System => { emit_as_gas_assessment(session, fee_statement, traversal_context)?; - } + }, } } diff --git a/aptos-move/aptos-vm/src/validator_txns/dkg.rs b/aptos-move/aptos-vm/src/validator_txns/dkg.rs index dd5f77dd174ff..309777b5ea2b5 100644 --- a/aptos-move/aptos-vm/src/validator_txns/dkg.rs +++ b/aptos-move/aptos-vm/src/validator_txns/dkg.rs @@ -5,131 +5,108 @@ use crate::{ aptos_vm::get_or_vm_startup_failure, errors::expect_only_successful_execution, move_vm_ext::{AptosMoveResolver, SessionId}, - system_module_names::{FINISH_WITH_DKG_RESULT, RECONFIGURATION_WITH_DKG_MODULE}, - validator_txns::dkg::{ - ExecutionFailure::{Expected, Unexpected}, - ExpectedFailure::*, - }, - AptosVM, + system_module_names::{FINISH_WITH_DKG_RESULT, RECONFIGURATION_WITH_DKG_MODULE, SET_DKG_META}, + AptosVM, VMValidator, }; use aptos_types::{ - dkg::{DKGState, DKGTrait, DKGTranscript, DefaultDKG}, + dkg::transactions::{DKGTransactionData, DKGTransactionType}, fee_statement::FeeStatement, move_utils::as_move_value::AsMoveValue, - on_chain_config::{ConfigurationResource, OnChainConfig}, transaction::{ExecutionStatus, TransactionStatus}, + vm_status::DiscardedVMStatus, }; use aptos_vm_logging::log_schema::AdapterLogSchema; use aptos_vm_types::output::VMOutput; use move_core_types::{ account_address::AccountAddress, value::{serialize_values, MoveValue}, - vm_status::{AbortLocation, StatusCode, VMStatus}, + vm_status::VMStatus, }; use move_vm_runtime::module_traversal::{TraversalContext, TraversalStorage}; use move_vm_types::gas::UnmeteredGasMeter; -#[derive(Debug)] -enum ExpectedFailure { - // Move equivalent: `errors::invalid_argument(*)` - EpochNotCurrent = 0x10001, - TranscriptDeserializationFailed = 0x10002, - TranscriptVerificationFailed = 0x10003, - - // Move equivalent: `errors::invalid_state(*)` - MissingResourceDKGState = 0x30001, - MissingResourceInprogressDKGSession = 0x30002, - MissingResourceConfiguration = 0x30003, -} - enum ExecutionFailure { - Expected(ExpectedFailure), + Expected(DiscardedVMStatus), Unexpected(VMStatus), } impl AptosVM { - pub(crate) fn process_dkg_result( + pub(crate) fn process_dkg_transaction( &self, resolver: &impl AptosMoveResolver, log_context: &AdapterLogSchema, session_id: SessionId, - dkg_transcript: DKGTranscript, + dkg_transaction_data: DKGTransactionData, ) -> Result<(VMStatus, VMOutput), VMStatus> { - match self.process_dkg_result_inner(resolver, log_context, session_id, dkg_transcript) { + match self.process_dkg_transaction_inner( + resolver, + log_context, + session_id, + dkg_transaction_data, + ) { Ok((vm_status, vm_output)) => Ok((vm_status, vm_output)), - Err(Expected(failure)) => { + Err(ExecutionFailure::Expected(status)) => { // Pretend we are inside Move, and expected failures are like Move aborts. Ok(( - VMStatus::MoveAbort(AbortLocation::Script, failure as u64), - VMOutput::empty_with_status(TransactionStatus::Discard(StatusCode::ABORTED)), + VMStatus::error(status, None), + VMOutput::empty_with_status(TransactionStatus::Discard(status)), )) }, - Err(Unexpected(vm_status)) => Err(vm_status), + Err(ExecutionFailure::Unexpected(vm_status)) => Err(vm_status), } } - fn process_dkg_result_inner( + fn process_dkg_transaction_inner( &self, resolver: &impl AptosMoveResolver, log_context: &AdapterLogSchema, session_id: SessionId, - dkg_node: DKGTranscript, + dkg_transaction: DKGTransactionData, ) -> Result<(VMStatus, VMOutput), ExecutionFailure> { - let dkg_state = OnChainConfig::fetch_config(resolver) - .ok_or_else(|| Expected(MissingResourceDKGState))?; - let config_resource = ConfigurationResource::fetch_config(resolver) - .ok_or_else(|| Expected(MissingResourceConfiguration))?; - let DKGState { in_progress, .. } = dkg_state; - let in_progress_session_state = - in_progress.ok_or_else(|| Expected(MissingResourceInprogressDKGSession))?; - - // Check epoch number. - if dkg_node.metadata.epoch != config_resource.epoch() { - return Err(Expected(EpochNotCurrent)); + // Verify the dkg transaction before execution + if let Some(status) = self + .validate_dkg_validator_transaction(dkg_transaction.clone(), resolver) + .status() + { + return Err(ExecutionFailure::Expected(status)); } - // Deserialize transcript and verify it. - let pub_params = DefaultDKG::new_public_params(&in_progress_session_state.metadata); - let transcript = bcs::from_bytes::<::Transcript>( - dkg_node.transcript_bytes.as_slice(), - ) - .map_err(|_| Expected(TranscriptDeserializationFailed))?; - - DefaultDKG::verify_transcript(&pub_params, &transcript) - .map_err(|_| Expected(TranscriptVerificationFailed))?; + let (function_name, args) = match dkg_transaction.metadata().transaction_type() { + DKGTransactionType::DKGMeta => (SET_DKG_META, vec![dkg_transaction + .data_bytes() + .as_move_value()]), + DKGTransactionType::PublicKeyShares => (FINISH_WITH_DKG_RESULT, vec![ + MoveValue::Signer(AccountAddress::ONE), + dkg_transaction.data_bytes().as_move_value(), + ]), + }; // All check passed, invoke VM to publish DKG result on chain. let mut gas_meter = UnmeteredGasMeter; let mut session = self.new_session(resolver, session_id, None); - let args = vec![ - MoveValue::Signer(AccountAddress::ONE), - dkg_node.transcript_bytes.as_move_value(), - ]; let module_storage = TraversalStorage::new(); session .execute_function_bypass_visibility( &RECONFIGURATION_WITH_DKG_MODULE, - FINISH_WITH_DKG_RESULT, + function_name, vec![], serialize_values(&args), &mut gas_meter, &mut TraversalContext::new(&module_storage), ) - .map_err(|e| { - expect_only_successful_execution(e, FINISH_WITH_DKG_RESULT.as_str(), log_context) - }) - .map_err(|r| Unexpected(r.unwrap_err()))?; + .map_err(|e| expect_only_successful_execution(e, function_name.as_str(), log_context)) + .map_err(|r| ExecutionFailure::Unexpected(r.unwrap_err()))?; let output = crate::aptos_vm::get_system_transaction_output( session, FeeStatement::zero(), ExecutionStatus::Success, &get_or_vm_startup_failure(&self.storage_gas_params, log_context) - .map_err(Unexpected)? + .map_err(ExecutionFailure::Unexpected)? .change_set_configs, ) - .map_err(Unexpected)?; + .map_err(ExecutionFailure::Unexpected)?; Ok((VMStatus::Executed, output)) } diff --git a/aptos-move/aptos-vm/src/validator_txns/mod.rs b/aptos-move/aptos-vm/src/validator_txns/mod.rs index 1c6c020fec1bc..b19c9c120d061 100644 --- a/aptos-move/aptos-vm/src/validator_txns/mod.rs +++ b/aptos-move/aptos-vm/src/validator_txns/mod.rs @@ -5,10 +5,10 @@ use crate::{ move_vm_ext::{AptosMoveResolver, SessionId}, AptosVM, }; -use aptos_types::validator_txn::ValidatorTransaction; +use aptos_types::{on_chain_config::FeatureFlag, validator_txn::ValidatorTransaction}; use aptos_vm_logging::log_schema::AdapterLogSchema; use aptos_vm_types::output::VMOutput; -use move_core_types::vm_status::VMStatus; +use move_core_types::vm_status::{StatusCode, VMStatus}; impl AptosVM { pub(crate) fn process_validator_transaction( @@ -19,12 +19,21 @@ impl AptosVM { ) -> Result<(VMStatus, VMOutput), VMStatus> { let session_id = SessionId::validator_txn(&txn); match txn { - ValidatorTransaction::DKGResult(dkg_node) => { - self.process_dkg_result(resolver, log_context, session_id, dkg_node) + ValidatorTransaction::DKG(dkg_node) => { + if !self.features().is_enabled(FeatureFlag::SUPRA_DKG) { + return Err(VMStatus::error(StatusCode::FEATURE_UNDER_GATING, None)); + } + + self.process_dkg_transaction(resolver, log_context, session_id, dkg_node) }, ValidatorTransaction::ObservedJWKUpdate(jwk_update) => { self.process_jwk_update(resolver, log_context, session_id, jwk_update) }, + ValidatorTransaction::DKGResult(_) => Err(VMStatus::Error { + status_code: StatusCode::UNREACHABLE, + sub_status: None, + message: Some("Unsupported ValidatorTransaction variant".to_string()), + }), } } } diff --git a/aptos-move/aptos-vm/src/verifier/transaction_arg_validation.rs b/aptos-move/aptos-vm/src/verifier/transaction_arg_validation.rs index 2616217a98ca3..3267afdb0a6a6 100644 --- a/aptos-move/aptos-vm/src/verifier/transaction_arg_validation.rs +++ b/aptos-move/aptos-vm/src/verifier/transaction_arg_validation.rs @@ -39,13 +39,10 @@ pub(crate) struct FunctionId { type ConstructorMap = Lazy>; static OLD_ALLOWED_STRUCTS: ConstructorMap = Lazy::new(|| { - [( - "0x1::string::String", - FunctionId { - module_id: ModuleId::new(AccountAddress::ONE, Identifier::from(ident_str!("string"))), - func_name: ident_str!("utf8"), - }, - )] + [("0x1::string::String", FunctionId { + module_id: ModuleId::new(AccountAddress::ONE, Identifier::from(ident_str!("string"))), + func_name: ident_str!("utf8"), + })] .into_iter() .map(|(s, validator)| (s.to_string(), validator)) .collect() @@ -53,56 +50,32 @@ static OLD_ALLOWED_STRUCTS: ConstructorMap = Lazy::new(|| { static NEW_ALLOWED_STRUCTS: ConstructorMap = Lazy::new(|| { [ - ( - "0x1::string::String", - FunctionId { - module_id: ModuleId::new( - AccountAddress::ONE, - Identifier::from(ident_str!("string")), - ), - func_name: ident_str!("utf8"), - }, - ), - ( - "0x1::object::Object", - FunctionId { - module_id: ModuleId::new( - AccountAddress::ONE, - Identifier::from(ident_str!("object")), - ), - func_name: ident_str!("address_to_object"), - }, - ), - ( - "0x1::option::Option", - FunctionId { - module_id: ModuleId::new( - AccountAddress::ONE, - Identifier::from(ident_str!("option")), - ), - func_name: ident_str!("from_vec"), - }, - ), - ( - "0x1::fixed_point32::FixedPoint32", - FunctionId { - module_id: ModuleId::new( - AccountAddress::ONE, - Identifier::from(ident_str!("fixed_point32")), - ), - func_name: ident_str!("create_from_raw_value"), - }, - ), - ( - "0x1::fixed_point64::FixedPoint64", - FunctionId { - module_id: ModuleId::new( - AccountAddress::ONE, - Identifier::from(ident_str!("fixed_point64")), - ), - func_name: ident_str!("create_from_raw_value"), - }, - ), + ("0x1::string::String", FunctionId { + module_id: ModuleId::new(AccountAddress::ONE, Identifier::from(ident_str!("string"))), + func_name: ident_str!("utf8"), + }), + ("0x1::object::Object", FunctionId { + module_id: ModuleId::new(AccountAddress::ONE, Identifier::from(ident_str!("object"))), + func_name: ident_str!("address_to_object"), + }), + ("0x1::option::Option", FunctionId { + module_id: ModuleId::new(AccountAddress::ONE, Identifier::from(ident_str!("option"))), + func_name: ident_str!("from_vec"), + }), + ("0x1::fixed_point32::FixedPoint32", FunctionId { + module_id: ModuleId::new( + AccountAddress::ONE, + Identifier::from(ident_str!("fixed_point32")), + ), + func_name: ident_str!("create_from_raw_value"), + }), + ("0x1::fixed_point64::FixedPoint64", FunctionId { + module_id: ModuleId::new( + AccountAddress::ONE, + Identifier::from(ident_str!("fixed_point64")), + ), + func_name: ident_str!("create_from_raw_value"), + }), ] .into_iter() .map(|(s, validator)| (s.to_string(), validator)) diff --git a/aptos-move/e2e-move-tests/src/lib.rs b/aptos-move/e2e-move-tests/src/lib.rs index f90cede8c72c4..0d122e884a8f4 100644 --- a/aptos-move/e2e-move-tests/src/lib.rs +++ b/aptos-move/e2e-move-tests/src/lib.rs @@ -3,10 +3,10 @@ pub mod aggregator; pub mod aggregator_v2; -pub mod supra_governance; pub mod harness; pub mod resource_groups; pub mod stake; +pub mod supra_governance; pub mod transaction_fee; use anyhow::bail; @@ -28,7 +28,8 @@ impl PackageHooks for AptosPackageHooks { fn custom_package_info_fields(&self) -> Vec { vec![UPGRADE_POLICY_CUSTOM_FIELD.to_string()] } -// sbjoshi changed + + // sbjoshi changed fn custom_dependency_key(&self) -> Option { Some("supra".to_string()) } diff --git a/aptos-move/e2e-move-tests/src/supra_governance.rs b/aptos-move/e2e-move-tests/src/supra_governance.rs index 485a39da0c391..d0d73489e4ea8 100644 --- a/aptos-move/e2e-move-tests/src/supra_governance.rs +++ b/aptos-move/e2e-move-tests/src/supra_governance.rs @@ -53,9 +53,6 @@ pub fn supra_vote( ) -> TransactionStatus { harness.run_transaction_payload( account, - aptos_stdlib::supra_governance_supra_vote( - proposal_id, - should_pass, - ), + aptos_stdlib::supra_governance_supra_vote(proposal_id, should_pass), ) } diff --git a/aptos-move/e2e-move-tests/src/tests/fungible_asset.rs b/aptos-move/e2e-move-tests/src/tests/fungible_asset.rs index 3851247d57d21..fcf482d10fbe2 100644 --- a/aptos-move/e2e-move-tests/src/tests/fungible_asset.rs +++ b/aptos-move/e2e-move-tests/src/tests/fungible_asset.rs @@ -2,19 +2,21 @@ // SPDX-License-Identifier: Apache-2.0 use crate::{assert_success, tests::common, MoveHarness}; -use aptos_types::account_address::{self, AccountAddress}; +use aptos_cached_packages::aptos_stdlib; +use aptos_language_e2e_tests::account::{Account, TransactionBuilder}; +use aptos_types::{ + account_address::{self, AccountAddress}, + account_config::AccountResource, + on_chain_config::FeatureFlag, +}; use move_core_types::{ identifier::Identifier, language_storage::{StructTag, TypeTag}, + move_resource::MoveStructType, }; use once_cell::sync::Lazy; use serde::Deserialize; use std::str::FromStr; -use aptos_cached_packages::aptos_stdlib; -use aptos_language_e2e_tests::account::{Account, TransactionBuilder}; -use aptos_types::account_config::AccountResource; -use aptos_types::on_chain_config::FeatureFlag; -use move_core_types::move_resource::MoveStructType; #[derive(Debug, Deserialize, Eq, PartialEq)] struct FungibleStore { @@ -279,7 +281,7 @@ fn test_sponsered_tx() { "0x{}::managed_fungible_token::get_metadata", (*alice.address()).to_hex() )) - .unwrap(), + .unwrap(), vec![], vec![], ) @@ -295,7 +297,7 @@ fn test_sponsered_tx() { "0x{}::managed_fungible_asset::mint_to_primary_stores", (*alice.address()).to_hex() )) - .unwrap(), + .unwrap(), vec![], vec![ bcs::to_bytes(&metadata).unwrap(), @@ -319,10 +321,7 @@ fn test_sponsered_tx() { sender_hex ); let module_src = module_src_string.as_str(); - let payload = aptos_stdlib::publish_module_source( - "test_module", - module_src - ); + let payload = aptos_stdlib::publish_module_source("test_module", module_src); let transaction = TransactionBuilder::new(bob.clone()) .fee_payer(alice.clone()) .payload(payload) @@ -336,7 +335,10 @@ fn test_sponsered_tx() { // Make sure bob's account is created let exists = h.exists_resource(bob.address(), AccountResource::struct_tag()); - assert!(exists, "Bob's account should exist after the sponsored transaction"); + assert!( + exists, + "Bob's account should exist after the sponsored transaction" + ); let result = h.run_entry_function( &alice, @@ -344,7 +346,7 @@ fn test_sponsered_tx() { "0x{}::managed_fungible_asset::transfer_between_primary_stores", (*alice.address()).to_hex() )) - .unwrap(), + .unwrap(), vec![], vec![ bcs::to_bytes(&metadata).unwrap(), diff --git a/aptos-move/e2e-move-tests/src/tests/per_category_gas_limits.data/test/Move.toml b/aptos-move/e2e-move-tests/src/tests/per_category_gas_limits.data/test/Move.toml index f0123a1a751d8..d37cbbbda4be6 100644 --- a/aptos-move/e2e-move-tests/src/tests/per_category_gas_limits.data/test/Move.toml +++ b/aptos-move/e2e-move-tests/src/tests/per_category_gas_limits.data/test/Move.toml @@ -5,4 +5,3 @@ version = "0.0.0" [dependencies] MoveStdlib = { local = "../../../../../framework/move-stdlib" } AptosStdlib = { local = "../../../../../framework/aptos-stdlib" } - diff --git a/aptos-move/e2e-move-tests/src/tests/vote.rs b/aptos-move/e2e-move-tests/src/tests/vote.rs index 4f1adc35be5c8..24293b9970a17 100644 --- a/aptos-move/e2e-move-tests/src/tests/vote.rs +++ b/aptos-move/e2e-move-tests/src/tests/vote.rs @@ -1,10 +1,7 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -use crate::{ - supra_governance::*, assert_abort, assert_success, - tests::common, MoveHarness, -}; +use crate::{assert_abort, assert_success, supra_governance::*, tests::common, MoveHarness}; use aptos_types::account_address::AccountAddress; use once_cell::sync::Lazy; use std::collections::BTreeMap; @@ -34,12 +31,7 @@ fn test_supra_vote() { true )); // Voters can vote on a voting proposal. - assert_success!(supra_vote( - &mut harness, - &voter, - proposal_id, - true - )); + assert_success!(supra_vote(&mut harness, &voter, proposal_id, true)); // Enable partial governance voting. In production, it requires governance. let core_resources = @@ -51,15 +43,7 @@ fn test_supra_vote() { assert_success!(harness.run(txn)); // If a voter has already voted on a proposal before partial voting is enabled, the voter cannot vote on the proposal again. - assert_abort!( - supra_vote( - &mut harness, - &voter, - proposal_id, - true - ), - 0x8000D - ); + assert_abort!(supra_vote(&mut harness, &voter, proposal_id, true), 0x8000D); assert_success!(supra_create_proposal_v2( &mut harness, @@ -73,27 +57,12 @@ fn test_supra_vote() { // Cannot vote on a non-exist proposal. let wrong_proposal_id: u64 = 2; assert_abort!( - supra_vote( - &mut harness, - &voter, - wrong_proposal_id, - true - ), + supra_vote(&mut harness, &voter, wrong_proposal_id, true), 25863 ); proposal_id = 1; // A voter can vote on a proposal multiple times with both Yes/No. - assert_success!(supra_vote( - &mut harness, - &voter, - proposal_id, - true - )); - assert_success!(supra_vote( - &mut harness, - &voter, - proposal_id, - false - )); + assert_success!(supra_vote(&mut harness, &voter, proposal_id, true)); + assert_success!(supra_vote(&mut harness, &voter, proposal_id, false)); } diff --git a/aptos-move/e2e-tests/Cargo.toml b/aptos-move/e2e-tests/Cargo.toml index 859110fee4302..6c707d1f5f90e 100644 --- a/aptos-move/e2e-tests/Cargo.toml +++ b/aptos-move/e2e-tests/Cargo.toml @@ -17,7 +17,7 @@ anyhow = { workspace = true } aptos-abstract-gas-usage = { workspace = true } aptos-bitvec = { workspace = true } aptos-block-executor = { workspace = true } -aptos-cached-packages ={ workspace = true } +aptos-cached-packages = { workspace = true } aptos-crypto = { workspace = true, features = ["fuzzing"] } aptos-framework = { workspace = true } aptos-gas-algebra = { workspace = true } diff --git a/aptos-move/e2e-testsuite/Cargo.toml b/aptos-move/e2e-testsuite/Cargo.toml index c06a16c83ecca..0c96321aebe66 100644 --- a/aptos-move/e2e-testsuite/Cargo.toml +++ b/aptos-move/e2e-testsuite/Cargo.toml @@ -35,7 +35,7 @@ serde = { workspace = true, features = ["derive"] } [features] default = [ - "aptos-cached-packages/fuzzing", - "move-core-types/fuzzing", - "aptos-types/fuzzing", + "aptos-cached-packages/fuzzing", + "move-core-types/fuzzing", + "aptos-types/fuzzing", ] diff --git a/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs b/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs index cf821b96a8933..931f7b3611a85 100644 --- a/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs +++ b/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs @@ -1,3 +1,6 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. // SPDX-License-Identifier: Apache-2.0 @@ -139,8 +142,7 @@ fn check_automated_transaction_successful_execution() { panic!("Automated transaction should successfully build: {maybe_automated_txn:?}") }; - let result = test_context - .execute_tagged_transaction(automated_txn.clone().into()); + let result = test_context.execute_tagged_transaction(automated_txn.clone().into()); AutomationRegistrationTestContext::check_discarded_output( result, StatusCode::NO_ACTIVE_AUTOMATED_TASK, @@ -162,8 +164,7 @@ fn check_automated_transaction_successful_execution() { // Execute automated transaction one more time which should be success, as task is already become active after epoch change let sender_address = test_context.sender_account_address(); let sender_seq_num = test_context.account_sequence_number(sender_address); - let output = test_context - .execute_and_apply_transaction(automated_txn.clone().into()); + let output = test_context.execute_and_apply_transaction(automated_txn.clone().into()); assert_eq!( output.status(), &TransactionStatus::Keep(ExecutionStatus::Success), @@ -187,8 +188,7 @@ fn check_automated_transaction_successful_execution() { let BuilderResult::Success(automated_txn) = maybe_automated_txn else { panic!("Automated transaction should successfully build") }; - let result = test_context - .execute_tagged_transaction(automated_txn.clone().into()); + let result = test_context.execute_tagged_transaction(automated_txn.clone().into()); AutomationRegistrationTestContext::check_discarded_output( result, StatusCode::NO_ACTIVE_AUTOMATED_TASK, diff --git a/aptos-move/e2e-testsuite/src/tests/automation_registration.rs b/aptos-move/e2e-testsuite/src/tests/automation_registration.rs index fdfbf02f3aaeb..73648ec2e11fb 100644 --- a/aptos-move/e2e-testsuite/src/tests/automation_registration.rs +++ b/aptos-move/e2e-testsuite/src/tests/automation_registration.rs @@ -1,3 +1,6 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. // SPDX-License-Identifier: Apache-2.0 @@ -8,38 +11,34 @@ use aptos_language_e2e_tests::{ data_store::FakeDataStore, executor::FakeExecutor, }; -use aptos_types::account_address::create_multisig_account_address; -use aptos_types::transaction::automation::Priority; -use aptos_types::transaction::{ExecutionError, Multisig, MultisigTransactionPayload}; use aptos_types::{ + account_address::create_multisig_account_address, + contract_event::ContractEvent, on_chain_config::{ AutomationCycleDetails, AutomationCycleInfo, AutomationCycleState, FeatureFlag, OnChainConfig, }, transaction::{ automation::{ - AutomationRegistryAction, AutomationRegistryRecord, AutomationTaskMetaData, + AutomationRegistryAction, AutomationRegistryRecord, AutomationTaskMetaData, Priority, RegistrationParams, }, - EntryFunction, ExecutionStatus, SignedTransaction, Transaction, TransactionOutput, - TransactionPayload, TransactionStatus, + EntryFunction, ExecutionError, ExecutionStatus, Multisig, MultisigTransactionPayload, + SignedTransaction, Transaction, TransactionOutput, TransactionPayload, TransactionStatus, }, }; use aptos_vm::aptos_vm_viewer::AptosVMViewer; use move_core_types::{ account_address::AccountAddress, value::{serialize_values, MoveValue}, - vm_status::StatusCode, + vm_status::{StatusCode, StatusCode::FEATURE_UNDER_GATING}, }; +use serde::{Deserialize, Serialize}; use std::{ ops::{Deref, DerefMut}, time::Instant, }; -use serde::{Serialize, Deserialize}; -use aptos_types::contract_event::ContractEvent; -use move_core_types::vm_status::StatusCode::FEATURE_UNDER_GATING; - const TIMESTAMP_NOW_SECONDS: &str = "0x1::timestamp::now_seconds"; const ACCOUNT_BALANCE: &str = "0x1::coin::balance"; const SUPRA_COIN: &str = "0x1::supra_coin::SupraCoin"; @@ -166,16 +165,12 @@ impl AutomationRegistrationTestContext { } else { (vec![], flag_value) }; - self.executor.exec( - "features", - "change_feature_flags_internal", - vec![], - vec![ + self.executor + .exec("features", "change_feature_flags_internal", vec![], vec![ MoveValue::Signer(acc).simple_serialize().unwrap(), bcs::to_bytes(&enabled).unwrap(), bcs::to_bytes(&disabled).unwrap(), - ], - ); + ]); } pub(crate) fn toggle_feature_with_registry_reconfig( @@ -395,11 +390,10 @@ impl AutomationRegistrationTestContext { } pub(crate) fn account_sequence_number(&mut self, account_address: AccountAddress) -> u64 { - let view_output = self.execute_view_function( - str::parse(ACCOUNT_SEQ_NUM).unwrap(), - vec![], - vec![account_address.to_vec()], - ); + let view_output = + self.execute_view_function(str::parse(ACCOUNT_SEQ_NUM).unwrap(), vec![], vec![ + account_address.to_vec(), + ]); let result = view_output.values.expect("Valid result"); assert_eq!(result.len(), 1); bcs::from_bytes::(&result[0]).unwrap() @@ -417,13 +411,12 @@ impl AutomationRegistrationTestContext { } pub(crate) fn get_task_details(&mut self, index: u64) -> AutomationTaskMetaData { - let view_output = self.execute_view_function( - str::parse(AUTOMATION_TASK_DETAILS).unwrap(), - vec![], - vec![MoveValue::U64(index) - .simple_serialize() - .expect("Successful serialization")], - ); + let view_output = + self.execute_view_function(str::parse(AUTOMATION_TASK_DETAILS).unwrap(), vec![], vec![ + MoveValue::U64(index) + .simple_serialize() + .expect("Successful serialization"), + ]); let result = view_output.values.expect("Valid result"); assert!(!result.is_empty()); bcs::from_bytes::(&result[0]) @@ -435,13 +428,11 @@ impl AutomationRegistrationTestContext { vm_viewer: &AptosVMViewer, ) -> AutomationTaskMetaData { let view_output = vm_viewer.execute_view_function( - to_view_function( - str::parse(AUTOMATION_TASK_DETAILS).unwrap(), - vec![], - vec![MoveValue::U64(index) + to_view_function(str::parse(AUTOMATION_TASK_DETAILS).unwrap(), vec![], vec![ + MoveValue::U64(index) .simple_serialize() - .expect("Successful serialization")], - ), + .expect("Successful serialization"), + ]), 50_000, ); let result = view_output.values.expect("Valid result"); @@ -807,14 +798,11 @@ fn check_automation_registry_actions_on_cycle_transition() { let result = test_context .execute_tagged_transaction(Transaction::AutomationRegistryTransaction(registry_action)); let status = result.status().status().expect("Expected execution status"); - assert!(matches!( - status, - ExecutionStatus::MoveAbort { - location: _, - code: _, - info: _ - } - )); + assert!(matches!(status, ExecutionStatus::MoveAbort { + location: _, + code: _, + info: _ + })); test_context.advance_chain_time_in_secs(600); @@ -848,14 +836,11 @@ fn check_automation_registry_actions_on_cycle_transition() { ); let status = result.status().status().expect("Expected execution status"); - assert!(matches!( - status, - ExecutionStatus::MoveAbort { - location: _, - code: _, - info: _ - } - )); + assert!(matches!(status, ExecutionStatus::MoveAbort { + location: _, + code: _, + info: _ + })); test_context.execute_and_apply_transaction(Transaction::AutomationRegistryTransaction( registry_action_for_task0, @@ -946,14 +931,11 @@ fn check_automation_registry_actions_on_cycle_suspension() { .execute_tagged_transaction(Transaction::AutomationRegistryTransaction(registry_action)); let status = result.status().status().expect("Expected execution status"); - assert!(matches!( - status, - ExecutionStatus::MoveAbort { - location: _, - code: _, - info: _ - } - )); + assert!(matches!(status, ExecutionStatus::MoveAbort { + location: _, + code: _, + info: _ + })); } #[test] @@ -972,7 +954,6 @@ fn check_automation_registry_actions_when_automation_cycle_disabled() { )); } - #[derive(Clone, Debug, Serialize, Deserialize)] struct TransactionExecutionFailed { multisig_address: AccountAddress, @@ -984,11 +965,12 @@ struct TransactionExecutionFailed { } fn find_transaction_error(events: &[ContractEvent]) -> Vec { - events.iter().filter(|e| e.is_v2()) + events + .iter() + .filter(|e| e.is_v2()) .map(|e| bcs::from_bytes::(e.event_data())) .filter_map(|d| d.ok()) .collect() - } #[test] @@ -1017,7 +999,9 @@ fn check_system_automation_task_registration() { let failed_event = find_transaction_error(output.events()); assert_eq!(failed_event.len(), 1); let expected_execution_error = ExecutionError { - abort_location: "0000000000000000000000000000000000000000000000000000000000000001::automation_registry".to_string(), + abort_location: + "0000000000000000000000000000000000000000000000000000000000000001::automation_registry" + .to_string(), error_type: "MoveAbort".to_string(), error_code: 41, }; @@ -1047,7 +1031,6 @@ fn check_system_automation_task_registration() { }; assert_eq!(expected_execution_error, failed_event[0].execution_error); - // Try without multisig payload specified let proposal_txn = test_context.create_system_automation_task_registration_proposal(7, &multisig); diff --git a/aptos-move/e2e-testsuite/src/tests/genesis_initializations.rs b/aptos-move/e2e-testsuite/src/tests/genesis_initializations.rs index c8b33d98a2353..35900083066c3 100644 --- a/aptos-move/e2e-testsuite/src/tests/genesis_initializations.rs +++ b/aptos-move/e2e-testsuite/src/tests/genesis_initializations.rs @@ -20,7 +20,10 @@ fn test_timestamp_time_has_started() { "timestamp", "set_time_has_started", vec![], - serialize_values(&vec![MoveValue::Signer(account_address), MoveValue::U64(12)]), + serialize_values(&vec![ + MoveValue::Signer(account_address), + MoveValue::U64(12), + ]), ); println!("{:?}", output); assert_eq!(output.unwrap_err().move_abort_code(), Some(327683)); @@ -29,7 +32,10 @@ fn test_timestamp_time_has_started() { "timestamp", "set_time_has_started", vec![], - serialize_values(&vec![MoveValue::Signer(CORE_CODE_ADDRESS), MoveValue::U64(12)]), + serialize_values(&vec![ + MoveValue::Signer(CORE_CODE_ADDRESS), + MoveValue::U64(12), + ]), ); } diff --git a/aptos-move/e2e-testsuite/src/tests/mod.rs b/aptos-move/e2e-testsuite/src/tests/mod.rs index ccf3b1ad3db04..3740847ae7367 100644 --- a/aptos-move/e2e-testsuite/src/tests/mod.rs +++ b/aptos-move/e2e-testsuite/src/tests/mod.rs @@ -13,6 +13,8 @@ //! Set env REGENERATE_GOLDENFILES to update the golden files when running tests.. mod account_universe; +mod automated_transactions; +mod automation_registration; mod create_account; mod data_store; mod execution_strategies; @@ -26,6 +28,4 @@ mod peer_to_peer; mod scripts; mod transaction_fuzzer; mod verify_txn; -mod automation_registration; -mod automated_transactions; mod vm_viewer; diff --git a/aptos-move/e2e-testsuite/src/tests/vm_viewer.rs b/aptos-move/e2e-testsuite/src/tests/vm_viewer.rs index 1209722c90a56..7f5b7ea6a58fc 100644 --- a/aptos-move/e2e-testsuite/src/tests/vm_viewer.rs +++ b/aptos-move/e2e-testsuite/src/tests/vm_viewer.rs @@ -1,20 +1,29 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. // SPDX-License-Identifier: Apache-2.0 use aptos_language_e2e_tests::executor::FakeExecutor; -use aptos_types::move_utils::MemberId; -use aptos_types::transaction::{ViewFunction, ViewFunctionOutput}; +use aptos_logger::debug; +use aptos_types::{ + move_utils::MemberId, + transaction::{ViewFunction, ViewFunctionOutput}, +}; use aptos_vm::aptos_vm_viewer::AptosVMViewer; use move_core_types::language_storage::TypeTag; use std::time::Instant; -use aptos_logger::debug; const TIMESTAMP_NOW_SECONDS: &str = "0x1::timestamp::now_seconds"; const ACCOUNT_BALANCE: &str = "0x1::coin::balance"; const ACCOUNT_SEQ_NUM: &str = "0x1::account::get_sequence_number"; const SUPRA_COIN: &str = "0x1::supra_coin::SupraCoin"; -pub(crate) fn to_view_function(fn_ref: MemberId, ty_args: Vec, args: Vec>) -> ViewFunction { +pub(crate) fn to_view_function( + fn_ref: MemberId, + ty_args: Vec, + args: Vec>, +) -> ViewFunction { ViewFunction::new(fn_ref.module_id, fn_ref.member_id, ty_args, args) } @@ -73,7 +82,10 @@ fn test_vm_viewer() { let viewer_ifc_time = Instant::now(); let time = Instant::now(); let vm_viewer = AptosVMViewer::new(test_executor.data_store()); - debug!("AptosVMViewer creation time: {}", time.elapsed().as_secs_f64()); + debug!( + "AptosVMViewer creation time: {}", + time.elapsed().as_secs_f64() + ); let actual_results = accounts .iter() .map(|account| { diff --git a/aptos-move/framework/Cargo.toml b/aptos-move/framework/Cargo.toml index 261d7ec9a994a..b457b1be835e0 100644 --- a/aptos-move/framework/Cargo.toml +++ b/aptos-move/framework/Cargo.toml @@ -43,6 +43,7 @@ codespan-reporting = { workspace = true } # is because the `dalek-cryptography/bulletproofs` works with version 2 of `dalek-cryptography/curve25519-dalek` and # we work with version 3. Instead, we use `zkcrypto/bulleproofs` which relies on `zkcrypto/curve25519-dalek-ng`. curve25519-dalek = { package = "curve25519-dalek-ng", version = "4" } +crypto = { workspace = true } either = { workspace = true } eth_trie = { workspace = true } flate2 = { workspace = true } diff --git a/aptos-move/framework/aptos-stdlib/Move.toml b/aptos-move/framework/aptos-stdlib/Move.toml index 1a58e9243fb5a..889da54293fe1 100644 --- a/aptos-move/framework/aptos-stdlib/Move.toml +++ b/aptos-move/framework/aptos-stdlib/Move.toml @@ -6,7 +6,7 @@ version = "1.0.0" std = "0x1" aptos_std = "0x1" supra_framework = "0x1" -Extensions = "0x1" # For Prover to instantiate `{{Ext}}` in prelude. +Extensions = "0x1" # For Prover to instantiate `{{Ext}}` in prelude. [dependencies] MoveStdlib = { local = "../move-stdlib" } diff --git a/aptos-move/framework/aptos-stdlib/sources/any.move b/aptos-move/framework/aptos-stdlib/sources/any.move index 2d778d4300ee7..88b9f4dd78030 100644 --- a/aptos-move/framework/aptos-stdlib/sources/any.move +++ b/aptos-move/framework/aptos-stdlib/sources/any.move @@ -62,4 +62,4 @@ module aptos_std::any { assert!(unpack(pack(22)) == 22, 1); assert!(unpack(pack(S { x: 22 })) == S { x: 22 }, 2); } -} +} \ No newline at end of file diff --git a/aptos-move/framework/aptos-token-objects/Move.toml b/aptos-move/framework/aptos-token-objects/Move.toml index b19f4e4cad98d..d5f24a3cdb70e 100644 --- a/aptos-move/framework/aptos-token-objects/Move.toml +++ b/aptos-move/framework/aptos-token-objects/Move.toml @@ -10,4 +10,4 @@ aptos_token_objects = "0x4" [dependencies] MoveStdlib = { local = "../move-stdlib" } -SupraFramework = { local = "../supra-framework"} +SupraFramework = { local = "../supra-framework" } diff --git a/aptos-move/framework/aptos-token/Move.toml b/aptos-move/framework/aptos-token/Move.toml index deba7e4b55a7a..454d3eb0b8245 100644 --- a/aptos-move/framework/aptos-token/Move.toml +++ b/aptos-move/framework/aptos-token/Move.toml @@ -9,4 +9,4 @@ aptos_token = "0x3" [dependencies] MoveStdlib = { local = "../move-stdlib" } -SupraFramework = { local = "../supra-framework"} +SupraFramework = { local = "../supra-framework" } diff --git a/aptos-move/framework/move-stdlib/Cargo.toml b/aptos-move/framework/move-stdlib/Cargo.toml index e02f9290530f3..9fe073eeeec8b 100644 --- a/aptos-move/framework/move-stdlib/Cargo.toml +++ b/aptos-move/framework/move-stdlib/Cargo.toml @@ -29,4 +29,4 @@ move-unit-test = { path = "../../../third_party/move/tools/move-unit-test" } tempfile = "3.2.0" [features] -testing = [] \ No newline at end of file +testing = [] diff --git a/aptos-move/framework/move-stdlib/doc/features.md b/aptos-move/framework/move-stdlib/doc/features.md index 55d8e15c2a9ae..1f8c50075f895 100644 --- a/aptos-move/framework/move-stdlib/doc/features.md +++ b/aptos-move/framework/move-stdlib/doc/features.md @@ -147,6 +147,12 @@ return true. - [Function `supra_delegation_pool_identity_enabled`](#0x1_features_supra_delegation_pool_identity_enabled) - [Function `get_supra_automation_v2_feature`](#0x1_features_get_supra_automation_v2_feature) - [Function `supra_automation_v2_enabled`](#0x1_features_supra_automation_v2_enabled) +- [Function `get_supra_validator_identity_v2_feature`](#0x1_features_get_supra_validator_identity_v2_feature) +- [Function `supra_validator_identity_v2_enabled`](#0x1_features_supra_validator_identity_v2_enabled) +- [Function `get_supra_bcft_certificates_feature`](#0x1_features_get_supra_bcft_certificates_feature) +- [Function `supra_bcft_certificates_enabled`](#0x1_features_supra_bcft_certificates_enabled) +- [Function `get_supra_dkg_feature`](#0x1_features_get_supra_dkg_feature) +- [Function `supra_dkg_enabled`](#0x1_features_supra_dkg_enabled) - [Function `change_feature_flags`](#0x1_features_change_feature_flags) - [Function `change_feature_flags_internal`](#0x1_features_change_feature_flags_internal) - [Function `change_feature_flags_for_next_epoch`](#0x1_features_change_feature_flags_for_next_epoch) @@ -924,6 +930,31 @@ Lifetime: transient + + +Whether BCFT certificate thresholds are enabled. + +Lifetime: permanent + + +
const SUPRA_BCFT_CERTIFICATES: u64 = 98;
+
+ + + + + +Whether the functionality related to the new validator identity representation is enabled. +This flag should only be enabled after all Validators have updated their keys to the new format, including the BLS keys. + +Lifetime: permanent + + +
const SUPRA_BLS_KEYS: u64 = 97;
+
+ + + Whether the automation task sync on block basis is enabled. @@ -946,6 +977,18 @@ Lifetime: permanent + + +Whether the APIs related to the Supra_Dkg feature are enabled. + +Lifetime: transient + + +
const SUPRA_DKG: u64 = 99;
+
+ + + Whether the APIs related to the eth_trie feature are enabled. @@ -3793,6 +3836,150 @@ Lifetime: transient + + + + +## Function `get_supra_validator_identity_v2_feature` + + + +
public fun get_supra_validator_identity_v2_feature(): u64
+
+ + + +
+Implementation + + +
public fun get_supra_validator_identity_v2_feature(): u64 {
+    SUPRA_BLS_KEYS
+}
+
+ + + +
+ + + +## Function `supra_validator_identity_v2_enabled` + + + +
public fun supra_validator_identity_v2_enabled(): bool
+
+ + + +
+Implementation + + +
public fun supra_validator_identity_v2_enabled(): bool acquires Features {
+    is_enabled(SUPRA_BLS_KEYS)
+}
+
+ + + +
+ + + +## Function `get_supra_bcft_certificates_feature` + + + +
public fun get_supra_bcft_certificates_feature(): u64
+
+ + + +
+Implementation + + +
public fun get_supra_bcft_certificates_feature(): u64 {
+    SUPRA_BCFT_CERTIFICATES
+}
+
+ + + +
+ + + +## Function `supra_bcft_certificates_enabled` + + + +
public fun supra_bcft_certificates_enabled(): bool
+
+ + + +
+Implementation + + +
public fun supra_bcft_certificates_enabled(): bool acquires Features {
+    is_enabled(SUPRA_BCFT_CERTIFICATES)
+}
+
+ + + +
+ + + +## Function `get_supra_dkg_feature` + + + +
public fun get_supra_dkg_feature(): u64
+
+ + + +
+Implementation + + +
public fun get_supra_dkg_feature(): u64 {
+    SUPRA_DKG
+}
+
+ + + +
+ + + +## Function `supra_dkg_enabled` + + + +
public fun supra_dkg_enabled(): bool
+
+ + + +
+Implementation + + +
public fun supra_dkg_enabled(): bool acquires Features {
+    is_enabled(SUPRA_DKG)
+}
+
+ + +
diff --git a/aptos-move/framework/move-stdlib/sources/configs/features.move b/aptos-move/framework/move-stdlib/sources/configs/features.move index a47728b299251..ae1d99afa44ed 100644 --- a/aptos-move/framework/move-stdlib/sources/configs/features.move +++ b/aptos-move/framework/move-stdlib/sources/configs/features.move @@ -784,6 +784,46 @@ module std::features { is_enabled(SUPRA_AUTOMATION_V2) } + /// Whether the functionality related to the new validator identity representation is enabled. + /// This flag should only be enabled after all Validators have updated their keys to the new format, including the BLS keys. + /// + /// Lifetime: permanent + const SUPRA_BLS_KEYS: u64 = 97; + + public fun get_supra_validator_identity_v2_feature(): u64 { + SUPRA_BLS_KEYS + } + + public fun supra_validator_identity_v2_enabled(): bool acquires Features { + is_enabled(SUPRA_BLS_KEYS) + } + + /// Whether BCFT certificate thresholds are enabled. + /// + /// Lifetime: permanent + const SUPRA_BCFT_CERTIFICATES: u64 = 98; + + public fun get_supra_bcft_certificates_feature(): u64 { + SUPRA_BCFT_CERTIFICATES + } + + public fun supra_bcft_certificates_enabled(): bool acquires Features { + is_enabled(SUPRA_BCFT_CERTIFICATES) + } + + /// Whether the APIs related to the Supra_Dkg feature are enabled. + /// + /// Lifetime: transient + const SUPRA_DKG: u64 = 99; + + public fun get_supra_dkg_feature(): u64 { + SUPRA_DKG + } + + public fun supra_dkg_enabled(): bool acquires Features { + is_enabled(SUPRA_DKG) + } + // ============================================================================================ // Feature Flag Implementation diff --git a/aptos-move/framework/src/natives/automation_registry_callbacks.rs b/aptos-move/framework/src/natives/automation_registry_callbacks.rs index 3daa57f935760..462756d9fd1bd 100644 --- a/aptos-move/framework/src/natives/automation_registry_callbacks.rs +++ b/aptos-move/framework/src/natives/automation_registry_callbacks.rs @@ -1,16 +1,13 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2025 Supra. // SPDX-License-Identifier: Apache-2.0 -use aptos_native_interface::{ - SafeNativeBuilder, SafeNativeContext, SafeNativeResult, -}; +use aptos_native_interface::{SafeNativeBuilder, SafeNativeContext, SafeNativeResult}; use move_vm_runtime::native_functions::NativeFunction; -use move_vm_types::{ - loaded_data::runtime_types::Type, - values::{Value}, -}; +use move_vm_types::{loaded_data::runtime_types::Type, values::Value}; use smallvec::{smallvec, SmallVec}; -use std::{collections::VecDeque}; - +use std::collections::VecDeque; /*************************************************************************************************** * native fun to check whether the binary has been updated which supports automation registry @@ -36,9 +33,10 @@ fn native_automation_cycle_management_support( pub fn make_all( builder: &SafeNativeBuilder, ) -> impl Iterator + '_ { - let natives = [ - ("native_automation_cycle_management_support", native_automation_cycle_management_support), - ]; + let natives = [( + "native_automation_cycle_management_support", + native_automation_cycle_management_support, + )]; builder.make_named_natives(natives) } diff --git a/aptos-move/framework/src/natives/cryptography/bls12381_bulletproofs.rs b/aptos-move/framework/src/natives/cryptography/bls12381_bulletproofs.rs index 882534c3fb1c1..01530e3accc30 100644 --- a/aptos-move/framework/src/natives/cryptography/bls12381_bulletproofs.rs +++ b/aptos-move/framework/src/natives/cryptography/bls12381_bulletproofs.rs @@ -1,24 +1,24 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. +use crate::natives::cryptography::bulletproofs::abort_codes; use aptos_crypto::bulletproofs::MAX_RANGE_BITS; use aptos_gas_schedule::gas_params::natives::aptos_framework::*; use aptos_native_interface::{ safely_pop_arg, RawSafeNative, SafeNativeBuilder, SafeNativeContext, SafeNativeError, SafeNativeResult, }; +use blsttc::G1Projective; use bulletproofs_bls12381::{BulletproofGens, PedersenGens, RangeProof}; use merlin::Transcript; use move_core_types::gas_algebra::{NumArgs, NumBytes}; use move_vm_runtime::native_functions::NativeFunction; -use move_vm_types::{ - loaded_data::runtime_types::Type, - values::{Value}, -}; +use move_vm_types::{loaded_data::runtime_types::Type, values::Value}; use once_cell::sync::Lazy; use smallvec::{smallvec, SmallVec}; use std::collections::VecDeque; -use blsttc::G1Projective; -use crate::natives::cryptography::bulletproofs::abort_codes; /// The Bulletproofs library only seems to support proving [0, 2^{num_bits}) ranges where num_bits is /// either 8, 16, 32 or 64. @@ -30,9 +30,7 @@ fn deserialize_g1(vec: Vec) -> Result { if vec.len() != 48 { return Err(()); } - let array: [u8; 48] = vec - .try_into() - .map_err(|_| ())?; + let array: [u8; 48] = vec.try_into().map_err(|_| ())?; let g1_option = G1Projective::from_compressed(&array); @@ -73,7 +71,6 @@ fn native_verify_range_proof( })?; let pg = { - let rand_base = deserialize_g1(rand_base_bytes).map_err(|_| SafeNativeError::Abort { abort_code: abort_codes::NFE_DESERIALIZE_RANGE_PROOF, })?; @@ -107,7 +104,7 @@ fn verify_range_proof( context.charge( BULLETPROOFS_BASE + BULLETPROOFS_PER_BYTE_RANGEPROOF_DESERIALIZE - * NumBytes::new(proof_bytes.len() as u64), + * NumBytes::new(proof_bytes.len() as u64), )?; let range_proof = match RangeProof::from_bytes(proof_bytes) { diff --git a/aptos-move/framework/src/natives/cryptography/bls12381_scalar.rs b/aptos-move/framework/src/natives/cryptography/bls12381_scalar.rs index 2ba8948b0f9d9..1a544baa646ea 100644 --- a/aptos-move/framework/src/natives/cryptography/bls12381_scalar.rs +++ b/aptos-move/framework/src/natives/cryptography/bls12381_scalar.rs @@ -1,16 +1,21 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. -use std::collections::VecDeque; -use smallvec::{smallvec, SmallVec}; +use aptos_gas_schedule::gas_params::natives::aptos_framework::{ + HASH_KECCAK256_BASE, HASH_KECCAK256_PER_BYTE, +}; +use aptos_native_interface::{ + safely_pop_arg, RawSafeNative, SafeNativeBuilder, SafeNativeContext, SafeNativeResult, +}; use blst::blst_scalar; -use aptos_gas_schedule::gas_params::natives::aptos_framework::{HASH_KECCAK256_BASE, HASH_KECCAK256_PER_BYTE}; -use aptos_native_interface::{safely_pop_arg, RawSafeNative, SafeNativeBuilder, SafeNativeContext, SafeNativeResult}; -use move_core_types::gas_algebra::{NumBytes}; +use blsttc::{group::ff::Field, Fr}; +use move_core_types::gas_algebra::NumBytes; use move_vm_runtime::native_functions::NativeFunction; -use move_vm_types::loaded_data::runtime_types::Type; -use move_vm_types::values::Value; -use blsttc::Fr; -use blsttc::group::ff::Field; +use move_vm_types::{loaded_data::runtime_types::Type, values::Value}; +use smallvec::{smallvec, SmallVec}; +use std::collections::VecDeque; /// Native function for computing hash to scalar for BLS12-381. /// @@ -27,25 +32,23 @@ fn native_hash_to_scalar( _ty_args: Vec, mut arguments: VecDeque, ) -> SafeNativeResult> { - let msg: Vec = safely_pop_arg!(arguments, Vec); let dst: Vec = safely_pop_arg!(arguments, Vec); let cost = HASH_KECCAK256_BASE - + HASH_KECCAK256_PER_BYTE * (NumBytes::new(msg.len() as u64) + NumBytes::new(dst.len() as u64)); + + HASH_KECCAK256_PER_BYTE + * (NumBytes::new(msg.len() as u64) + NumBytes::new(dst.len() as u64)); context.charge(cost)?; let scalar_fr: Fr; - if let Some(scalar) = blst_scalar::hash_to(&msg, &dst){ - if let Ok(fr_scalar) = scalar.try_into(){ + if let Some(scalar) = blst_scalar::hash_to(&msg, &dst) { + if let Ok(fr_scalar) = scalar.try_into() { scalar_fr = fr_scalar; - } - else { + } else { scalar_fr = Fr::zero(); } - } - else { + } else { scalar_fr = Fr::zero(); } @@ -57,12 +60,10 @@ pub fn make_all( ) -> impl Iterator + '_ { let mut natives = vec![]; - natives.extend([ - ( - "native_hash_to_scalar", - native_hash_to_scalar as RawSafeNative, - ), - ]); + natives.extend([( + "native_hash_to_scalar", + native_hash_to_scalar as RawSafeNative, + )]); builder.make_named_natives(natives) } diff --git a/aptos-move/framework/src/natives/cryptography/class_groups.rs b/aptos-move/framework/src/natives/cryptography/class_groups.rs new file mode 100644 index 0000000000000..fafeae1360e46 --- /dev/null +++ b/aptos-move/framework/src/natives/cryptography/class_groups.rs @@ -0,0 +1,78 @@ +// Copyright (c) 2025 Supra. + +/*************************************************************************************************** + * native fun class_group_validate_pubkey + * + * gas cost: per_pubkey_deserialize_cost + pop_proof_validation + * + * where +? indicates that the expression stops evaluating there if the previous gas-charging step + * failed + **************************************************************************************************/ +use aptos_gas_schedule::gas_params::natives::supra_stdlib::{ + CLASS_GROUPS_PER_PUBKEY_DESERIALIZE, CLASS_GROUPS_POP, +}; +use aptos_native_interface::{ + safely_pop_arg, RawSafeNative, SafeNativeBuilder, SafeNativeContext, SafeNativeResult, +}; +#[cfg(feature = "testing")] +use crypto::bls12381::cl_utils::rng; +use move_core_types::gas_algebra::NumArgs; +use move_vm_runtime::native_functions::NativeFunction; +use move_vm_types::{loaded_data::runtime_types::Type, values::Value}; +use smallvec::{smallvec, SmallVec}; +use std::collections::VecDeque; + +fn native_class_group_validate_pubkey( + context: &mut SafeNativeContext, + _ty_args: Vec, + mut arguments: VecDeque, +) -> SafeNativeResult> { + debug_assert!(_ty_args.is_empty()); + debug_assert!(arguments.len() == 1); + + context.charge(CLASS_GROUPS_PER_PUBKEY_DESERIALIZE * NumArgs::one())?; + context.charge(CLASS_GROUPS_POP)?; + + let pk_bytes = safely_pop_arg!(arguments, Vec); + match crypto::cg_public_key::CGEncryptionKeyBls12381::try_from(pk_bytes.as_slice()) { + Ok(_) => Ok(smallvec![Value::bool(true)]), + Err(_) => Ok(smallvec![Value::bool(false)]), + } +} + +#[cfg(feature = "testing")] +pub fn native_generate_keys( + _context: &mut SafeNativeContext, + _ty_args: Vec, + _arguments: VecDeque, +) -> SafeNativeResult> { + let (sk, pk) = crypto::bls12381::cg_encryption::keygen(&mut rng(), &vec![]).unwrap(); + + Ok(smallvec![ + Value::vector_u8(bcs::to_bytes(&sk).unwrap()), + Value::vector_u8(pk.to_vec()), + ]) +} + +/*************************************************************************************************** + * module + * + **************************************************************************************************/ +pub fn make_all( + builder: &SafeNativeBuilder, +) -> impl Iterator + '_ { + let mut natives = vec![]; + + natives.extend([( + "validate_pubkey_internal", + native_class_group_validate_pubkey as RawSafeNative, + )]); + + #[cfg(feature = "testing")] + natives.append(&mut vec![( + "generate_keys_internal", + native_generate_keys as RawSafeNative, + )]); + + builder.make_named_natives(natives) +} diff --git a/aptos-move/framework/src/natives/cryptography/eth_trie.rs b/aptos-move/framework/src/natives/cryptography/eth_trie.rs index 96c1489303571..6dc32154c90a2 100644 --- a/aptos-move/framework/src/natives/cryptography/eth_trie.rs +++ b/aptos-move/framework/src/natives/cryptography/eth_trie.rs @@ -1,19 +1,25 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. -use std::collections::VecDeque; -use std::sync::Arc; +use aptos_gas_schedule::gas_params::natives::aptos_framework::{ + ETH_TRIE_PROOF_BASE, ETH_TRIE_PROOF_DECODE_BASE, ETH_TRIE_PROOF_DECODE_PER_BYTE, + ETH_TRIE_PROOF_HASH_BASE, ETH_TRIE_PROOF_HASH_PER_BYTE, +}; +use aptos_native_interface::{ + safely_pop_arg, safely_pop_vec_arg, RawSafeNative, SafeNativeBuilder, SafeNativeContext, + SafeNativeResult, +}; +use eth_trie::{EthTrie, MemoryDB, Trie, DB}; use keccak_hash::{keccak, H256}; -use move_vm_types::values::Value; -use move_vm_types::loaded_data::runtime_types::Type; -use eth_trie::{EthTrie, Trie, DB}; -use eth_trie::MemoryDB; -use smallvec::{smallvec, SmallVec}; use move_core_types::gas_algebra::{NumArgs, NumBytes}; use move_vm_runtime::native_functions::NativeFunction; -use aptos_native_interface::{safely_pop_arg, safely_pop_vec_arg, RawSafeNative, SafeNativeBuilder, SafeNativeContext, SafeNativeResult}; -use aptos_gas_schedule::gas_params::natives::aptos_framework::{ETH_TRIE_PROOF_BASE, ETH_TRIE_PROOF_DECODE_BASE, ETH_TRIE_PROOF_DECODE_PER_BYTE, ETH_TRIE_PROOF_HASH_BASE, ETH_TRIE_PROOF_HASH_PER_BYTE}; +use move_vm_types::{loaded_data::runtime_types::Type, values::Value}; #[cfg(feature = "testing")] use rand::Rng; +use smallvec::{smallvec, SmallVec}; +use std::{collections::VecDeque, sync::Arc}; /// The minimum length (in bytes) for an encoded node to be stored by hash. const HASHED_LENGTH: usize = 32; @@ -45,8 +51,10 @@ pub fn native_verify_proof_eth_trie( let total_proof_bytes = proof.iter().map(|node| node.len() as u64).sum::(); context.charge( - (ETH_TRIE_PROOF_HASH_BASE + ETH_TRIE_PROOF_DECODE_BASE) * NumArgs::new(proof.len() as u64) + - (ETH_TRIE_PROOF_HASH_PER_BYTE + ETH_TRIE_PROOF_DECODE_PER_BYTE) * NumBytes::new(total_proof_bytes))?; + (ETH_TRIE_PROOF_HASH_BASE + ETH_TRIE_PROOF_DECODE_BASE) * NumArgs::new(proof.len() as u64) + + (ETH_TRIE_PROOF_HASH_PER_BYTE + ETH_TRIE_PROOF_DECODE_PER_BYTE) + * NumBytes::new(total_proof_bytes), + )?; // Convert the root (a Vec) into a H256 hash. let root_hash = H256::from_slice(&root); @@ -155,12 +163,10 @@ pub fn make_all( native_generate_random_trie as RawSafeNative, )]); - natives.extend([ - ( - "native_verify_proof_eth_trie", - native_verify_proof_eth_trie as RawSafeNative, - ), - ]); + natives.extend([( + "native_verify_proof_eth_trie", + native_verify_proof_eth_trie as RawSafeNative, + )]); builder.make_named_natives(natives) } diff --git a/aptos-move/framework/src/natives/cryptography/mod.rs b/aptos-move/framework/src/natives/cryptography/mod.rs index 5231d4bdba0c4..c1dd6e64fed91 100644 --- a/aptos-move/framework/src/natives/cryptography/mod.rs +++ b/aptos-move/framework/src/natives/cryptography/mod.rs @@ -3,14 +3,15 @@ pub mod algebra; pub mod bls12381; +pub mod bls12381_bulletproofs; +pub mod bls12381_scalar; pub mod bulletproofs; +pub mod class_groups; pub mod ed25519; +pub mod eth_trie; mod helpers; pub mod multi_ed25519; pub mod ristretto255; pub mod ristretto255_point; pub mod ristretto255_scalar; pub mod secp256k1; -pub mod eth_trie; -pub mod bls12381_scalar; -pub mod bls12381_bulletproofs; diff --git a/aptos-move/framework/src/natives/mod.rs b/aptos-move/framework/src/natives/mod.rs index 83802f992d70b..3e25412b8b056 100644 --- a/aptos-move/framework/src/natives/mod.rs +++ b/aptos-move/framework/src/natives/mod.rs @@ -4,6 +4,7 @@ pub mod account; pub mod aggregator_natives; +mod automation_registry_callbacks; pub mod code; pub mod consensus_config; pub mod create_signer; @@ -16,13 +17,12 @@ pub mod hash; pub mod object; pub mod object_code_deployment; pub mod randomness; +pub mod rlp; pub mod state_storage; pub mod string_utils; pub mod transaction_context; pub mod type_info; pub mod util; -pub mod rlp; -mod automation_registry_callbacks; pub mod vector_utils; use crate::natives::cryptography::multi_ed25519; @@ -60,7 +60,10 @@ pub fn all_natives( add_natives_from_module!("genesis", create_signer::make_all(builder)); add_natives_from_module!("multi_ed25519", multi_ed25519::make_all(builder)); add_natives_from_module!("bls12381", cryptography::bls12381::make_all(builder)); - add_natives_from_module!("bls12381_scalar", cryptography::bls12381_scalar::make_all(builder)); + add_natives_from_module!( + "bls12381_scalar", + cryptography::bls12381_scalar::make_all(builder) + ); add_natives_from_module!("eth_trie", cryptography::eth_trie::make_all(builder)); add_natives_from_module!("secp256k1", cryptography::secp256k1::make_all(builder)); add_natives_from_module!("aptos_hash", hash::make_all(builder)); @@ -80,6 +83,10 @@ pub fn all_natives( "bls12381_bulletproofs", cryptography::bls12381_bulletproofs::make_all(builder) ); + add_natives_from_module!( + "class_groups", + cryptography::class_groups::make_all(builder) + ); add_natives_from_module!( "transaction_context", transaction_context::make_all(builder) @@ -100,7 +107,10 @@ pub fn all_natives( dispatchable_fungible_asset::make_all(builder) ); add_natives_from_module!("rlp", rlp::make_all(builder)); - add_natives_from_module!("automation_registry", automation_registry_callbacks::make_all(builder)); + add_natives_from_module!( + "automation_registry", + automation_registry_callbacks::make_all(builder) + ); add_natives_from_module!("vector_utils", vector_utils::make_all(builder)); make_table_from_iter(framework_addr, natives) diff --git a/aptos-move/framework/src/natives/rlp.rs b/aptos-move/framework/src/natives/rlp.rs index edf1881076c5d..413bb9cf86725 100644 --- a/aptos-move/framework/src/natives/rlp.rs +++ b/aptos-move/framework/src/natives/rlp.rs @@ -1,17 +1,24 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. -use std::collections::VecDeque; +use aptos_gas_schedule::gas_params::natives::aptos_framework::{ + RLP_ENCODE_DECODE_BASE, RLP_ENCODE_DECODE_PER_BYTE, UTIL_FROM_BYTES_BASE, + UTIL_FROM_BYTES_PER_BYTE, +}; +use aptos_native_interface::{ + safely_pop_arg, RawSafeNative, SafeNativeBuilder, SafeNativeContext, SafeNativeError, + SafeNativeResult, +}; use ark_std::iterable::Iterable; use keccak_hash::H256; +use move_core_types::{account_address::AccountAddress, gas_algebra::NumBytes}; +use move_vm_runtime::native_functions::NativeFunction; +use move_vm_types::{loaded_data::runtime_types::Type, values::Value}; use rlp::Rlp; use smallvec::{smallvec, SmallVec}; -use aptos_gas_schedule::gas_params::natives::aptos_framework::{RLP_ENCODE_DECODE_BASE, RLP_ENCODE_DECODE_PER_BYTE, UTIL_FROM_BYTES_BASE, UTIL_FROM_BYTES_PER_BYTE}; -use aptos_native_interface::{safely_pop_arg, RawSafeNative, SafeNativeBuilder, SafeNativeContext, SafeNativeError, SafeNativeResult}; -use move_core_types::account_address::AccountAddress; -use move_core_types::gas_algebra::{NumBytes}; -use move_vm_runtime::native_functions::NativeFunction; -use move_vm_types::loaded_data::runtime_types::Type; -use move_vm_types::values::Value; +use std::collections::VecDeque; const E_DECODE_FAILURE: u64 = 0x1; const E_INVALID_TYPE_ARG: u64 = 0x2; @@ -24,8 +31,7 @@ macro_rules! rlp_encode_scalar { ($context:expr, $args:ident, $rust_ty:ty, $num_bytes:expr) => {{ let x: $rust_ty = safely_pop_arg!($args, $rust_ty); $context.charge( - RLP_ENCODE_DECODE_BASE + - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new($num_bytes) + RLP_ENCODE_DECODE_BASE + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new($num_bytes), )?; let encoded_data = rlp::encode(&x).to_vec(); Ok(smallvec![Value::vector_u8(encoded_data)]) @@ -39,8 +45,8 @@ macro_rules! rlp_decode_scalar { let encoded_data: Vec = safely_pop_arg!($args, Vec); // Gas charge $context.charge( - RLP_ENCODE_DECODE_BASE + - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64) + RLP_ENCODE_DECODE_BASE + + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64), )?; // RLP decode match rlp::decode::<$rust_ty>(&encoded_data) { @@ -57,7 +63,11 @@ macro_rules! rlp_encode_list { ($data:expr, $rust_ty:ty, $err_code:expr) => {{ let vec_t: Vec<$rust_ty> = match bcs::from_bytes(&$data) { Ok(val) => val, - Err(_) => return Err(SafeNativeError::Abort { abort_code: $err_code }), + Err(_) => { + return Err(SafeNativeError::Abort { + abort_code: $err_code, + }) + }, }; let encoded = rlp::encode_list(&vec_t).to_vec(); Ok(smallvec![Value::vector_u8(encoded)]) @@ -69,7 +79,9 @@ macro_rules! rlp_decode_list { ($rlp:expr, $rust_ty:ty, $build_value_fn:expr, $err_code:expr) => {{ match $rlp.as_list::<$rust_ty>() { Ok(decoded) => Ok(smallvec![$build_value_fn(decoded)]), - Err(_) => Err(SafeNativeError::Abort { abort_code: $err_code }), + Err(_) => Err(SafeNativeError::Abort { + abort_code: $err_code, + }), } }}; } @@ -86,33 +98,34 @@ fn native_rlp_encode( ty_args: Vec, mut args: VecDeque, ) -> SafeNativeResult> { - if ty_args.len() != 1 { - return Err(SafeNativeError::Abort { abort_code: E_INVALID_TYPE_ARG }); + return Err(SafeNativeError::Abort { + abort_code: E_INVALID_TYPE_ARG, + }); } let inner_ty = &ty_args[0]; match inner_ty { - Type::Bool => rlp_encode_scalar!(context, args, bool, 1), - Type::U8 => rlp_encode_scalar!(context, args, u8, 1), - Type::U16 => rlp_encode_scalar!(context, args, u16, 2), - Type::U32 => rlp_encode_scalar!(context, args, u32, 4), - Type::U64 => rlp_encode_scalar!(context, args, u64, 8), - Type::U128 => rlp_encode_scalar!(context, args, u128, 16), + Type::Bool => rlp_encode_scalar!(context, args, bool, 1), + Type::U8 => rlp_encode_scalar!(context, args, u8, 1), + Type::U16 => rlp_encode_scalar!(context, args, u16, 2), + Type::U32 => rlp_encode_scalar!(context, args, u32, 4), + Type::U64 => rlp_encode_scalar!(context, args, u64, 8), + Type::U128 => rlp_encode_scalar!(context, args, u128, 16), // address is custom Type::Address => { let addr: AccountAddress = safely_pop_arg!(args, AccountAddress); let addr_bytes = addr.into_bytes(); context.charge( - RLP_ENCODE_DECODE_BASE + - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(addr_bytes.len() as u64) + RLP_ENCODE_DECODE_BASE + + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(addr_bytes.len() as u64), )?; let addr = H256::from(addr_bytes); let encoded_data = rlp::encode(&addr).to_vec(); Ok(smallvec![Value::vector_u8(encoded_data)]) - } + }, // vector is also custom Type::Vector(inner_type) => { @@ -121,17 +134,21 @@ fn native_rlp_encode( Type::U8 => { let bytes: Vec = safely_pop_arg!(args, Vec); context.charge( - RLP_ENCODE_DECODE_BASE + - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(bytes.len() as u64) + RLP_ENCODE_DECODE_BASE + + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(bytes.len() as u64), )?; let encoded_data = rlp::encode(&bytes).to_vec(); Ok(smallvec![Value::vector_u8(encoded_data)]) - } - _ => Err(SafeNativeError::Abort { abort_code: E_UNSUPPORTED_TYPE }), + }, + _ => Err(SafeNativeError::Abort { + abort_code: E_UNSUPPORTED_TYPE, + }), } - } + }, - _ => Err(SafeNativeError::Abort { abort_code: E_UNSUPPORTED_TYPE }), + _ => Err(SafeNativeError::Abort { + abort_code: E_UNSUPPORTED_TYPE, + }), } } @@ -140,56 +157,65 @@ fn native_rlp_decode( ty_args: Vec, mut args: VecDeque, ) -> SafeNativeResult> { - if ty_args.len() != 1 { - return Err(SafeNativeError::Abort { abort_code: E_INVALID_TYPE_ARG }); + return Err(SafeNativeError::Abort { + abort_code: E_INVALID_TYPE_ARG, + }); } let inner_ty = &ty_args[0]; match inner_ty { - Type::Bool => rlp_decode_scalar!(context, args, bool, Value::bool), - Type::U8 => rlp_decode_scalar!(context, args, u8, Value::u8), - Type::U16 => rlp_decode_scalar!(context, args, u16, Value::u16), - Type::U32 => rlp_decode_scalar!(context, args, u32, Value::u32), - Type::U64 => rlp_decode_scalar!(context, args, u64, Value::u64), - Type::U128 => rlp_decode_scalar!(context, args, u128, Value::u128), + Type::Bool => rlp_decode_scalar!(context, args, bool, Value::bool), + Type::U8 => rlp_decode_scalar!(context, args, u8, Value::u8), + Type::U16 => rlp_decode_scalar!(context, args, u16, Value::u16), + Type::U32 => rlp_decode_scalar!(context, args, u32, Value::u32), + Type::U64 => rlp_decode_scalar!(context, args, u64, Value::u64), + Type::U128 => rlp_decode_scalar!(context, args, u128, Value::u128), Type::Address => { let encoded_data: Vec = safely_pop_arg!(args, Vec); context.charge( - RLP_ENCODE_DECODE_BASE + - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64) + RLP_ENCODE_DECODE_BASE + + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64), )?; // address => decode as Vec, then convert match rlp::decode::>(&encoded_data) { - Ok(addr_bytes) => { - match AccountAddress::from_bytes(addr_bytes) { - Ok(addr) => Ok(smallvec![Value::address(addr)]), - Err(_) => Err(SafeNativeError::Abort { abort_code: E_DECODE_FAILURE }), - } + Ok(addr_bytes) => match AccountAddress::from_bytes(addr_bytes) { + Ok(addr) => Ok(smallvec![Value::address(addr)]), + Err(_) => Err(SafeNativeError::Abort { + abort_code: E_DECODE_FAILURE, + }), }, - Err(_) => Err(SafeNativeError::Abort { abort_code: E_DECODE_FAILURE }), + Err(_) => Err(SafeNativeError::Abort { + abort_code: E_DECODE_FAILURE, + }), } - } + }, Type::Vector(inner_type) => { match &**inner_type { // only vector encoding is supported Type::U8 => { let encoded_data: Vec = safely_pop_arg!(args, Vec); context.charge( - RLP_ENCODE_DECODE_BASE + - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64) + RLP_ENCODE_DECODE_BASE + + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64), )?; match rlp::decode::>(&encoded_data) { Ok(decoded_bytes) => Ok(smallvec![Value::vector_u8(decoded_bytes)]), - Err(_) => Err(SafeNativeError::Abort { abort_code: E_DECODE_FAILURE }), + Err(_) => Err(SafeNativeError::Abort { + abort_code: E_DECODE_FAILURE, + }), } - } - _ => Err(SafeNativeError::Abort { abort_code: E_UNSUPPORTED_TYPE }), + }, + _ => Err(SafeNativeError::Abort { + abort_code: E_UNSUPPORTED_TYPE, + }), } - } + }, - _ => Err(SafeNativeError::Abort { abort_code: E_UNSUPPORTED_TYPE }), + _ => Err(SafeNativeError::Abort { + abort_code: E_UNSUPPORTED_TYPE, + }), } } @@ -205,41 +231,44 @@ fn native_rlp_encode_list_scalar( ty_args: Vec, mut args: VecDeque, ) -> SafeNativeResult> { - if ty_args.len() != 1 { - return Err(SafeNativeError::Abort { abort_code: E_INVALID_TYPE_ARG }); + return Err(SafeNativeError::Abort { + abort_code: E_INVALID_TYPE_ARG, + }); } let inner_ty = &ty_args[0]; let data: Vec = safely_pop_arg!(args, Vec); let total_data_bytes = data.len() as u64; context.charge( - RLP_ENCODE_DECODE_BASE+ - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(total_data_bytes))?; + RLP_ENCODE_DECODE_BASE + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(total_data_bytes), + )?; match inner_ty { Type::Bool => { rlp_encode_list!(data, bool, E_ENCODE_FAILURE) - } + }, Type::U8 => { rlp_encode_list!(data, u8, E_ENCODE_FAILURE) - } + }, Type::U16 => { rlp_encode_list!(data, u16, E_ENCODE_FAILURE) - } + }, Type::U32 => { rlp_encode_list!(data, u32, E_ENCODE_FAILURE) - } + }, Type::U64 => { rlp_encode_list!(data, u64, E_ENCODE_FAILURE) - } + }, Type::U128 => { rlp_encode_list!(data, u128, E_ENCODE_FAILURE) - } + }, Type::Address => { // Address is a bit more custom - let data: Vec = bcs::from_bytes(&data) - .map_err(|_| SafeNativeError::Abort { abort_code: E_ENCODE_FAILURE })?; + let data: Vec = + bcs::from_bytes(&data).map_err(|_| SafeNativeError::Abort { + abort_code: E_ENCODE_FAILURE, + })?; let mut address_vec = vec![]; for addr in data { @@ -249,10 +278,10 @@ fn native_rlp_encode_list_scalar( } let encoded_data = rlp::encode_list(&address_vec).to_vec(); Ok(smallvec![Value::vector_u8(encoded_data)]) - } - _ => { - Err(SafeNativeError::Abort { abort_code: E_UNSUPPORTED_TYPE }) - } + }, + _ => Err(SafeNativeError::Abort { + abort_code: E_UNSUPPORTED_TYPE, + }), } } @@ -261,16 +290,17 @@ fn native_rlp_decode_list_scalar( ty_args: Vec, mut args: VecDeque, ) -> SafeNativeResult> { - if ty_args.len() != 1 { - return Err(SafeNativeError::Abort { abort_code: E_INVALID_TYPE_ARG }); + return Err(SafeNativeError::Abort { + abort_code: E_INVALID_TYPE_ARG, + }); } let inner_ty = &ty_args[0]; let encoded_data: Vec = safely_pop_arg!(args, Vec); context.charge( - RLP_ENCODE_DECODE_BASE+ - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64) + RLP_ENCODE_DECODE_BASE + + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64), )?; let rlp = Rlp::new(&encoded_data); @@ -307,17 +337,23 @@ fn native_rlp_decode_list_scalar( } match AccountAddress::from_bytes(address_bytes) { Ok(addr) => address_vec.push(addr), - Err(_) => return Err(SafeNativeError::Abort { - abort_code: E_DECODE_FAILURE, - }), + Err(_) => { + return Err(SafeNativeError::Abort { + abort_code: E_DECODE_FAILURE, + }) + }, } } Ok(smallvec![Value::vector_address(address_vec)]) }, - Err(_) => Err(SafeNativeError::Abort { abort_code: E_DECODE_FAILURE }), + Err(_) => Err(SafeNativeError::Abort { + abort_code: E_DECODE_FAILURE, + }), } }, - _ => Err(SafeNativeError::Abort { abort_code: E_UNSUPPORTED_TYPE }), + _ => Err(SafeNativeError::Abort { + abort_code: E_UNSUPPORTED_TYPE, + }), } } @@ -326,14 +362,14 @@ fn native_rlp_encode_list_byte_array( _ty_args: Vec, mut args: VecDeque, ) -> SafeNativeResult> { - let data: Vec = safely_pop_arg!(args, Vec); let total_data_bytes = data.len() as u64; context.charge( - RLP_ENCODE_DECODE_BASE+ - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(total_data_bytes))?; - let data: Vec> = bcs::from_bytes(&data) - .map_err(|_| SafeNativeError::Abort { abort_code: E_ENCODE_FAILURE })?; + RLP_ENCODE_DECODE_BASE + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(total_data_bytes), + )?; + let data: Vec> = bcs::from_bytes(&data).map_err(|_| SafeNativeError::Abort { + abort_code: E_ENCODE_FAILURE, + })?; let encoded_data = rlp::encode_list::, _>(&data).to_vec(); Ok(smallvec![Value::vector_u8(encoded_data)]) } @@ -343,11 +379,10 @@ fn native_rlp_decode_list_byte_array( _ty_args: Vec, mut args: VecDeque, ) -> SafeNativeResult> { - let encoded_data: Vec = safely_pop_arg!(args, Vec); context.charge( - RLP_ENCODE_DECODE_BASE+ - RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64) + RLP_ENCODE_DECODE_BASE + + RLP_ENCODE_DECODE_PER_BYTE * NumBytes::new(encoded_data.len() as u64), )?; let rlp = Rlp::new(&encoded_data); @@ -356,14 +391,17 @@ fn native_rlp_decode_list_byte_array( Ok(decoded) => { //serialize and return data context.charge( - UTIL_FROM_BYTES_BASE+ - UTIL_FROM_BYTES_PER_BYTE * NumBytes::new(encoded_data.len() as u64) + UTIL_FROM_BYTES_BASE + + UTIL_FROM_BYTES_PER_BYTE * NumBytes::new(encoded_data.len() as u64), )?; - let serialized_data = bcs::to_bytes(&decoded) - .map_err(|_| SafeNativeError::Abort { abort_code: E_DECODE_FAILURE })?; + let serialized_data = bcs::to_bytes(&decoded).map_err(|_| SafeNativeError::Abort { + abort_code: E_DECODE_FAILURE, + })?; Ok(smallvec![Value::vector_u8(serialized_data)]) }, - Err(_) => Err(SafeNativeError::Abort { abort_code: E_DECODE_FAILURE }), + Err(_) => Err(SafeNativeError::Abort { + abort_code: E_DECODE_FAILURE, + }), } } @@ -375,12 +413,22 @@ pub fn make_all( natives.extend([ ("native_rlp_encode", native_rlp_encode as RawSafeNative), ("native_rlp_decode", native_rlp_decode as RawSafeNative), - - ("native_rlp_encode_list_scalar", native_rlp_encode_list_scalar as RawSafeNative), - ("native_rlp_decode_list_scalar", native_rlp_decode_list_scalar as RawSafeNative), - - ("native_rlp_encode_list_byte_array", native_rlp_encode_list_byte_array as RawSafeNative), - ("native_rlp_decode_list_byte_array", native_rlp_decode_list_byte_array as RawSafeNative), + ( + "native_rlp_encode_list_scalar", + native_rlp_encode_list_scalar as RawSafeNative, + ), + ( + "native_rlp_decode_list_scalar", + native_rlp_decode_list_scalar as RawSafeNative, + ), + ( + "native_rlp_encode_list_byte_array", + native_rlp_encode_list_byte_array as RawSafeNative, + ), + ( + "native_rlp_decode_list_byte_array", + native_rlp_decode_list_byte_array as RawSafeNative, + ), ]); builder.make_named_natives(natives) diff --git a/aptos-move/framework/src/release_bundle.rs b/aptos-move/framework/src/release_bundle.rs index 20c7fbdcd1334..3899efb0f709c 100644 --- a/aptos-move/framework/src/release_bundle.rs +++ b/aptos-move/framework/src/release_bundle.rs @@ -3,6 +3,7 @@ use crate::{built_package::BuiltPackage, natives::code::PackageMetadata, path_in_crate}; use anyhow::Context; +use aptos_crypto::HashValue; use aptos_types::account_address::AccountAddress; use move_binary_format::{access::ModuleAccess, errors::PartialVMError, CompiledModule}; use move_command_line_common::files::{extension_equals, find_filenames, MOVE_EXTENSION}; @@ -10,7 +11,6 @@ use move_core_types::language_storage::ModuleId; use move_model::{code_writer::CodeWriter, emit, emitln, model::Loc}; use serde::{Deserialize, Serialize}; use std::{collections::BTreeMap, path::PathBuf}; -use aptos_crypto::HashValue; /// A release bundle consists of a list of release packages. #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] @@ -184,9 +184,16 @@ impl ReleasePackage { for_address: AccountAddress, out: PathBuf, next_execution_hash: Option, - function_name: String + function_name: String, ) -> anyhow::Result<()> { - self.generate_script_proposal_impl(for_address, out, true, true, next_execution_hash, function_name) + self.generate_script_proposal_impl( + for_address, + out, + true, + true, + next_execution_hash, + function_name, + ) } fn generate_script_proposal_impl( @@ -208,7 +215,11 @@ impl ReleasePackage { // The Sha2-256 digest here is the combined hash of all the hashes of the `.move` files and // the manifest file(Move.toml) in the source package. // Check [move_package::resolution::digest::compile_digest] - emitln!(writer, "// source package's SHA2-256 digest: {}", self.metadata.source_digest); + emitln!( + writer, + "// source package's SHA2-256 digest: {}", + self.metadata.source_digest + ); emitln!(writer, "script {"); writer.indent(); emitln!(writer, "use std::vector;"); diff --git a/aptos-move/framework/supra-framework/doc/block.md b/aptos-move/framework/supra-framework/doc/block.md index ac1d7e8bf1f00..40a0b40e069eb 100644 --- a/aptos-move/framework/supra-framework/doc/block.md +++ b/aptos-move/framework/supra-framework/doc/block.md @@ -696,7 +696,7 @@ The runtime always runs this before executing the transactions in a block. block_prologue() but trigger reconfiguration with DKG after epoch timed out. -
fun block_prologue_ext(vm: signer, hash: address, epoch: u64, round: u64, proposer: address, failed_proposer_indices: vector<u64>, previous_block_votes_bitvec: vector<u8>, timestamp: u64, randomness_seed: option::Option<vector<u8>>)
+
fun block_prologue_ext(vm: signer, hash: address, epoch: u64, round: u64, proposer: address, failed_proposer_indices: vector<u64>, previous_block_votes_bitvec: vector<u8>, timestamp: u64, randomness_seed_vec: vector<u8>)
 
@@ -714,8 +714,14 @@ The runtime always runs this before executing the transactions in a block. failed_proposer_indices: vector<u64>, previous_block_votes_bitvec: vector<u8>, timestamp: u64, - randomness_seed: Option<vector<u8>>, + randomness_seed_vec: vector<u8>, ) acquires BlockResource, CommitHistory { + let randomness_seed = if (vector::length(&randomness_seed_vec) == 0) { + option::none() + } else { + option::some(randomness_seed_vec) + }; + let epoch_interval = block_prologue_common( &vm, hash, @@ -1265,7 +1271,7 @@ The BlockResource existed under the @supra_framework. ### Function `block_prologue_ext` -
fun block_prologue_ext(vm: signer, hash: address, epoch: u64, round: u64, proposer: address, failed_proposer_indices: vector<u64>, previous_block_votes_bitvec: vector<u8>, timestamp: u64, randomness_seed: option::Option<vector<u8>>)
+
fun block_prologue_ext(vm: signer, hash: address, epoch: u64, round: u64, proposer: address, failed_proposer_indices: vector<u64>, previous_block_votes_bitvec: vector<u8>, timestamp: u64, randomness_seed_vec: vector<u8>)
 
diff --git a/aptos-move/framework/supra-framework/doc/dkg.md b/aptos-move/framework/supra-framework/doc/dkg.md index 6ae6728a12ca3..56657d41dd124 100644 --- a/aptos-move/framework/supra-framework/doc/dkg.md +++ b/aptos-move/framework/supra-framework/doc/dkg.md @@ -6,44 +6,55 @@ DKG on-chain states and helper functions. -- [Struct `DKGSessionMetadata`](#0x1_dkg_DKGSessionMetadata) - [Struct `DKGStartEvent`](#0x1_dkg_DKGStartEvent) +- [Struct `DKGMetaSetEvent`](#0x1_dkg_DKGMetaSetEvent) +- [Struct `DKGFinishEvent`](#0x1_dkg_DKGFinishEvent) +- [Struct `DKGSessionMetadata`](#0x1_dkg_DKGSessionMetadata) - [Struct `DKGSessionState`](#0x1_dkg_DKGSessionState) - [Resource `DKGState`](#0x1_dkg_DKGState) +- [Struct `OnChainAggregateCommitment`](#0x1_dkg_OnChainAggregateCommitment) +- [Struct `OnChainAggregateCommitmentAllCommittees`](#0x1_dkg_OnChainAggregateCommitmentAllCommittees) - [Constants](#@Constants_0) - [Function `initialize`](#0x1_dkg_initialize) - [Function `start`](#0x1_dkg_start) +- [Function `set_dkg_meta`](#0x1_dkg_set_dkg_meta) - [Function `finish`](#0x1_dkg_finish) - [Function `try_clear_incomplete_session`](#0x1_dkg_try_clear_incomplete_session) - [Function `incomplete_session`](#0x1_dkg_incomplete_session) +- [Function `last_completed_session`](#0x1_dkg_last_completed_session) - [Function `session_dealer_epoch`](#0x1_dkg_session_dealer_epoch) - [Specification](#@Specification_1) - [Function `initialize`](#@Specification_1_initialize) - [Function `start`](#@Specification_1_start) + - [Function `set_dkg_meta`](#@Specification_1_set_dkg_meta) - [Function `finish`](#@Specification_1_finish) - [Function `try_clear_incomplete_session`](#@Specification_1_try_clear_incomplete_session) - [Function `incomplete_session`](#@Specification_1_incomplete_session) -
use 0x1::error;
+
use 0x1::any;
+use 0x1::dkg_committee;
+use 0x1::error;
 use 0x1::event;
 use 0x1::option;
-use 0x1::randomness_config;
+use 0x1::stake;
+use 0x1::string;
 use 0x1::system_addresses;
 use 0x1::timestamp;
-use 0x1::validator_consensus_info;
+use 0x1::type_info;
+use 0x1::vector;
 
- + -## Struct `DKGSessionMetadata` +## Struct `DKGStartEvent` -This can be considered as the public input of DKG. -
struct DKGSessionMetadata has copy, drop, store
+
#[event]
+struct DKGStartEvent has drop, store
 
@@ -54,25 +65,69 @@ This can be considered as the public input of DKG.
-dealer_epoch: u64 +session_metadata: dkg::DKGSessionMetadata
-randomness_config: randomness_config::RandomnessConfig +start_time_us: u64
+
+ + + + + + +## Struct `DKGMetaSetEvent` + + + +
#[event]
+struct DKGMetaSetEvent has drop, store
+
+ + + +
+Fields + + +
-dealer_validator_set: vector<validator_consensus_info::ValidatorConsensusInfo> +dkg_meta_transcript: vector<u8>
+
+ + +
+ + + +## Struct `DKGFinishEvent` + + + +
#[event]
+struct DKGFinishEvent has drop, store
+
+ + + +
+Fields + + +
-target_validator_set: vector<validator_consensus_info::ValidatorConsensusInfo> +target_committees_public_key_shares: vector<u8>
@@ -82,14 +137,14 @@ This can be considered as the public input of DKG.
- + -## Struct `DKGStartEvent` +## Struct `DKGSessionMetadata` +This can be considered as the public input of DKG. -
#[event]
-struct DKGStartEvent has drop, store
+
struct DKGSessionMetadata has copy, drop, store
 
@@ -100,13 +155,25 @@ This can be considered as the public input of DKG.
-session_metadata: dkg::DKGSessionMetadata +dealer_epoch: u64
-start_time_us: u64 +randomness_seed: vector<u8> +
+
+ +
+
+dealer_committee: dkg_committee::DkgCommittee +
+
+ +
+
+target_committees: vector<dkg_committee::ReceiverCommittee>
@@ -147,7 +214,13 @@ The validator set of epoch x works together for an DKG output for t
-transcript: vector<u8> +dkg_meta_transcript: vector<u8> +
+
+ +
+
+target_committees_public_key_shares: vector<u8>
@@ -189,6 +262,96 @@ The completed and in-progress DKG sessions.
+ + + + +## Struct `OnChainAggregateCommitment` + + + +
struct OnChainAggregateCommitment has copy, drop
+
+ + + +
+Fields + + +
+
+bls12381_commitment_g: vector<u8> +
+
+ +
+
+bls12381_commitment_evals: vector<vector<u8>> +
+
+ +
+
+dealer_ids: vector<u32> +
+
+ +
+
+committee_index: u32 +
+
+ +
+
+epoch: u64 +
+
+ +
+
+chain_id: u8 +
+
+ +
+
+threshold_type: u8 +
+
+ +
+
+ + +
+ + + +## Struct `OnChainAggregateCommitmentAllCommittees` + + + +
struct OnChainAggregateCommitmentAllCommittees has copy, drop
+
+ + + +
+Fields + + +
+
+commitments: vector<dkg::OnChainAggregateCommitment> +
+
+ +
+
+ +
@@ -196,11 +359,29 @@ The completed and in-progress DKG sessions. ## Constants - + + + + +
const EDKG_INVALID_PK_SHARES: u64 = 4;
+
+ + + + + + + +
const EDKG_META_ALREADY_SET: u64 = 2;
+
+ + + + -
const EDKG_IN_PROGRESS: u64 = 1;
+
const EDKG_META_NOT_SET: u64 = 3;
 
@@ -209,7 +390,7 @@ The completed and in-progress DKG sessions. -
const EDKG_NOT_IN_PROGRESS: u64 = 2;
+
const EDKG_NOT_IN_PROGRESS: u64 = 1;
 
@@ -221,7 +402,7 @@ The completed and in-progress DKG sessions. Called in genesis to initialize on-chain states. -
public fun initialize(supra_framework: &signer)
+
public(friend) fun initialize(supra_framework: &signer)
 
@@ -230,7 +411,7 @@ Called in genesis to initialize on-chain states. Implementation -
public fun initialize(supra_framework: &signer) {
+
public(friend) fun initialize(supra_framework: &signer) {
     system_addresses::assert_supra_framework(supra_framework);
     if (!exists<DKGState>(@supra_framework)) {
         move_to<DKGState>(
@@ -240,7 +421,7 @@ Called in genesis to initialize on-chain states.
                 in_progress: std::option::none(),
             }
         );
-    }
+    };
 }
 
@@ -256,7 +437,7 @@ Mark on-chain DKG state as in-progress. Notify validators to start DKG. Abort if a DKG is already in progress. -
public(friend) fun start(dealer_epoch: u64, randomness_config: randomness_config::RandomnessConfig, dealer_validator_set: vector<validator_consensus_info::ValidatorConsensusInfo>, target_validator_set: vector<validator_consensus_info::ValidatorConsensusInfo>)
+
public(friend) fun start(dealer_epoch: u64, randomness_seed: vector<u8>, dealer_committee: dkg_committee::DkgCommittee, target_committees: vector<dkg_committee::ReceiverCommittee>)
 
@@ -267,22 +448,23 @@ Abort if a DKG is already in progress.
public(friend) fun start(
     dealer_epoch: u64,
-    randomness_config: RandomnessConfig,
-    dealer_validator_set: vector<ValidatorConsensusInfo>,
-    target_validator_set: vector<ValidatorConsensusInfo>,
+    randomness_seed: vector<u8>,
+    dealer_committee: DkgCommittee,
+    target_committees: vector<ReceiverCommittee>
 ) acquires DKGState {
     let dkg_state = borrow_global_mut<DKGState>(@supra_framework);
     let new_session_metadata = DKGSessionMetadata {
         dealer_epoch,
-        randomness_config,
-        dealer_validator_set,
-        target_validator_set,
+        randomness_seed,
+        dealer_committee,
+        target_committees,
     };
     let start_time_us = timestamp::now_microseconds();
     dkg_state.in_progress = std::option::some(DKGSessionState {
         metadata: new_session_metadata,
         start_time_us,
-        transcript: vector[],
+        dkg_meta_transcript: vector[],
+        target_committees_public_key_shares: vector[],
     });
 
     emit(DKGStartEvent {
@@ -294,18 +476,57 @@ Abort if a DKG is already in progress.
 
 
 
+
+
+
+
+## Function `set_dkg_meta`
+
+Family Node sets the DKGMeta for the in-progress DKG session
+The dkg transcript is assumed to have been already verified by the aptos VM in process_dkg_result method
+
+
+
public(friend) fun set_dkg_meta(dkg_meta_all_committees: vector<u8>)
+
+ + + +
+Implementation + + +
public(friend) fun set_dkg_meta(dkg_meta_all_committees: vector<u8>)
+acquires DKGState {
+    // ensure dkg is in progress
+    let dkg_state = borrow_global_mut<DKGState>(@supra_framework);
+    assert!(option::is_some(&dkg_state.in_progress), error::invalid_state(EDKG_NOT_IN_PROGRESS));
+
+    // we only add the first DKG Meta proposed and ignore the rest
+    let session = option::extract(&mut dkg_state.in_progress);
+    assert!(vector::length(&session.dkg_meta_transcript) == 0, error::already_exists(EDKG_META_ALREADY_SET));
+    session.dkg_meta_transcript = dkg_meta_all_committees;
+    dkg_state.in_progress = option::some(session);
+
+    emit(DKGMetaSetEvent {
+        dkg_meta_transcript: dkg_meta_all_committees,
+    });
+}
+
+ + +
## Function `finish` -Put a transcript into the currently incomplete DKG session, then mark it completed. - -Abort if DKG is not in progress. +Family Node sets the target_committees_public_key_shares for the in-progress DKG session and +marks the incomplete DKG session completed. +The target_committees_public_key_shares is assumed to be verified by the aptos VM before calling this function -
public(friend) fun finish(transcript: vector<u8>)
+
public(friend) fun finish(target_committees_public_key_shares: vector<u8>)
 
@@ -314,13 +535,46 @@ Abort if DKG is not in progress. Implementation -
public(friend) fun finish(transcript: vector<u8>) acquires DKGState {
+
public(friend) fun finish(target_committees_public_key_shares: vector<u8>)
+acquires DKGState {
+    // ensure dkg is in progress
     let dkg_state = borrow_global_mut<DKGState>(@supra_framework);
     assert!(option::is_some(&dkg_state.in_progress), error::invalid_state(EDKG_NOT_IN_PROGRESS));
+
+    // DKG meta should be already set before `finish` is called
     let session = option::extract(&mut dkg_state.in_progress);
-    session.transcript = transcript;
+    assert!(vector::length(&session.dkg_meta_transcript) > 0, error::already_exists(EDKG_META_NOT_SET));
+
+    session.target_committees_public_key_shares = target_committees_public_key_shares;
     dkg_state.last_completed = option::some(session);
     dkg_state.in_progress = option::none();
+
+    // propagate updated keys to stake.move for all threshold types
+    let public_key_shares_all_comms_serialized
+        = any::new(type_info::type_name<OnChainAggregateCommitmentAllCommittees>(), target_committees_public_key_shares);
+    let public_key_shares_all_comms = any::unpack<OnChainAggregateCommitmentAllCommittees>(public_key_shares_all_comms_serialized);
+
+    // Build a vector of DkgCommitteeOutput for all committees
+    let committee_outputs = vector[];
+    let i = 0;
+    let len = vector::length(&public_key_shares_all_comms.commitments);
+    while (i < len) {
+        let commitment = vector::borrow(&public_key_shares_all_comms.commitments, i);
+        // As the first index contains the committee's threshold public key, we can skip that
+        let evals = vector::slice(&commitment.bls12381_commitment_evals, 1, vector::length(&commitment.bls12381_commitment_evals));
+
+        vector::push_back(
+            &mut committee_outputs,
+            new_dkg_committee_output(commitment.threshold_type, evals)
+        );
+        i = i + 1;
+    };
+
+    // Set all keys for all threshold types
+    stake::set_dkg_output_keys(committee_outputs);
+    emit(DKGFinishEvent {
+        target_committees_public_key_shares,
+    });
 }
 
@@ -384,6 +638,35 @@ Return the incomplete DKG session state, if it exists. + + + + +## Function `last_completed_session` + +Return the last completed DKG session state, if it exists. + + +
public fun last_completed_session(): option::Option<dkg::DKGSessionState>
+
+ + + +
+Implementation + + +
public fun last_completed_session(): Option<DKGSessionState> acquires DKGState {
+    if (exists<DKGState>(@supra_framework)) {
+        borrow_global<DKGState>(@supra_framework).last_completed
+    } else {
+        option::none()
+    }
+}
+
+ + +
@@ -427,7 +710,7 @@ Return the dealer epoch of a DKGS ### Function `initialize` -
public fun initialize(supra_framework: &signer)
+
public(friend) fun initialize(supra_framework: &signer)
 
@@ -444,7 +727,7 @@ Return the dealer epoch of a DKGS ### Function `start` -
public(friend) fun start(dealer_epoch: u64, randomness_config: randomness_config::RandomnessConfig, dealer_validator_set: vector<validator_consensus_info::ValidatorConsensusInfo>, target_validator_set: vector<validator_consensus_info::ValidatorConsensusInfo>)
+
public(friend) fun start(dealer_epoch: u64, randomness_seed: vector<u8>, dealer_committee: dkg_committee::DkgCommittee, target_committees: vector<dkg_committee::ReceiverCommittee>)
 
@@ -456,12 +739,30 @@ Return the dealer epoch of a DKGS + + +### Function `set_dkg_meta` + + +
public(friend) fun set_dkg_meta(dkg_meta_all_committees: vector<u8>)
+
+ + + + +
requires exists<DKGState>(@supra_framework);
+requires option::is_some(global<DKGState>(@supra_framework).in_progress);
+aborts_if false;
+
+ + + ### Function `finish` -
public(friend) fun finish(transcript: vector<u8>)
+
public(friend) fun finish(target_committees_public_key_shares: vector<u8>)
 
diff --git a/aptos-move/framework/supra-framework/doc/dkg_committee.md b/aptos-move/framework/supra-framework/doc/dkg_committee.md new file mode 100644 index 0000000000000..03f59a3113fb6 --- /dev/null +++ b/aptos-move/framework/supra-framework/doc/dkg_committee.md @@ -0,0 +1,496 @@ + + + +# Module `0x1::dkg_committee` + + + +- [Struct `DkgNodeConfig`](#0x1_dkg_committee_DkgNodeConfig) +- [Struct `DkgCommittee`](#0x1_dkg_committee_DkgCommittee) +- [Struct `ReceiverCommittee`](#0x1_dkg_committee_ReceiverCommittee) +- [Struct `DkgCommitteeOutput`](#0x1_dkg_committee_DkgCommitteeOutput) +- [Constants](#@Constants_0) +- [Function `new_dkg_node_config`](#0x1_dkg_committee_new_dkg_node_config) +- [Function `get_addr`](#0x1_dkg_committee_get_addr) +- [Function `get_dkg_pubkey`](#0x1_dkg_committee_get_dkg_pubkey) +- [Function `len`](#0x1_dkg_committee_len) +- [Function `get_committee`](#0x1_dkg_committee_get_committee) +- [Function `new_dkg_committee`](#0x1_dkg_committee_new_dkg_committee) +- [Function `new_dkg_committee_from_validator_consensus_info`](#0x1_dkg_committee_new_dkg_committee_from_validator_consensus_info) +- [Function `new_receiver_committee`](#0x1_dkg_committee_new_receiver_committee) +- [Function `new_dkg_committee_output`](#0x1_dkg_committee_new_dkg_committee_output) +- [Function `get_dkg_committee_output_threshold_type`](#0x1_dkg_committee_get_dkg_committee_output_threshold_type) +- [Function `get_dkg_committee_output_keys`](#0x1_dkg_committee_get_dkg_committee_output_keys) + + +
use 0x1::bcs;
+use 0x1::validator_consensus_info;
+use 0x1::validator_public_keys;
+use 0x1::vector;
+
+ + + + + +## Struct `DkgNodeConfig` + + + +
struct DkgNodeConfig has copy, drop, store
+
+ + + +
+Fields + + +
+
+addr: address +
+
+ +
+
+identity: vector<u8> +
+
+ +
+
+dkg_pubkey: vector<u8> +
+
+ +
+
+ + +
+ + + +## Struct `DkgCommittee` + + + +
struct DkgCommittee has copy, drop, store
+
+ + + +
+Fields + + +
+
+committee: vector<dkg_committee::DkgNodeConfig> +
+
+ +
+
+threshold_type: validator_public_keys::CertificateThresholdType +
+
+ +
+
+ + +
+ + + +## Struct `ReceiverCommittee` + + + +
struct ReceiverCommittee has copy, drop, store
+
+ + + +
+Fields + + +
+
+is_resharing: bool +
+
+ +
+
+dkg_threshold_type: validator_public_keys::CertificateThresholdType +
+
+ +
+
+committee: dkg_committee::DkgCommittee +
+
+ +
+
+ + +
+ + + +## Struct `DkgCommitteeOutput` + +Input for DKG key output - contains threshold type and keys for one committee + + +
struct DkgCommitteeOutput has copy, drop
+
+ + + +
+Fields + + +
+
+threshold_type: u8 +
+
+ The threshold type (0=validity, 1=quorum, 2=unanimous, etc.) +
+
+keys: vector<vector<u8>> +
+
+ Public key shares for each validator (indexed by validator position) +
+
+ + +
+ + + +## Constants + + + + + + +
const EINVALID_DKG_COMMITTEE_SIZE: u64 = 1;
+
+ + + + + +## Function `new_dkg_node_config` + + + +
public fun new_dkg_node_config(addr: address, identity: vector<u8>, dkg_pubkey: vector<u8>): dkg_committee::DkgNodeConfig
+
+ + + +
+Implementation + + +
public fun new_dkg_node_config(addr: address, identity: vector<u8>, dkg_pubkey: vector<u8>,): DkgNodeConfig{
+    DkgNodeConfig{
+        addr,
+        identity,
+        dkg_pubkey
+    }
+}
+
+ + + +
+ + + +## Function `get_addr` + + + +
public fun get_addr(dkg_node: &dkg_committee::DkgNodeConfig): address
+
+ + + +
+Implementation + + +
public fun get_addr(dkg_node: &DkgNodeConfig): address{
+    dkg_node.addr
+}
+
+ + + +
+ + + +## Function `get_dkg_pubkey` + + + +
public fun get_dkg_pubkey(dkg_node: &dkg_committee::DkgNodeConfig): vector<u8>
+
+ + + +
+Implementation + + +
public fun get_dkg_pubkey(dkg_node: &DkgNodeConfig): vector<u8>{
+    dkg_node.dkg_pubkey
+}
+
+ + + +
+ + + +## Function `len` + + + +
public fun len(committee: &dkg_committee::DkgCommittee): u64
+
+ + + +
+Implementation + + +
public fun len(committee: &DkgCommittee): u64{
+    vector::length(&committee.committee)
+}
+
+ + + +
+ + + +## Function `get_committee` + + + +
public fun get_committee(dkg_committee: &dkg_committee::DkgCommittee): vector<dkg_committee::DkgNodeConfig>
+
+ + + +
+Implementation + + +
public fun get_committee(dkg_committee: &DkgCommittee): vector<DkgNodeConfig>{
+    dkg_committee.committee
+}
+
+ + + +
+ + + +## Function `new_dkg_committee` + + + +
public fun new_dkg_committee(committee: vector<dkg_committee::DkgNodeConfig>, threshold_type: validator_public_keys::CertificateThresholdType): dkg_committee::DkgCommittee
+
+ + + +
+Implementation + + +
public fun new_dkg_committee(committee: vector<DkgNodeConfig>, threshold_type: CertificateThresholdType): DkgCommittee{
+
+    assert!(vector::length(&committee) > 0, EINVALID_DKG_COMMITTEE_SIZE);
+    DkgCommittee{
+        committee,
+        threshold_type
+    }
+}
+
+ + + +
+ + + +## Function `new_dkg_committee_from_validator_consensus_info` + + + +
public fun new_dkg_committee_from_validator_consensus_info(validator_committee: vector<validator_consensus_info::ValidatorConsensusInfo>, threshold_type: validator_public_keys::CertificateThresholdType): dkg_committee::DkgCommittee
+
+ + + +
+Implementation + + +
public fun new_dkg_committee_from_validator_consensus_info(validator_committee: vector<ValidatorConsensusInfo>, threshold_type: CertificateThresholdType): DkgCommittee{
+
+    assert!(vector::length(&validator_committee) > 0, EINVALID_DKG_COMMITTEE_SIZE);
+
+    // The order of the committee members is important for DKG.
+    // The order should correspond to the order of the validator committee.
+    // The output of the DKG has keys in the same order as the committee.
+    let dkg_committee = vector[];
+    vector::for_each(validator_committee, |x|
+        {
+            let validator_keys_bytes = validator_consensus_info::get_pk_bytes(&x);
+            let addr = validator_consensus_info::get_addr(&x);
+            vector::push_back(&mut dkg_committee, DkgNodeConfig{
+                addr,
+                identity: bcs::to_bytes(&addr),
+                dkg_pubkey: validator_keys_bytes,
+            });
+        }
+    );
+
+    DkgCommittee{
+        committee: dkg_committee,
+        threshold_type
+    }
+}
+
+ + + +
+ + + +## Function `new_receiver_committee` + + + +
public fun new_receiver_committee(is_resharing: bool, dkg_threshold_type: validator_public_keys::CertificateThresholdType, committee: dkg_committee::DkgCommittee): dkg_committee::ReceiverCommittee
+
+ + + +
+Implementation + + +
public fun new_receiver_committee(is_resharing: bool, dkg_threshold_type: CertificateThresholdType, committee: DkgCommittee): ReceiverCommittee{
+    ReceiverCommittee{
+        is_resharing,
+        dkg_threshold_type,
+        committee
+    }
+}
+
+ + + +
+ + + +## Function `new_dkg_committee_output` + +Create a new DkgCommitteeOutput + + +
public fun new_dkg_committee_output(threshold_type: u8, keys: vector<vector<u8>>): dkg_committee::DkgCommitteeOutput
+
+ + + +
+Implementation + + +
public fun new_dkg_committee_output(threshold_type: u8, keys: vector<vector<u8>>): DkgCommitteeOutput {
+    DkgCommitteeOutput { threshold_type, keys }
+}
+
+ + + +
+ + + +## Function `get_dkg_committee_output_threshold_type` + +Get threshold type from DkgCommitteeOutput + + +
public fun get_dkg_committee_output_threshold_type(output: &dkg_committee::DkgCommitteeOutput): u8
+
+ + + +
+Implementation + + +
public fun get_dkg_committee_output_threshold_type(output: &DkgCommitteeOutput): u8 {
+    output.threshold_type
+}
+
+ + + +
+ + + +## Function `get_dkg_committee_output_keys` + +Get keys from DkgCommitteeOutput + + +
public fun get_dkg_committee_output_keys(output: &dkg_committee::DkgCommitteeOutput): vector<vector<u8>>
+
+ + + +
+Implementation + + +
public fun get_dkg_committee_output_keys(output: &DkgCommitteeOutput): vector<vector<u8>> {
+    output.keys
+}
+
+ + + +
+ + +[move-book]: https://aptos.dev/move/book/SUMMARY diff --git a/aptos-move/framework/supra-framework/doc/dkg_config.md b/aptos-move/framework/supra-framework/doc/dkg_config.md new file mode 100644 index 0000000000000..8c263bce41b3a --- /dev/null +++ b/aptos-move/framework/supra-framework/doc/dkg_config.md @@ -0,0 +1,557 @@ + + + +# Module `0x1::dkg_config` + +DKG configuration module for configurable DKG parameters. +This config can be updated via governance and takes effect at the next epoch. + + +- [Struct `ReceiverCommitteeConfig`](#0x1_dkg_config_ReceiverCommitteeConfig) +- [Resource `DkgConfig`](#0x1_dkg_config_DkgConfig) +- [Constants](#@Constants_0) +- [Function `initialize`](#0x1_dkg_config_initialize) +- [Function `set_for_next_epoch`](#0x1_dkg_config_set_for_next_epoch) +- [Function `has_key_threshold_type`](#0x1_dkg_config_has_key_threshold_type) +- [Function `on_new_epoch`](#0x1_dkg_config_on_new_epoch) +- [Function `new`](#0x1_dkg_config_new) +- [Function `new_receiver_committee_config`](#0x1_dkg_config_new_receiver_committee_config) +- [Function `default`](#0x1_dkg_config_default) +- [Function `current`](#0x1_dkg_config_current) +- [Function `get_dealer_committee_threshold_type`](#0x1_dkg_config_get_dealer_committee_threshold_type) +- [Function `get_receiver_committee_configs`](#0x1_dkg_config_get_receiver_committee_configs) +- [Function `get_is_resharing`](#0x1_dkg_config_get_is_resharing) +- [Function `get_committee_threshold_type`](#0x1_dkg_config_get_committee_threshold_type) +- [Function `get_dkg_threshold_type`](#0x1_dkg_config_get_dkg_threshold_type) + + +
use 0x1::config_buffer;
+use 0x1::error;
+use 0x1::system_addresses;
+use 0x1::validator_public_keys;
+
+ + + + + +## Struct `ReceiverCommitteeConfig` + +Configuration for a single receiver committee in DKG. + + +
struct ReceiverCommitteeConfig has copy, drop, store
+
+ + + +
+Fields + + +
+
+is_resharing: bool +
+
+ Whether this committee uses resharing from the previous epoch's public key. +
+
+committee_threshold_type: validator_public_keys::CertificateThresholdType +
+
+ The threshold type for this committee (e.g., quorum, clan_majority). +
+
+dkg_threshold_type: validator_public_keys::CertificateThresholdType +
+
+ The threshold type for output keys in DKG for this committee (e.g., validity, quorum). +
+
+ + +
+ + + +## Resource `DkgConfig` + +Main DKG configuration stored at @supra_framework. +Controls DKG parameters that can be updated via governance. + + +
struct DkgConfig has copy, drop, store, key
+
+ + + +
+Fields + + +
+
+dealer_committee_threshold_type: validator_public_keys::CertificateThresholdType +
+
+ Threshold type for the dealer committee. (e.g., quorum, clan_majority). +
+
+receiver_committees: vector<dkg_config::ReceiverCommitteeConfig> +
+
+ Configuration for each receiver committee. + Default: [(false, validity), (false, quorum)] +
+
+ + +
+ + + +## Constants + + + + +Error: Receiver committees vector cannot be empty. + + +
const EEMPTY_RECEIVER_COMMITTEES: u64 = 1;
+
+ + + + + +Error: Cannot enable resharing for a threshold type that doesn't exist in current config. + + +
const ERESHARING_FOR_NONEXISTENT_THRESHOLD_TYPE: u64 = 2;
+
+ + + + + +## Function `initialize` + +Initialize DKG config during genesis. + + +
public(friend) fun initialize(framework: &signer)
+
+ + + +
+Implementation + + +
public(friend) fun initialize(framework: &signer) {
+    system_addresses::assert_supra_framework(framework);
+    if (!exists<DkgConfig>(@supra_framework)) {
+        move_to(framework, default());
+    }
+}
+
+ + + +
+ + + +## Function `set_for_next_epoch` + +Set a new DKG config for the next epoch. +This can only be called by on-chain governance. +Example usage: +``` +let new_config = dkg_config::new( +quorum_certificate_type(), +vector[ +dkg_config::new_receiver_committee_config(true, validity_certificate_type()), +dkg_config::new_receiver_committee_config(true, quorum_certificate_type()), +] +); +dkg_config::set_for_next_epoch(&framework_signer, new_config); +supra_governance::reconfigure(&framework_signer); +``` + + +
public fun set_for_next_epoch(framework: &signer, new_config: dkg_config::DkgConfig)
+
+ + + +
+Implementation + + +
public fun set_for_next_epoch(framework: &signer, new_config: DkgConfig) acquires DkgConfig {
+    system_addresses::assert_supra_framework(framework);
+
+    // Validate: receiver_committees cannot be empty
+    assert!(
+        vector::length(&new_config.receiver_committees) > 0,
+        error::invalid_argument(EEMPTY_RECEIVER_COMMITTEES)
+    );
+
+    // Validate: if resharing is enabled for a dkg threshold type, it must exist in current config
+    let current_config = current();
+    let i = 0;
+    let len = vector::length(&new_config.receiver_committees);
+    while (i < len) {
+        let new_rc = vector::borrow(&new_config.receiver_committees, i);
+        if (new_rc.is_resharing) {
+            // Check if this threshold type exists in current config
+            assert!(
+                has_key_threshold_type(¤t_config, new_rc.dkg_threshold_type),
+                error::invalid_argument(ERESHARING_FOR_NONEXISTENT_THRESHOLD_TYPE)
+            );
+        };
+        i = i + 1;
+    };
+
+    config_buffer::upsert(new_config);
+}
+
+ + + +
+ + + +## Function `has_key_threshold_type` + +Check if a threshold type exists in the config's receiver committees. + + +
fun has_key_threshold_type(config: &dkg_config::DkgConfig, threshold_type: validator_public_keys::CertificateThresholdType): bool
+
+ + + +
+Implementation + + +
fun has_key_threshold_type(config: &DkgConfig, threshold_type: CertificateThresholdType): bool {
+    let i = 0;
+    let len = vector::length(&config.receiver_committees);
+    while (i < len) {
+        let rc = vector::borrow(&config.receiver_committees, i);
+        if (rc.dkg_threshold_type == threshold_type) {
+            return true
+        };
+        i = i + 1;
+    };
+    false
+}
+
+ + + +
+ + + +## Function `on_new_epoch` + +Apply any pending DKG config at epoch boundary. +Called from reconfiguration_with_dkg::finish(). + + +
public(friend) fun on_new_epoch(framework: &signer)
+
+ + + +
+Implementation + + +
public(friend) fun on_new_epoch(framework: &signer) acquires DkgConfig {
+    system_addresses::assert_supra_framework(framework);
+    if (config_buffer::does_exist<DkgConfig>()) {
+        let new_config = config_buffer::extract<DkgConfig>();
+        if (exists<DkgConfig>(@supra_framework)) {
+            *borrow_global_mut<DkgConfig>(@supra_framework) = new_config;
+        } else {
+            move_to(framework, new_config);
+        }
+    }
+}
+
+ + + +
+ + + +## Function `new` + +Create a new DkgConfig. + + +
public fun new(dealer_committee_threshold_type: validator_public_keys::CertificateThresholdType, receiver_committees: vector<dkg_config::ReceiverCommitteeConfig>): dkg_config::DkgConfig
+
+ + + +
+Implementation + + +
public fun new(
+    dealer_committee_threshold_type: CertificateThresholdType,
+    receiver_committees: vector<ReceiverCommitteeConfig>
+): DkgConfig {
+    DkgConfig {
+        dealer_committee_threshold_type,
+        receiver_committees,
+    }
+}
+
+ + + +
+ + + +## Function `new_receiver_committee_config` + +Create a new ReceiverCommitteeConfig. + + +
public fun new_receiver_committee_config(is_resharing: bool, committee_threshold_type: validator_public_keys::CertificateThresholdType, dkg_threshold_type: validator_public_keys::CertificateThresholdType): dkg_config::ReceiverCommitteeConfig
+
+ + + +
+Implementation + + +
public fun new_receiver_committee_config(
+    is_resharing: bool,
+    committee_threshold_type: CertificateThresholdType,
+    dkg_threshold_type: CertificateThresholdType
+): ReceiverCommitteeConfig {
+    ReceiverCommitteeConfig {
+        is_resharing,
+        committee_threshold_type,
+        dkg_threshold_type,
+    }
+}
+
+ + + +
+ + + +## Function `default` + +Returns the default DKG configuration: +- Dealer threshold: quorum_certificate_type() +- Receiver committees: +- [(is_resharing = false, committee_threshold_type = quorum_certificate_type(), dkg_threshold_type = validity_certificate_type()), +- (is_resharing = false, committee_threshold_type = quorum_certificate_type(), dkg_threshold_type = quorum_certificate_type())] + + +
public fun default(): dkg_config::DkgConfig
+
+ + + +
+Implementation + + +
public fun default(): DkgConfig {
+    DkgConfig {
+        dealer_committee_threshold_type: quorum_certificate_type(),
+        receiver_committees: vector[
+            ReceiverCommitteeConfig {
+                is_resharing: false,
+                committee_threshold_type: quorum_certificate_type(),
+                dkg_threshold_type: validity_certificate_type(),
+            },
+            ReceiverCommitteeConfig {
+                is_resharing: false,
+                committee_threshold_type: quorum_certificate_type(),
+                dkg_threshold_type: quorum_certificate_type(),
+            },
+        ],
+    }
+}
+
+ + + +
+ + + +## Function `current` + +Get the current DKG config. + + +
public fun current(): dkg_config::DkgConfig
+
+ + + +
+Implementation + + +
public fun current(): DkgConfig acquires DkgConfig {
+    if (exists<DkgConfig>(@supra_framework)) {
+        *borrow_global<DkgConfig>(@supra_framework)
+    } else {
+        default()
+    }
+}
+
+ + + +
+ + + +## Function `get_dealer_committee_threshold_type` + +Get the dealer threshold type from the config. + + +
public fun get_dealer_committee_threshold_type(config: &dkg_config::DkgConfig): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun get_dealer_committee_threshold_type(config: &DkgConfig): CertificateThresholdType {
+    config.dealer_committee_threshold_type
+}
+
+ + + +
+ + + +## Function `get_receiver_committee_configs` + +Get the receiver committee configs from the DkgConfig. + + +
public fun get_receiver_committee_configs(config: &dkg_config::DkgConfig): vector<dkg_config::ReceiverCommitteeConfig>
+
+ + + +
+Implementation + + +
public fun get_receiver_committee_configs(config: &DkgConfig): vector<ReceiverCommitteeConfig> {
+    config.receiver_committees
+}
+
+ + + +
+ + + +## Function `get_is_resharing` + +Get is_resharing from a ReceiverCommitteeConfig. + + +
public fun get_is_resharing(config: &dkg_config::ReceiverCommitteeConfig): bool
+
+ + + +
+Implementation + + +
public fun get_is_resharing(config: &ReceiverCommitteeConfig): bool {
+    config.is_resharing
+}
+
+ + + +
+ + + +## Function `get_committee_threshold_type` + +Get committee_threshold_type from a ReceiverCommitteeConfig. + + +
public fun get_committee_threshold_type(config: &dkg_config::ReceiverCommitteeConfig): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun get_committee_threshold_type(config: &ReceiverCommitteeConfig): CertificateThresholdType {
+    config.committee_threshold_type
+}
+
+ + + +
+ + + +## Function `get_dkg_threshold_type` + +Get dkg_threshold_type from a ReceiverCommitteeConfig. + + +
public fun get_dkg_threshold_type(config: &dkg_config::ReceiverCommitteeConfig): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun get_dkg_threshold_type(config: &ReceiverCommitteeConfig): CertificateThresholdType {
+    config.dkg_threshold_type
+}
+
+ + + +
+ + +[move-book]: https://aptos.dev/move/book/SUMMARY diff --git a/aptos-move/framework/supra-framework/doc/evm_config.md b/aptos-move/framework/supra-framework/doc/evm_config.md index 6a60a5adffc31..266294bb013cd 100644 --- a/aptos-move/framework/supra-framework/doc/evm_config.md +++ b/aptos-move/framework/supra-framework/doc/evm_config.md @@ -11,6 +11,7 @@ - [Function `set_for_next_epoch`](#0x1_evm_config_set_for_next_epoch) - [Function `on_new_epoch`](#0x1_evm_config_on_new_epoch) - [Specification](#@Specification_1) + - [Function `initialize`](#@Specification_1_initialize) - [Function `set_for_next_epoch`](#@Specification_1_set_for_next_epoch) - [Function `on_new_epoch`](#@Specification_1_on_new_epoch) @@ -172,6 +173,22 @@ Otherwise, move the new config to supra_framework. + + +### Function `initialize` + + +
public(friend) fun initialize(supra_framework: &signer, config: vector<u8>)
+
+ + + + +
pragma aborts_if_is_strict = false;
+
+ + + ### Function `set_for_next_epoch` diff --git a/aptos-move/framework/supra-framework/doc/genesis.md b/aptos-move/framework/supra-framework/doc/genesis.md index 585539cb61c8c..0ec7146a80448 100644 --- a/aptos-move/framework/supra-framework/doc/genesis.md +++ b/aptos-move/framework/supra-framework/doc/genesis.md @@ -59,6 +59,7 @@ use 0x1::coin; use 0x1::consensus_config; use 0x1::create_signer; +use 0x1::dkg_config; use 0x1::error; use 0x1::evm_genesis_config; use 0x1::execution_config; @@ -611,6 +612,7 @@ Genesis step 1: Initialize supra framework account and core modules on chain. }; consensus_config::initialize(&supra_framework_account, consensus_config); + dkg_config::initialize(&supra_framework_account); execution_config::set(&supra_framework_account, execution_config); supra_config::initialize(&supra_framework_account, supra_config); version::initialize(&supra_framework_account, initial_version); diff --git a/aptos-move/framework/supra-framework/doc/overview.md b/aptos-move/framework/supra-framework/doc/overview.md index 202e9563f6480..faadddbd91cca 100644 --- a/aptos-move/framework/supra-framework/doc/overview.md +++ b/aptos-move/framework/supra-framework/doc/overview.md @@ -28,6 +28,8 @@ This is the reference documentation of the Supra framework. - [`0x1::create_signer`](create_signer.md#0x1_create_signer) - [`0x1::dispatchable_fungible_asset`](dispatchable_fungible_asset.md#0x1_dispatchable_fungible_asset) - [`0x1::dkg`](dkg.md#0x1_dkg) +- [`0x1::dkg_committee`](dkg_committee.md#0x1_dkg_committee) +- [`0x1::dkg_config`](dkg_config.md#0x1_dkg_config) - [`0x1::event`](event.md#0x1_event) - [`0x1::evm_genesis_config`](evm_genesis_config.md#0x1_evm_genesis_config) - [`0x1::execution_config`](execution_config.md#0x1_execution_config) @@ -73,6 +75,7 @@ This is the reference documentation of the Supra framework. - [`0x1::transaction_validation`](transaction_validation.md#0x1_transaction_validation) - [`0x1::util`](util.md#0x1_util) - [`0x1::validator_consensus_info`](validator_consensus_info.md#0x1_validator_consensus_info) +- [`0x1::validator_public_keys`](validator_public_keys.md#0x1_validator_public_keys) - [`0x1::version`](version.md#0x1_version) - [`0x1::vesting`](vesting.md#0x1_vesting) - [`0x1::vesting_without_staking`](vesting_without_staking.md#0x1_vesting_without_staking) diff --git a/aptos-move/framework/supra-framework/doc/reconfiguration_with_dkg.md b/aptos-move/framework/supra-framework/doc/reconfiguration_with_dkg.md index c7273caaf5e2b..2ef8b141feebb 100644 --- a/aptos-move/framework/supra-framework/doc/reconfiguration_with_dkg.md +++ b/aptos-move/framework/supra-framework/doc/reconfiguration_with_dkg.md @@ -7,6 +7,7 @@ Reconfiguration with DKG helper functions. - [Function `try_start`](#0x1_reconfiguration_with_dkg_try_start) +- [Function `set_dkg_meta`](#0x1_reconfiguration_with_dkg_set_dkg_meta) - [Function `finish`](#0x1_reconfiguration_with_dkg_finish) - [Function `finish_with_dkg_result`](#0x1_reconfiguration_with_dkg_finish_with_dkg_result) - [Specification](#@Specification_0) @@ -18,6 +19,8 @@ Reconfiguration with DKG helper functions.
use 0x1::automation_registry;
 use 0x1::consensus_config;
 use 0x1::dkg;
+use 0x1::dkg_committee;
+use 0x1::dkg_config;
 use 0x1::evm_genesis_config;
 use 0x1::execution_config;
 use 0x1::features;
@@ -26,6 +29,7 @@ Reconfiguration with DKG helper functions.
 use 0x1::jwks;
 use 0x1::keyless_account;
 use 0x1::option;
+use 0x1::randomness;
 use 0x1::randomness_api_v0_config;
 use 0x1::randomness_config;
 use 0x1::randomness_config_seqnum;
@@ -35,6 +39,7 @@ Reconfiguration with DKG helper functions.
 use 0x1::supra_config;
 use 0x1::system_addresses;
 use 0x1::validator_consensus_info;
+use 0x1::validator_public_keys;
 use 0x1::version;
 
@@ -67,17 +72,68 @@ Do nothing if one is already in progress. }; reconfiguration_state::on_reconfig_start(); let cur_epoch = reconfiguration::current_epoch(); + let randomness_seed = randomness::bytes(32); + + // Get DKG configuration (dealer threshold type and receiver committee configs) + let config = dkg_config::current(); + let receiver_configs = dkg_config::get_receiver_committee_configs(&config); + + // Build receiver committees from config + let receiver_committees = vector[]; + let i = 0; + let len = vector::length(&receiver_configs); + while (i < len) { + let rc = vector::borrow(&receiver_configs, i); + vector::push_back( + &mut receiver_committees, + new_receiver_committee( + dkg_config::get_is_resharing(rc), + dkg_config::get_dkg_threshold_type(rc), + new_dkg_committee_from_validator_consensus_info( + stake::next_validator_consensus_infos(), + dkg_config::get_committee_threshold_type(rc))) + ); + i = i + 1; + }; + + // DKG for configured receiver committees dkg::start( cur_epoch, - randomness_config::current(), - stake::cur_validator_consensus_infos(), - stake::next_validator_consensus_infos() + randomness_seed, + new_dkg_committee_from_validator_consensus_info( + stake::cur_validator_consensus_infos(), + dkg_config::get_dealer_committee_threshold_type(&config)), + receiver_committees ); }
+ + + + +## Function `set_dkg_meta` + + + +
fun set_dkg_meta(dkg_meta: vector<u8>)
+
+ + + +
+Implementation + + +
fun set_dkg_meta(dkg_meta: vector<u8>) {
+    dkg::set_dkg_meta(dkg_meta);
+}
+
+ + +
@@ -116,6 +172,7 @@ Run the default reconfiguration to enter the new epoch. randomness_config::on_new_epoch(framework); randomness_api_v0_config::on_new_epoch(framework); evm_genesis_config::on_new_epoch(framework); + dkg_config::on_new_epoch(framework); reconfiguration::reconfigure(); }
diff --git a/aptos-move/framework/supra-framework/doc/stake.md b/aptos-move/framework/supra-framework/doc/stake.md index 113f9e9e709dc..52ba7d697524d 100644 --- a/aptos-move/framework/supra-framework/doc/stake.md +++ b/aptos-move/framework/supra-framework/doc/stake.md @@ -95,6 +95,7 @@ or if their stake drops below the min required, they would get removed at the en - [Function `reactivate_stake`](#0x1_stake_reactivate_stake) - [Function `reactivate_stake_with_cap`](#0x1_stake_reactivate_stake_with_cap) - [Function `rotate_consensus_key_internal`](#0x1_stake_rotate_consensus_key_internal) +- [Function `set_dkg_output_keys`](#0x1_stake_set_dkg_output_keys) - [Function `rotate_consensus_key_genesis`](#0x1_stake_rotate_consensus_key_genesis) - [Function `rotate_consensus_key`](#0x1_stake_rotate_consensus_key) - [Function `update_network_and_fullnode_addresses`](#0x1_stake_update_network_and_fullnode_addresses) @@ -172,8 +173,10 @@ or if their stake drops below the min required, they would get removed at the en
use 0x1::account;
+use 0x1::bls12381;
 use 0x1::chain_status;
 use 0x1::coin;
+use 0x1::dkg_committee;
 use 0x1::ed25519;
 use 0x1::error;
 use 0x1::event;
@@ -189,6 +192,7 @@ or if their stake drops below the min required, they would get removed at the en
 use 0x1::table;
 use 0x1::timestamp;
 use 0x1::validator_consensus_info;
+use 0x1::validator_public_keys;
 use 0x1::vector;
 
@@ -1657,6 +1661,16 @@ Account is already a validator or pending validator. + + +Invalid DKG public key shares. + + +
const EDKG_INVALID_PK_SHARES: u64 = 21;
+
+ + + Table to store collected transaction fees for each validator already exists. @@ -2502,9 +2516,15 @@ Initialize the validator account and give ownership to the signing account. network_addresses: vector<u8>, fullnode_addresses: vector<u8>, ) acquires AllowedValidators { + // Checks the public key is valid to prevent rogue-key attacks. - let valid_public_key = ed25519::new_validated_public_key_from_bytes(consensus_pubkey); - assert!(option::is_some(&valid_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + if (std::features::supra_validator_identity_v2_enabled()) { + let _valid_public_key = validator_public_keys::validator_public_keys_from_bytes(consensus_pubkey); + } + else { + let valid_public_key = ed25519::new_validated_public_key_from_bytes(consensus_pubkey); + assert!(option::is_some(&valid_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + }; initialize_owner(account); move_to(account, ValidatorConfig { @@ -2998,11 +3018,21 @@ Move amount of coins from pending_inactive to active. let old_consensus_pubkey = validator_info.consensus_pubkey; // Checks the public key is valid to prevent rogue-key attacks. if (!genesis) { - let validated_public_key = ed25519::new_validated_public_key_from_bytes(new_consensus_pubkey); - assert!(option::is_some(&validated_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + if (std::features::supra_validator_identity_v2_enabled()) { + let _valid_public_key = validator_public_keys::validator_public_keys_from_bytes(new_consensus_pubkey); + } + else { + let valid_public_key = ed25519::new_validated_public_key_from_bytes(new_consensus_pubkey); + assert!(option::is_some(&valid_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + }; } else { - let validated_public_key = ed25519::new_validated_public_key_from_bytes(new_consensus_pubkey); - assert!(option::is_some(&validated_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + if (std::features::supra_validator_identity_v2_enabled()) { + let _valid_public_key = validator_public_keys::validator_public_keys_from_bytes(new_consensus_pubkey); + } + else { + let valid_public_key = ed25519::new_validated_public_key_from_bytes(new_consensus_pubkey); + assert!(option::is_some(&valid_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + }; }; validator_info.consensus_pubkey = new_consensus_pubkey; @@ -3028,6 +3058,110 @@ Move amount of coins from pending_inactive to active. + + + + +## Function `set_dkg_output_keys` + +Set DKG output keys for all provided threshold types. +Each DkgCommitteeOutput contains a threshold_type and corresponding keys for all validators. + + +
public(friend) fun set_dkg_output_keys(committee_outputs: vector<dkg_committee::DkgCommitteeOutput>)
+
+ + + +
+Implementation + + +
public(friend) fun set_dkg_output_keys(
+    committee_outputs: vector<dkg_committee::DkgCommitteeOutput>,
+) acquires ValidatorConfig, ValidatorFees, ValidatorPerformance, ValidatorSet, StakePool {
+    if (vector::is_empty(&committee_outputs)) {
+        return
+    };
+
+    let next_validator_infos = next_validator_consensus_infos();
+    let num_validators = vector::length(&next_validator_infos);
+
+    // Validate all committee outputs have correct number of keys
+    let num_outputs = vector::length(&committee_outputs);
+    let j = 0;
+    while (j < num_outputs) {
+        let output = vector::borrow(&committee_outputs, j);
+        assert!(
+            num_validators == vector::length(&dkg_committee::get_dkg_committee_output_keys(output)),
+            error::invalid_argument(EDKG_INVALID_PK_SHARES)
+        );
+        j = j + 1;
+    };
+
+    // Iterate over each validator
+    let i = 0;
+    while (i < num_validators) {
+        let val_info = vector::borrow(&next_validator_infos, i);
+        let addr = validator_consensus_info::get_addr(val_info);
+        let validator_config = borrow_global_mut<ValidatorConfig>(addr);
+        let old_consensus_pubkey = validator_config.consensus_pubkey;
+
+        // Load current public keys
+        let pub_keys = validator_public_keys::validator_public_keys_from_bytes(old_consensus_pubkey);
+
+        // Apply all threshold key updates for this validator
+        let k = 0;
+        while (k < num_outputs) {
+            let output = vector::borrow(&committee_outputs, k);
+            let output_keys = dkg_committee::get_dkg_committee_output_keys(output);
+            let key_bytes = vector::borrow(&output_keys, i);
+
+            // Deserialize the key
+            let key_opt = aptos_std::bls12381::public_key_from_bytes(*key_bytes);
+            assert!(option::is_some(&key_opt), error::invalid_argument(EINVALID_PUBLIC_KEY));
+            let new_key = option::extract(&mut key_opt);
+
+            // Rotate the key based on threshold type
+            validator_public_keys::rotate_supra_bls_threshold_key_by_type(
+                &mut pub_keys,
+                dkg_committee::get_dkg_committee_output_threshold_type(output),
+                new_key
+            );
+            k = k + 1;
+        };
+
+        // Serialize and save updated keys
+        let new_consensus_pubkey = validator_public_keys::public_key_to_bytes(pub_keys);
+        validator_config.consensus_pubkey = new_consensus_pubkey;
+
+        // Emit events
+        let stake_pool = borrow_global_mut<StakePool>(addr);
+        if (std::features::module_event_migration_enabled()) {
+            event::emit(
+                RotateConsensusKey {
+                    pool_address: addr,
+                    old_consensus_pubkey,
+                    new_consensus_pubkey,
+                },
+            );
+        };
+        event::emit_event(
+            &mut stake_pool.rotate_consensus_key_events,
+            RotateConsensusKeyEvent {
+                pool_address: addr,
+                old_consensus_pubkey,
+                new_consensus_pubkey,
+            },
+        );
+
+        i = i + 1;
+    };
+}
+
+ + +
@@ -3957,9 +4091,9 @@ Return the ValidatorConsensusInfo of each current validator, sorted }; let new_voting_power = cur_active - + if (lockup_expired) { 0 } else { cur_pending_inactive } - + cur_pending_active - + cur_reward + cur_fee; + + if (lockup_expired) { 0 } else { cur_pending_inactive } + + cur_pending_active + + cur_reward + cur_fee; if (new_voting_power >= minimum_stake) { let config = *borrow_global<ValidatorConfig>(candidate.addr); @@ -5003,11 +5137,7 @@ Returns validator's next epoch voting power, including pending_active, active, a -
let is_public_key_validated = ed25519::spec_public_key_validate_internal(
-    consensus_pubkey,
-);
-aborts_if !is_public_key_validated;
-let addr = signer::address_of(account);
+
let addr = signer::address_of(account);
 let post_addr = signer::address_of(account);
 let allowed = global<AllowedValidators>(@supra_framework);
 aborts_if exists<ValidatorConfig>(addr);
@@ -5207,10 +5337,6 @@ Returns validator's next epoch voting power, including pending_active, active, a
 aborts_if !exists<StakePool>(pool_address);
 aborts_if signer::address_of(operator) != pre_stake_pool.operator_address;
 aborts_if !exists<ValidatorConfig>(pool_address);
-let is_public_key_validated = ed25519::spec_public_key_validate_internal(
-    new_consensus_pubkey,
-);
-aborts_if !is_public_key_validated;
 modifies global<ValidatorConfig>(pool_address);
 include StakedValueNochange;
 ensures validator_info.consensus_pubkey == new_consensus_pubkey;
@@ -5542,6 +5668,301 @@ Returns validator's next epoch voting power, including pending_active, active, a
 
 
 
+
+
+
+
+
schema AddStakeWithCapAbortsIfAndEnsures {
+    owner_cap: OwnerCapability;
+    amount: u64;
+    let pool_address = owner_cap.pool_address;
+    aborts_if !exists<StakePool>(pool_address);
+    let config = global<staking_config::StakingConfig>(@supra_framework);
+    let validator_set = global<ValidatorSet>(@supra_framework);
+    let voting_power_increase_limit = config.voting_power_increase_limit;
+    let post post_validator_set = global<ValidatorSet>(@supra_framework);
+    let update_voting_power_increase = amount != 0 && (spec_contains(validator_set.active_validators, pool_address)
+                                                       || spec_contains(validator_set.pending_active, pool_address));
+    aborts_if update_voting_power_increase && validator_set.total_joining_power + amount > MAX_U128;
+    ensures update_voting_power_increase ==> post_validator_set.total_joining_power == validator_set.total_joining_power + amount;
+    aborts_if update_voting_power_increase && validator_set.total_voting_power > 0
+            && validator_set.total_voting_power * voting_power_increase_limit > MAX_U128;
+    aborts_if update_voting_power_increase && validator_set.total_voting_power > 0
+            && validator_set.total_joining_power + amount > validator_set.total_voting_power * voting_power_increase_limit / 100;
+    let stake_pool = global<StakePool>(pool_address);
+    let post post_stake_pool = global<StakePool>(pool_address);
+    let value_pending_active = stake_pool.pending_active.value;
+    let value_active = stake_pool.active.value;
+    ensures amount != 0 && spec_is_current_epoch_validator(pool_address) ==> post_stake_pool.pending_active.value == value_pending_active + amount;
+    ensures amount != 0 && !spec_is_current_epoch_validator(pool_address) ==> post_stake_pool.active.value == value_active + amount;
+    let maximum_stake = config.maximum_stake;
+    let value_pending_inactive = stake_pool.pending_inactive.value;
+    let next_epoch_voting_power = value_pending_active + value_active + value_pending_inactive;
+    let voting_power = next_epoch_voting_power + amount;
+    aborts_if amount != 0 && voting_power > MAX_U64;
+    aborts_if amount != 0 && voting_power > maximum_stake;
+}
+
+ + + + + + + +
schema AddStakeAbortsIfAndEnsures {
+    owner: signer;
+    amount: u64;
+    let owner_address = signer::address_of(owner);
+    aborts_if !exists<OwnerCapability>(owner_address);
+    let owner_cap = global<OwnerCapability>(owner_address);
+    include AddStakeWithCapAbortsIfAndEnsures { owner_cap };
+}
+
+ + + + + + + +
fun spec_is_allowed(account: address): bool {
+   if (!exists<AllowedValidators>(@supra_framework)) {
+       true
+   } else {
+       let allowed = global<AllowedValidators>(@supra_framework);
+       contains(allowed.accounts, account)
+   }
+}
+
+ + + + + + + +
fun spec_find_validator(v: vector<ValidatorInfo>, addr: address): Option<u64>;
+
+ + + + + + + +
fun spec_validators_are_initialized(validators: vector<ValidatorInfo>): bool {
+   forall i in 0..len(validators):
+       spec_has_stake_pool(validators[i].addr) &&
+           spec_has_validator_config(validators[i].addr)
+}
+
+ + + + + + + +
fun spec_validators_are_initialized_addrs(addrs: vector<address>): bool {
+   forall i in 0..len(addrs):
+       spec_has_stake_pool(addrs[i]) &&
+           spec_has_validator_config(addrs[i])
+}
+
+ + + + + + + +
fun spec_validator_indices_are_valid(validators: vector<ValidatorInfo>): bool {
+   spec_validator_indices_are_valid_addr(validators, spec_validator_index_upper_bound()) &&
+       spec_validator_indices_are_valid_config(validators, spec_validator_index_upper_bound())
+}
+
+ + + + + + + +
fun spec_validator_indices_are_valid_addr(validators: vector<ValidatorInfo>, upper_bound: u64): bool {
+   forall i in 0..len(validators):
+       global<ValidatorConfig>(validators[i].addr).validator_index < upper_bound
+}
+
+ + + + + + + +
fun spec_validator_indices_are_valid_config(validators: vector<ValidatorInfo>, upper_bound: u64): bool {
+   forall i in 0..len(validators):
+       validators[i].config.validator_index < upper_bound
+}
+
+ + + + + + + +
fun spec_validator_indices_active_pending_inactive(validator_set: ValidatorSet): bool {
+   len(validator_set.pending_inactive) + len(validator_set.active_validators) == spec_validator_index_upper_bound()
+}
+
+ + + + + + + +
fun spec_validator_index_upper_bound(): u64 {
+   len(global<ValidatorPerformance>(@supra_framework).validators)
+}
+
+ + + + + + + +
fun spec_has_stake_pool(a: address): bool {
+   exists<StakePool>(a)
+}
+
+ + + + + + + +
fun spec_has_validator_config(a: address): bool {
+   exists<ValidatorConfig>(a)
+}
+
+ + + + + + + +
fun spec_rewards_amount(
+   stake_amount: u64,
+   num_successful_proposals: u64,
+   num_total_proposals: u64,
+   rewards_rate: u64,
+   rewards_rate_denominator: u64,
+): u64;
+
+ + + + + + + +
fun spec_contains(validators: vector<ValidatorInfo>, addr: address): bool {
+   exists i in 0..len(validators): validators[i].addr == addr
+}
+
+ + + + + + + +
fun spec_is_current_epoch_validator(pool_address: address): bool {
+   let validator_set = global<ValidatorSet>(@supra_framework);
+   !spec_contains(validator_set.pending_active, pool_address)
+       && (spec_contains(validator_set.active_validators, pool_address)
+       || spec_contains(validator_set.pending_inactive, pool_address))
+}
+
+ + + + + + + +
schema ResourceRequirement {
+    requires exists<SupraCoinCapabilities>(@supra_framework);
+    requires exists<ValidatorPerformance>(@supra_framework);
+    requires exists<ValidatorSet>(@supra_framework);
+    requires exists<StakingConfig>(@supra_framework);
+    requires exists<StakingRewardsConfig>(@supra_framework) || !features::spec_periodical_reward_rate_decrease_enabled();
+    requires exists<timestamp::CurrentTimeMicroseconds>(@supra_framework);
+    requires exists<ValidatorFees>(@supra_framework);
+}
+
+ + + + + + + +
fun spec_get_reward_rate_1(config: StakingConfig): num {
+   if (features::spec_periodical_reward_rate_decrease_enabled()) {
+       let epoch_rewards_rate = global<staking_config::StakingRewardsConfig>(@supra_framework).rewards_rate;
+       if (epoch_rewards_rate.value == 0) {
+           0
+       } else {
+           let denominator_0 = aptos_std::fixed_point64::spec_divide_u128(staking_config::MAX_REWARDS_RATE, epoch_rewards_rate);
+           let denominator = if (denominator_0 > MAX_U64) {
+               MAX_U64
+           } else {
+               denominator_0
+           };
+           let nominator = aptos_std::fixed_point64::spec_multiply_u128(denominator, epoch_rewards_rate);
+           nominator
+       }
+   } else {
+           config.rewards_rate
+   }
+}
+
+ + + + + + + +
fun spec_get_reward_rate_2(config: StakingConfig): num {
+   if (features::spec_periodical_reward_rate_decrease_enabled()) {
+       let epoch_rewards_rate = global<staking_config::StakingRewardsConfig>(@supra_framework).rewards_rate;
+       if (epoch_rewards_rate.value == 0) {
+           1
+       } else {
+           let denominator_0 = aptos_std::fixed_point64::spec_divide_u128(staking_config::MAX_REWARDS_RATE, epoch_rewards_rate);
+           let denominator = if (denominator_0 > MAX_U64) {
+               MAX_U64
+           } else {
+               denominator_0
+           };
+           denominator
+       }
+   } else {
+           config.rewards_rate_denominator
+   }
+}
+
+ + + ### Function `update_stake_pool` diff --git a/aptos-move/framework/supra-framework/doc/validator_public_keys.md b/aptos-move/framework/supra-framework/doc/validator_public_keys.md new file mode 100644 index 0000000000000..e0e357572d004 --- /dev/null +++ b/aptos-move/framework/supra-framework/doc/validator_public_keys.md @@ -0,0 +1,985 @@ + + + +# Module `0x1::validator_public_keys` + + + +- [Struct `CertificateThresholdType`](#0x1_validator_public_keys_CertificateThresholdType) +- [Struct `InternalPublicKeys`](#0x1_validator_public_keys_InternalPublicKeys) +- [Struct `ValidatorPublicKeys`](#0x1_validator_public_keys_ValidatorPublicKeys) +- [Constants](#@Constants_0) +- [Function `validity_certificate_type`](#0x1_validator_public_keys_validity_certificate_type) +- [Function `quorum_certificate_type`](#0x1_validator_public_keys_quorum_certificate_type) +- [Function `unanimous_certificate_type`](#0x1_validator_public_keys_unanimous_certificate_type) +- [Function `bcft_validity_certificate_type`](#0x1_validator_public_keys_bcft_validity_certificate_type) +- [Function `bcft_quorum_certificate_type`](#0x1_validator_public_keys_bcft_quorum_certificate_type) +- [Function `bcft_fallback_view_change_certificate_type`](#0x1_validator_public_keys_bcft_fallback_view_change_certificate_type) +- [Function `clan_majority_certificate_type`](#0x1_validator_public_keys_clan_majority_certificate_type) +- [Function `is_validity_certificate_type`](#0x1_validator_public_keys_is_validity_certificate_type) +- [Function `is_quorum_certificate_type`](#0x1_validator_public_keys_is_quorum_certificate_type) +- [Function `is_unanimous_certificate_type`](#0x1_validator_public_keys_is_unanimous_certificate_type) +- [Function `is_bcft_validity_certificate_type`](#0x1_validator_public_keys_is_bcft_validity_certificate_type) +- [Function `is_bcft_quorum_certificate_type`](#0x1_validator_public_keys_is_bcft_quorum_certificate_type) +- [Function `is_bcft_fallback_view_change_certificate_type`](#0x1_validator_public_keys_is_bcft_fallback_view_change_certificate_type) +- [Function `is_clan_majority_certificate_type`](#0x1_validator_public_keys_is_clan_majority_certificate_type) +- [Function `validator_public_keys_from_bytes`](#0x1_validator_public_keys_validator_public_keys_from_bytes) +- [Function `public_key_to_bytes`](#0x1_validator_public_keys_public_key_to_bytes) +- [Function `get_network_key`](#0x1_validator_public_keys_get_network_key) +- [Function `get_supra_bls_multi_sig_pub_key`](#0x1_validator_public_keys_get_supra_bls_multi_sig_pub_key) +- [Function `get_supra_cg_key`](#0x1_validator_public_keys_get_supra_cg_key) +- [Function `get_supra_ed_key`](#0x1_validator_public_keys_get_supra_ed_key) +- [Function `rotate_supra_bls_threshold_validity_key`](#0x1_validator_public_keys_rotate_supra_bls_threshold_validity_key) +- [Function `rotate_supra_bls_threshold_quorum_key`](#0x1_validator_public_keys_rotate_supra_bls_threshold_quorum_key) +- [Function `rotate_supra_bls_threshold_unanimous_key`](#0x1_validator_public_keys_rotate_supra_bls_threshold_unanimous_key) +- [Function `rotate_supra_bls_threshold_bcft_validity_key`](#0x1_validator_public_keys_rotate_supra_bls_threshold_bcft_validity_key) +- [Function `rotate_supra_bls_threshold_bcft_quorum_key`](#0x1_validator_public_keys_rotate_supra_bls_threshold_bcft_quorum_key) +- [Function `rotate_supra_bls_threshold_bcft_fallback_view_change_key`](#0x1_validator_public_keys_rotate_supra_bls_threshold_bcft_fallback_view_change_key) +- [Function `rotate_supra_bls_threshold_clan_majority_key`](#0x1_validator_public_keys_rotate_supra_bls_threshold_clan_majority_key) +- [Function `rotate_supra_bls_threshold_key_by_type`](#0x1_validator_public_keys_rotate_supra_bls_threshold_key_by_type) + + +
use 0x1::any;
+use 0x1::bcs;
+use 0x1::bls12381;
+use 0x1::class_groups;
+use 0x1::ed25519;
+use 0x1::error;
+use 0x1::option;
+use 0x1::string;
+use 0x1::type_info;
+
+ + + + + +## Struct `CertificateThresholdType` + +Internal tag wrapper + + +
struct CertificateThresholdType has copy, drop, store
+
+ + + +
+Fields + + +
+
+tag: u8 +
+
+ +
+
+ + +
+ + + +## Struct `InternalPublicKeys` + +InternalPublicKeys consists of: +1. bls multisig key +2. bls threshold key shares for various certificate types +3. classgroup key +4. ed25519 key + + +
struct InternalPublicKeys has copy, drop, store
+
+ + + +
+Fields + + +
+
+bls_multisig_key: bls12381::PublicKey +
+
+ +
+
+bls_threshold_validity_certificate_key: option::Option<bls12381::PublicKey> +
+
+ +
+
+bls_threshold_quorum_certificate_key: option::Option<bls12381::PublicKey> +
+
+ +
+
+bls_threshold_unanimous_certificate_key: option::Option<bls12381::PublicKey> +
+
+ +
+
+bls_threshold_bcft_validity_certificate_key: option::Option<bls12381::PublicKey> +
+
+ +
+
+bls_threshold_bcft_quorum_certificate_key: option::Option<bls12381::PublicKey> +
+
+ +
+
+bls_threshold_bcft_fallback_view_change_certificate_key: option::Option<bls12381::PublicKey> +
+
+ +
+
+bls_threshold_clan_majority_certificate_key: option::Option<bls12381::PublicKey> +
+
+ +
+
+class_group_key: class_groups::CGPublicKey +
+
+ +
+
+ed25519_key: ed25519::ValidatedPublicKey +
+
+ +
+
+ + +
+ + + +## Struct `ValidatorPublicKeys` + +ValidatorPublicKeys consists of: +1. network key +2. supra's internal keys + + +
struct ValidatorPublicKeys has copy, drop, store
+
+ + + +
+Fields + + +
+
+network_key: ed25519::ValidatedPublicKey +
+
+ +
+
+supra_keys: validator_public_keys::InternalPublicKeys +
+
+ +
+
+ + +
+ + + +## Constants + + + + +The size of a serialized bls12381 G1 public key, in bytes. + + +
const BLS12381_G1_PUBLIC_KEY_NUM_BYTES: u64 = 48;
+
+ + + + + +The integer should match the Rust enum value representation in CertificateThresholdType. +n - f - c, given there are f Byzantine nodes and c crash-only nodes in the [Committee] with n >= 3f + 2c + 1 nodes. + + +
const CERTIFICATE_THRESHOLD_TYPE_BCFT_FALLBACK_VIEW_CHANGE: u8 = 5;
+
+ + + + + +The integer should match the Rust enum value representation in CertificateThresholdType +2f + c + 1, given there are f Byzantine nodes and c crash-only nodes in the [Committee] with n >= 3f + 2c + 1 nodes. + + +
const CERTIFICATE_THRESHOLD_TYPE_BCFT_QUORUM: u8 = 4;
+
+ + + + + +The integer should match the Rust enum value representation in CertificateThresholdType. +f+1, given there are f Byzantine nodes and c crash-only nodes in the [Committee] with n >= 3f + 2c + 1 nodes. + + +
const CERTIFICATE_THRESHOLD_TYPE_BCFT_VALIDITY: u8 = 3;
+
+ + + + + +The integer should match the Rust enum value representation in CertificateThresholdType. +f+1, given there are f Byzantine nodes in the [Committee] with n >= 2f + 1 nodes. + + +
const CERTIFICATE_THRESHOLD_TYPE_CLAN_MAJORITY: u8 = 6;
+
+ + + + + +The integer should match the Rust enum value representation in CertificateThresholdType. +2f+1, given there are f Byzantine nodes in the [Committee] and n >= 3f + 1 nodes in total. + + +
const CERTIFICATE_THRESHOLD_TYPE_QUORUM: u8 = 1;
+
+ + + + + +The integer should match the Rust enum value representation in CertificateThresholdType. +n, where n is the total number of nodes in the [Committee]. + + +
const CERTIFICATE_THRESHOLD_TYPE_UNANIMOUS: u8 = 2;
+
+ + + + + +The integer should match the Rust enum value representation in CertificateThresholdType. +f+1, given there are f Byzantine nodes in the [Committee]. + + +
const CERTIFICATE_THRESHOLD_TYPE_VALIDITY: u8 = 0;
+
+ + + + + +The size of a serialized ed25519 public key, in bytes. + + +
const ED25519_PUBLIC_KEY_NUM_BYTES: u64 = 32;
+
+ + + + + +Error: Unknown certificate threshold type. + + +
const EUNKNOWN_THRESHOLD_TYPE: u64 = 1;
+
+ + + + + +## Function `validity_certificate_type` + + + +
public fun validity_certificate_type(): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun validity_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_VALIDITY } }
+
+ + + +
+ + + +## Function `quorum_certificate_type` + + + +
public fun quorum_certificate_type(): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun quorum_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_QUORUM } }
+
+ + + +
+ + + +## Function `unanimous_certificate_type` + + + +
public fun unanimous_certificate_type(): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun unanimous_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_UNANIMOUS } }
+
+ + + +
+ + + +## Function `bcft_validity_certificate_type` + + + +
public fun bcft_validity_certificate_type(): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun bcft_validity_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_BCFT_VALIDITY } }
+
+ + + +
+ + + +## Function `bcft_quorum_certificate_type` + + + +
public fun bcft_quorum_certificate_type(): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun bcft_quorum_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_BCFT_QUORUM } }
+
+ + + +
+ + + +## Function `bcft_fallback_view_change_certificate_type` + + + +
public fun bcft_fallback_view_change_certificate_type(): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun bcft_fallback_view_change_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_BCFT_FALLBACK_VIEW_CHANGE } }
+
+ + + +
+ + + +## Function `clan_majority_certificate_type` + + + +
public fun clan_majority_certificate_type(): validator_public_keys::CertificateThresholdType
+
+ + + +
+Implementation + + +
public fun clan_majority_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_CLAN_MAJORITY } }
+
+ + + +
+ + + +## Function `is_validity_certificate_type` + + + +
public fun is_validity_certificate_type(t: &validator_public_keys::CertificateThresholdType): bool
+
+ + + +
+Implementation + + +
public fun is_validity_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_VALIDITY }
+
+ + + +
+ + + +## Function `is_quorum_certificate_type` + + + +
public fun is_quorum_certificate_type(t: &validator_public_keys::CertificateThresholdType): bool
+
+ + + +
+Implementation + + +
public fun is_quorum_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_QUORUM }
+
+ + + +
+ + + +## Function `is_unanimous_certificate_type` + + + +
public fun is_unanimous_certificate_type(t: &validator_public_keys::CertificateThresholdType): bool
+
+ + + +
+Implementation + + +
public fun is_unanimous_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_UNANIMOUS }
+
+ + + +
+ + + +## Function `is_bcft_validity_certificate_type` + + + +
public fun is_bcft_validity_certificate_type(t: &validator_public_keys::CertificateThresholdType): bool
+
+ + + +
+Implementation + + +
public fun is_bcft_validity_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_BCFT_VALIDITY }
+
+ + + +
+ + + +## Function `is_bcft_quorum_certificate_type` + + + +
public fun is_bcft_quorum_certificate_type(t: &validator_public_keys::CertificateThresholdType): bool
+
+ + + +
+Implementation + + +
public fun is_bcft_quorum_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_BCFT_QUORUM }
+
+ + + +
+ + + +## Function `is_bcft_fallback_view_change_certificate_type` + + + +
public fun is_bcft_fallback_view_change_certificate_type(t: &validator_public_keys::CertificateThresholdType): bool
+
+ + + +
+Implementation + + +
public fun is_bcft_fallback_view_change_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_BCFT_FALLBACK_VIEW_CHANGE }
+
+ + + +
+ + + +## Function `is_clan_majority_certificate_type` + + + +
public fun is_clan_majority_certificate_type(t: &validator_public_keys::CertificateThresholdType): bool
+
+ + + +
+Implementation + + +
public fun is_clan_majority_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_CLAN_MAJORITY }
+
+ + + +
+ + + +## Function `validator_public_keys_from_bytes` + + + +
public fun validator_public_keys_from_bytes(bytes: vector<u8>): validator_public_keys::ValidatorPublicKeys
+
+ + + +
+Implementation + + +
public fun validator_public_keys_from_bytes(bytes: vector<u8>): ValidatorPublicKeys{
+
+    // bcs deserialization
+    let bytes_serialized = any::new(type_info::type_name<ValidatorPublicKeys>(), bytes);
+    let validator_public_keys = any::unpack<ValidatorPublicKeys>(bytes_serialized);
+    validator_public_keys
+}
+
+ + + +
+ + + +## Function `public_key_to_bytes` + + + +
public fun public_key_to_bytes(pk: validator_public_keys::ValidatorPublicKeys): vector<u8>
+
+ + + +
+Implementation + + +
public fun public_key_to_bytes(pk: ValidatorPublicKeys): vector<u8>{
+    // bcs deserialization
+    bcs::to_bytes<ValidatorPublicKeys>(&pk)
+}
+
+ + + +
+ + + +## Function `get_network_key` + + + +
public fun get_network_key(pk: &validator_public_keys::ValidatorPublicKeys): ed25519::ValidatedPublicKey
+
+ + + +
+Implementation + + +
public fun get_network_key(pk: &ValidatorPublicKeys): ed25519::ValidatedPublicKey{
+    pk.network_key
+}
+
+ + + +
+ + + +## Function `get_supra_bls_multi_sig_pub_key` + + + +
public fun get_supra_bls_multi_sig_pub_key(pk: &validator_public_keys::ValidatorPublicKeys): bls12381::PublicKey
+
+ + + +
+Implementation + + +
public fun get_supra_bls_multi_sig_pub_key(pk: &ValidatorPublicKeys): bls12381::PublicKey{
+    pk.supra_keys.bls_multisig_key
+}
+
+ + + +
+ + + +## Function `get_supra_cg_key` + + + +
public fun get_supra_cg_key(pk: &validator_public_keys::ValidatorPublicKeys): class_groups::CGPublicKey
+
+ + + +
+Implementation + + +
public fun get_supra_cg_key(pk: &ValidatorPublicKeys): class_groups::CGPublicKey{
+    pk.supra_keys.class_group_key
+}
+
+ + + +
+ + + +## Function `get_supra_ed_key` + + + +
public fun get_supra_ed_key(pk: &validator_public_keys::ValidatorPublicKeys): ed25519::ValidatedPublicKey
+
+ + + +
+Implementation + + +
public fun get_supra_ed_key(pk: &ValidatorPublicKeys): ed25519::ValidatedPublicKey{
+    pk.supra_keys.ed25519_key
+}
+
+ + + +
+ + + +## Function `rotate_supra_bls_threshold_validity_key` + + + +
public fun rotate_supra_bls_threshold_validity_key(pk: &mut validator_public_keys::ValidatorPublicKeys, new_bls_threshold_validity_key: bls12381::PublicKey)
+
+ + + +
+Implementation + + +
public fun rotate_supra_bls_threshold_validity_key(pk: &mut ValidatorPublicKeys, new_bls_threshold_validity_key: bls12381::PublicKey) {
+    pk.supra_keys.bls_threshold_validity_certificate_key = option::some(new_bls_threshold_validity_key);
+}
+
+ + + +
+ + + +## Function `rotate_supra_bls_threshold_quorum_key` + + + +
public fun rotate_supra_bls_threshold_quorum_key(pk: &mut validator_public_keys::ValidatorPublicKeys, new_bls_threshold_quorum_key: bls12381::PublicKey)
+
+ + + +
+Implementation + + +
public fun rotate_supra_bls_threshold_quorum_key(pk: &mut ValidatorPublicKeys, new_bls_threshold_quorum_key: bls12381::PublicKey) {
+    pk.supra_keys.bls_threshold_quorum_certificate_key = option::some(new_bls_threshold_quorum_key);
+}
+
+ + + +
+ + + +## Function `rotate_supra_bls_threshold_unanimous_key` + + + +
public fun rotate_supra_bls_threshold_unanimous_key(pk: &mut validator_public_keys::ValidatorPublicKeys, new_key: bls12381::PublicKey)
+
+ + + +
+Implementation + + +
public fun rotate_supra_bls_threshold_unanimous_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) {
+    pk.supra_keys.bls_threshold_unanimous_certificate_key = option::some(new_key);
+}
+
+ + + +
+ + + +## Function `rotate_supra_bls_threshold_bcft_validity_key` + + + +
public fun rotate_supra_bls_threshold_bcft_validity_key(pk: &mut validator_public_keys::ValidatorPublicKeys, new_key: bls12381::PublicKey)
+
+ + + +
+Implementation + + +
public fun rotate_supra_bls_threshold_bcft_validity_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) {
+    pk.supra_keys.bls_threshold_bcft_validity_certificate_key = option::some(new_key);
+}
+
+ + + +
+ + + +## Function `rotate_supra_bls_threshold_bcft_quorum_key` + + + +
public fun rotate_supra_bls_threshold_bcft_quorum_key(pk: &mut validator_public_keys::ValidatorPublicKeys, new_key: bls12381::PublicKey)
+
+ + + +
+Implementation + + +
public fun rotate_supra_bls_threshold_bcft_quorum_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) {
+    pk.supra_keys.bls_threshold_bcft_quorum_certificate_key = option::some(new_key);
+}
+
+ + + +
+ + + +## Function `rotate_supra_bls_threshold_bcft_fallback_view_change_key` + + + +
public fun rotate_supra_bls_threshold_bcft_fallback_view_change_key(pk: &mut validator_public_keys::ValidatorPublicKeys, new_key: bls12381::PublicKey)
+
+ + + +
+Implementation + + +
public fun rotate_supra_bls_threshold_bcft_fallback_view_change_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) {
+    pk.supra_keys.bls_threshold_bcft_fallback_view_change_certificate_key = option::some(new_key);
+}
+
+ + + +
+ + + +## Function `rotate_supra_bls_threshold_clan_majority_key` + + + +
public fun rotate_supra_bls_threshold_clan_majority_key(pk: &mut validator_public_keys::ValidatorPublicKeys, new_key: bls12381::PublicKey)
+
+ + + +
+Implementation + + +
public fun rotate_supra_bls_threshold_clan_majority_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) {
+    pk.supra_keys.bls_threshold_clan_majority_certificate_key = option::some(new_key);
+}
+
+ + + +
+ + + +## Function `rotate_supra_bls_threshold_key_by_type` + +Rotate a threshold key based on the threshold type tag. +threshold_type: 0=validity, 1=quorum, 2=unanimous, 3=bcft_validity, 4=bcft_quorum, 5=bcft_fallback_view_change, 6=clan_majority + + +
public fun rotate_supra_bls_threshold_key_by_type(pk: &mut validator_public_keys::ValidatorPublicKeys, threshold_type: u8, new_key: bls12381::PublicKey)
+
+ + + +
+Implementation + + +
public fun rotate_supra_bls_threshold_key_by_type(pk: &mut ValidatorPublicKeys, threshold_type: u8, new_key: bls12381::PublicKey) {
+    if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_VALIDITY) {
+        rotate_supra_bls_threshold_validity_key(pk, new_key);
+    } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_QUORUM) {
+        rotate_supra_bls_threshold_quorum_key(pk, new_key);
+    } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_UNANIMOUS) {
+        rotate_supra_bls_threshold_unanimous_key(pk, new_key);
+    } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_BCFT_VALIDITY) {
+        rotate_supra_bls_threshold_bcft_validity_key(pk, new_key);
+    } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_BCFT_QUORUM) {
+        rotate_supra_bls_threshold_bcft_quorum_key(pk, new_key);
+    } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_BCFT_FALLBACK_VIEW_CHANGE) {
+        rotate_supra_bls_threshold_bcft_fallback_view_change_key(pk, new_key);
+    } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_CLAN_MAJORITY) {
+        rotate_supra_bls_threshold_clan_majority_key(pk, new_key);
+    } else {
+        abort error::invalid_argument(EUNKNOWN_THRESHOLD_TYPE)
+    };
+}
+
+ + + +
+ + +[move-book]: https://aptos.dev/move/book/SUMMARY diff --git a/aptos-move/framework/supra-framework/doc/vesting_without_staking.md b/aptos-move/framework/supra-framework/doc/vesting_without_staking.md index 976c558399155..0cd53c9ed178c 100644 --- a/aptos-move/framework/supra-framework/doc/vesting_without_staking.md +++ b/aptos-move/framework/supra-framework/doc/vesting_without_staking.md @@ -1257,7 +1257,7 @@ Create a vesting schedule with the given schedule of distributions, a vesting st // last vesting fraction must be non zero to ensure that no amount remains unvested forever. assert!( fixed_point32::get_raw_value(*vector::borrow(&schedule, schedule_len - 1)) != - 0, + 0, error::invalid_argument(EEMPTY_VESTING_SCHEDULE), ); assert!( diff --git a/aptos-move/framework/supra-framework/sources/block.move b/aptos-move/framework/supra-framework/sources/block.move index cedf43e8427e3..fd6a5aaf5750d 100644 --- a/aptos-move/framework/supra-framework/sources/block.move +++ b/aptos-move/framework/supra-framework/sources/block.move @@ -263,8 +263,14 @@ module supra_framework::block { failed_proposer_indices: vector, previous_block_votes_bitvec: vector, timestamp: u64, - randomness_seed: Option>, + randomness_seed_vec: vector, ) acquires BlockResource, CommitHistory { + let randomness_seed = if (vector::length(&randomness_seed_vec) == 0) { + option::none() + } else { + option::some(randomness_seed_vec) + }; + let epoch_interval = block_prologue_common( &vm, hash, diff --git a/aptos-move/framework/supra-framework/sources/configs/config_buffer.move b/aptos-move/framework/supra-framework/sources/configs/config_buffer.move index a2fa31c0cc8e8..6e0019d13d0c8 100644 --- a/aptos-move/framework/supra-framework/sources/configs/config_buffer.move +++ b/aptos-move/framework/supra-framework/sources/configs/config_buffer.move @@ -32,6 +32,7 @@ module supra_framework::config_buffer { friend supra_framework::randomness_config_seqnum; friend supra_framework::version; friend supra_framework::automation_registry; + friend supra_framework::dkg_config; friend supra_framework::leader_ban_registry_config; /// Config buffer operations failed with permission denied. diff --git a/aptos-move/framework/supra-framework/sources/configs/dkg_config.move b/aptos-move/framework/supra-framework/sources/configs/dkg_config.move new file mode 100644 index 0000000000000..007dfcdb7153f --- /dev/null +++ b/aptos-move/framework/supra-framework/sources/configs/dkg_config.move @@ -0,0 +1,373 @@ +// Copyright (c) 2026 Supra. +/// DKG configuration module for configurable DKG parameters. +/// This config can be updated via governance and takes effect at the next epoch. +module supra_framework::dkg_config { + use std::error; + use std::vector; + use supra_framework::config_buffer; + use supra_framework::system_addresses; + use supra_framework::validator_public_keys::{ + CertificateThresholdType, + validity_certificate_type, + quorum_certificate_type + }; + #[test_only] + use supra_framework::validator_public_keys::unanimous_certificate_type; + + friend supra_framework::genesis; + friend supra_framework::reconfiguration_with_dkg; + + /// Error: Receiver committees vector cannot be empty. + const EEMPTY_RECEIVER_COMMITTEES: u64 = 1; + /// Error: Cannot enable resharing for a threshold type that doesn't exist in current config. + const ERESHARING_FOR_NONEXISTENT_THRESHOLD_TYPE: u64 = 2; + + /// Configuration for a single receiver committee in DKG. + struct ReceiverCommitteeConfig has copy, drop, store { + /// Whether this committee uses resharing from the previous epoch's public key. + is_resharing: bool, + /// The threshold type for this committee (e.g., quorum, clan_majority). + committee_threshold_type: CertificateThresholdType, + /// The threshold type for output keys in DKG for this committee (e.g., validity, quorum). + dkg_threshold_type: CertificateThresholdType, + } + + /// Main DKG configuration stored at @supra_framework. + /// Controls DKG parameters that can be updated via governance. + struct DkgConfig has copy, drop, key, store { + /// Threshold type for the dealer committee. (e.g., quorum, clan_majority). + dealer_committee_threshold_type: CertificateThresholdType, + /// Configuration for each receiver committee. + /// Default: [(false, validity), (false, quorum)] + receiver_committees: vector, + } + + // ======================== + // Initialization + // ======================== + + /// Initialize DKG config during genesis. + public(friend) fun initialize(framework: &signer) { + system_addresses::assert_supra_framework(framework); + if (!exists(@supra_framework)) { + move_to(framework, default()); + } + } + + // ======================== + // Config Update (Governance) + // ======================== + + /// Set a new DKG config for the next epoch. + /// This can only be called by on-chain governance. + /// Example usage: + /// ``` + /// let new_config = dkg_config::new( + /// quorum_certificate_type(), + /// vector[ + /// dkg_config::new_receiver_committee_config(true, validity_certificate_type()), + /// dkg_config::new_receiver_committee_config(true, quorum_certificate_type()), + /// ] + /// ); + /// dkg_config::set_for_next_epoch(&framework_signer, new_config); + /// supra_governance::reconfigure(&framework_signer); + /// ``` + public fun set_for_next_epoch(framework: &signer, new_config: DkgConfig) acquires DkgConfig { + system_addresses::assert_supra_framework(framework); + + // Validate: receiver_committees cannot be empty + assert!( + vector::length(&new_config.receiver_committees) > 0, + error::invalid_argument(EEMPTY_RECEIVER_COMMITTEES) + ); + + // Validate: if resharing is enabled for a dkg threshold type, it must exist in current config + let current_config = current(); + let i = 0; + let len = vector::length(&new_config.receiver_committees); + while (i < len) { + let new_rc = vector::borrow(&new_config.receiver_committees, i); + if (new_rc.is_resharing) { + // Check if this threshold type exists in current config + assert!( + has_key_threshold_type(¤t_config, new_rc.dkg_threshold_type), + error::invalid_argument(ERESHARING_FOR_NONEXISTENT_THRESHOLD_TYPE) + ); + }; + i = i + 1; + }; + + config_buffer::upsert(new_config); + } + + /// Check if a threshold type exists in the config's receiver committees. + fun has_key_threshold_type(config: &DkgConfig, threshold_type: CertificateThresholdType): bool { + let i = 0; + let len = vector::length(&config.receiver_committees); + while (i < len) { + let rc = vector::borrow(&config.receiver_committees, i); + if (rc.dkg_threshold_type == threshold_type) { + return true + }; + i = i + 1; + }; + false + } + + /// Apply any pending DKG config at epoch boundary. + /// Called from reconfiguration_with_dkg::finish(). + public(friend) fun on_new_epoch(framework: &signer) acquires DkgConfig { + system_addresses::assert_supra_framework(framework); + if (config_buffer::does_exist()) { + let new_config = config_buffer::extract(); + if (exists(@supra_framework)) { + *borrow_global_mut(@supra_framework) = new_config; + } else { + move_to(framework, new_config); + } + } + } + + // ======================== + // Constructors + // ======================== + + /// Create a new DkgConfig. + public fun new( + dealer_committee_threshold_type: CertificateThresholdType, + receiver_committees: vector + ): DkgConfig { + DkgConfig { + dealer_committee_threshold_type, + receiver_committees, + } + } + + /// Create a new ReceiverCommitteeConfig. + public fun new_receiver_committee_config( + is_resharing: bool, + committee_threshold_type: CertificateThresholdType, + dkg_threshold_type: CertificateThresholdType + ): ReceiverCommitteeConfig { + ReceiverCommitteeConfig { + is_resharing, + committee_threshold_type, + dkg_threshold_type, + } + } + + /// Returns the default DKG configuration: + /// - Dealer threshold: quorum_certificate_type() + /// - Receiver committees: + /// - [(is_resharing = false, committee_threshold_type = quorum_certificate_type(), dkg_threshold_type = validity_certificate_type()), + /// - (is_resharing = false, committee_threshold_type = quorum_certificate_type(), dkg_threshold_type = quorum_certificate_type())] + public fun default(): DkgConfig { + DkgConfig { + dealer_committee_threshold_type: quorum_certificate_type(), + receiver_committees: vector[ + ReceiverCommitteeConfig { + is_resharing: false, + committee_threshold_type: quorum_certificate_type(), + dkg_threshold_type: validity_certificate_type(), + }, + ReceiverCommitteeConfig { + is_resharing: false, + committee_threshold_type: quorum_certificate_type(), + dkg_threshold_type: quorum_certificate_type(), + }, + ], + } + } + + // ======================== + // Getters + // ======================== + + /// Get the current DKG config. + public fun current(): DkgConfig acquires DkgConfig { + if (exists(@supra_framework)) { + *borrow_global(@supra_framework) + } else { + default() + } + } + + /// Get the dealer threshold type from the config. + public fun get_dealer_committee_threshold_type(config: &DkgConfig): CertificateThresholdType { + config.dealer_committee_threshold_type + } + + /// Get the receiver committee configs from the DkgConfig. + public fun get_receiver_committee_configs(config: &DkgConfig): vector { + config.receiver_committees + } + + /// Get is_resharing from a ReceiverCommitteeConfig. + public fun get_is_resharing(config: &ReceiverCommitteeConfig): bool { + config.is_resharing + } + + /// Get committee_threshold_type from a ReceiverCommitteeConfig. + public fun get_committee_threshold_type(config: &ReceiverCommitteeConfig): CertificateThresholdType { + config.committee_threshold_type + } + + /// Get dkg_threshold_type from a ReceiverCommitteeConfig. + public fun get_dkg_threshold_type(config: &ReceiverCommitteeConfig): CertificateThresholdType { + config.dkg_threshold_type + } + + // ======================== + // Tests + // ======================== + + #[test_only] + use supra_framework::account; + + #[test_only] + fun initialize_for_testing(framework: &signer) { + config_buffer::initialize(framework); + initialize(framework); + } + + #[test(framework = @0x1)] + fun test_default_config(framework: signer) acquires DkgConfig { + account::create_account_for_test(@0x1); + initialize_for_testing(&framework); + + let config = current(); + + // Check dealer threshold type is quorum + assert!( + get_dealer_committee_threshold_type(&config) == quorum_certificate_type(), + 1 + ); + + // Check receiver committees + let receivers = get_receiver_committee_configs(&config); + assert!(vector::length(&receivers) == 2, 2); + + // First receiver: (false, quorum, validity) + let r0 = vector::borrow(&receivers, 0); + assert!(!get_is_resharing(r0), 3); + assert!(get_committee_threshold_type(r0) == quorum_certificate_type(), 4); + assert!(get_dkg_threshold_type(r0) == validity_certificate_type(), 5); + + // Second receiver: (false, quorum,quorum) + let r1 = vector::borrow(&receivers, 1); + assert!(!get_is_resharing(r1), 6); + assert!(get_committee_threshold_type(r1) == quorum_certificate_type(), 4); + assert!(get_dkg_threshold_type(r1) == quorum_certificate_type(), 6); + } + + #[test(framework = @0x1)] + fun test_set_for_next_epoch(framework: signer) acquires DkgConfig { + account::create_account_for_test(@0x1); + initialize_for_testing(&framework); + + // Create new config with resharing enabled + let new_config = new( + validity_certificate_type(), // Change dealer to validity + vector[ + new_receiver_committee_config(true, quorum_certificate_type(), validity_certificate_type()), + new_receiver_committee_config(true, quorum_certificate_type(), quorum_certificate_type()), + ] + ); + + // Stage for next epoch + set_for_next_epoch(&framework, new_config); + + // Config should not change yet + let config = current(); + assert!(!get_is_resharing(vector::borrow(&get_receiver_committee_configs(&config), 0)), 1); + + // Apply on new epoch + on_new_epoch(&framework); + + // Now config should be updated + let config = current(); + assert!(get_dealer_committee_threshold_type(&config) == validity_certificate_type(), 2); + let receivers = get_receiver_committee_configs(&config); + assert!(get_is_resharing(vector::borrow(&receivers, 0)), 3); + assert!(get_is_resharing(vector::borrow(&receivers, 1)), 4); + } + + #[test(framework = @0x1)] + #[expected_failure(abort_code = 65537, location = Self)] // EEMPTY_RECEIVER_COMMITTEES + fun test_set_for_next_epoch_empty_receivers_fails(framework: signer) acquires DkgConfig { + account::create_account_for_test(@0x1); + initialize_for_testing(&framework); + + // Try to set config with empty receiver committees - should fail + let bad_config = new( + quorum_certificate_type(), + vector[] // Empty! + ); + set_for_next_epoch(&framework, bad_config); + } + + #[test(framework = @0x1)] + #[expected_failure(abort_code = 65538, location = Self)] // ERESHARING_FOR_NONEXISTENT_THRESHOLD_TYPE + fun test_set_for_next_epoch_resharing_nonexistent_type_fails(framework: signer) acquires DkgConfig { + account::create_account_for_test(@0x1); + initialize_for_testing(&framework); + + // Default config has validity and quorum threshold types. + // Try to enable resharing for unanimous_certificate_type which doesn't exist. + let bad_config = new( + quorum_certificate_type(), + vector[ + new_receiver_committee_config(true, quorum_certificate_type(),unanimous_certificate_type()), // This type doesn't exist! + ] + ); + set_for_next_epoch(&framework, bad_config); + } + + #[test(framework = @0x1)] + fun test_set_for_next_epoch_resharing_existing_type_succeeds(framework: signer) acquires DkgConfig { + account::create_account_for_test(@0x1); + initialize_for_testing(&framework); + + // Enable resharing for types that DO exist in current config (validity and quorum) + let good_config = new( + quorum_certificate_type(), + vector[ + new_receiver_committee_config(true, quorum_certificate_type(), validity_certificate_type()), // Exists in default + new_receiver_committee_config(true, quorum_certificate_type(), quorum_certificate_type()), // Exists in default + ] + ); + + // Should succeed + set_for_next_epoch(&framework, good_config); + on_new_epoch(&framework); + + let config = current(); + let receivers = get_receiver_committee_configs(&config); + assert!(get_is_resharing(vector::borrow(&receivers, 0)), 1); + assert!(get_is_resharing(vector::borrow(&receivers, 1)), 2); + } + + #[test(framework = @0x1)] + fun test_add_new_threshold_type_without_resharing_succeeds(framework: signer) acquires DkgConfig { + account::create_account_for_test(@0x1); + initialize_for_testing(&framework); + + // Adding a new threshold type without resharing should succeed + let config_with_new_type = new( + quorum_certificate_type(), + vector[ + new_receiver_committee_config(false, quorum_certificate_type(), validity_certificate_type()), + new_receiver_committee_config(false, quorum_certificate_type(), quorum_certificate_type()), + new_receiver_committee_config(false, quorum_certificate_type(), unanimous_certificate_type()), // New type, no resharing + ] + ); + + // Should succeed because resharing is false + set_for_next_epoch(&framework, config_with_new_type); + on_new_epoch(&framework); + + let config = current(); + let receivers = get_receiver_committee_configs(&config); + assert!(vector::length(&receivers) == 3, 1); + } +} diff --git a/aptos-move/framework/supra-framework/sources/dkg.move b/aptos-move/framework/supra-framework/sources/dkg.move index 9721c2722bd6f..f06ca82fb9350 100644 --- a/aptos-move/framework/supra-framework/sources/dkg.move +++ b/aptos-move/framework/supra-framework/sources/dkg.move @@ -1,26 +1,25 @@ +// Copyright (c) 2024 Supra. /// DKG on-chain states and helper functions. module supra_framework::dkg { + use std::dkg_committee::{DkgCommittee, ReceiverCommittee, new_dkg_committee_output}; use std::error; use std::option; - use std::option::Option; + use std::option::{Option}; + use std::vector; + use aptos_std::any; + use aptos_std::type_info; use supra_framework::event::emit; - use supra_framework::randomness_config::RandomnessConfig; use supra_framework::system_addresses; use supra_framework::timestamp; - use supra_framework::validator_consensus_info::ValidatorConsensusInfo; + use supra_framework::stake; + friend supra_framework::block; friend supra_framework::reconfiguration_with_dkg; - const EDKG_IN_PROGRESS: u64 = 1; - const EDKG_NOT_IN_PROGRESS: u64 = 2; - - /// This can be considered as the public input of DKG. - struct DKGSessionMetadata has copy, drop, store { - dealer_epoch: u64, - randomness_config: RandomnessConfig, - dealer_validator_set: vector, - target_validator_set: vector, - } + const EDKG_NOT_IN_PROGRESS: u64 = 1; + const EDKG_META_ALREADY_SET: u64 = 2; + const EDKG_META_NOT_SET: u64 = 3; + const EDKG_INVALID_PK_SHARES: u64 = 4; #[event] struct DKGStartEvent has drop, store { @@ -28,12 +27,31 @@ module supra_framework::dkg { start_time_us: u64, } + #[event] + struct DKGMetaSetEvent has drop, store { + dkg_meta_transcript: vector, + } + + #[event] + struct DKGFinishEvent has drop, store { + target_committees_public_key_shares: vector + } + + /// This can be considered as the public input of DKG. + struct DKGSessionMetadata has copy, drop, store { + dealer_epoch: u64, + randomness_seed: vector, + dealer_committee: DkgCommittee, + target_committees: vector, + } + /// The input and output of a DKG session. /// The validator set of epoch `x` works together for an DKG output for the target validator set of epoch `x+1`. struct DKGSessionState has copy, store, drop { metadata: DKGSessionMetadata, start_time_us: u64, - transcript: vector, + dkg_meta_transcript: vector, + target_committees_public_key_shares: vector } /// The completed and in-progress DKG sessions. @@ -42,8 +60,22 @@ module supra_framework::dkg { in_progress: Option, } + struct OnChainAggregateCommitment has copy, drop{ + bls12381_commitment_g: vector, + bls12381_commitment_evals: vector>, + dealer_ids: vector, + committee_index: u32, + epoch: u64, + chain_id: u8, + threshold_type: u8, + } + + struct OnChainAggregateCommitmentAllCommittees has copy, drop{ + commitments: vector, + } + /// Called in genesis to initialize on-chain states. - public fun initialize(supra_framework: &signer) { + public(friend) fun initialize(supra_framework: &signer) { system_addresses::assert_supra_framework(supra_framework); if (!exists(@supra_framework)) { move_to( @@ -53,29 +85,30 @@ module supra_framework::dkg { in_progress: std::option::none(), } ); - } + }; } /// Mark on-chain DKG state as in-progress. Notify validators to start DKG. /// Abort if a DKG is already in progress. public(friend) fun start( dealer_epoch: u64, - randomness_config: RandomnessConfig, - dealer_validator_set: vector, - target_validator_set: vector, + randomness_seed: vector, + dealer_committee: DkgCommittee, + target_committees: vector ) acquires DKGState { let dkg_state = borrow_global_mut(@supra_framework); let new_session_metadata = DKGSessionMetadata { dealer_epoch, - randomness_config, - dealer_validator_set, - target_validator_set, + randomness_seed, + dealer_committee, + target_committees, }; let start_time_us = timestamp::now_microseconds(); dkg_state.in_progress = std::option::some(DKGSessionState { metadata: new_session_metadata, start_time_us, - transcript: vector[], + dkg_meta_transcript: vector[], + target_committees_public_key_shares: vector[], }); emit(DKGStartEvent { @@ -84,16 +117,68 @@ module supra_framework::dkg { }); } - /// Put a transcript into the currently incomplete DKG session, then mark it completed. - /// - /// Abort if DKG is not in progress. - public(friend) fun finish(transcript: vector) acquires DKGState { + /// Family Node sets the DKGMeta for the in-progress DKG session + /// The dkg transcript is assumed to have been already verified by the aptos VM in `process_dkg_result` method + public(friend) fun set_dkg_meta(dkg_meta_all_committees: vector) + acquires DKGState { + // ensure dkg is in progress let dkg_state = borrow_global_mut(@supra_framework); assert!(option::is_some(&dkg_state.in_progress), error::invalid_state(EDKG_NOT_IN_PROGRESS)); + + // we only add the first DKG Meta proposed and ignore the rest + let session = option::extract(&mut dkg_state.in_progress); + assert!(vector::length(&session.dkg_meta_transcript) == 0, error::already_exists(EDKG_META_ALREADY_SET)); + session.dkg_meta_transcript = dkg_meta_all_committees; + dkg_state.in_progress = option::some(session); + + emit(DKGMetaSetEvent { + dkg_meta_transcript: dkg_meta_all_committees, + }); + } + + /// Family Node sets the `target_committees_public_key_shares` for the in-progress DKG session and + /// marks the incomplete DKG session completed. + ///The `target_committees_public_key_shares` is assumed to be verified by the aptos VM before calling this function + public(friend) fun finish(target_committees_public_key_shares: vector) + acquires DKGState { + // ensure dkg is in progress + let dkg_state = borrow_global_mut(@supra_framework); + assert!(option::is_some(&dkg_state.in_progress), error::invalid_state(EDKG_NOT_IN_PROGRESS)); + + // DKG meta should be already set before `finish` is called let session = option::extract(&mut dkg_state.in_progress); - session.transcript = transcript; + assert!(vector::length(&session.dkg_meta_transcript) > 0, error::already_exists(EDKG_META_NOT_SET)); + + session.target_committees_public_key_shares = target_committees_public_key_shares; dkg_state.last_completed = option::some(session); dkg_state.in_progress = option::none(); + + // propagate updated keys to stake.move for all threshold types + let public_key_shares_all_comms_serialized + = any::new(type_info::type_name(), target_committees_public_key_shares); + let public_key_shares_all_comms = any::unpack(public_key_shares_all_comms_serialized); + + // Build a vector of DkgCommitteeOutput for all committees + let committee_outputs = vector[]; + let i = 0; + let len = vector::length(&public_key_shares_all_comms.commitments); + while (i < len) { + let commitment = vector::borrow(&public_key_shares_all_comms.commitments, i); + // As the first index contains the committee's threshold public key, we can skip that + let evals = vector::slice(&commitment.bls12381_commitment_evals, 1, vector::length(&commitment.bls12381_commitment_evals)); + + vector::push_back( + &mut committee_outputs, + new_dkg_committee_output(commitment.threshold_type, evals) + ); + i = i + 1; + }; + + // Set all keys for all threshold types + stake::set_dkg_output_keys(committee_outputs); + emit(DKGFinishEvent { + target_committees_public_key_shares, + }); } /// Delete the currently incomplete session, if it exists. @@ -114,6 +199,15 @@ module supra_framework::dkg { } } + /// Return the last completed DKG session state, if it exists. + public fun last_completed_session(): Option acquires DKGState { + if (exists(@supra_framework)) { + borrow_global(@supra_framework).last_completed + } else { + option::none() + } + } + /// Return the dealer epoch of a `DKGSessionState`. public fun session_dealer_epoch(session: &DKGSessionState): u64 { session.metadata.dealer_epoch diff --git a/aptos-move/framework/supra-framework/sources/dkg.spec.move b/aptos-move/framework/supra-framework/sources/dkg.spec.move index dcedf6065fdfb..99ffa0124274a 100644 --- a/aptos-move/framework/supra-framework/sources/dkg.spec.move +++ b/aptos-move/framework/supra-framework/sources/dkg.spec.move @@ -13,15 +13,22 @@ spec supra_framework::dkg { spec start( dealer_epoch: u64, - randomness_config: RandomnessConfig, - dealer_validator_set: vector, - target_validator_set: vector, + randomness_seed: vector, + dealer_committee: DkgCommittee, + target_committees: vector ) { aborts_if !exists(@supra_framework); aborts_if !exists(@supra_framework); } - spec finish(transcript: vector) { + spec set_dkg_meta(dkg_meta_all_committees: vector) { + use std::option; + requires exists(@supra_framework); + requires option::is_some(global(@supra_framework).in_progress); + aborts_if false; + } + + spec finish(target_committees_public_key_shares: vector) { use std::option; requires exists(@supra_framework); requires option::is_some(global(@supra_framework).in_progress); diff --git a/aptos-move/framework/supra-framework/sources/dkg_committee.move b/aptos-move/framework/supra-framework/sources/dkg_committee.move new file mode 100644 index 0000000000000..55148cddaa4d9 --- /dev/null +++ b/aptos-move/framework/supra-framework/sources/dkg_committee.move @@ -0,0 +1,120 @@ +// Copyright (c) 2024 Supra. +module std::dkg_committee { + + use std::bcs; + use std::vector; + use supra_framework::validator_consensus_info; + use supra_framework::validator_consensus_info::ValidatorConsensusInfo; + use supra_framework::validator_public_keys::CertificateThresholdType; + + const EINVALID_DKG_COMMITTEE_SIZE: u64 = 1; + + struct DkgNodeConfig has copy, drop, store { + addr: address, + identity: vector, + dkg_pubkey: vector, + } + + struct DkgCommittee has copy, drop, store { + committee: vector, + // The threshold type for the committee's Byzantine fault tolerance. + threshold_type: CertificateThresholdType, + } + + struct ReceiverCommittee has copy, drop, store { + is_resharing: bool, + // The threshold type for the output key of the DKG process. + dkg_threshold_type: CertificateThresholdType, + committee: DkgCommittee, + } + + public fun new_dkg_node_config(addr: address, identity: vector, dkg_pubkey: vector,): DkgNodeConfig{ + DkgNodeConfig{ + addr, + identity, + dkg_pubkey + } + } + + public fun get_addr(dkg_node: &DkgNodeConfig): address{ + dkg_node.addr + } + + public fun get_dkg_pubkey(dkg_node: &DkgNodeConfig): vector{ + dkg_node.dkg_pubkey + } + + public fun len(committee: &DkgCommittee): u64{ + vector::length(&committee.committee) + } + + public fun get_committee(dkg_committee: &DkgCommittee): vector{ + dkg_committee.committee + } + + public fun new_dkg_committee(committee: vector, threshold_type: CertificateThresholdType): DkgCommittee{ + + assert!(vector::length(&committee) > 0, EINVALID_DKG_COMMITTEE_SIZE); + DkgCommittee{ + committee, + threshold_type + } + } + + public fun new_dkg_committee_from_validator_consensus_info(validator_committee: vector, threshold_type: CertificateThresholdType): DkgCommittee{ + + assert!(vector::length(&validator_committee) > 0, EINVALID_DKG_COMMITTEE_SIZE); + + // The order of the committee members is important for DKG. + // The order should correspond to the order of the validator committee. + // The output of the DKG has keys in the same order as the committee. + let dkg_committee = vector[]; + vector::for_each(validator_committee, |x| + { + let validator_keys_bytes = validator_consensus_info::get_pk_bytes(&x); + let addr = validator_consensus_info::get_addr(&x); + vector::push_back(&mut dkg_committee, DkgNodeConfig{ + addr, + identity: bcs::to_bytes(&addr), + dkg_pubkey: validator_keys_bytes, + }); + } + ); + + DkgCommittee{ + committee: dkg_committee, + threshold_type + } + } + + public fun new_receiver_committee(is_resharing: bool, dkg_threshold_type: CertificateThresholdType, committee: DkgCommittee): ReceiverCommittee{ + ReceiverCommittee{ + is_resharing, + dkg_threshold_type, + committee + } + } + + /// Input for DKG key output - contains threshold type and keys for one committee + struct DkgCommitteeOutput has copy, drop { + /// The threshold type (0=validity, 1=quorum, 2=unanimous, etc.) + threshold_type: u8, + /// Public key shares for each validator (indexed by validator position) + keys: vector>, + } + + /// Create a new DkgCommitteeOutput + public fun new_dkg_committee_output(threshold_type: u8, keys: vector>): DkgCommitteeOutput { + DkgCommitteeOutput { threshold_type, keys } + } + + /// Get threshold type from DkgCommitteeOutput + public fun get_dkg_committee_output_threshold_type(output: &DkgCommitteeOutput): u8 { + output.threshold_type + } + + /// Get keys from DkgCommitteeOutput + public fun get_dkg_committee_output_keys(output: &DkgCommitteeOutput): vector> { + output.keys + } +} diff --git a/aptos-move/framework/supra-framework/sources/genesis.move b/aptos-move/framework/supra-framework/sources/genesis.move index a56f60f0a0d4c..63345a2601c8c 100644 --- a/aptos-move/framework/supra-framework/sources/genesis.move +++ b/aptos-move/framework/supra-framework/sources/genesis.move @@ -14,6 +14,7 @@ module supra_framework::genesis { use supra_framework::chain_status; use supra_framework::coin; use supra_framework::consensus_config; + use supra_framework::dkg_config; use supra_framework::execution_config; use supra_framework::supra_config; use supra_framework::evm_genesis_config; @@ -40,7 +41,7 @@ module supra_framework::genesis { use supra_framework::vesting_without_staking; #[test_only] - use aptos_std::ed25519; + use supra_std::validator_public_keys; #[verify_only] use std::features; @@ -173,6 +174,7 @@ module supra_framework::genesis { }; consensus_config::initialize(&supra_framework_account, consensus_config); + dkg_config::initialize(&supra_framework_account); execution_config::set(&supra_framework_account, execution_config); supra_config::initialize(&supra_framework_account, supra_config); version::initialize(&supra_framework_account, initial_version); @@ -920,8 +922,8 @@ module supra_framework::genesis { initialize_supra_coin(supra_framework); let owner = @0x121341; - let (_, pk_1) = stake::generate_identity(); - let _pk_1 = ed25519::unvalidated_public_key_to_bytes(&pk_1); + let (_sk_1, pk_1) = stake::generate_identity(); + let _pk_1 = validator_public_keys::public_key_to_bytes(pk_1); create_account(supra_framework, owner, 0); let validator_config_commission = ValidatorConfigurationWithCommission { validator_config: ValidatorConfiguration { @@ -983,10 +985,10 @@ module supra_framework::genesis { initialize_supra_coin(supra_framework); let owner1 = @0x121341; create_account(supra_framework, owner1, 0); - let (_, pk_1) = stake::generate_identity(); - let (_, pk_2) = stake::generate_identity(); - let _pk_1 = ed25519::unvalidated_public_key_to_bytes(&pk_1); - let _pk_2 = ed25519::unvalidated_public_key_to_bytes(&pk_2); + let (_sk_1, pk_1) = stake::generate_identity(); + let (_sk_2, pk_2) = stake::generate_identity(); + let _pk_1 = validator_public_keys::public_key_to_bytes(pk_1); + let _pk_2 = validator_public_keys::public_key_to_bytes(pk_2); let validator_config_commission1 = ValidatorConfigurationWithCommission { validator_config: ValidatorConfiguration { owner_address: owner1, @@ -1184,4 +1186,4 @@ module supra_framework::genesis { let vesting_contracts = vesting_without_staking::vesting_contracts(admin_address); assert!(vector::length(&vesting_contracts) == 1, 0); } -} +} \ No newline at end of file diff --git a/aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move b/aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move index 452f1e1292faf..a692ee37b8507 100644 --- a/aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move +++ b/aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move @@ -2901,7 +2901,7 @@ module supra_framework::pbo_delegation_pool { use supra_framework::timestamp::fast_forward_seconds; #[test_only] - const CONSENSUS_KEY_1: vector = x"c1bd3bcb387e4ee9a909f6304a1c9902661b0ecfb1e148c7892b210c7f353dfd"; + const CONSENSUS_KEY_1: vector = x"20ed28c35dc60a6c9629a7eb0a8dfa815c85c6cf2cedc9e43314cc26f02d741dc430b40c7239278dae17d68d06950d51ce61c2c16c032ceea62c9715611be7f577f48525ad610432bb5d13fa5826fc07c6650000000000000080090192000000000000007bb0b330cbdcec145d2671ef2532bb7a856a5155c66d7ad89ef2cb65e854fc08a5d43cd159a7abc77adfee05e764ec9abdfc133db8e8621398dcbe53db1069de56405f02a1347d5399502fe849b44cfa673ad95bdbf33b417f3f8e4fa854b87b4a60eff6426b277d6036ffc0cfcdd25c971d53c2b612ed1df66f33eff839c0064ac16d7e04650d13984b08b2f9e7bb240fe3ff920000000000000014a973f3c74f41cecc3c596a125835264d72803ba1ef9c9270fa2228e8f8442889f20ddfffc60bc073758c3fd13a29219ad4532c512d2a97c3a8421dedfa41e4d8d9ffaa3581049a65a64f57ea533ab831c88527bb3d7ce46b6eebd6fef6d3303cf7716455381c74da2bcbfc3e02de2e5fadb014ed4f7ecf6b62a4ce6c0db90b91f084512a18be5cb8892b1615a7bb7ef35d0192000000000000008c49908494889c8d07e0b6f0cb6871aaf7e97506476d0a63530ce06b58928225a4292dff8ffaccd4f217fd65c2afbac848ac5d5957d15aa83fb8d2f261d85ddf4f16feee49d07f274dd421f84862bd73634925c41d2b470066d751732cc4f9630e886df15e63f962959c8f765b48434b6124fe051c2a02ba91bd94a7d8fc3cf7240ffba508ff73d8bb95a8ba661fa59ed9c9b8030000000000000192000000000000007bb0b330cbdcec145d2671ef2532bb7a856a5155c66d7ad89ef2cb65e854fc08a5d43cd159a7abc77adfee05e764ec9abdfc133db8e8621398dcbe53db1069de56405f02a1347d5399502fe849b44cfa673ad95bdbf33b417f3f8e4fa854b87b4a60eff6426b277d6036ffc0cfcdd25c971d53c2b612ed1df66f33eff839c0064ac16d7e04650d13984b08b2f9e7bb240fe3ff920000000000000014a973f3c74f41cecc3c596a125835264d72803ba1ef9c9270fa2228e8f8442889f20ddfffc60bc073758c3fd13a29219ad4532c512d2a97c3a8421dedfa41e4d8d9ffaa3581049a65a64f57ea533ab831c88527bb3d7ce46b6eebd6fef6d3303cf7716455381c74da2bcbfc3e02de2e5fadb014ed4f7ecf6b62a4ce6c0db90b91f084512a18be5cb8892b1615a7bb7ef35d0192000000000000008c49908494889c8d07e0b6f0cb6871aaf7e97506476d0a63530ce06b58928225a4292dff8ffaccd4f217fd65c2afbac848ac5d5957d15aa83fb8d2f261d85ddf4f16feee49d07f274dd421f84862bd73634925c41d2b470066d751732cc4f9630e886df15e63f962959c8f765b48434b6124fe051c2a02ba91bd94a7d8fc3cf7240ffba508ff73d8bb95a8ba661fa59ed9c9b8030000000000000120000000000000000da685763a376d42546959f3e2d96ff46256cd3e539dd458b800c9d0daf4d981019c00000000000000a529edcfd13d9f5014b4e2fab134f833d266876a0a0fbcf3577ef87ced2656924e235d4a6f48169d0c6b1fd4d77b27f36b0eda1e78fb1691894e077333e7f278444a3e6de72685de03564bcf61466567e34c79279fcdccc42c2354e4c0a836e785f909656badb5950ebcf77a1ef9a3680818abe674760bc09888a446b96d9765779222970aaeb804abaa939c4225c474c2bc925be1d24648c6298d69208e695ae5888320393ef041be5f42d0f2eaac6036daffb8373eb80ad275fcc2b9"; #[test_only] const CONSENSUS_POP_1: vector = x"a9d6c1f1270f2d1454c89a83a4099f813a56dc7db55591d46aa4e6ccae7898b234029ba7052f18755e6fa5e6b73e235f14efc4e2eb402ca2b8f56bad69f965fc11b7b25eb1c95a06f83ddfd023eac4559b6582696cfea97b227f4ce5bdfdfed0"; diff --git a/aptos-move/framework/supra-framework/sources/reconfiguration_with_dkg.move b/aptos-move/framework/supra-framework/sources/reconfiguration_with_dkg.move index 8386cf18dd9b3..c89a1396e9009 100644 --- a/aptos-move/framework/supra-framework/sources/reconfiguration_with_dkg.move +++ b/aptos-move/framework/supra-framework/sources/reconfiguration_with_dkg.move @@ -1,10 +1,14 @@ /// Reconfiguration with DKG helper functions. module supra_framework::reconfiguration_with_dkg { + use std::dkg_committee::{new_dkg_committee_from_validator_consensus_info, new_receiver_committee}; use std::features; use std::option; + use std::vector; use supra_framework::automation_registry; + use supra_framework::randomness; use supra_framework::consensus_config; use supra_framework::dkg; + use supra_framework::dkg_config; use supra_framework::execution_config; use supra_framework::gas_schedule; use supra_framework::jwk_consensus_config; @@ -36,14 +40,45 @@ module supra_framework::reconfiguration_with_dkg { }; reconfiguration_state::on_reconfig_start(); let cur_epoch = reconfiguration::current_epoch(); + let randomness_seed = randomness::bytes(32); + + // Get DKG configuration (dealer threshold type and receiver committee configs) + let config = dkg_config::current(); + let receiver_configs = dkg_config::get_receiver_committee_configs(&config); + + // Build receiver committees from config + let receiver_committees = vector[]; + let i = 0; + let len = vector::length(&receiver_configs); + while (i < len) { + let rc = vector::borrow(&receiver_configs, i); + vector::push_back( + &mut receiver_committees, + new_receiver_committee( + dkg_config::get_is_resharing(rc), + dkg_config::get_dkg_threshold_type(rc), + new_dkg_committee_from_validator_consensus_info( + stake::next_validator_consensus_infos(), + dkg_config::get_committee_threshold_type(rc))) + ); + i = i + 1; + }; + + // DKG for configured receiver committees dkg::start( cur_epoch, - randomness_config::current(), - stake::cur_validator_consensus_infos(), - stake::next_validator_consensus_infos() + randomness_seed, + new_dkg_committee_from_validator_consensus_info( + stake::cur_validator_consensus_infos(), + dkg_config::get_dealer_committee_threshold_type(&config)), + receiver_committees ); } + fun set_dkg_meta(dkg_meta: vector) { + dkg::set_dkg_meta(dkg_meta); + } + /// Clear incomplete DKG session, if it exists. /// Apply buffered on-chain configs (except for ValidatorSet, which is done inside `reconfiguration::reconfigure()`). /// Re-enable validator set changes. @@ -66,6 +101,7 @@ module supra_framework::reconfiguration_with_dkg { randomness_config::on_new_epoch(framework); randomness_api_v0_config::on_new_epoch(framework); evm_genesis_config::on_new_epoch(framework); + dkg_config::on_new_epoch(framework); reconfiguration::reconfigure(); } diff --git a/aptos-move/framework/supra-framework/sources/stake.move b/aptos-move/framework/supra-framework/sources/stake.move index 5717ce4b2703f..6d7d2adf286a6 100644 --- a/aptos-move/framework/supra-framework/sources/stake.move +++ b/aptos-move/framework/supra-framework/sources/stake.move @@ -26,6 +26,7 @@ module supra_framework::stake { use aptos_std::ed25519; use aptos_std::math64::min; use aptos_std::table::{Self, Table}; + use supra_std::validator_public_keys; use supra_framework::supra_coin::SupraCoin; use supra_framework::account; use supra_framework::coin::{Self, Coin, MintCapability}; @@ -34,12 +35,14 @@ module supra_framework::stake { use supra_framework::system_addresses; use supra_framework::staking_config::{Self, StakingConfig, StakingRewardsConfig}; use supra_framework::chain_status; + use std::dkg_committee; friend supra_framework::block; friend supra_framework::genesis; friend supra_framework::reconfiguration; friend supra_framework::reconfiguration_with_dkg; friend supra_framework::transaction_fee; + friend supra_framework::dkg; friend supra_framework::leader_ban_registry; #[test_only] @@ -85,6 +88,8 @@ module supra_framework::stake { const EFEES_TABLE_ALREADY_EXISTS: u64 = 19; /// Validator set change temporarily disabled because of in-progress reconfiguration. const ERECONFIGURATION_IN_PROGRESS: u64 = 20; + /// Invalid DKG public key shares. + const EDKG_INVALID_PK_SHARES: u64 = 21; /// Validator status enum. We can switch to proper enum later once Move supports it. const VALIDATOR_STATUS_PENDING_ACTIVE: u64 = 1; @@ -650,9 +655,15 @@ module supra_framework::stake { network_addresses: vector, fullnode_addresses: vector, ) acquires AllowedValidators { + // Checks the public key is valid to prevent rogue-key attacks. - let valid_public_key = ed25519::new_validated_public_key_from_bytes(consensus_pubkey); - assert!(option::is_some(&valid_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + if (std::features::supra_validator_identity_v2_enabled()) { + let _valid_public_key = validator_public_keys::validator_public_keys_from_bytes(consensus_pubkey); + } + else { + let valid_public_key = ed25519::new_validated_public_key_from_bytes(consensus_pubkey); + assert!(option::is_some(&valid_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + }; initialize_owner(account); move_to(account, ValidatorConfig { @@ -886,11 +897,21 @@ module supra_framework::stake { let old_consensus_pubkey = validator_info.consensus_pubkey; // Checks the public key is valid to prevent rogue-key attacks. if (!genesis) { - let validated_public_key = ed25519::new_validated_public_key_from_bytes(new_consensus_pubkey); - assert!(option::is_some(&validated_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + if (std::features::supra_validator_identity_v2_enabled()) { + let _valid_public_key = validator_public_keys::validator_public_keys_from_bytes(new_consensus_pubkey); + } + else { + let valid_public_key = ed25519::new_validated_public_key_from_bytes(new_consensus_pubkey); + assert!(option::is_some(&valid_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + }; } else { - let validated_public_key = ed25519::new_validated_public_key_from_bytes(new_consensus_pubkey); - assert!(option::is_some(&validated_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + if (std::features::supra_validator_identity_v2_enabled()) { + let _valid_public_key = validator_public_keys::validator_public_keys_from_bytes(new_consensus_pubkey); + } + else { + let valid_public_key = ed25519::new_validated_public_key_from_bytes(new_consensus_pubkey); + assert!(option::is_some(&valid_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY)); + }; }; validator_info.consensus_pubkey = new_consensus_pubkey; @@ -913,6 +934,90 @@ module supra_framework::stake { ); } + /// Set DKG output keys for all provided threshold types. + /// Each DkgCommitteeOutput contains a threshold_type and corresponding keys for all validators. + public(friend) fun set_dkg_output_keys( + committee_outputs: vector, + ) acquires ValidatorConfig, ValidatorFees, ValidatorPerformance, ValidatorSet, StakePool { + if (vector::is_empty(&committee_outputs)) { + return + }; + + let next_validator_infos = next_validator_consensus_infos(); + let num_validators = vector::length(&next_validator_infos); + + // Validate all committee outputs have correct number of keys + let num_outputs = vector::length(&committee_outputs); + let j = 0; + while (j < num_outputs) { + let output = vector::borrow(&committee_outputs, j); + assert!( + num_validators == vector::length(&dkg_committee::get_dkg_committee_output_keys(output)), + error::invalid_argument(EDKG_INVALID_PK_SHARES) + ); + j = j + 1; + }; + + // Iterate over each validator + let i = 0; + while (i < num_validators) { + let val_info = vector::borrow(&next_validator_infos, i); + let addr = validator_consensus_info::get_addr(val_info); + let validator_config = borrow_global_mut(addr); + let old_consensus_pubkey = validator_config.consensus_pubkey; + + // Load current public keys + let pub_keys = validator_public_keys::validator_public_keys_from_bytes(old_consensus_pubkey); + + // Apply all threshold key updates for this validator + let k = 0; + while (k < num_outputs) { + let output = vector::borrow(&committee_outputs, k); + let output_keys = dkg_committee::get_dkg_committee_output_keys(output); + let key_bytes = vector::borrow(&output_keys, i); + + // Deserialize the key + let key_opt = aptos_std::bls12381::public_key_from_bytes(*key_bytes); + assert!(option::is_some(&key_opt), error::invalid_argument(EINVALID_PUBLIC_KEY)); + let new_key = option::extract(&mut key_opt); + + // Rotate the key based on threshold type + validator_public_keys::rotate_supra_bls_threshold_key_by_type( + &mut pub_keys, + dkg_committee::get_dkg_committee_output_threshold_type(output), + new_key + ); + k = k + 1; + }; + + // Serialize and save updated keys + let new_consensus_pubkey = validator_public_keys::public_key_to_bytes(pub_keys); + validator_config.consensus_pubkey = new_consensus_pubkey; + + // Emit events + let stake_pool = borrow_global_mut(addr); + if (std::features::module_event_migration_enabled()) { + event::emit( + RotateConsensusKey { + pool_address: addr, + old_consensus_pubkey, + new_consensus_pubkey, + }, + ); + }; + event::emit_event( + &mut stake_pool.rotate_consensus_key_events, + RotateConsensusKeyEvent { + pool_address: addr, + old_consensus_pubkey, + new_consensus_pubkey, + }, + ); + + i = i + 1; + }; + } + /// Rotate the consensus key of the validator /// does not verify proof of possession /// only for genesis @@ -1506,9 +1611,9 @@ module supra_framework::stake { }; let new_voting_power = cur_active - + if (lockup_expired) { 0 } else { cur_pending_inactive } - + cur_pending_active - + cur_reward + cur_fee; + + if (lockup_expired) { 0 } else { cur_pending_inactive } + + cur_pending_active + + cur_reward + cur_fee; if (new_voting_power >= minimum_stake) { let config = *borrow_global(candidate.addr); @@ -1875,12 +1980,12 @@ module supra_framework::stake { #[test_only] public fun join_validator_set_for_test( - pk: &ed25519::UnvalidatedPublicKey, + pk: &validator_public_keys::ValidatorPublicKeys, operator: &signer, pool_address: address, should_end_epoch: bool, ) acquires SupraCoinCapabilities, StakePool, ValidatorConfig, ValidatorPerformance, ValidatorSet, ValidatorFees { - let pk_bytes = ed25519::unvalidated_public_key_to_bytes(pk); + let pk_bytes = validator_public_keys::public_key_to_bytes(*pk); rotate_consensus_key(operator, pool_address, pk_bytes); join_validator_set(operator, pool_address); if (should_end_epoch) { @@ -1953,7 +2058,7 @@ module supra_framework::stake { #[test_only] public fun initialize_test_validator( - public_key: &ed25519::UnvalidatedPublicKey, + public_key: &validator_public_keys::ValidatorPublicKeys, validator: &signer, amount: u64, should_join_validator_set: bool, @@ -1964,7 +2069,7 @@ module supra_framework::stake { account::create_account_for_test(validator_address); }; - let pk_bytes = ed25519::unvalidated_public_key_to_bytes(public_key); + let pk_bytes = validator_public_keys::public_key_to_bytes(*public_key); initialize_validator(validator, pk_bytes, vector::empty(), vector::empty()); if (amount > 0) { @@ -1983,7 +2088,7 @@ module supra_framework::stake { public fun create_validator_set( supra_framework: &signer, active_validator_addresses: vector
, - public_keys: vector, + public_keys: vector, ) { let active_validators = vector::empty(); let i = 0; @@ -1994,7 +2099,7 @@ module supra_framework::stake { addr: *validator_address, voting_power: 0, config: ValidatorConfig { - consensus_pubkey: ed25519::unvalidated_public_key_to_bytes(pk), + consensus_pubkey: validator_public_keys::public_key_to_bytes(*pk), network_addresses: b"", fullnode_addresses: b"", validator_index: 0, @@ -2041,10 +2146,8 @@ module supra_framework::stake { } #[test_only] - public fun generate_identity(): (ed25519::SecretKey, ed25519::UnvalidatedPublicKey) { - let (sk, validated_pub_key) = ed25519::generate_keys(); - let unvalidated_pk = ed25519::public_key_to_unvalidated(&validated_pub_key); - (sk, unvalidated_pk) + public fun generate_identity(): (validator_public_keys::ValidatorSecretKeys, validator_public_keys::ValidatorPublicKeys) { + validator_public_keys::generate_keys() } #[test(supra_framework = @supra_framework, validator = @0x123)] @@ -2634,7 +2737,7 @@ module supra_framework::stake { initialize_for_test_custom(supra_framework, 100, 10000, LOCKUP_CYCLE_SECONDS, true, 1, 100, 100); let (_sk_1, pk_1) = generate_identity(); - let pk_1_bytes = ed25519::unvalidated_public_key_to_bytes(&pk_1); + let pk_1_bytes = validator_public_keys::public_key_to_bytes(pk_1); let (_sk_2, pk_2) = generate_identity(); let (_sk_3, pk_3) = generate_identity(); initialize_test_validator(&pk_1, validator_1, 100, false, false); @@ -2661,7 +2764,7 @@ module supra_framework::stake { // Validator 1 rotates consensus key. Validator 2 leaves. Validator 3 joins. let (_sk_1b, pk_1b) = generate_identity(); - let pk_1b_bytes = ed25519::unvalidated_public_key_to_bytes(&pk_1b); + let pk_1b_bytes = validator_public_keys::public_key_to_bytes(pk_1b); rotate_consensus_key(validator_1, validator_1_address, pk_1b_bytes); leave_validator_set(validator_2, validator_2_address); join_validator_set(validator_3, validator_3_address); @@ -2750,7 +2853,7 @@ module supra_framework::stake { // Operator can separately rotate consensus key. let (_sk_new, pk_new) = generate_identity(); - let pk_new_bytes = ed25519::unvalidated_public_key_to_bytes(&pk_new); + let pk_new_bytes = validator_public_keys::public_key_to_bytes(pk_new); rotate_consensus_key(validator, pool_address, pk_new_bytes); let validator_config = borrow_global(pool_address); assert!(validator_config.consensus_pubkey == pk_new_bytes, 2); @@ -2859,7 +2962,7 @@ module supra_framework::stake { let vci: &ValidatorConsensusInfo = obj; validator_consensus_info::get_addr(vci) }); - let vci_voting_powers = vector::map_ref(&vci_vec_0, |obj|{ + let vci_voting_powers = vector::map_ref(&vci_vec_0, |obj|{ let vci: &ValidatorConsensusInfo = obj; validator_consensus_info::get_voting_power(vci) }); @@ -3123,7 +3226,7 @@ module supra_framework::stake { // Initialize validator config. let validator_address = signer::address_of(validator); let (_sk_new, pk_new) = generate_identity(); - let pk_new_bytes = ed25519::unvalidated_public_key_to_bytes(&pk_new); + let pk_new_bytes = validator_public_keys::public_key_to_bytes(pk_new); rotate_consensus_key(validator, validator_address, pk_new_bytes); // Join the validator set with enough stake. This now wouldn't fail since the validator config already exists. @@ -3351,4 +3454,4 @@ module supra_framework::stake { assert_validator_state(validator_2_address, 601, 0, 0, 0, 1); assert_validator_state(validator_3_address, 101, 0, 0, 0, 0); } -} +} \ No newline at end of file diff --git a/aptos-move/framework/supra-framework/sources/stake.spec.move b/aptos-move/framework/supra-framework/sources/stake.spec.move index 3885edda470a3..c619f126fde47 100644 --- a/aptos-move/framework/supra-framework/sources/stake.spec.move +++ b/aptos-move/framework/supra-framework/sources/stake.spec.move @@ -131,10 +131,11 @@ spec supra_framework::stake { network_addresses: vector, fullnode_addresses: vector, ){ - let is_public_key_validated = ed25519::spec_public_key_validate_internal( + //todo: fix this validation + /*let is_public_key_validated = consensus_key::spec_cg_pk_valid( consensus_pubkey, ); - aborts_if !is_public_key_validated; + aborts_if !is_public_key_validated;*/ let addr = signer::address_of(account); let post_addr = signer::address_of(account); let allowed = global(@supra_framework); @@ -407,10 +408,12 @@ spec supra_framework::stake { aborts_if !exists(pool_address); aborts_if signer::address_of(operator) != pre_stake_pool.operator_address; aborts_if !exists(pool_address); - let is_public_key_validated = ed25519::spec_public_key_validate_internal( + + //todo: fix this check + /*let is_public_key_validated = ed25519::spec_public_key_validate_internal( new_consensus_pubkey, ); - aborts_if !is_public_key_validated; + aborts_if !is_public_key_validated;*/ modifies global(pool_address); include StakedValueNochange; diff --git a/aptos-move/framework/supra-framework/sources/validator_public_keys.move b/aptos-move/framework/supra-framework/sources/validator_public_keys.move new file mode 100644 index 0000000000000..30e389ba0f92b --- /dev/null +++ b/aptos-move/framework/supra-framework/sources/validator_public_keys.move @@ -0,0 +1,259 @@ +// Copyright (c) 2024 Supra. +module supra_framework::validator_public_keys { + + use std::bcs; + use std::error; + use std::option; + use aptos_std::any; + use aptos_std::bls12381; + use aptos_std::ed25519; + use aptos_std::type_info; + use supra_std::class_groups; + #[test_only] + use aptos_std::bls12381::public_key_with_pop_to_normal; + #[test_only] + use supra_framework::validator_public_keys; + + /// The integer should match the Rust enum value representation in `CertificateThresholdType`. + /// f+1, given there are f Byzantine nodes in the [Committee]. + const CERTIFICATE_THRESHOLD_TYPE_VALIDITY: u8 = 0; + /// The integer should match the Rust enum value representation in `CertificateThresholdType`. + /// 2f+1, given there are f Byzantine nodes in the [Committee] and n >= 3f + 1 nodes in total. + const CERTIFICATE_THRESHOLD_TYPE_QUORUM: u8 = 1; + /// The integer should match the Rust enum value representation in `CertificateThresholdType`. + /// n, where n is the total number of nodes in the [Committee]. + const CERTIFICATE_THRESHOLD_TYPE_UNANIMOUS: u8 = 2; + /// The integer should match the Rust enum value representation in `CertificateThresholdType`. + /// f+1, given there are f Byzantine nodes and c crash-only nodes in the [Committee] with n >= 3f + 2c + 1 nodes. + const CERTIFICATE_THRESHOLD_TYPE_BCFT_VALIDITY: u8 = 3; + /// The integer should match the Rust enum value representation in `CertificateThresholdType` + /// 2f + c + 1, given there are f Byzantine nodes and c crash-only nodes in the [Committee] with n >= 3f + 2c + 1 nodes. + const CERTIFICATE_THRESHOLD_TYPE_BCFT_QUORUM: u8 = 4; + /// The integer should match the Rust enum value representation in `CertificateThresholdType`. + /// n - f - c, given there are f Byzantine nodes and c crash-only nodes in the [Committee] with n >= 3f + 2c + 1 nodes. + const CERTIFICATE_THRESHOLD_TYPE_BCFT_FALLBACK_VIEW_CHANGE: u8 = 5; + /// The integer should match the Rust enum value representation in `CertificateThresholdType`. + /// f+1, given there are f Byzantine nodes in the [Committee] with n >= 2f + 1 nodes. + const CERTIFICATE_THRESHOLD_TYPE_CLAN_MAJORITY: u8 = 6; + + /// Error: Unknown certificate threshold type. + const EUNKNOWN_THRESHOLD_TYPE: u64 = 1; + + /// Internal tag wrapper + struct CertificateThresholdType has copy, drop, store { tag: u8 } + + public fun validity_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_VALIDITY } } + public fun quorum_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_QUORUM } } + public fun unanimous_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_UNANIMOUS } } + public fun bcft_validity_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_BCFT_VALIDITY } } + public fun bcft_quorum_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_BCFT_QUORUM } } + public fun bcft_fallback_view_change_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_BCFT_FALLBACK_VIEW_CHANGE } } + public fun clan_majority_certificate_type(): CertificateThresholdType { CertificateThresholdType { tag: CERTIFICATE_THRESHOLD_TYPE_CLAN_MAJORITY } } + + public fun is_validity_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_VALIDITY } + public fun is_quorum_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_QUORUM } + public fun is_unanimous_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_UNANIMOUS } + public fun is_bcft_validity_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_BCFT_VALIDITY } + public fun is_bcft_quorum_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_BCFT_QUORUM } + public fun is_bcft_fallback_view_change_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_BCFT_FALLBACK_VIEW_CHANGE } + public fun is_clan_majority_certificate_type(t: &CertificateThresholdType): bool { t.tag == CERTIFICATE_THRESHOLD_TYPE_CLAN_MAJORITY } + + /// The size of a serialized ed25519 public key, in bytes. + const ED25519_PUBLIC_KEY_NUM_BYTES: u64 = 32; + /// The size of a serialized bls12381 G1 public key, in bytes. + const BLS12381_G1_PUBLIC_KEY_NUM_BYTES: u64 = 48; + + /// InternalPublicKeys consists of: + /// 1. bls multisig key + /// 2. bls threshold key shares for various certificate types + /// 3. classgroup key + /// 4. ed25519 key + struct InternalPublicKeys has copy, drop, store { + bls_multisig_key: bls12381::PublicKey, + bls_threshold_validity_certificate_key: option::Option, + bls_threshold_quorum_certificate_key: option::Option, + bls_threshold_unanimous_certificate_key: option::Option, + bls_threshold_bcft_validity_certificate_key: option::Option, + bls_threshold_bcft_quorum_certificate_key: option::Option, + bls_threshold_bcft_fallback_view_change_certificate_key: option::Option, + bls_threshold_clan_majority_certificate_key: option::Option, + class_group_key: class_groups::CGPublicKey, + ed25519_key: ed25519::ValidatedPublicKey, + } + + /// ValidatorPublicKeys consists of: + /// 1. network key + /// 2. supra's internal keys + struct ValidatorPublicKeys has copy, drop, store { + network_key: ed25519::ValidatedPublicKey, + supra_keys: InternalPublicKeys, + } + + #[test_only] + /// This struct holds calidator secret key that can be used during testing. + struct ValidatorSecretKeys has drop { + network_key: ed25519::SecretKey, + supra_bls_multi_sig_bls_key: bls12381::SecretKey, + supra_bls_threshold_validity_key: option::Option, + supra_bls_threshold_quorum_key: option::Option, + supra_bls_threshold_unanimous_key: option::Option, + supra_bls_threshold_bcft_validity_key: option::Option, + supra_bls_threshold_bcft_quorum_key: option::Option, + supra_bls_threshold_bcft_fallback_view_change_key: option::Option, + supra_bls_threshold_clan_majority_key: option::Option, + cg_key: class_groups::SecretKey, + supra_ed_key: ed25519::SecretKey, + } + + public fun validator_public_keys_from_bytes(bytes: vector): ValidatorPublicKeys{ + + // bcs deserialization + let bytes_serialized = any::new(type_info::type_name(), bytes); + let validator_public_keys = any::unpack(bytes_serialized); + validator_public_keys + } + + public fun public_key_to_bytes(pk: ValidatorPublicKeys): vector{ + // bcs deserialization + bcs::to_bytes(&pk) + } + + public fun get_network_key(pk: &ValidatorPublicKeys): ed25519::ValidatedPublicKey{ + pk.network_key + } + + public fun get_supra_bls_multi_sig_pub_key(pk: &ValidatorPublicKeys): bls12381::PublicKey{ + pk.supra_keys.bls_multisig_key + } + + public fun get_supra_cg_key(pk: &ValidatorPublicKeys): class_groups::CGPublicKey{ + pk.supra_keys.class_group_key + } + + public fun get_supra_ed_key(pk: &ValidatorPublicKeys): ed25519::ValidatedPublicKey{ + pk.supra_keys.ed25519_key + } + + public fun rotate_supra_bls_threshold_validity_key(pk: &mut ValidatorPublicKeys, new_bls_threshold_validity_key: bls12381::PublicKey) { + pk.supra_keys.bls_threshold_validity_certificate_key = option::some(new_bls_threshold_validity_key); + } + + public fun rotate_supra_bls_threshold_quorum_key(pk: &mut ValidatorPublicKeys, new_bls_threshold_quorum_key: bls12381::PublicKey) { + pk.supra_keys.bls_threshold_quorum_certificate_key = option::some(new_bls_threshold_quorum_key); + } + + public fun rotate_supra_bls_threshold_unanimous_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) { + pk.supra_keys.bls_threshold_unanimous_certificate_key = option::some(new_key); + } + + public fun rotate_supra_bls_threshold_bcft_validity_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) { + pk.supra_keys.bls_threshold_bcft_validity_certificate_key = option::some(new_key); + } + + public fun rotate_supra_bls_threshold_bcft_quorum_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) { + pk.supra_keys.bls_threshold_bcft_quorum_certificate_key = option::some(new_key); + } + + public fun rotate_supra_bls_threshold_bcft_fallback_view_change_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) { + pk.supra_keys.bls_threshold_bcft_fallback_view_change_certificate_key = option::some(new_key); + } + + public fun rotate_supra_bls_threshold_clan_majority_key(pk: &mut ValidatorPublicKeys, new_key: bls12381::PublicKey) { + pk.supra_keys.bls_threshold_clan_majority_certificate_key = option::some(new_key); + } + + /// Rotate a threshold key based on the threshold type tag. + /// threshold_type: 0=validity, 1=quorum, 2=unanimous, 3=bcft_validity, 4=bcft_quorum, 5=bcft_fallback_view_change, 6=clan_majority + public fun rotate_supra_bls_threshold_key_by_type(pk: &mut ValidatorPublicKeys, threshold_type: u8, new_key: bls12381::PublicKey) { + if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_VALIDITY) { + rotate_supra_bls_threshold_validity_key(pk, new_key); + } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_QUORUM) { + rotate_supra_bls_threshold_quorum_key(pk, new_key); + } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_UNANIMOUS) { + rotate_supra_bls_threshold_unanimous_key(pk, new_key); + } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_BCFT_VALIDITY) { + rotate_supra_bls_threshold_bcft_validity_key(pk, new_key); + } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_BCFT_QUORUM) { + rotate_supra_bls_threshold_bcft_quorum_key(pk, new_key); + } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_BCFT_FALLBACK_VIEW_CHANGE) { + rotate_supra_bls_threshold_bcft_fallback_view_change_key(pk, new_key); + } else if (threshold_type == CERTIFICATE_THRESHOLD_TYPE_CLAN_MAJORITY) { + rotate_supra_bls_threshold_clan_majority_key(pk, new_key); + } else { + abort error::invalid_argument(EUNKNOWN_THRESHOLD_TYPE) + }; + } + + #[test_only] + /// Generates validator key pair for testing. + public fun generate_keys(): (ValidatorSecretKeys, ValidatorPublicKeys) { + let (network_key_sk, network_key_pk) = ed25519::generate_keys(); + let (supra_bls12381_multi_sig_sk, supra_bls12381_multi_sig_pk) = bls12381::generate_keys(); + let (supra_cg_sk, supra_cg_pk) = class_groups::generate_keys(); + let (supra_ed_key_sk, supra_ed_key_pk) = ed25519::generate_keys(); + + let sk = ValidatorSecretKeys{ + network_key: network_key_sk, + supra_bls_multi_sig_bls_key: supra_bls12381_multi_sig_sk, + supra_bls_threshold_validity_key: option::none(), + supra_bls_threshold_quorum_key: option::none(), + supra_bls_threshold_unanimous_key: option::none(), + supra_bls_threshold_bcft_validity_key: option::none(), + supra_bls_threshold_bcft_quorum_key: option::none(), + supra_bls_threshold_bcft_fallback_view_change_key: option::none(), + supra_bls_threshold_clan_majority_key: option::none(), + cg_key: supra_cg_sk, + supra_ed_key: supra_ed_key_sk, + }; + + let pk = ValidatorPublicKeys { + network_key: network_key_pk, + supra_keys: InternalPublicKeys{ + bls_multisig_key: public_key_with_pop_to_normal(&supra_bls12381_multi_sig_pk), + bls_threshold_validity_certificate_key: option::none(), + bls_threshold_quorum_certificate_key: option::none(), + bls_threshold_unanimous_certificate_key: option::none(), + bls_threshold_bcft_validity_certificate_key: option::none(), + bls_threshold_bcft_quorum_certificate_key: option::none(), + bls_threshold_bcft_fallback_view_change_certificate_key: option::none(), + bls_threshold_clan_majority_certificate_key: option::none(), + class_group_key: supra_cg_pk, + ed25519_key: supra_ed_key_pk, + }, + }; + + (sk, pk) + } + + #[test] + fun test_serde_roundtrip() { + // Generate full keypair + let (_sk, pk) = validator_public_keys::generate_keys(); + + // Serialize + let bytes = validator_public_keys::public_key_to_bytes(pk); + + // Parse + let parsed = validator_public_keys::validator_public_keys_from_bytes(bytes); + + // Compare network key + let ed0 = get_network_key(&pk); + let ed1 = get_network_key(&parsed); + assert!(ed0 == ed1, 1001); + + // BLS multi sig equal + let b0 = get_supra_bls_multi_sig_pub_key(&pk); + let b1 = get_supra_bls_multi_sig_pub_key(&parsed); + assert!(b0 == b1, 1002); + + // CG key equal + let c0 = get_supra_cg_key(&pk); + let c1 = get_supra_cg_key(&parsed); + assert!(c0 == c1, 1003); + + // Compare ED bytes + let ed0 = get_supra_ed_key(&pk); + let ed1 = get_supra_ed_key(&parsed); + assert!(ed0 == ed1, 1004); + } +} diff --git a/aptos-move/framework/supra-framework/sources/vesting_without_staking.move b/aptos-move/framework/supra-framework/sources/vesting_without_staking.move index 226a49acb9338..f5f121e8ddb8f 100644 --- a/aptos-move/framework/supra-framework/sources/vesting_without_staking.move +++ b/aptos-move/framework/supra-framework/sources/vesting_without_staking.move @@ -325,7 +325,7 @@ module supra_framework::vesting_without_staking { // last vesting fraction must be non zero to ensure that no amount remains unvested forever. assert!( fixed_point32::get_raw_value(*vector::borrow(&schedule, schedule_len - 1)) != - 0, + 0, error::invalid_argument(EEMPTY_VESTING_SCHEDULE), ); assert!( @@ -1278,7 +1278,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -1408,7 +1408,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -1539,7 +1539,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -1667,7 +1667,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -1796,7 +1796,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -2065,7 +2065,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -2301,7 +2301,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -2559,7 +2559,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -2623,7 +2623,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -2682,7 +2682,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -2733,7 +2733,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -2766,7 +2766,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 2, + * 2, ); vest_individual(contract_address, shareholder_1_address); vested_amount_1 = vested_amount_1 + fraction(shareholder_1_share, 2, 10); @@ -2793,7 +2793,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 3, + * 3, ); vest_individual(contract_address, shareholder_1_address); vested_amount_1 = vested_amount_1 + fraction(shareholder_1_share, 1, 10); @@ -2852,7 +2852,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -2861,7 +2861,7 @@ module supra_framework::vesting_without_staking { // Time is now at the start time, vest will unlock the first period, which is 2/10. timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 50, + * 50, ); vest_individual(contract_address, shareholder_1_address); vested_amount_1 = vested_amount_1 + GRANT_AMOUNT / 4; @@ -2938,7 +2938,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount_1 = 0; @@ -2961,7 +2961,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 2, + * 2, ); vest(contract_address); vested_amount_1 = vested_amount_1 + fraction(shareholder_1_share, 2, 10); @@ -2971,7 +2971,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 3, + * 3, ); vest(contract_address); vested_amount_1 = vested_amount_1 + fraction(shareholder_1_share, 1, 10); @@ -2981,7 +2981,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 4, + * 4, ); vest(contract_address); vested_amount_1 = vested_amount_1 + fraction(shareholder_1_share, 1, 10); @@ -2991,7 +2991,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 5, + * 5, ); vest(contract_address); vested_amount_1 = vested_amount_1 + fraction(shareholder_1_share, 1, 10); @@ -3001,7 +3001,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 6, + * 6, ); vest(contract_address); vested_amount_1 = vested_amount_1 + fraction(shareholder_1_share, 1, 10); @@ -3011,7 +3011,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 7, + * 7, ); vest(contract_address); vested_amount_1 = vested_amount_1 + fraction(shareholder_1_share, 1, 10); @@ -3021,7 +3021,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 8, + * 8, ); vest(contract_address); vested_amount_1 = vested_amount_1 + fraction(shareholder_1_share, 1, 10); @@ -3031,7 +3031,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 9, + * 9, ); vest(contract_address); vested_amount_1 = shareholder_1_share; @@ -3516,7 +3516,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount = 0; @@ -3535,7 +3535,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 9, + * 9, ); vest(contract_address); vested_amount = shareholder_share; @@ -3566,7 +3566,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount = 0; @@ -3585,7 +3585,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 9, + * 9, ); vest(contract_address); vested_amount = shareholder_share; @@ -3616,7 +3616,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount = 0; @@ -3639,7 +3639,7 @@ module supra_framework::vesting_without_staking { timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 9, + * 9, ); vest(contract_address); vested_amount = shareholder_share; @@ -3675,7 +3675,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount = 0; @@ -3686,7 +3686,7 @@ module supra_framework::vesting_without_staking { // Time is now at the start time, vest will unlock the first period, which is 2/10. timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 2, + * 2, ); vest(contract_address); vested_amount = vested_amount + fraction(shareholder_share, 5, 10); @@ -3723,7 +3723,7 @@ module supra_framework::vesting_without_staking { ); assert!( vector::length(&borrow_global(admin_address).vesting_contracts) == - 1, + 1, 0, ); let vested_amount = 0; @@ -3736,7 +3736,7 @@ module supra_framework::vesting_without_staking { // Time is now at the start time, vest will unlock the first period, which is 2/10. timestamp::update_global_time_for_test_secs( vesting_start_secs(contract_address) + period_duration_secs(contract_address) - * 4, + * 4, ); vest(contract_address); vested_amount = vested_amount + fraction(shareholder_share, 7, 10); @@ -3821,4 +3821,4 @@ module supra_framework::vesting_without_staking { assert!(balance_1 == shareholder_1_share, balance_1); assert!(balance_2 == shareholder_2_share, balance_2); } -} +} \ No newline at end of file diff --git a/aptos-move/framework/supra-framework/tests/delegation_pool_integration_tests.move b/aptos-move/framework/supra-framework/tests/delegation_pool_integration_tests.move index a8aba0c4a581d..23f5954a72d35 100644 --- a/aptos-move/framework/supra-framework/tests/delegation_pool_integration_tests.move +++ b/aptos-move/framework/supra-framework/tests/delegation_pool_integration_tests.move @@ -37,7 +37,7 @@ module supra_framework::delegation_pool_integration_tests { const MODULE_EVENT: u64 = 26; #[test_only] - const CONSENSUS_KEY_1: vector = x"c1bd3bcb387e4ee9a909f6304a1c9902661b0ecfb1e148c7892b210c7f353dfd"; + const CONSENSUS_KEY_1: vector = x"20ed28c35dc60a6c9629a7eb0a8dfa815c85c6cf2cedc9e43314cc26f02d741dc430b40c7239278dae17d68d06950d51ce61c2c16c032ceea62c9715611be7f577f48525ad610432bb5d13fa5826fc07c6650000000000000080090192000000000000007bb0b330cbdcec145d2671ef2532bb7a856a5155c66d7ad89ef2cb65e854fc08a5d43cd159a7abc77adfee05e764ec9abdfc133db8e8621398dcbe53db1069de56405f02a1347d5399502fe849b44cfa673ad95bdbf33b417f3f8e4fa854b87b4a60eff6426b277d6036ffc0cfcdd25c971d53c2b612ed1df66f33eff839c0064ac16d7e04650d13984b08b2f9e7bb240fe3ff920000000000000014a973f3c74f41cecc3c596a125835264d72803ba1ef9c9270fa2228e8f8442889f20ddfffc60bc073758c3fd13a29219ad4532c512d2a97c3a8421dedfa41e4d8d9ffaa3581049a65a64f57ea533ab831c88527bb3d7ce46b6eebd6fef6d3303cf7716455381c74da2bcbfc3e02de2e5fadb014ed4f7ecf6b62a4ce6c0db90b91f084512a18be5cb8892b1615a7bb7ef35d0192000000000000008c49908494889c8d07e0b6f0cb6871aaf7e97506476d0a63530ce06b58928225a4292dff8ffaccd4f217fd65c2afbac848ac5d5957d15aa83fb8d2f261d85ddf4f16feee49d07f274dd421f84862bd73634925c41d2b470066d751732cc4f9630e886df15e63f962959c8f765b48434b6124fe051c2a02ba91bd94a7d8fc3cf7240ffba508ff73d8bb95a8ba661fa59ed9c9b8030000000000000192000000000000007bb0b330cbdcec145d2671ef2532bb7a856a5155c66d7ad89ef2cb65e854fc08a5d43cd159a7abc77adfee05e764ec9abdfc133db8e8621398dcbe53db1069de56405f02a1347d5399502fe849b44cfa673ad95bdbf33b417f3f8e4fa854b87b4a60eff6426b277d6036ffc0cfcdd25c971d53c2b612ed1df66f33eff839c0064ac16d7e04650d13984b08b2f9e7bb240fe3ff920000000000000014a973f3c74f41cecc3c596a125835264d72803ba1ef9c9270fa2228e8f8442889f20ddfffc60bc073758c3fd13a29219ad4532c512d2a97c3a8421dedfa41e4d8d9ffaa3581049a65a64f57ea533ab831c88527bb3d7ce46b6eebd6fef6d3303cf7716455381c74da2bcbfc3e02de2e5fadb014ed4f7ecf6b62a4ce6c0db90b91f084512a18be5cb8892b1615a7bb7ef35d0192000000000000008c49908494889c8d07e0b6f0cb6871aaf7e97506476d0a63530ce06b58928225a4292dff8ffaccd4f217fd65c2afbac848ac5d5957d15aa83fb8d2f261d85ddf4f16feee49d07f274dd421f84862bd73634925c41d2b470066d751732cc4f9630e886df15e63f962959c8f765b48434b6124fe051c2a02ba91bd94a7d8fc3cf7240ffba508ff73d8bb95a8ba661fa59ed9c9b8030000000000000120000000000000000da685763a376d42546959f3e2d96ff46256cd3e539dd458b800c9d0daf4d981019c00000000000000a529edcfd13d9f5014b4e2fab134f833d266876a0a0fbcf3577ef87ced2656924e235d4a6f48169d0c6b1fd4d77b27f36b0eda1e78fb1691894e077333e7f278444a3e6de72685de03564bcf61466567e34c79279fcdccc42c2354e4c0a836e785f909656badb5950ebcf77a1ef9a3680818abe674760bc09888a446b96d9765779222970aaeb804abaa939c4225c474c2bc925be1d24648c6298d69208e695ae5888320393ef041be5f42d0f2eaac6036daffb8373eb80ad275fcc2b9"; #[test_only] public fun initialize_for_test(supra_framework: &signer) { diff --git a/aptos-move/framework/supra-stdlib/doc/class_groups.md b/aptos-move/framework/supra-stdlib/doc/class_groups.md new file mode 100644 index 0000000000000..fb1f8c1c88481 --- /dev/null +++ b/aptos-move/framework/supra-stdlib/doc/class_groups.md @@ -0,0 +1,125 @@ + + + +# Module `0x1::class_groups` + + + +- [Struct `CGPublicKey`](#0x1_class_groups_CGPublicKey) +- [Function `public_key_from_bytes`](#0x1_class_groups_public_key_from_bytes) +- [Function `public_key_to_bytes`](#0x1_class_groups_public_key_to_bytes) +- [Function `validate_pubkey_internal`](#0x1_class_groups_validate_pubkey_internal) + + +
use 0x1::option;
+
+ + + + + +## Struct `CGPublicKey` + + + +
struct CGPublicKey has copy, drop, store
+
+ + + +
+Fields + + +
+
+bytes: vector<u8> +
+
+ +
+
+ + +
+ + + +## Function `public_key_from_bytes` + +Creates a new public key from a sequence of bytes. + + +
public fun public_key_from_bytes(bytes: vector<u8>): option::Option<class_groups::CGPublicKey>
+
+ + + +
+Implementation + + +
public fun public_key_from_bytes(bytes: vector<u8>): Option<CGPublicKey> {
+    if (validate_pubkey_internal(bytes)) {
+        option::some(CGPublicKey {
+            bytes
+        })
+    } else {
+        option::none<CGPublicKey>()
+    }
+}
+
+ + + +
+ + + +## Function `public_key_to_bytes` + +Serializes a public key to a sequence of bytes. + + +
public fun public_key_to_bytes(pk: &class_groups::CGPublicKey): vector<u8>
+
+ + + +
+Implementation + + +
public fun public_key_to_bytes(pk: &CGPublicKey): vector<u8> {
+    pk.bytes
+}
+
+ + + +
+ + + +## Function `validate_pubkey_internal` + + + +
fun validate_pubkey_internal(public_key: vector<u8>): bool
+
+ + + +
+Implementation + + +
native fun validate_pubkey_internal(public_key: vector<u8>): bool;
+
+ + + +
+ + +[move-book]: https://aptos.dev/move/book/SUMMARY diff --git a/aptos-move/framework/supra-stdlib/doc/consensus_key.md b/aptos-move/framework/supra-stdlib/doc/consensus_key.md new file mode 100644 index 0000000000000..1476c49c921a7 --- /dev/null +++ b/aptos-move/framework/supra-stdlib/doc/consensus_key.md @@ -0,0 +1,285 @@ + + + +# Module `0x1::consensus_key` + + + +- [Struct `ConsensusPublicKey`](#0x1_consensus_key_ConsensusPublicKey) +- [Constants](#@Constants_0) +- [Function `consensus_public_key_from_bytes`](#0x1_consensus_key_consensus_public_key_from_bytes) +- [Function `public_key_to_bytes`](#0x1_consensus_key_public_key_to_bytes) +- [Function `get_bls_pub_key`](#0x1_consensus_key_get_bls_pub_key) +- [Function `get_ed_key`](#0x1_consensus_key_get_ed_key) +- [Function `get_cg_key`](#0x1_consensus_key_get_cg_key) + + +
use 0x1::bls12381;
+use 0x1::class_groups;
+use 0x1::ed25519;
+use 0x1::error;
+use 0x1::option;
+use 0x1::vector;
+
+ + + + + +## Struct `ConsensusPublicKey` + +Consensus public key consists of: +1. Ed25519 key +2. Bls12381 G1 key +3. Class group encryption key + + +
struct ConsensusPublicKey has copy, drop, store
+
+ + + +
+Fields + + +
+
+ed_key: ed25519::ValidatedPublicKey +
+
+ +
+
+bls_key: option::Option<bls12381::PublicKey> +
+
+ +
+
+cg_key: option::Option<class_groups::CGPublicKey> +
+
+ +
+
+ + +
+ + + +## Constants + + + + +Wrong number of bytes were given as input when deserializing an consensus public key. + + +
const E_WRONG_PUBKEY_SIZE: u64 = 1;
+
+ + + + + +The size of a serialized bls12381 G1 public key, in bytes. + + +
const BLS12381_G1_PUBLIC_KEY_NUM_BYTES: u64 = 48;
+
+ + + + + +The size of a serialized ed25519 public key, in bytes. + + +
const ED25519_PUBLIC_KEY_NUM_BYTES: u64 = 32;
+
+ + + + + +Invalid consensus public key + + +
const EINVALID_PUBLIC_KEY: u64 = 2;
+
+ + + + + +## Function `consensus_public_key_from_bytes` + + + +
public fun consensus_public_key_from_bytes(bytes: vector<u8>): option::Option<consensus_key::ConsensusPublicKey>
+
+ + + +
+Implementation + + +
public fun consensus_public_key_from_bytes(bytes: vector<u8>): Option<ConsensusPublicKey>{
+    //todo: pop for ed and bls
+    if (vector::length(&bytes) == ED25519_PUBLIC_KEY_NUM_BYTES){
+        let ed_key_bytes = vector::slice(&bytes, 0, ED25519_PUBLIC_KEY_NUM_BYTES);
+        let valid_ed_public_key = ed25519::new_validated_public_key_from_bytes(ed_key_bytes);
+        assert!(option::is_some(&valid_ed_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY));
+        option::some(ConsensusPublicKey {
+            ed_key: option::extract(&mut valid_ed_public_key),
+            bls_key: option::none<bls12381::PublicKey>(),
+            cg_key: option::none<class_groups::CGPublicKey>()
+        })
+    }
+    else if (vector::length(&bytes) > ED25519_PUBLIC_KEY_NUM_BYTES + BLS12381_G1_PUBLIC_KEY_NUM_BYTES){
+
+        let ed_key_bytes = vector::slice(&bytes, 0, ED25519_PUBLIC_KEY_NUM_BYTES);
+        let bls_key_bytes = vector::slice(&bytes, ED25519_PUBLIC_KEY_NUM_BYTES, ED25519_PUBLIC_KEY_NUM_BYTES + BLS12381_G1_PUBLIC_KEY_NUM_BYTES);
+        let cg_key_bytes = vector::slice(&bytes, ED25519_PUBLIC_KEY_NUM_BYTES + BLS12381_G1_PUBLIC_KEY_NUM_BYTES, vector::length(&bytes));
+
+        let valid_ed_public_key = ed25519::new_validated_public_key_from_bytes(ed_key_bytes);
+        assert!(option::is_some(&valid_ed_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY));
+
+        let valid_bls_public_key = bls12381::public_key_from_bytes(bls_key_bytes);
+        assert!(option::is_some(&valid_bls_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY));
+
+        let valid_cg_public_key = class_groups::public_key_from_bytes(cg_key_bytes);
+        assert!(option::is_some(&valid_cg_public_key), error::invalid_argument(EINVALID_PUBLIC_KEY));
+
+        option::some(ConsensusPublicKey {
+            ed_key: option::extract(&mut valid_ed_public_key),
+            bls_key: valid_bls_public_key,
+            cg_key: valid_cg_public_key
+        })
+
+    }
+    else {
+        option::none<ConsensusPublicKey>()
+    }
+}
+
+ + + +
+ + + +## Function `public_key_to_bytes` + + + +
public fun public_key_to_bytes(pk: consensus_key::ConsensusPublicKey): vector<u8>
+
+ + + +
+Implementation + + +
public fun public_key_to_bytes(pk: ConsensusPublicKey): vector<u8>{
+
+    let out = vector::empty<u8>();
+    let ed_bytes  = ed25519::validated_public_key_to_bytes(&pk.ed_key);
+    vector::append(&mut out, ed_bytes);
+
+    if(option::is_some(&pk.bls_key) && option::is_some(&pk.cg_key)){
+        let bls_key = option::extract(&mut pk.bls_key);
+        let bls_bytes = bls12381::public_key_to_bytes(&bls_key);
+        vector::append(&mut out, bls_bytes);
+
+        let cg_key = option::extract(&mut pk.cg_key);
+        let cg_bytes  = class_groups::public_key_to_bytes(&cg_key);
+        vector::append(&mut out, cg_bytes);
+    };
+    out
+}
+
+ + + +
+ + + +## Function `get_bls_pub_key` + + + +
public fun get_bls_pub_key(pk: &consensus_key::ConsensusPublicKey): option::Option<bls12381::PublicKey>
+
+ + + +
+Implementation + + +
public fun get_bls_pub_key(pk: &ConsensusPublicKey): option::Option<bls12381::PublicKey>{
+    pk.bls_key
+}
+
+ + + +
+ + + +## Function `get_ed_key` + + + +
public fun get_ed_key(pk: &consensus_key::ConsensusPublicKey): ed25519::ValidatedPublicKey
+
+ + + +
+Implementation + + +
public fun get_ed_key(pk: &ConsensusPublicKey): ed25519::ValidatedPublicKey{
+    pk.ed_key
+}
+
+ + + +
+ + + +## Function `get_cg_key` + + + +
public fun get_cg_key(pk: &consensus_key::ConsensusPublicKey): option::Option<class_groups::CGPublicKey>
+
+ + + +
+Implementation + + +
public fun get_cg_key(pk: &ConsensusPublicKey): option::Option<class_groups::CGPublicKey>{
+    pk.cg_key
+}
+
+ + + +
+ + +[move-book]: https://aptos.dev/move/book/SUMMARY diff --git a/aptos-move/framework/supra-stdlib/doc/overview.md b/aptos-move/framework/supra-stdlib/doc/overview.md index e880ae5616a31..a8230be46ba39 100644 --- a/aptos-move/framework/supra-stdlib/doc/overview.md +++ b/aptos-move/framework/supra-stdlib/doc/overview.md @@ -15,6 +15,7 @@ This is the reference documentation of the Supra standard library extension. - [`0x1::bls12381_bulletproofs`](bls12381_bulletproofs.md#0x1_bls12381_bulletproofs) - [`0x1::bls12381_pedersen`](bls12381_pedersen.md#0x1_bls12381_pedersen) - [`0x1::bls12381_scalar`](bls12381_scalar.md#0x1_bls12381_scalar) +- [`0x1::class_groups`](class_groups.md#0x1_class_groups) - [`0x1::decode_bcs`](decode_bcs.md#0x1_decode_bcs) - [`0x1::enumerable_map`](enumerable_map.md#0x1_enumerable_map) - [`0x1::eth_trie`](eth_trie.md#0x1_eth_trie) diff --git a/aptos-move/framework/supra-stdlib/sources/class_groups.move b/aptos-move/framework/supra-stdlib/sources/class_groups.move new file mode 100644 index 0000000000000..d508fb531cab9 --- /dev/null +++ b/aptos-move/framework/supra-stdlib/sources/class_groups.move @@ -0,0 +1,48 @@ +// Copyright (c) 2025 Supra. +module supra_std::class_groups { + + use std::option; + use std::option::Option; + + struct CGPublicKey has copy, drop, store { + bytes: vector + } + + #[test_only] + struct SecretKey has copy, drop { + bytes: vector, + } + + /// Creates a new public key from a sequence of bytes. + public fun public_key_from_bytes(bytes: vector): Option { + if (validate_pubkey_internal(bytes)) { + option::some(CGPublicKey { + bytes + }) + } else { + option::none() + } + } + + /// Serializes a public key to a sequence of bytes. + public fun public_key_to_bytes(pk: &CGPublicKey): vector { + pk.bytes + } + + #[test_only] + /// Generates a class group key-pair: a secret key with its corresponding public key. + public fun generate_keys(): (SecretKey, CGPublicKey) { + let (sk_bytes, pk_bytes) = generate_keys_internal(); + let sk = SecretKey { + bytes: sk_bytes + }; + let pk = CGPublicKey { + bytes: pk_bytes + }; + (sk, pk) + } + + native fun validate_pubkey_internal(public_key: vector): bool; + #[test_only] + native fun generate_keys_internal(): (vector, vector); +} diff --git a/aptos-move/framework/tests/move_unit_test.rs b/aptos-move/framework/tests/move_unit_test.rs index c4e704137f11e..3b1c12ce344bf 100644 --- a/aptos-move/framework/tests/move_unit_test.rs +++ b/aptos-move/framework/tests/move_unit_test.rs @@ -71,8 +71,8 @@ pub fn aptos_test_natives() -> NativeFunctionTable { natives::configure_for_unit_test(); extended_checks::configure_extended_checks_for_unit_test(); // move_stdlib has the testing feature enabled to include debug native functions - let mut f = Features::default(); - f.enable(aptos_types::on_chain_config::FeatureFlag::DELEGATION_POOLS); + let mut f = Features::default(); + f.enable(aptos_types::on_chain_config::FeatureFlag::DELEGATION_POOLS); natives::aptos_natives( LATEST_GAS_FEATURE_VERSION, NativeGasParameters::zeros(), diff --git a/aptos-move/move-examples/Cargo.toml b/aptos-move/move-examples/Cargo.toml index 7380a8bccfc5f..3b380bea69b11 100644 --- a/aptos-move/move-examples/Cargo.toml +++ b/aptos-move/move-examples/Cargo.toml @@ -16,7 +16,7 @@ rust-version = { workspace = true } aptos-framework = { workspace = true } aptos-gas-schedule = { workspace = true } aptos-types = { workspace = true } -aptos-vm ={ workspace = true, features = ["testing"] } +aptos-vm = { workspace = true, features = ["testing"] } clap = { workspace = true } move-cli = { workspace = true } move-package = { workspace = true } diff --git a/aptos-move/move-examples/cli_args/Move.toml b/aptos-move/move-examples/cli_args/Move.toml index 5549eba33d9dc..5cd9bd5b839a3 100644 --- a/aptos-move/move-examples/cli_args/Move.toml +++ b/aptos-move/move-examples/cli_args/Move.toml @@ -7,4 +7,4 @@ upgrade_policy = "compatible" test_account = "_" [dependencies.SupraFramework] -local = "../../framework/supra-framework" \ No newline at end of file +local = "../../framework/supra-framework" diff --git a/aptos-move/move-examples/event/Move.toml b/aptos-move/move-examples/event/Move.toml index 7b0a08a0b3dba..80e703ddd188f 100644 --- a/aptos-move/move-examples/event/Move.toml +++ b/aptos-move/move-examples/event/Move.toml @@ -9,4 +9,3 @@ event = "_" [dependencies] SupraFramework = { local = "../../framework/supra-framework" } - diff --git a/aptos-move/move-examples/fungible_asset/stablecoin/Move.toml b/aptos-move/move-examples/fungible_asset/stablecoin/Move.toml index 336dfe51799cd..3fd9f67ffd98c 100644 --- a/aptos-move/move-examples/fungible_asset/stablecoin/Move.toml +++ b/aptos-move/move-examples/fungible_asset/stablecoin/Move.toml @@ -6,7 +6,7 @@ version = "0.0.0" [addresses] stablecoin = "_" master_minter = "_" -minter = "_" +minter = "_" pauser = "_" denylister = "_" @@ -18,4 +18,4 @@ pauser = "0xdafe" denylister = "0xcade" [dependencies] -AptosFramework = { local = "../../../framework/aptos-framework" } \ No newline at end of file +AptosFramework = { local = "../../../framework/aptos-framework" } diff --git a/aptos-move/move-examples/hello_prover/Move.toml b/aptos-move/move-examples/hello_prover/Move.toml index 65b64e778408a..792250c76b671 100644 --- a/aptos-move/move-examples/hello_prover/Move.toml +++ b/aptos-move/move-examples/hello_prover/Move.toml @@ -6,5 +6,3 @@ version = "0.0.0" SupraFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/supra-framework/", rev = "main" } [addresses] - - diff --git a/aptos-move/move-examples/mint_nft/3-Adding-Admin/Move.toml b/aptos-move/move-examples/mint_nft/3-Adding-Admin/Move.toml index a732c6cc2df5e..e4519774dbff1 100644 --- a/aptos-move/move-examples/mint_nft/3-Adding-Admin/Move.toml +++ b/aptos-move/move-examples/mint_nft/3-Adding-Admin/Move.toml @@ -9,4 +9,4 @@ AptosToken = { local = "../../../framework/aptos-token" } [addresses] aptos_framework = "0x1" # replace the admin_addr with the actual admin address we created using CLI -admin_addr = "0xbeef" \ No newline at end of file +admin_addr = "0xbeef" diff --git a/aptos-move/move-examples/mint_nft/4-Getting-Production-Ready/Move.toml b/aptos-move/move-examples/mint_nft/4-Getting-Production-Ready/Move.toml index a732c6cc2df5e..e4519774dbff1 100644 --- a/aptos-move/move-examples/mint_nft/4-Getting-Production-Ready/Move.toml +++ b/aptos-move/move-examples/mint_nft/4-Getting-Production-Ready/Move.toml @@ -9,4 +9,4 @@ AptosToken = { local = "../../../framework/aptos-token" } [addresses] aptos_framework = "0x1" # replace the admin_addr with the actual admin address we created using CLI -admin_addr = "0xbeef" \ No newline at end of file +admin_addr = "0xbeef" diff --git a/aptos-move/move-examples/my_first_dapp/move/Move.toml b/aptos-move/move-examples/my_first_dapp/move/Move.toml index cc7be052b9f7a..c1110dd80e90b 100644 --- a/aptos-move/move-examples/my_first_dapp/move/Move.toml +++ b/aptos-move/move-examples/my_first_dapp/move/Move.toml @@ -6,4 +6,4 @@ git = 'https://github.com/aptos-labs/aptos-core.git' rev = 'main' subdir = 'aptos-move/framework/supra-framework' [addresses] -todolist_addr='_' \ No newline at end of file +todolist_addr = '_' diff --git a/aptos-move/move-examples/raffle/Move.toml b/aptos-move/move-examples/raffle/Move.toml index ff8b380fcfa36..e74c531be774a 100644 --- a/aptos-move/move-examples/raffle/Move.toml +++ b/aptos-move/move-examples/raffle/Move.toml @@ -7,4 +7,4 @@ AptosFramework = { local = "../../framework/aptos-framework" } AptosStdlib = { local = "../../framework/aptos-stdlib" } [addresses] -raffle = "_" \ No newline at end of file +raffle = "_" diff --git a/aptos-move/move-examples/tic-tac-toe/Move.toml b/aptos-move/move-examples/tic-tac-toe/Move.toml index 8944127a4733e..69ae7976390da 100644 --- a/aptos-move/move-examples/tic-tac-toe/Move.toml +++ b/aptos-move/move-examples/tic-tac-toe/Move.toml @@ -7,4 +7,3 @@ tic_tac_toe = "_" [dependencies] SupraFramework = { local = "../../framework/supra-framework" } - diff --git a/aptos-move/move-examples/upgrade_and_govern/genesis/Move.toml b/aptos-move/move-examples/upgrade_and_govern/genesis/Move.toml index 512d1c185ac8c..d0e538ac16858 100644 --- a/aptos-move/move-examples/upgrade_and_govern/genesis/Move.toml +++ b/aptos-move/move-examples/upgrade_and_govern/genesis/Move.toml @@ -7,4 +7,4 @@ version = '1.0.0' upgrade_and_govern = '_' [dependencies.SupraFramework] -local = '../../../framework/supra-framework' # <:!:manifest \ No newline at end of file +local = '../../../framework/supra-framework' # <:!:manifest diff --git a/aptos-move/move-examples/upgrade_and_govern/upgrade/Move.toml b/aptos-move/move-examples/upgrade_and_govern/upgrade/Move.toml index 22fc1fd2eefec..af213eebc93cd 100644 --- a/aptos-move/move-examples/upgrade_and_govern/upgrade/Move.toml +++ b/aptos-move/move-examples/upgrade_and_govern/upgrade/Move.toml @@ -7,4 +7,4 @@ version = '1.1.0' upgrade_and_govern = '_' [dependencies.SupraFramework] -local = '../../../framework/supra-framework' # <:!:manifest \ No newline at end of file +local = '../../../framework/supra-framework' # <:!:manifest diff --git a/aptos-move/vm-genesis/Cargo.toml b/aptos-move/vm-genesis/Cargo.toml index 59927cdd791a7..3ded45ef5247d 100644 --- a/aptos-move/vm-genesis/Cargo.toml +++ b/aptos-move/vm-genesis/Cargo.toml @@ -13,10 +13,10 @@ repository = { workspace = true } rust-version = { workspace = true } [dependencies] -aptos-cached-packages = { workspace = true } +aptos-cached-packages = { workspace = true } aptos-crypto = { workspace = true } -aptos-framework = { workspace = true } -aptos-gas-schedule = { workspace = true } +aptos-framework = { workspace = true } +aptos-gas-schedule = { workspace = true } aptos-types = { workspace = true } aptos-vm = { workspace = true } bcs = { workspace = true } @@ -36,4 +36,8 @@ proptest-derive = { workspace = true } [features] default = [] -fuzzing = ["aptos-types/fuzzing", "move-core-types/fuzzing", "move-vm-types/fuzzing"] +fuzzing = [ + "aptos-types/fuzzing", + "move-core-types/fuzzing", + "move-vm-types/fuzzing", +] diff --git a/aptos-move/vm-genesis/src/lib.rs b/aptos-move/vm-genesis/src/lib.rs index a8aeddc99eee3..4294f547634da 100644 --- a/aptos-move/vm-genesis/src/lib.rs +++ b/aptos-move/vm-genesis/src/lib.rs @@ -1021,19 +1021,13 @@ fn publish_package(session: &mut SessionExt, pack: &ReleasePackage) { }); // Call the initialize function with the metadata. - exec_function( - session, - CODE_MODULE_NAME, - "initialize", - vec![], - vec![ - MoveValue::Signer(CORE_CODE_ADDRESS) - .simple_serialize() - .unwrap(), - MoveValue::Signer(addr).simple_serialize().unwrap(), - bcs::to_bytes(pack.package_metadata()).unwrap(), - ], - ); + exec_function(session, CODE_MODULE_NAME, "initialize", vec![], vec![ + MoveValue::Signer(CORE_CODE_ADDRESS) + .simple_serialize() + .unwrap(), + MoveValue::Signer(addr).simple_serialize().unwrap(), + bcs::to_bytes(pack.package_metadata()).unwrap(), + ]); } /// Trigger a reconfiguration. This emits an event that will be passed along to the storage layer. diff --git a/aptos-node/Cargo.toml b/aptos-node/Cargo.toml index 5281650c79561..be242768c5a8f 100644 --- a/aptos-node/Cargo.toml +++ b/aptos-node/Cargo.toml @@ -87,11 +87,24 @@ jemallocator = { workspace = true } rstack-self = { workspace = true } [features] -assert-private-keys-not-cloneable = ["aptos-crypto/assert-private-keys-not-cloneable"] +assert-private-keys-not-cloneable = [ + "aptos-crypto/assert-private-keys-not-cloneable", +] check-vm-features = [] -consensus-only-perf-test = ["aptos-executor/consensus-only-perf-test", "aptos-mempool/consensus-only-perf-test", "aptos-db/consensus-only-perf-test"] +consensus-only-perf-test = [ + "aptos-executor/consensus-only-perf-test", + "aptos-mempool/consensus-only-perf-test", + "aptos-db/consensus-only-perf-test", +] default = [] -failpoints = ["fail/failpoints", "aptos-consensus/failpoints", "aptos-executor/failpoints", "aptos-mempool/failpoints", "aptos-api/failpoints", "aptos-config/failpoints"] +failpoints = [ + "fail/failpoints", + "aptos-consensus/failpoints", + "aptos-executor/failpoints", + "aptos-mempool/failpoints", + "aptos-api/failpoints", + "aptos-config/failpoints", +] indexer = ["aptos-indexer"] tokio-console = ["aptos-logger/tokio-console", "aptos-config/tokio-console"] smoke-test = ["aptos-jwk-consensus/smoke-test", "aptos-dkg-runtime/smoke-test"] diff --git a/config/src/config/identity_config.rs b/config/src/config/identity_config.rs index 82f3ded0cc1ef..096be32cfc2d9 100644 --- a/config/src/config/identity_config.rs +++ b/config/src/config/identity_config.rs @@ -11,7 +11,7 @@ use aptos_crypto::{ }; use aptos_types::{ account_address::{from_identity_public_key, AccountAddress, AccountAddress as PeerId}, - dkg::{real_dkg::maybe_dk_from_bls_sk, DKGTrait, DefaultDKG}, + aptos_dkg::{real_dkg::maybe_dk_from_bls_sk, DKGTrait, DefaultDKG}, }; use serde::{Deserialize, Serialize}; use std::{ diff --git a/consensus/Cargo.toml b/consensus/Cargo.toml index 4d6f00ed82159..80b45a23ee587 100644 --- a/consensus/Cargo.toml +++ b/consensus/Cargo.toml @@ -105,12 +105,12 @@ tempfile = { workspace = true } [features] default = [] fuzzing = [ - "aptos-consensus-types/fuzzing", - "aptos-config/fuzzing", - "aptos-crypto/fuzzing", - "aptos-mempool/fuzzing", - "aptos-types/fuzzing", - "aptos-safety-rules/testing", + "aptos-consensus-types/fuzzing", + "aptos-config/fuzzing", + "aptos-crypto/fuzzing", + "aptos-mempool/fuzzing", + "aptos-types/fuzzing", + "aptos-safety-rules/testing", ] failpoints = ["fail/failpoints"] diff --git a/consensus/src/epoch_manager.rs b/consensus/src/epoch_manager.rs index f7f4344203803..39587b7c0af18 100644 --- a/consensus/src/epoch_manager.rs +++ b/consensus/src/epoch_manager.rs @@ -81,7 +81,7 @@ use aptos_safety_rules::SafetyRulesManager; use aptos_secure_storage::{KVStorage, Storage}; use aptos_types::{ account_address::AccountAddress, - dkg::{real_dkg::maybe_dk_from_bls_sk, DKGState, DKGTrait, DefaultDKG}, + aptos_dkg::{real_dkg::maybe_dk_from_bls_sk, DKGState, DKGTrait, DefaultDKG}, epoch_change::EpochChangeProof, epoch_state::EpochState, jwks::SupportedOIDCProviders, diff --git a/consensus/src/payload_client/mixed.rs b/consensus/src/payload_client/mixed.rs index 63cc7f00a62c3..79b98b59ed451 100644 --- a/consensus/src/payload_client/mixed.rs +++ b/consensus/src/payload_client/mixed.rs @@ -47,15 +47,15 @@ impl MixedPayloadClient { /// When enabled in smoke tests, generate 2 random validator transactions, 1 valid, 1 invalid. fn extra_test_only_vtxns(&self) -> Vec { fail_point!("mixed_payload_client::extra_test_only_vtxns", |_| { - use aptos_types::dkg::{DKGTranscript, DKGTranscriptMetadata}; + use aptos_types::dkg::{DKGTransactionData, DKGTransactionMetadata}; use move_core_types::account_address::AccountAddress; - vec![ValidatorTransaction::DKGResult(DKGTranscript { - metadata: DKGTranscriptMetadata { + vec![ValidatorTransaction::DKG(DKGTransactionData { + metadata: DKGTransactionMetadata { epoch: 999, author: AccountAddress::ZERO, }, - transcript_bytes: vec![], + data_bytes: vec![], })] }); vec![] diff --git a/consensus/src/transaction_shuffler/fairness/conflict_key/entry_fun.rs b/consensus/src/transaction_shuffler/fairness/conflict_key/entry_fun.rs index 45e1dce9624dd..778ec7c6bb715 100644 --- a/consensus/src/transaction_shuffler/fairness/conflict_key/entry_fun.rs +++ b/consensus/src/transaction_shuffler/fairness/conflict_key/entry_fun.rs @@ -4,8 +4,10 @@ use crate::transaction_shuffler::fairness::conflict_key::ConflictKey; use aptos_types::transaction::{SignedTransaction, TransactionPayload}; -use move_core_types::{identifier::Identifier, language_storage::ModuleId}; -use move_core_types::identifier::IdentStr; +use move_core_types::{ + identifier::{IdentStr, Identifier}, + language_storage::ModuleId, +}; #[derive(Eq, Hash, PartialEq)] pub enum EntryFunKey { @@ -36,7 +38,7 @@ impl ConflictKey for EntryFunKey { match txn.payload() { TransactionPayload::AutomationRegistration(auto_payload) => { EntryFunKey::from((auto_payload.module_id(), auto_payload.function())) - } + }, TransactionPayload::EntryFunction(entry_fun) => { EntryFunKey::from((entry_fun.module(), entry_fun.function())) }, diff --git a/consensus/src/transaction_shuffler/fairness/conflict_key/entry_fun_module.rs b/consensus/src/transaction_shuffler/fairness/conflict_key/entry_fun_module.rs index c142cb193a245..5f5c14ec25809 100644 --- a/consensus/src/transaction_shuffler/fairness/conflict_key/entry_fun_module.rs +++ b/consensus/src/transaction_shuffler/fairness/conflict_key/entry_fun_module.rs @@ -26,7 +26,9 @@ impl From<&ModuleId> for EntryFunModuleKey { impl ConflictKey for EntryFunModuleKey { fn extract_from(txn: &SignedTransaction) -> Self { match txn.payload() { - TransactionPayload::AutomationRegistration(auto_payload) => Self::from(auto_payload.module_id()), + TransactionPayload::AutomationRegistration(auto_payload) => { + Self::from(auto_payload.module_id()) + }, TransactionPayload::EntryFunction(entry_fun) => Self::from(entry_fun.module()), TransactionPayload::Multisig(..) | TransactionPayload::Script(_) diff --git a/consensus/src/util/mod.rs b/consensus/src/util/mod.rs index a469f121916b2..37b3807406806 100644 --- a/consensus/src/util/mod.rs +++ b/consensus/src/util/mod.rs @@ -18,6 +18,7 @@ pub fn is_vtxn_expected( vtxn: &ValidatorTransaction, ) -> bool { match vtxn { + ValidatorTransaction::DKG(_) => randomness_config.randomness_enabled(), ValidatorTransaction::DKGResult(_) => randomness_config.randomness_enabled(), ValidatorTransaction::ObservedJWKUpdate(_) => jwk_consensus_config.jwk_consensus_enabled(), } diff --git a/crates/aptos-collections/Cargo.toml b/crates/aptos-collections/Cargo.toml index 69c953a35c639..ee1d4db9107a2 100644 --- a/crates/aptos-collections/Cargo.toml +++ b/crates/aptos-collections/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aptos-collections" -description = "Aptos Collections Library" +description = "Aptos Collections Library" version = "0.1.0" # Workspace inherited keys diff --git a/crates/aptos-crypto/src/hash.rs b/crates/aptos-crypto/src/hash.rs index 4707a0a5eb1d9..51e8152e9b37b 100644 --- a/crates/aptos-crypto/src/hash.rs +++ b/crates/aptos-crypto/src/hash.rs @@ -113,7 +113,7 @@ use std::{ fmt, str::FromStr, }; -use tiny_keccak::{Hasher, Sha3, Keccak}; +use tiny_keccak::{Hasher, Keccak, Sha3}; /// A prefix used to begin the salt of every hashable structure. The salt /// consists in this global prefix, concatenated with the specified diff --git a/crates/aptos-dkg/Cargo.toml b/crates/aptos-dkg/Cargo.toml index 67f8660a49e3c..d862b569cfd13 100644 --- a/crates/aptos-dkg/Cargo.toml +++ b/crates/aptos-dkg/Cargo.toml @@ -9,7 +9,7 @@ anyhow = { workspace = true } aptos-crypto = { workspace = true } aptos-crypto-derive = { workspace = true } aptos-runtimes = { workspace = true } -bcs = { workspace = true } +bcs = { workspace = true } blst = { workspace = true } blstrs = { workspace = true } criterion = { workspace = true } diff --git a/crates/aptos-faucet/cli/Cargo.toml b/crates/aptos-faucet/cli/Cargo.toml index f68cf9a29848a..630ebae285ce7 100644 --- a/crates/aptos-faucet/cli/Cargo.toml +++ b/crates/aptos-faucet/cli/Cargo.toml @@ -19,4 +19,3 @@ aptos-logger = { workspace = true } aptos-sdk = { workspace = true } clap = { workspace = true } tokio = { workspace = true } - diff --git a/crates/aptos-faucet/core/Cargo.toml b/crates/aptos-faucet/core/Cargo.toml index 0653a1eacc56e..61b6826b4f267 100644 --- a/crates/aptos-faucet/core/Cargo.toml +++ b/crates/aptos-faucet/core/Cargo.toml @@ -17,12 +17,14 @@ anyhow = { workspace = true } aptos-config = { workspace = true } aptos-faucet-metrics-server = { workspace = true } aptos-logger = { workspace = true } -aptos-metrics-core = { workspace = true } +aptos-metrics-core = { workspace = true } aptos-sdk = { workspace = true } async-trait = { workspace = true } captcha = { version = "0.0.9" } clap = { workspace = true } -deadpool-redis = { version = "0.11.1", features = ["rt_tokio_1"], default-features = false } +deadpool-redis = { version = "0.11.1", features = [ + "rt_tokio_1", +], default-features = false } enum_dispatch = { workspace = true } futures = { workspace = true } hex = { workspace = true } @@ -33,7 +35,11 @@ once_cell = { workspace = true } poem = { workspace = true } poem-openapi = { workspace = true } rand = { workspace = true } -redis = { workspace = true, features = ["aio", "tokio-comp", "connection-manager"] } +redis = { workspace = true, features = [ + "aio", + "tokio-comp", + "connection-manager", +] } reqwest = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } diff --git a/crates/aptos-faucet/metrics-server/Cargo.toml b/crates/aptos-faucet/metrics-server/Cargo.toml index 3b779539d4368..f427e2111609a 100644 --- a/crates/aptos-faucet/metrics-server/Cargo.toml +++ b/crates/aptos-faucet/metrics-server/Cargo.toml @@ -15,7 +15,7 @@ rust-version = { workspace = true } [dependencies] anyhow = { workspace = true } aptos-logger = { workspace = true } -aptos-metrics-core = { workspace = true } +aptos-metrics-core = { workspace = true } once_cell = { workspace = true } poem = { workspace = true } prometheus = { workspace = true } diff --git a/crates/aptos-genesis/src/builder.rs b/crates/aptos-genesis/src/builder.rs index bdb84a172d61a..a4b66eba88bba 100644 --- a/crates/aptos-genesis/src/builder.rs +++ b/crates/aptos-genesis/src/builder.rs @@ -28,8 +28,8 @@ use aptos_types::{ account_address::AccountAddress, chain_id::ChainId, on_chain_config::{ - Features, GasScheduleV2, OnChainConsensusConfig, OnChainExecutionConfig, - OnChainJWKConsensusConfig, OnChainRandomnessConfig, + AutomationRegistryConfig, Features, GasScheduleV2, OnChainConsensusConfig, + OnChainExecutionConfig, OnChainJWKConsensusConfig, OnChainRandomnessConfig, }, transaction::Transaction, waypoint::Waypoint, @@ -45,7 +45,6 @@ use std::{ path::{Path, PathBuf}, sync::Arc, }; -use aptos_types::on_chain_config::AutomationRegistryConfig; const VALIDATOR_IDENTITY: &str = "validator-identity.yaml"; const VFN_IDENTITY: &str = "vfn-identity.yaml"; diff --git a/crates/aptos-genesis/src/config.rs b/crates/aptos-genesis/src/config.rs index 5449c46382afe..9c6b94b05fe87 100644 --- a/crates/aptos-genesis/src/config.rs +++ b/crates/aptos-genesis/src/config.rs @@ -7,7 +7,10 @@ use aptos_types::{ account_address::{AccountAddress, AccountAddressWithChecks}, chain_id::ChainId, network_address::{DnsName, NetworkAddress, Protocol}, - on_chain_config::{OnChainConsensusConfig, OnChainExecutionConfig, OnChainJWKConsensusConfig}, + on_chain_config::{ + AutomationRegistryConfig, OnChainConsensusConfig, OnChainExecutionConfig, + OnChainJWKConsensusConfig, + }, transaction::authenticator::AuthenticationKey, }; use aptos_vm_genesis::{AccountBalance, EmployeePool, Validator, ValidatorWithCommissionRate}; @@ -21,7 +24,6 @@ use std::{ path::Path, str::FromStr, }; -use aptos_types::on_chain_config::AutomationRegistryConfig; /// Template for setting up Github for Genesis /// diff --git a/crates/aptos-genesis/src/lib.rs b/crates/aptos-genesis/src/lib.rs index 1c5b9fd858da2..c94e1f763ae71 100644 --- a/crates/aptos-genesis/src/lib.rs +++ b/crates/aptos-genesis/src/lib.rs @@ -25,7 +25,8 @@ use aptos_types::{ account_address::AccountAddress, chain_id::ChainId, on_chain_config::{ - Features, GasScheduleV2, OnChainConsensusConfig, OnChainExecutionConfig, OnChainJWKConsensusConfig, OnChainRandomnessConfig + AutomationRegistryConfig, Features, GasScheduleV2, OnChainConsensusConfig, + OnChainExecutionConfig, OnChainJWKConsensusConfig, OnChainRandomnessConfig, }, transaction::Transaction, waypoint::Waypoint, @@ -33,7 +34,6 @@ use aptos_types::{ use aptos_vm::AptosVM; use aptos_vm_genesis::Validator; use std::convert::TryInto; -use aptos_types::on_chain_config::AutomationRegistryConfig; /// Holder object for all pieces needed to generate a genesis transaction #[derive(Clone)] diff --git a/crates/aptos-genesis/src/mainnet.rs b/crates/aptos-genesis/src/mainnet.rs index 1478112f58cf9..91b71329c72f2 100644 --- a/crates/aptos-genesis/src/mainnet.rs +++ b/crates/aptos-genesis/src/mainnet.rs @@ -13,11 +13,12 @@ use aptos_temppath::TempPath; use aptos_types::{ account_address::AccountAddress, chain_id::ChainId, - on_chain_config::{Features, OnChainJWKConsensusConfig, OnChainRandomnessConfig}, + on_chain_config::{ + AutomationRegistryConfig, Features, OnChainJWKConsensusConfig, OnChainRandomnessConfig, + }, transaction::Transaction, waypoint::Waypoint, }; -use aptos_types::on_chain_config::AutomationRegistryConfig; use aptos_vm::AptosVM; use aptos_vm_genesis::{AccountBalance, EmployeePool, ValidatorWithCommissionRate}; diff --git a/crates/aptos-id-generator/Cargo.toml b/crates/aptos-id-generator/Cargo.toml index 89eb2315b9e04..332cbb108c7df 100644 --- a/crates/aptos-id-generator/Cargo.toml +++ b/crates/aptos-id-generator/Cargo.toml @@ -13,4 +13,3 @@ repository = { workspace = true } rust-version = { workspace = true } [dependencies] - diff --git a/crates/aptos-infallible/Cargo.toml b/crates/aptos-infallible/Cargo.toml index 822c9b1c3763b..ea7cc093ce851 100644 --- a/crates/aptos-infallible/Cargo.toml +++ b/crates/aptos-infallible/Cargo.toml @@ -13,4 +13,3 @@ repository = { workspace = true } rust-version = { workspace = true } [dependencies] - diff --git a/crates/aptos-keygen/Cargo.toml b/crates/aptos-keygen/Cargo.toml index f58044df02a2d..abea043934782 100644 --- a/crates/aptos-keygen/Cargo.toml +++ b/crates/aptos-keygen/Cargo.toml @@ -16,4 +16,3 @@ rust-version = { workspace = true } aptos-crypto = { workspace = true } aptos-types = { workspace = true } rand = { workspace = true } - diff --git a/crates/aptos-log-derive/Cargo.toml b/crates/aptos-log-derive/Cargo.toml index 65ba47e3e6578..4ada1edf6a853 100644 --- a/crates/aptos-log-derive/Cargo.toml +++ b/crates/aptos-log-derive/Cargo.toml @@ -19,5 +19,3 @@ proc-macro = true proc-macro2 = { workspace = true } quote = { workspace = true } syn = { workspace = true } - - diff --git a/crates/aptos-network-checker/Cargo.toml b/crates/aptos-network-checker/Cargo.toml index b8941edb57c2b..361eae8246bf0 100644 --- a/crates/aptos-network-checker/Cargo.toml +++ b/crates/aptos-network-checker/Cargo.toml @@ -23,4 +23,3 @@ clap = { workspace = true } futures = { workspace = true } serde = { workspace = true } tokio = { workspace = true } - diff --git a/crates/aptos-profiler/Cargo.toml b/crates/aptos-profiler/Cargo.toml index e13c1ceec354d..a379e835ea1e9 100644 --- a/crates/aptos-profiler/Cargo.toml +++ b/crates/aptos-profiler/Cargo.toml @@ -20,4 +20,3 @@ pprof = { workspace = true } backtrace = { workspace = true } jemallocator = { workspace = true } jemalloc-sys = { workspace = true } - diff --git a/crates/aptos-proptest-helpers/Cargo.toml b/crates/aptos-proptest-helpers/Cargo.toml index 4e1bc94c0767d..584d9c3bbcac9 100644 --- a/crates/aptos-proptest-helpers/Cargo.toml +++ b/crates/aptos-proptest-helpers/Cargo.toml @@ -16,5 +16,3 @@ rust-version = { workspace = true } crossbeam = { workspace = true } proptest = { workspace = true } proptest-derive = { workspace = true } - - diff --git a/crates/aptos-rate-limiter/Cargo.toml b/crates/aptos-rate-limiter/Cargo.toml index 3de9cdfca4ff2..c277d90e4c750 100644 --- a/crates/aptos-rate-limiter/Cargo.toml +++ b/crates/aptos-rate-limiter/Cargo.toml @@ -20,4 +20,3 @@ futures = { workspace = true } pin-project = { workspace = true } tokio = { workspace = true } tokio-util = { workspace = true } - diff --git a/crates/aptos-retrier/Cargo.toml b/crates/aptos-retrier/Cargo.toml index 8eccb8ac672a0..a7c809a2e0386 100644 --- a/crates/aptos-retrier/Cargo.toml +++ b/crates/aptos-retrier/Cargo.toml @@ -15,4 +15,3 @@ rust-version = { workspace = true } [dependencies] aptos-logger = { workspace = true } tokio = { workspace = true } - diff --git a/crates/aptos-rosetta-cli/Cargo.toml b/crates/aptos-rosetta-cli/Cargo.toml index ff37ec922ae04..e9bf998b7b3d1 100644 --- a/crates/aptos-rosetta-cli/Cargo.toml +++ b/crates/aptos-rosetta-cli/Cargo.toml @@ -23,4 +23,3 @@ serde = { workspace = true } serde_json = { workspace = true } tokio = { workspace = true } url = { workspace = true } - diff --git a/crates/aptos-rosetta/src/types/objects.rs b/crates/aptos-rosetta/src/types/objects.rs index b9bbde086a4c4..ed650d3e440db 100644 --- a/crates/aptos-rosetta/src/types/objects.rs +++ b/crates/aptos-rosetta/src/types/objects.rs @@ -921,8 +921,7 @@ impl Transaction { (TransactionType::Validator, None, None, txn.info, txn.events) }, BlockEpilogue(_) => (TransactionType::BlockEpilogue, None, None, txn.info, vec![]), - AutomatedTransaction(automated_txn) - | SystemAutomatedTransaction(automated_txn)=> ( + AutomatedTransaction(automated_txn) | SystemAutomatedTransaction(automated_txn) => ( TransactionType::Automated, None, Some(automated_txn), @@ -935,7 +934,7 @@ impl Transaction { None, txn.info, txn.events, - ) + ), }; // Operations must be sequential and operation index must always be in the same order diff --git a/crates/aptos-temppath/Cargo.toml b/crates/aptos-temppath/Cargo.toml index 39341318abf3d..20aa81dcbc642 100644 --- a/crates/aptos-temppath/Cargo.toml +++ b/crates/aptos-temppath/Cargo.toml @@ -15,5 +15,3 @@ rust-version = { workspace = true } [dependencies] hex = { workspace = true } rand = { workspace = true } - - diff --git a/crates/aptos/Cargo.toml b/crates/aptos/Cargo.toml index bb2d65e0dfa0a..2dd782a60f352 100644 --- a/crates/aptos/Cargo.toml +++ b/crates/aptos/Cargo.toml @@ -56,9 +56,7 @@ chrono = { workspace = true } clap = { workspace = true, features = ["env", "unstable-styles"] } clap_complete = { workspace = true } dashmap = { workspace = true } -diesel = { workspace = true, features = [ - "postgres_backend", -] } +diesel = { workspace = true, features = ["postgres_backend"] } diesel-async = { workspace = true } dirs = { workspace = true } futures = { workspace = true } @@ -87,7 +85,10 @@ poem = { workspace = true } rand = { workspace = true } regex = { workspace = true } reqwest = { workspace = true } -self_update = { git = "https://github.com/banool/self_update.git", rev = "8306158ad0fd5b9d4766a3c6bf967e7ef0ea5c4b", features = ["archive-zip", "compression-zip-deflate"] } +self_update = { git = "https://github.com/banool/self_update.git", rev = "8306158ad0fd5b9d4766a3c6bf967e7ef0ea5c4b", features = [ + "archive-zip", + "compression-zip-deflate", +] } serde = { workspace = true } serde_json = { workspace = true } serde_yaml = { workspace = true } diff --git a/crates/aptos/src/account/multisig_account.rs b/crates/aptos/src/account/multisig_account.rs index cd30f4e68d420..00383722305cc 100644 --- a/crates/aptos/src/account/multisig_account.rs +++ b/crates/aptos/src/account/multisig_account.rs @@ -16,10 +16,11 @@ use aptos_rest_client::{ aptos_api_types::{HexEncodedBytes, WriteResource, WriteSetChange}, Transaction, }; -use aptos_types::transaction::automation::RegistrationParams; use aptos_types::{ account_address::AccountAddress, - transaction::{Multisig, MultisigTransactionPayload, TransactionPayload}, + transaction::{ + automation::RegistrationParams, Multisig, MultisigTransactionPayload, TransactionPayload, + }, }; use async_trait::async_trait; use bcs::to_bytes; @@ -170,7 +171,7 @@ impl TryFrom for MultisigTransactionPayload { match value { MultisigPayloadVariants::EntryFunction(e) => e.try_into(), MultisigPayloadVariants::GaslessAutomationTask(r) => r.try_into(), - MultisigPayloadVariants::AutomationTask(r) => r.try_into() + MultisigPayloadVariants::AutomationTask(r) => r.try_into(), } } } @@ -234,7 +235,7 @@ impl TryFrom for MultisigTransactionPayload type Error = CliError; fn try_from( - value: AutomationTaskRegistrationArguments + value: AutomationTaskRegistrationArguments, ) -> Result { let automation_function = value.automation_function.try_into()?; let registration_params = RegistrationParams::new_user_automation_task_v2( @@ -252,7 +253,6 @@ impl TryFrom for MultisigTransactionPayload } } - /// Propose a new multisig transaction. /// /// As one of the owners of the multisig, propose a new transaction. This also implicitly approves @@ -271,7 +271,6 @@ pub struct CreateTransaction { pub(crate) store_hash_only: bool, } - #[async_trait] impl CliCommand for CreateTransaction { fn command_name(&self) -> &'static str { @@ -325,8 +324,6 @@ impl SupraCommand for CreateTransaction { } } - - /// Verify entry function matches on-chain transaction proposal. #[derive(Debug, Parser)] pub struct VerifyProposal { diff --git a/crates/aptos/src/common/types.rs b/crates/aptos/src/common/types.rs index 84e057d8fbc70..38027746bd115 100644 --- a/crates/aptos/src/common/types.rs +++ b/crates/aptos/src/common/types.rs @@ -24,6 +24,7 @@ use aptos_api_types::ViewFunction; use aptos_crypto::{ ed25519::{Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature}, encoding_type::{EncodingError, EncodingType}, + hash::HashValueParseError, x25519, PrivateKey, ValidCryptoMaterialStringExt, }; use aptos_global_constants::adjust_gas_headroom; @@ -67,9 +68,8 @@ use std::{ str::FromStr, time::{Duration, Instant, SystemTime, UNIX_EPOCH}, }; -use thiserror::Error; -use aptos_crypto::hash::HashValueParseError; use supra_aptos::ApiVersion; +use thiserror::Error; pub const USER_AGENT: &str = concat!("aptos-cli/", env!("CARGO_PKG_VERSION")); const US_IN_SECS: u64 = 1_000_000; diff --git a/crates/aptos/src/governance/mod.rs b/crates/aptos/src/governance/mod.rs index c0871a470fba3..bdd811514a8c6 100644 --- a/crates/aptos/src/governance/mod.rs +++ b/crates/aptos/src/governance/mod.rs @@ -8,13 +8,16 @@ use crate::common::utils::read_from_file; use crate::{ common::{ types::{ - CliError, CliTypedResult, MovePackageDir, ProfileOptions, - PromptOptions, RestOptions, TransactionOptions, TransactionSummary, + CliError, CliTypedResult, MovePackageDir, ProfileOptions, PromptOptions, RestOptions, + TransactionOptions, TransactionSummary, }, utils::prompt_yes_with_override, }, governance::utils::*, - move_tool::{FrameworkPackageArgs, IncludedArtifacts}, + move_tool::{ + FrameworkPackageArgs, IncludedArtifacts, + IncludedArtifacts::{All, Sparse}, + }, CliCommand, CliResult, }; use aptos_api_types::ViewFunction; @@ -45,15 +48,13 @@ use reqwest::Url; use serde::{Deserialize, Serialize}; use std::{ collections::BTreeMap, - fmt::Formatter, + fmt::{Display, Formatter}, fs, path::{Path, PathBuf}, + str::FromStr, }; -use std::fmt::Display; -use std::str::FromStr; use supra_aptos::{SupraCommand, SupraCommandArguments}; use tempfile::TempDir; -use crate::move_tool::IncludedArtifacts::{All, Sparse}; /// Tool for on-chain governance /// @@ -420,22 +421,24 @@ impl SupraCommand for SubmitProposal { let payload = if self.args.is_multi_step { aptos_stdlib::supra_governance_supra_create_proposal_v2( - script_hash.to_vec(), - self.args.metadata_url.to_string().as_bytes().to_vec(), - metadata_hash.to_hex().as_bytes().to_vec(), - true, - ) + script_hash.to_vec(), + self.args.metadata_url.to_string().as_bytes().to_vec(), + metadata_hash.to_hex().as_bytes().to_vec(), + true, + ) } else { - aptos_stdlib::supra_governance_supra_create_proposal( - script_hash.to_vec(), - self.args.metadata_url.to_string().as_bytes().to_vec(), - metadata_hash.to_hex().as_bytes().to_vec(), - ) + aptos_stdlib::supra_governance_supra_create_proposal( + script_hash.to_vec(), + self.args.metadata_url.to_string().as_bytes().to_vec(), + metadata_hash.to_hex().as_bytes().to_vec(), + ) }; Ok(SupraCommandArguments { payload, sender_account: self.args.txn_options.sender_account, - profile_options: supra_aptos::ProfileOptions::from(self.args.txn_options.profile_options), + profile_options: supra_aptos::ProfileOptions::from( + self.args.txn_options.profile_options, + ), rest_options: supra_aptos::RestOptions::from(self.args.txn_options.rest_options), gas_options: supra_aptos::GasOptions::from(self.args.txn_options.gas_options), }) @@ -721,10 +724,7 @@ impl CliCommand> for SubmitVote { summaries.push( self.args .txn_options - .submit_transaction(aptos_stdlib::supra_governance_supra_vote( - proposal_id, - vote, - )) + .submit_transaction(aptos_stdlib::supra_governance_supra_vote(proposal_id, vote)) .await .map(TransactionSummary::from)?, ); @@ -745,14 +745,13 @@ impl SupraCommand for SubmitVote { let vote = self.args.yes; let proposal_id = self.args.proposal_id; - let payload = aptos_stdlib::supra_governance_supra_vote( - proposal_id, - vote, - ); + let payload = aptos_stdlib::supra_governance_supra_vote(proposal_id, vote); Ok(SupraCommandArguments { payload, sender_account: self.args.txn_options.sender_account, - profile_options: supra_aptos::ProfileOptions::from(self.args.txn_options.profile_options), + profile_options: supra_aptos::ProfileOptions::from( + self.args.txn_options.profile_options, + ), rest_options: supra_aptos::RestOptions::from(self.args.txn_options.rest_options), gas_options: supra_aptos::GasOptions::from(self.args.txn_options.gas_options), }) @@ -781,7 +780,9 @@ impl CliCommand for ApproveExecutionHash { Ok(self .txn_options .submit_transaction( - aptos_stdlib::supra_governance_add_supra_approved_script_hash_script(self.proposal_id), + aptos_stdlib::supra_governance_add_supra_approved_script_hash_script( + self.proposal_id, + ), ) .await .map(TransactionSummary::from)?) @@ -791,8 +792,9 @@ impl CliCommand for ApproveExecutionHash { #[async_trait] impl SupraCommand for ApproveExecutionHash { async fn supra_command_arguments(self) -> anyhow::Result { - let payload = aptos_stdlib::supra_governance_add_supra_approved_script_hash_script(self.proposal_id); - Ok(SupraCommandArguments{ + let payload = + aptos_stdlib::supra_governance_add_supra_approved_script_hash_script(self.proposal_id); + Ok(SupraCommandArguments { payload, sender_account: self.txn_options.sender_account, profile_options: supra_aptos::ProfileOptions::from(self.txn_options.profile_options), @@ -946,7 +948,7 @@ impl SupraCommand for ExecuteProposal { let args = vec![TransactionArgument::U64(self.proposal_id)]; let payload = TransactionPayload::Script(Script::new(bytecode, vec![], args)); - Ok(SupraCommandArguments{ + Ok(SupraCommandArguments { payload, sender_account: self.txn_options.sender_account, profile_options: supra_aptos::ProfileOptions::from(self.txn_options.profile_options), @@ -1092,7 +1094,7 @@ impl CliCommand<()> for GenerateUpgradeProposal { testnet, next_execution_hash, proposal_type, - function_name + function_name, } = self; let package_path = move_options.get_package_path()?; let options = included_artifacts.build_options( @@ -1120,8 +1122,10 @@ impl CliCommand<()> for GenerateUpgradeProposal { // If we're generating a multi-step proposal } else { let next_execution_hash = if !next_execution_hash.is_empty() { - Some(HashValue::from_str(&next_execution_hash) - .map_err(|e| CliError::HashError(e, next_execution_hash))?) + Some( + HashValue::from_str(&next_execution_hash) + .map_err(|e| CliError::HashError(e, next_execution_hash))?, + ) } else { None }; @@ -1130,7 +1134,7 @@ impl CliCommand<()> for GenerateUpgradeProposal { account, output, next_execution_hash, - function_name + function_name, )?; } Ok(()) diff --git a/crates/aptos/src/lib.rs b/crates/aptos/src/lib.rs index 1566b44bd00c1..a30c4bd4db384 100644 --- a/crates/aptos/src/lib.rs +++ b/crates/aptos/src/lib.rs @@ -13,10 +13,10 @@ pub mod move_tool; pub mod node; pub mod op; pub mod stake; +pub mod supra_specific; #[cfg(any(test, feature = "fuzzing"))] pub mod test; pub mod update; -pub mod supra_specific; use crate::common::{ types::{CliCommand, CliResult, CliTypedResult}, diff --git a/crates/aptos/src/move_tool/mod.rs b/crates/aptos/src/move_tool/mod.rs index 57e581d1641b5..d7527ddddcf7e 100644 --- a/crates/aptos/src/move_tool/mod.rs +++ b/crates/aptos/src/move_tool/mod.rs @@ -66,8 +66,8 @@ use std::{ str::FromStr, }; pub use stored_package::*; -use tokio::task; use supra_aptos::{SupraCommand, SupraCommandArguments}; +use tokio::task; use url::Url; mod aptos_debug_natives; @@ -181,7 +181,8 @@ impl FrameworkPackageArgs { prompt_options: PromptOptions, ) -> CliTypedResult<()> { const SUPRA_FRAMEWORK: &str = "SupraFramework"; - const SUPRA_FRAMEWORK_GIT_PATH: &str = "https://github.com/Entropy-Foundation/aptos-core.git"; + const SUPRA_FRAMEWORK_GIT_PATH: &str = + "https://github.com/Entropy-Foundation/aptos-core.git"; const SUBDIR_PATH: &str = "aptos-move/framework/supra-framework"; const DEFAULT_BRANCH: &str = "dev"; diff --git a/crates/aptos/src/move_tool/stored_package.rs b/crates/aptos/src/move_tool/stored_package.rs index 29751f5533ae0..cd4eedb1f612c 100644 --- a/crates/aptos/src/move_tool/stored_package.rs +++ b/crates/aptos/src/move_tool/stored_package.rs @@ -40,10 +40,7 @@ impl fmt::Display for CachedPackageMetadata<'_> { impl CachedPackageRegistry { pub fn new(inner: PackageRegistry, bytecode: BTreeMap>) -> Self { - Self { - inner, - bytecode, - } + Self { inner, bytecode } } /// Creates a new registry. diff --git a/crates/aptos/src/node/mod.rs b/crates/aptos/src/node/mod.rs index ab0404eaabbd6..1aaa6916a004d 100644 --- a/crates/aptos/src/node/mod.rs +++ b/crates/aptos/src/node/mod.rs @@ -902,7 +902,7 @@ impl TryFrom<&ValidatorInfo> for ValidatorInfoSummary { fn try_from(info: &ValidatorInfo) -> Result { let config = info.config(); let config = ValidatorConfig { - consensus_public_key: config.consensus_public_key.to_bytes().to_vec(), + consensus_public_key: config.consensus_public_key().to_bytes().to_vec(), validator_network_addresses: config.validator_network_addresses.clone(), fullnode_network_addresses: config.fullnode_network_addresses.clone(), validator_index: config.validator_index, diff --git a/crates/aptos/src/supra_specific.rs b/crates/aptos/src/supra_specific.rs index 023bca4ff9dac..327209fdf9baf 100644 --- a/crates/aptos/src/supra_specific.rs +++ b/crates/aptos/src/supra_specific.rs @@ -1,10 +1,15 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright © Entropy Foundation use crate::common::types::{GasOptions, ProfileOptions, RestOptions}; impl From for supra_aptos::ProfileOptions { fn from(value: ProfileOptions) -> Self { - Self { profile: value.profile } + Self { + profile: value.profile, + } } } diff --git a/crates/fallible/Cargo.toml b/crates/fallible/Cargo.toml index 6563764a437bc..7d5b2a7525eec 100644 --- a/crates/fallible/Cargo.toml +++ b/crates/fallible/Cargo.toml @@ -14,5 +14,3 @@ rust-version = { workspace = true } [dependencies] thiserror = { workspace = true } - - diff --git a/crates/indexer/Cargo.toml b/crates/indexer/Cargo.toml index 77799b37096b9..ee12ca227e6c9 100644 --- a/crates/indexer/Cargo.toml +++ b/crates/indexer/Cargo.toml @@ -29,11 +29,11 @@ bcs = { workspace = true } bigdecimal = { workspace = true } chrono = { workspace = true } diesel = { workspace = true, features = [ - "chrono", - "postgres", - "r2d2", - "numeric", - "serde_json", + "chrono", + "postgres", + "r2d2", + "numeric", + "serde_json", ] } diesel_migrations = { workspace = true } field_count = { workspace = true } diff --git a/crates/proxy/Cargo.toml b/crates/proxy/Cargo.toml index bd1266c34911a..330c5adf0b6e3 100644 --- a/crates/proxy/Cargo.toml +++ b/crates/proxy/Cargo.toml @@ -14,5 +14,3 @@ rust-version = { workspace = true } [dependencies] ipnet = { workspace = true } - - diff --git a/crates/supra/src/lib.rs b/crates/supra/src/lib.rs index a735476b1bcf4..28d297b74e19a 100644 --- a/crates/supra/src/lib.rs +++ b/crates/supra/src/lib.rs @@ -1,8 +1,10 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright © Entropy Foundation use anyhow::Result; -use aptos_types::account_address::AccountAddress; -use aptos_types::transaction::TransactionPayload; +use aptos_types::{account_address::AccountAddress, transaction::TransactionPayload}; use async_trait::async_trait; use clap::ValueEnum; use std::fmt::{Display, Formatter}; diff --git a/crates/validator-transaction-pool/src/tests.rs b/crates/validator-transaction-pool/src/tests.rs index 62a7bbca11b7b..b837794ebc9da 100644 --- a/crates/validator-transaction-pool/src/tests.rs +++ b/crates/validator-transaction-pool/src/tests.rs @@ -5,7 +5,7 @@ use crate::{TransactionFilter, VTxnPoolState}; use aptos_channels::{aptos_channel, message_queues::QueueStyle}; use aptos_crypto::hash::CryptoHash; use aptos_types::{ - dkg::DKGTranscript, + dkg::DKGTransactionData, jwks::{dummy_issuer, QuorumCertifiedUpdate}, validator_txn::{Topic, ValidatorTransaction}, }; @@ -21,9 +21,9 @@ use tokio::time::timeout; #[test] fn txn_pull_order_should_be_fifo_except_in_topic_overwriting() { let pool = VTxnPoolState::default(); - let txn_0 = ValidatorTransaction::DKGResult(DKGTranscript::dummy()); + let txn_0 = ValidatorTransaction::DKG(DKGTransactionData::dummy()); let txn_1 = ValidatorTransaction::ObservedJWKUpdate(QuorumCertifiedUpdate::dummy()); - let txn_2 = ValidatorTransaction::DKGResult(DKGTranscript::dummy()); + let txn_2 = ValidatorTransaction::DKG(DKGTransactionData::dummy()); let _guard_0 = pool.put( Topic::JWK_CONSENSUS(dummy_issuer()), Arc::new(txn_0.clone()), @@ -48,7 +48,7 @@ fn txn_pull_order_should_be_fifo_except_in_topic_overwriting() { fn delete_by_seq_num() { let pool = VTxnPoolState::default(); let txn_0 = ValidatorTransaction::ObservedJWKUpdate(QuorumCertifiedUpdate::dummy()); - let txn_1 = ValidatorTransaction::DKGResult(DKGTranscript::dummy()); + let txn_1 = ValidatorTransaction::DKG(DKGTransactionData::dummy()); let guard_0 = pool.put( Topic::JWK_CONSENSUS(dummy_issuer()), Arc::new(txn_0.clone()), @@ -69,7 +69,7 @@ fn delete_by_seq_num() { fn txn_should_be_dropped_if_guard_is_dropped() { let pool = VTxnPoolState::default(); let txn_0 = ValidatorTransaction::ObservedJWKUpdate(QuorumCertifiedUpdate::dummy()); - let txn_1 = ValidatorTransaction::DKGResult(DKGTranscript::dummy()); + let txn_1 = ValidatorTransaction::DKG(DKGTransactionData::dummy()); let guard_0 = pool.put( Topic::JWK_CONSENSUS(dummy_issuer()), Arc::new(txn_0.clone()), @@ -91,7 +91,7 @@ fn txn_should_be_dropped_if_guard_is_dropped() { async fn per_txn_pull_notification() { let pool = VTxnPoolState::default(); let txn_0 = ValidatorTransaction::ObservedJWKUpdate(QuorumCertifiedUpdate::dummy()); - let txn_1 = ValidatorTransaction::DKGResult(DKGTranscript::dummy()); + let txn_1 = ValidatorTransaction::DKG(DKGTransactionData::dummy()); let (tx, mut rx) = aptos_channel::new(QueueStyle::KLAST, 1, None); let _guard_0 = pool.put( Topic::JWK_CONSENSUS(dummy_issuer()), @@ -116,7 +116,7 @@ async fn per_txn_pull_notification() { fn pull_item_limit_should_be_respected() { let pool = VTxnPoolState::default(); let txn_0 = ValidatorTransaction::ObservedJWKUpdate(QuorumCertifiedUpdate::dummy()); - let txn_1 = ValidatorTransaction::DKGResult(DKGTranscript::dummy()); + let txn_1 = ValidatorTransaction::DKG(DKGTransactionData::dummy()); let guard_0 = pool.put( Topic::JWK_CONSENSUS(dummy_issuer()), Arc::new(txn_0.clone()), diff --git a/dkg/src/agg_trx_producer.rs b/dkg/src/agg_trx_producer.rs index bbe537cea5b9d..4d760e5a85f67 100644 --- a/dkg/src/agg_trx_producer.rs +++ b/dkg/src/agg_trx_producer.rs @@ -7,7 +7,7 @@ use crate::{ use aptos_channels::aptos_channel::Sender; use aptos_logger::info; use aptos_reliable_broadcast::ReliableBroadcast; -use aptos_types::{dkg::DKGTrait, epoch_state::EpochState}; +use aptos_types::{aptos_dkg::DKGTrait, epoch_state::EpochState}; use futures::future::AbortHandle; use futures_util::future::Abortable; use move_core_types::account_address::AccountAddress; diff --git a/dkg/src/counters.rs b/dkg/src/counters.rs index a62e5bd67d88f..7e1d904fae362 100644 --- a/dkg/src/counters.rs +++ b/dkg/src/counters.rs @@ -7,7 +7,7 @@ use once_cell::sync::Lazy; /// Count of the pending messages sent to itself in the channel pub static PENDING_SELF_MESSAGES: Lazy = Lazy::new(|| { register_int_gauge!( - "aptos_dkg_pending_self_messages", + "dkg_pending_self_messages", "Count of the pending messages sent to itself in the channel" ) .unwrap() @@ -15,7 +15,7 @@ pub static PENDING_SELF_MESSAGES: Lazy = Lazy::new(|| { pub static DKG_STAGE_SECONDS: Lazy = Lazy::new(|| { register_histogram_vec!( - "aptos_dkg_session_stage_seconds", + "dkg_session_stage_seconds", "How long it takes to reach different DKG stages", &["dealer", "stage"] ) @@ -24,7 +24,7 @@ pub static DKG_STAGE_SECONDS: Lazy = Lazy::new(|| { pub static ROUNDING_SECONDS: Lazy = Lazy::new(|| { register_histogram_vec!( - "aptos_dkg_rounding_seconds", + "dkg_rounding_seconds", "Rounding seconds and counts by method", &["method"] ) diff --git a/dkg/src/dkg_manager/mod.rs b/dkg/src/dkg_manager/mod.rs index 5427e41a196c5..87970058d4bce 100644 --- a/dkg/src/dkg_manager/mod.rs +++ b/dkg/src/dkg_manager/mod.rs @@ -13,7 +13,7 @@ use aptos_crypto::Uniform; use aptos_infallible::duration_since_epoch; use aptos_logger::{debug, error, info, warn}; use aptos_types::{ - dkg::{ + aptos_dkg::{ DKGSessionMetadata, DKGSessionState, DKGStartEvent, DKGTrait, DKGTranscript, DKGTranscriptMetadata, MayHaveRoundingSummary, }, diff --git a/dkg/src/dkg_manager/tests.rs b/dkg/src/dkg_manager/tests.rs index c102836e2f5b9..258436a54d7dd 100644 --- a/dkg/src/dkg_manager/tests.rs +++ b/dkg/src/dkg_manager/tests.rs @@ -14,7 +14,7 @@ use aptos_crypto::{ }; use aptos_infallible::RwLock; use aptos_types::{ - dkg::{ + aptos_dkg::{ dummy_dkg::DummyDKG, DKGSessionMetadata, DKGStartEvent, DKGTrait, DKGTranscript, DKGTranscriptMetadata, }, diff --git a/dkg/src/epoch_manager.rs b/dkg/src/epoch_manager.rs index 464b9a98d471c..25a4127264a4c 100644 --- a/dkg/src/epoch_manager.rs +++ b/dkg/src/epoch_manager.rs @@ -21,7 +21,7 @@ use aptos_network::{application::interface::NetworkClient, protocols::network::E use aptos_reliable_broadcast::ReliableBroadcast; use aptos_types::{ account_address::AccountAddress, - dkg::{DKGStartEvent, DKGState, DKGTrait, DefaultDKG}, + aptos_dkg::{DKGStartEvent, DKGState, DKGTrait, DefaultDKG}, epoch_state::EpochState, on_chain_config::{ OnChainConfigPayload, OnChainConfigProvider, OnChainConsensusConfig, diff --git a/dkg/src/lib.rs b/dkg/src/lib.rs index 819e69bf7a808..aa319df672e75 100644 --- a/dkg/src/lib.rs +++ b/dkg/src/lib.rs @@ -18,7 +18,7 @@ use aptos_event_notifications::{ DbBackedOnChainConfig, EventNotificationListener, ReconfigNotificationListener, }; use aptos_network::application::interface::{NetworkClient, NetworkServiceEvents}; -use aptos_types::dkg::{DKGTrait, DefaultDKG}; +use aptos_types::aptos_dkg::{DKGTrait, DefaultDKG}; use aptos_validator_transaction_pool::VTxnPoolState; use move_core_types::account_address::AccountAddress; use tokio::runtime::Runtime; diff --git a/dkg/src/transcript_aggregation/mod.rs b/dkg/src/transcript_aggregation/mod.rs index ec43bde5ad9dd..cf261cd12ae78 100644 --- a/dkg/src/transcript_aggregation/mod.rs +++ b/dkg/src/transcript_aggregation/mod.rs @@ -8,7 +8,7 @@ use aptos_infallible::{duration_since_epoch, Mutex}; use aptos_logger::info; use aptos_reliable_broadcast::BroadcastStatus; use aptos_types::{ - dkg::{DKGTrait, DKGTranscript}, + aptos_dkg::{DKGTrait, DKGTranscript}, epoch_state::EpochState, validator_verifier::VerifyError, }; diff --git a/dkg/src/transcript_aggregation/tests.rs b/dkg/src/transcript_aggregation/tests.rs index 6b3c3d8b42f6b..d722f92504fd8 100644 --- a/dkg/src/transcript_aggregation/tests.rs +++ b/dkg/src/transcript_aggregation/tests.rs @@ -6,7 +6,7 @@ use aptos_crypto::{ed25519, Uniform}; use aptos_infallible::duration_since_epoch; use aptos_reliable_broadcast::BroadcastStatus; use aptos_types::{ - dkg::{ + aptos_dkg::{ dummy_dkg::{DummyDKG, DummyDKGTranscript}, DKGSessionMetadata, DKGTrait, DKGTranscript, DKGTranscriptMetadata, }, diff --git a/dkg/src/types.rs b/dkg/src/types.rs index 928b659027278..22a9c8820c79c 100644 --- a/dkg/src/types.rs +++ b/dkg/src/types.rs @@ -4,7 +4,7 @@ use aptos_crypto_derive::CryptoHasher; use aptos_enum_conversion_derive::EnumConversion; use aptos_reliable_broadcast::RBMessage; -pub use aptos_types::dkg::DKGTranscript; +pub use aptos_types::aptos_dkg::DKGTranscript; use serde::{Deserialize, Serialize}; /// Once DKG starts, a validator should send this message to peers in order to collect DKG transcripts from peers. diff --git a/ecosystem/indexer-grpc/indexer-grpc-fullnode/src/convert.rs b/ecosystem/indexer-grpc/indexer-grpc-fullnode/src/convert.rs index 07fc100121bc6..8937b1900c25f 100644 --- a/ecosystem/indexer-grpc/indexer-grpc-fullnode/src/convert.rs +++ b/ecosystem/indexer-grpc/indexer-grpc-fullnode/src/convert.rs @@ -2,27 +2,30 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -use aptos_api_types::transaction::{AutomationRegistrationParams, AutomationTaskType}; use aptos_api_types::{ - transaction::ValidatorTransaction as ApiValidatorTransactionEnum, AccountSignature, - DeleteModule, DeleteResource, Ed25519Signature, EntryFunctionId, EntryFunctionPayload, Event, - GenesisPayload, MoveAbility, MoveFunction, MoveFunctionGenericTypeParam, - MoveFunctionVisibility, MoveModule, MoveModuleBytecode, MoveModuleId, MoveScriptBytecode, - MoveStruct, MoveStructField, MoveStructTag, MoveType, MultiEd25519Signature, MultiKeySignature, - MultisigPayload, MultisigTransactionPayload, PublicKey, ScriptPayload, Signature, - SingleKeySignature, Transaction, TransactionInfo, TransactionPayload, TransactionSignature, - WriteSet, WriteSetChange, + transaction::{ + AutomationRegistrationParams, AutomationTaskType, + ValidatorTransaction as ApiValidatorTransactionEnum, + }, + AccountSignature, DeleteModule, DeleteResource, Ed25519Signature, EntryFunctionId, + EntryFunctionPayload, Event, GenesisPayload, MoveAbility, MoveFunction, + MoveFunctionGenericTypeParam, MoveFunctionVisibility, MoveModule, MoveModuleBytecode, + MoveModuleId, MoveScriptBytecode, MoveStruct, MoveStructField, MoveStructTag, MoveType, + MultiEd25519Signature, MultiKeySignature, MultisigPayload, MultisigTransactionPayload, + PublicKey, ScriptPayload, Signature, SingleKeySignature, Transaction, TransactionInfo, + TransactionPayload, TransactionSignature, WriteSet, WriteSetChange, }; use aptos_bitvec::BitVec; use aptos_logger::warn; use aptos_protos::{ transaction::v1::{ - self as transaction, any_signature, validator_transaction, + self as transaction, any_signature, automation_payload_extensions, validator_transaction, validator_transaction::observed_jwk_update::exported_provider_jw_ks::{ jwk::{JwkType, Rsa, UnsupportedJwk}, Jwk as ProtoJwk, }, - Ed25519, Keyless, Secp256k1Ecdsa, TransactionSizeInfo, WebAuthn, + AutomationPayloadExtensions, Ed25519, Keyless, Secp256k1Ecdsa, TransactionSizeInfo, + WebAuthn, }, util::timestamp, }; @@ -30,8 +33,6 @@ use aptos_types::jwks::jwk::JWK; use hex; use move_binary_format::file_format::Ability; use std::time::Duration; -use aptos_protos::transaction::v1::automation_payload_extensions; -use aptos_protos::transaction::v1::AutomationPayloadExtensions; pub fn convert_move_module_id(move_module_id: &MoveModuleId) -> transaction::MoveModuleId { transaction::MoveModuleId { @@ -506,7 +507,7 @@ pub fn convert_multisig_payload( ), ), } - } + }, }); transaction::MultisigPayload { multisig_address: multisig_payload.multisig_address.to_string(), @@ -514,11 +515,12 @@ pub fn convert_multisig_payload( } } -pub fn convert_automation_task_type(automation_task_type: &AutomationTaskType) -> transaction::AutomationTaskType { +pub fn convert_automation_task_type( + automation_task_type: &AutomationTaskType, +) -> transaction::AutomationTaskType { match automation_task_type { AutomationTaskType::User => transaction::AutomationTaskType::User, - AutomationTaskType::System => transaction::AutomationTaskType::System - + AutomationTaskType::System => transaction::AutomationTaskType::System, } } @@ -528,7 +530,9 @@ pub fn convert_automation_payload( match auto_payload { AutomationRegistrationParams::V1(params_v1) => { let v1 = transaction::AutomationPayload { - automated_function: Some(convert_entry_function_payload(¶ms_v1.automated_function)), + automated_function: Some(convert_entry_function_payload( + ¶ms_v1.automated_function, + )), expiration_timestamp_secs: params_v1.expiration_timestamp_secs, max_gas_amount: params_v1.max_gas_amount, gas_price_cap: params_v1.gas_price_cap, @@ -536,12 +540,14 @@ pub fn convert_automation_payload( aux_data: params_v1.aux_data.clone(), }; AutomationPayloadExtensions { - variant: Some(automation_payload_extensions::Variant::V1(v1)) + variant: Some(automation_payload_extensions::Variant::V1(v1)), } - } + }, AutomationRegistrationParams::V2(params_v2) => { let v2 = transaction::AutomationPayloadV2 { - automated_function: Some(convert_entry_function_payload(¶ms_v2.automated_function)), + automated_function: Some(convert_entry_function_payload( + ¶ms_v2.automated_function, + )), expiration_timestamp_secs: params_v2.expiration_timestamp_secs, max_gas_amount: params_v2.max_gas_amount, gas_price_cap: params_v2.gas_price_cap, @@ -551,10 +557,9 @@ pub fn convert_automation_payload( priority: params_v2.task_priority.clone(), }; AutomationPayloadExtensions { - variant: Some(automation_payload_extensions::Variant::V2(v2)) + variant: Some(automation_payload_extensions::Variant::V2(v2)), } - - } + }, } } @@ -957,19 +962,35 @@ fn convert_validator_transaction( ) -> transaction::transaction::TxnData { transaction::transaction::TxnData::Validator(transaction::ValidatorTransaction { validator_transaction_type: match api_validator_txn { - ApiValidatorTransactionEnum::DkgResult(dgk_result) => { + ApiValidatorTransactionEnum::Dkg(dkg_transaction) => { + Some( + validator_transaction::ValidatorTransactionType::Dkg( + validator_transaction::DkgTransactionData { + dkg_data: Some(validator_transaction::dkg_data::DkgTransactionData{ + epoch: dkg_transaction.dkg_transaction_data.epoch.0, + author: dkg_transaction.dkg_transaction_data.author.to_string(), + bls_aggregate_signature: dkg_transaction.dkg_transaction_data.bls_aggregate_signature.clone(), + signer_indices_clan_committee: dkg_transaction.dkg_transaction_data.signer_indices_clan_committee.clone(), + transaction_type: dkg_transaction.dkg_transaction_data.transaction_type as u32, + payload: dkg_transaction.dkg_transaction_data.payload.0.clone(), + }), + }, + ) + ) + } + ApiValidatorTransactionEnum::DkgResult(dkg_result) => { Some( validator_transaction::ValidatorTransactionType::DkgUpdate( validator_transaction::DkgUpdate { dkg_transcript: Some(validator_transaction::dkg_update::DkgTranscript { - author: dgk_result.dkg_transcript.author.to_string(), - epoch: dgk_result.dkg_transcript.epoch.0, - payload: dgk_result.dkg_transcript.payload.0.clone(), + author: dkg_result.dkg_transcript.author.to_string(), + epoch: dkg_result.dkg_transcript.epoch.0, + payload: dkg_result.dkg_transcript.payload.0.clone(), }), }, ) ) - }, + } ApiValidatorTransactionEnum::ObservedJwkUpdate(observed_jwk_update) => { Some( validator_transaction::ValidatorTransactionType::ObservedJwkUpdate( diff --git a/ecosystem/indexer-grpc/indexer-grpc-table-info/Cargo.toml b/ecosystem/indexer-grpc/indexer-grpc-table-info/Cargo.toml index 1f3dc6676cb38..40b199b98d649 100644 --- a/ecosystem/indexer-grpc/indexer-grpc-table-info/Cargo.toml +++ b/ecosystem/indexer-grpc/indexer-grpc-table-info/Cargo.toml @@ -16,7 +16,7 @@ anyhow = { workspace = true } aptos-api = { workspace = true } aptos-api-types = { workspace = true } aptos-config = { workspace = true } -aptos-db-indexer = { workspace = true } +aptos-db-indexer = { workspace = true } aptos-indexer-grpc-fullnode = { workspace = true } aptos-indexer-grpc-utils = { workspace = true } aptos-logger = { workspace = true } diff --git a/ecosystem/nft-metadata-crawler-parser/Cargo.toml b/ecosystem/nft-metadata-crawler-parser/Cargo.toml index e04313d4c92ec..5fcc733ba182d 100644 --- a/ecosystem/nft-metadata-crawler-parser/Cargo.toml +++ b/ecosystem/nft-metadata-crawler-parser/Cargo.toml @@ -22,11 +22,11 @@ bytes = { workspace = true } chrono = { workspace = true } clap = { workspace = true } diesel = { workspace = true, features = [ - "chrono", - "postgres", - "r2d2", - "numeric", - "serde_json", + "chrono", + "postgres", + "r2d2", + "numeric", + "serde_json", ] } diesel_migrations = { workspace = true } field_count = { workspace = true } diff --git a/execution/block-partitioner/Cargo.toml b/execution/block-partitioner/Cargo.toml index e4ba06cbfcdf7..ff7ffcb389f5a 100644 --- a/execution/block-partitioner/Cargo.toml +++ b/execution/block-partitioner/Cargo.toml @@ -40,4 +40,3 @@ default = [] [[bench]] name = "v2" harness = false - diff --git a/execution/executor-benchmark/Cargo.toml b/execution/executor-benchmark/Cargo.toml index 61371bde60254..d78a2be061330 100644 --- a/execution/executor-benchmark/Cargo.toml +++ b/execution/executor-benchmark/Cargo.toml @@ -29,7 +29,7 @@ aptos-jellyfish-merkle = { workspace = true } aptos-logger = { workspace = true } aptos-metrics-core = { workspace = true } aptos-node-resource-metrics = { workspace = true } -aptos-push-metrics = { workspace = true } +aptos-push-metrics = { workspace = true } aptos-sdk = { workspace = true } aptos-storage-interface = { workspace = true } aptos-transaction-generator-lib = { workspace = true } @@ -61,4 +61,8 @@ aptos-temppath = { workspace = true } [features] default = [] -fuzzing = ["aptos-config/fuzzing", "aptos-crypto/fuzzing", "aptos-types/fuzzing"] +fuzzing = [ + "aptos-config/fuzzing", + "aptos-crypto/fuzzing", + "aptos-types/fuzzing", +] diff --git a/execution/executor-service/Cargo.toml b/execution/executor-service/Cargo.toml index f5421858af1de..e07d41c32d85e 100644 --- a/execution/executor-service/Cargo.toml +++ b/execution/executor-service/Cargo.toml @@ -19,7 +19,7 @@ aptos-infallible = { workspace = true } aptos-logger = { workspace = true } aptos-metrics-core = { workspace = true } aptos-node-resource-metrics = { workspace = true } -aptos-push-metrics = { workspace = true } +aptos-push-metrics = { workspace = true } aptos-secure-net = { workspace = true } aptos-storage-interface = { workspace = true } aptos-types = { workspace = true } diff --git a/execution/executor-types/src/lib.rs b/execution/executor-types/src/lib.rs index 5f87e40dc1456..9339e56aeffee 100644 --- a/execution/executor-types/src/lib.rs +++ b/execution/executor-types/src/lib.rs @@ -12,9 +12,9 @@ use aptos_crypto::{ use aptos_scratchpad::{ProofRead, SparseMerkleTree}; use aptos_types::{ account_config::NEW_EPOCH_EVENT_MOVE_TYPE_TAG, + aptos_dkg::DKG_START_EVENT_MOVE_TYPE_TAG, block_executor::{config::BlockExecutorConfigFromOnchain, partitioner::ExecutableBlock}, contract_event::ContractEvent, - dkg::DKG_START_EVENT_MOVE_TYPE_TAG, epoch_state::EpochState, jwks::OBSERVED_JWK_UPDATED_MOVE_TYPE_TAG, ledger_info::LedgerInfoWithSignatures, diff --git a/execution/executor/Cargo.toml b/execution/executor/Cargo.toml index da2d69e3cc59d..7738d478657a5 100644 --- a/execution/executor/Cargo.toml +++ b/execution/executor/Cargo.toml @@ -56,6 +56,11 @@ rand = { workspace = true } [features] default = [] -fuzzing = ["aptos-consensus-types/fuzzing", "aptos-crypto/fuzzing", "aptos-types/fuzzing", "aptos-storage-interface/fuzzing"] +fuzzing = [ + "aptos-consensus-types/fuzzing", + "aptos-crypto/fuzzing", + "aptos-types/fuzzing", + "aptos-storage-interface/fuzzing", +] failpoints = ["fail/failpoints", "aptos-vm/failpoints"] consensus-only-perf-test = [] diff --git a/execution/executor/src/components/chunk_output.rs b/execution/executor/src/components/chunk_output.rs index b00e8ea7ad87a..01b03d74f4091 100644 --- a/execution/executor/src/components/chunk_output.rs +++ b/execution/executor/src/components/chunk_output.rs @@ -336,7 +336,9 @@ pub fn update_counters_for_processed_chunk( Some(Transaction::BlockEpilogue(_)) => "block_epilogue", Some(Transaction::ValidatorTransaction(_)) => "validator_transaction", Some(Transaction::AutomatedTransaction(_)) => "automated_transaction", - Some(Transaction::AutomationRegistryTransaction(_)) => "automation_registry_transaction", + Some(Transaction::AutomationRegistryTransaction(_)) => { + "automation_registry_transaction" + }, Some(Transaction::SystemAutomatedTransaction(_)) => "system_automated_transaction", None => "unknown", }; @@ -410,11 +412,13 @@ pub fn update_counters_for_processed_chunk( .with_label_values(&[process_type, "script", state]) .inc(); }, - aptos_types::transaction::TransactionPayload::AutomationRegistration(_auto_payload) => { + aptos_types::transaction::TransactionPayload::AutomationRegistration( + _auto_payload, + ) => { metrics::APTOS_PROCESSED_USER_TRANSACTIONS_PAYLOAD_TYPE .with_label_values(&[process_type, "automation", state]) .inc(); - } + }, aptos_types::transaction::TransactionPayload::EntryFunction(function) => { metrics::APTOS_PROCESSED_USER_TRANSACTIONS_PAYLOAD_TYPE .with_label_values(&[process_type, "function", state]) diff --git a/keyless/circuit/Cargo.toml b/keyless/circuit/Cargo.toml index 662d69d6fee95..c025d96e51ec8 100644 --- a/keyless/circuit/Cargo.toml +++ b/keyless/circuit/Cargo.toml @@ -30,7 +30,12 @@ tempfile = { workspace = true } [dev-dependencies] hex = { workspace = true } num-bigint = { workspace = true } -num-modular = { version = "0.6.1", features = ["num-bigint", "num-integer", "num-traits", "std"] } +num-modular = { version = "0.6.1", features = [ + "num-bigint", + "num-integer", + "num-traits", + "std", +] } rand_chacha = "0.3.1" rsa = { version = "0.9.6", features = ["sha2"] } tokio = { workspace = true } diff --git a/mempool/Cargo.toml b/mempool/Cargo.toml index dede31a831943..3da6a345126e6 100644 --- a/mempool/Cargo.toml +++ b/mempool/Cargo.toml @@ -61,5 +61,10 @@ proptest = { workspace = true } [features] default = [] failpoints = ["fail/failpoints", "aptos-vm-validator/failpoints"] -fuzzing = ["proptest", "aptos-types/fuzzing", "aptos-storage-interface/fuzzing", "aptos-config/fuzzing"] +fuzzing = [ + "proptest", + "aptos-types/fuzzing", + "aptos-storage-interface/fuzzing", + "aptos-config/fuzzing", +] consensus-only-perf-test = [] diff --git a/network/framework/Cargo.toml b/network/framework/Cargo.toml index fc9ede7291c34..b4ba67bdd4ab5 100644 --- a/network/framework/Cargo.toml +++ b/network/framework/Cargo.toml @@ -73,8 +73,25 @@ rand_core = { workspace = true } [features] default = [] -fuzzing = ["aptos-bitvec/fuzzing", "aptos-config/fuzzing", "aptos-crypto/fuzzing", "aptos-types/fuzzing", "aptos-proptest-helpers", "aptos-time-service/testing", "aptos-types/fuzzing", "aptos-memsocket/testing", "aptos-netcore/fuzzing", "proptest", "proptest-derive"] -testing = ["aptos-config/testing", "aptos-time-service/testing", "aptos-memsocket/testing", "aptos-netcore/testing"] +fuzzing = [ + "aptos-bitvec/fuzzing", + "aptos-config/fuzzing", + "aptos-crypto/fuzzing", + "aptos-types/fuzzing", + "aptos-proptest-helpers", + "aptos-time-service/testing", + "aptos-types/fuzzing", + "aptos-memsocket/testing", + "aptos-netcore/fuzzing", + "proptest", + "proptest-derive", +] +testing = [ + "aptos-config/testing", + "aptos-time-service/testing", + "aptos-memsocket/testing", + "aptos-netcore/testing", +] [package.metadata.cargo-machete] ignored = ["serde_bytes"] diff --git a/protos/python/pyproject.toml b/protos/python/pyproject.toml index 2faea9a7c7b44..ead7782045d15 100644 --- a/protos/python/pyproject.toml +++ b/protos/python/pyproject.toml @@ -8,7 +8,7 @@ readme = "README.md" repository = "https://github.com/aptos-labs/aptos-core" homepage = "https://github.com/aptos-labs/aptos-core/tree/main/protos/python" keywords = ["web3", "aptos", "blockchain", "indexer"] -packages = [{include = "aptos_protos"}] +packages = [{ include = "aptos_protos" }] [tool.poe.tasks] generate = "./generate.sh" diff --git a/protos/rust/src/pb/aptos.transaction.v1.rs b/protos/rust/src/pb/aptos.transaction.v1.rs index 0cbbd0e632e48..0386c0702b9f6 100644 --- a/protos/rust/src/pb/aptos.transaction.v1.rs +++ b/protos/rust/src/pb/aptos.transaction.v1.rs @@ -102,7 +102,7 @@ pub mod transaction { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum TxnData { #[prost(message, tag="7")] BlockMetadata(super::BlockMetadataTransaction), @@ -162,7 +162,7 @@ pub struct ValidatorTransaction { /// Nested message and enum types in `ValidatorTransaction`. pub mod validator_transaction { #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct ObservedJwkUpdate { #[prost(message, optional, tag="1")] pub quorum_certified_update: ::core::option::Option, @@ -170,7 +170,7 @@ pub mod validator_transaction { /// Nested message and enum types in `ObservedJwkUpdate`. pub mod observed_jwk_update { #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportedProviderJwKs { #[prost(string, tag="1")] pub issuer: ::prost::alloc::string::String, @@ -182,7 +182,7 @@ pub mod validator_transaction { /// Nested message and enum types in `ExportedProviderJWKs`. pub mod exported_provider_jw_ks { #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Jwk { #[prost(oneof="jwk::JwkType", tags="1, 2")] pub jwk_type: ::core::option::Option, @@ -190,7 +190,7 @@ pub mod validator_transaction { /// Nested message and enum types in `JWK`. pub mod jwk { #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Rsa { #[prost(string, tag="1")] pub kid: ::prost::alloc::string::String, @@ -204,7 +204,7 @@ pub mod validator_transaction { pub n: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnsupportedJwk { #[prost(bytes="vec", tag="1")] pub id: ::prost::alloc::vec::Vec, @@ -212,7 +212,7 @@ pub mod validator_transaction { pub payload: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum JwkType { #[prost(message, tag="1")] UnsupportedJwk(UnsupportedJwk), @@ -222,7 +222,7 @@ pub mod validator_transaction { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportedAggregateSignature { #[prost(uint64, repeated, tag="1")] pub signer_indices: ::prost::alloc::vec::Vec, @@ -231,7 +231,7 @@ pub mod validator_transaction { pub sig: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuorumCertifiedUpdate { #[prost(message, optional, tag="1")] pub update: ::core::option::Option, @@ -240,7 +240,7 @@ pub mod validator_transaction { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct DkgUpdate { #[prost(message, optional, tag="1")] pub dkg_transcript: ::core::option::Option, @@ -248,7 +248,7 @@ pub mod validator_transaction { /// Nested message and enum types in `DkgUpdate`. pub mod dkg_update { #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct DkgTranscript { #[prost(uint64, tag="1")] pub epoch: u64, @@ -258,13 +258,43 @@ pub mod validator_transaction { pub payload: ::prost::alloc::vec::Vec, } } + #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct DkgTransactionData { + #[prost(message, optional, tag="1")] + pub dkg_data: ::core::option::Option, + } + + /// Nested message and enum types in `DkgTransactionData`. + pub mod dkg_data { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct DkgTransactionData { + #[prost(uint64, tag="1")] + pub epoch: u64, + #[prost(string, tag="2")] + pub author: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="3")] + pub bls_aggregate_signature: ::prost::alloc::vec::Vec, + #[prost(uint32, repeated, tag="4")] + pub signer_indices_clan_committee: ::prost::alloc::vec::Vec, + #[prost(uint32, tag="5")] + pub transaction_type: u32, + #[prost(bytes="vec", tag="6")] + pub payload: ::prost::alloc::vec::Vec, + } + } + + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum ValidatorTransactionType { #[prost(message, tag="1")] ObservedJwkUpdate(ObservedJwkUpdate), #[prost(message, tag="2")] DkgUpdate(DkgUpdate), + #[prost(message, tag="3")] + Dkg(DkgTransactionData), } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -421,7 +451,7 @@ pub mod write_set { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum WriteSet { #[prost(message, tag="2")] ScriptWriteSet(super::ScriptWriteSet), @@ -497,7 +527,7 @@ pub mod write_set_change { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Change { #[prost(message, tag="2")] DeleteModule(super::DeleteModule), @@ -655,7 +685,7 @@ pub mod transaction_payload { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Payload { #[prost(message, tag="2")] EntryFunctionPayload(super::EntryFunctionPayload), @@ -749,7 +779,7 @@ pub mod multisig_transaction_payload { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Payload { #[prost(message, tag="2")] EntryFunctionPayload(super::EntryFunctionPayload), @@ -930,7 +960,7 @@ pub struct MoveType { /// Nested message and enum types in `MoveType`. pub mod move_type { #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReferenceType { #[prost(bool, tag="1")] pub mutable: bool, @@ -938,7 +968,7 @@ pub mod move_type { pub to: ::core::option::Option<::prost::alloc::boxed::Box>, } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Content { #[prost(message, tag="3")] Vector(::prost::alloc::boxed::Box), @@ -1035,7 +1065,7 @@ pub mod signature { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Signature { #[prost(message, tag="2")] Ed25519(super::Ed25519Signature), @@ -1193,7 +1223,7 @@ pub mod any_signature { } /// Support: >= 1.10. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum SignatureVariant { #[prost(message, tag="3")] Ed25519(super::Ed25519), @@ -1307,7 +1337,7 @@ pub mod account_signature { } } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Signature { #[prost(message, tag="2")] Ed25519(super::Ed25519Signature), @@ -4244,4 +4274,4 @@ pub const FILE_DESCRIPTOR_SET: &[u8] = &[ 0x03, 0x12, 0x04, 0xa3, 0x05, 0x17, 0x18, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, ]; include!("aptos.transaction.v1.serde.rs"); -// @@protoc_insertion_point(module) +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/protos/rust/src/pb/aptos.transaction.v1.serde.rs b/protos/rust/src/pb/aptos.transaction.v1.serde.rs index 92cce90cda457..438666ba8b9b4 100644 --- a/protos/rust/src/pb/aptos.transaction.v1.serde.rs +++ b/protos/rust/src/pb/aptos.transaction.v1.serde.rs @@ -107,8 +107,8 @@ impl<'de> serde::Deserialize<'de> for AccountSignature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut signature__ = None; @@ -125,28 +125,28 @@ impl<'de> serde::Deserialize<'de> for AccountSignature { return Err(serde::de::Error::duplicate_field("ed25519")); } signature__ = map.next_value::<::std::option::Option<_>>()?.map(account_signature::Signature::Ed25519) -; + ; } GeneratedField::MultiEd25519 => { if signature__.is_some() { return Err(serde::de::Error::duplicate_field("multiEd25519")); } signature__ = map.next_value::<::std::option::Option<_>>()?.map(account_signature::Signature::MultiEd25519) -; + ; } GeneratedField::SingleKeySignature => { if signature__.is_some() { return Err(serde::de::Error::duplicate_field("singleKeySignature")); } signature__ = map.next_value::<::std::option::Option<_>>()?.map(account_signature::Signature::SingleKeySignature) -; + ; } GeneratedField::MultiKeySignature => { if signature__.is_some() { return Err(serde::de::Error::duplicate_field("multiKeySignature")); } signature__ = map.next_value::<::std::option::Option<_>>()?.map(account_signature::Signature::MultiKeySignature) -; + ; } } } @@ -322,8 +322,8 @@ impl<'de> serde::Deserialize<'de> for AnyPublicKey { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut public_key__ = None; @@ -548,8 +548,8 @@ impl<'de> serde::Deserialize<'de> for AnySignature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut signature__ = None; @@ -575,28 +575,28 @@ impl<'de> serde::Deserialize<'de> for AnySignature { return Err(serde::de::Error::duplicate_field("ed25519")); } signature_variant__ = map.next_value::<::std::option::Option<_>>()?.map(any_signature::SignatureVariant::Ed25519) -; + ; } GeneratedField::Secp256k1Ecdsa => { if signature_variant__.is_some() { return Err(serde::de::Error::duplicate_field("secp256k1Ecdsa")); } signature_variant__ = map.next_value::<::std::option::Option<_>>()?.map(any_signature::SignatureVariant::Secp256k1Ecdsa) -; + ; } GeneratedField::Webauthn => { if signature_variant__.is_some() { return Err(serde::de::Error::duplicate_field("webauthn")); } signature_variant__ = map.next_value::<::std::option::Option<_>>()?.map(any_signature::SignatureVariant::Webauthn) -; + ; } GeneratedField::Keyless => { if signature_variant__.is_some() { return Err(serde::de::Error::duplicate_field("keyless")); } signature_variant__ = map.next_value::<::std::option::Option<_>>()?.map(any_signature::SignatureVariant::Keyless) -; + ; } } } @@ -819,8 +819,8 @@ impl<'de> serde::Deserialize<'de> for AutomatedTaskMeta { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut sender__ = None; let mut index__ = None; @@ -975,8 +975,8 @@ impl<'de> serde::Deserialize<'de> for AutomatedTransaction { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut meta__ = None; let mut events__ = None; @@ -1125,8 +1125,8 @@ impl<'de> serde::Deserialize<'de> for AutomationPayload { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut automated_function__ = None; let mut expiration_timestamp_secs__ = None; @@ -1709,8 +1709,8 @@ impl<'de> serde::Deserialize<'de> for Block { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut timestamp__ = None; let mut height__ = None; @@ -1859,8 +1859,8 @@ impl<'de> serde::Deserialize<'de> for BlockEndInfo { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut block_gas_limit_reached__ = None; let mut block_output_limit_reached__ = None; @@ -1979,8 +1979,8 @@ impl<'de> serde::Deserialize<'de> for BlockEpilogueTransaction { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut block_end_info__ = None; while let Some(k) = map.next_key()? { @@ -2117,8 +2117,8 @@ impl<'de> serde::Deserialize<'de> for BlockMetadataTransaction { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut id__ = None; let mut round__ = None; @@ -2274,8 +2274,8 @@ impl<'de> serde::Deserialize<'de> for DeleteModule { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut state_key_hash__ = None; @@ -2412,8 +2412,8 @@ impl<'de> serde::Deserialize<'de> for DeleteResource { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut state_key_hash__ = None; @@ -2539,8 +2539,8 @@ impl<'de> serde::Deserialize<'de> for DeleteTableData { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut key__ = None; let mut key_type__ = None; @@ -2666,8 +2666,8 @@ impl<'de> serde::Deserialize<'de> for DeleteTableItem { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut state_key_hash__ = None; let mut handle__ = None; @@ -2793,8 +2793,8 @@ impl<'de> serde::Deserialize<'de> for DirectWriteSet { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut write_set_change__ = None; let mut events__ = None; @@ -2892,8 +2892,8 @@ impl<'de> serde::Deserialize<'de> for Ed25519 { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut signature__ = None; while let Some(k) = map.next_key()? { @@ -2995,8 +2995,8 @@ impl<'de> serde::Deserialize<'de> for Ed25519Signature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut public_key__ = None; let mut signature__ = None; @@ -3107,8 +3107,8 @@ impl<'de> serde::Deserialize<'de> for EntryFunctionId { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut module__ = None; let mut name__ = None; @@ -3235,8 +3235,8 @@ impl<'de> serde::Deserialize<'de> for EntryFunctionPayload { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut function__ = None; let mut type_arguments__ = None; @@ -3388,8 +3388,8 @@ impl<'de> serde::Deserialize<'de> for Event { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut key__ = None; let mut sequence_number__ = None; @@ -3524,8 +3524,8 @@ impl<'de> serde::Deserialize<'de> for EventKey { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut creation_number__ = None; let mut account_address__ = None; @@ -3636,8 +3636,8 @@ impl<'de> serde::Deserialize<'de> for EventSizeInfo { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut type_tag_bytes__ = None; let mut total_bytes__ = None; @@ -3779,8 +3779,8 @@ impl<'de> serde::Deserialize<'de> for FeePayerSignature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut sender__ = None; let mut secondary_signer_addresses__ = None; @@ -3911,8 +3911,8 @@ impl<'de> serde::Deserialize<'de> for GenesisTransaction { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut payload__ = None; let mut events__ = None; @@ -4019,8 +4019,8 @@ impl<'de> serde::Deserialize<'de> for IndexedSignature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut index__ = None; let mut signature__ = None; @@ -4120,8 +4120,8 @@ impl<'de> serde::Deserialize<'de> for Keyless { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut signature__ = None; while let Some(k) = map.next_key()? { @@ -4344,8 +4344,8 @@ impl<'de> serde::Deserialize<'de> for MoveFunction { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut visibility__ = None; @@ -4501,7 +4501,7 @@ impl serde::Serialize for MoveFunctionGenericTypeParam { let v = self.constraints.iter().cloned().map(|v| { MoveAbility::from_i32(v) .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", v))) - }).collect::, _>>()?; + }).collect::, _>>()?; struct_ser.serialize_field("constraints", &v)?; } struct_ser.end() @@ -4558,8 +4558,8 @@ impl<'de> serde::Deserialize<'de> for MoveFunctionGenericTypeParam { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut constraints__ = None; while let Some(k) = map.next_key()? { @@ -4686,8 +4686,8 @@ impl<'de> serde::Deserialize<'de> for MoveModule { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut name__ = None; @@ -4818,8 +4818,8 @@ impl<'de> serde::Deserialize<'de> for MoveModuleBytecode { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut bytecode__ = None; let mut abi__ = None; @@ -4928,8 +4928,8 @@ impl<'de> serde::Deserialize<'de> for MoveModuleId { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut name__ = None; @@ -5036,8 +5036,8 @@ impl<'de> serde::Deserialize<'de> for MoveScriptBytecode { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut bytecode__ = None; let mut abi__ = None; @@ -5102,7 +5102,7 @@ impl serde::Serialize for MoveStruct { let v = self.abilities.iter().cloned().map(|v| { MoveAbility::from_i32(v) .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", v))) - }).collect::, _>>()?; + }).collect::, _>>()?; struct_ser.serialize_field("abilities", &v)?; } if !self.generic_type_params.is_empty() { @@ -5179,8 +5179,8 @@ impl<'de> serde::Deserialize<'de> for MoveStruct { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut is_native__ = None; @@ -5311,8 +5311,8 @@ impl<'de> serde::Deserialize<'de> for MoveStructField { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut name__ = None; let mut r#type__ = None; @@ -5360,7 +5360,7 @@ impl serde::Serialize for MoveStructGenericTypeParam { let v = self.constraints.iter().cloned().map(|v| { MoveAbility::from_i32(v) .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", v))) - }).collect::, _>>()?; + }).collect::, _>>()?; struct_ser.serialize_field("constraints", &v)?; } if self.is_phantom { @@ -5424,8 +5424,8 @@ impl<'de> serde::Deserialize<'de> for MoveStructGenericTypeParam { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut constraints__ = None; let mut is_phantom__ = None; @@ -5551,8 +5551,8 @@ impl<'de> serde::Deserialize<'de> for MoveStructTag { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut module__ = None; @@ -5706,8 +5706,8 @@ impl<'de> serde::Deserialize<'de> for MoveType { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut content__ = None; @@ -5724,14 +5724,14 @@ impl<'de> serde::Deserialize<'de> for MoveType { return Err(serde::de::Error::duplicate_field("vector")); } content__ = map.next_value::<::std::option::Option<_>>()?.map(move_type::Content::Vector) -; + ; } GeneratedField::Struct => { if content__.is_some() { return Err(serde::de::Error::duplicate_field("struct")); } content__ = map.next_value::<::std::option::Option<_>>()?.map(move_type::Content::Struct) -; + ; } GeneratedField::GenericTypeParamIndex => { if content__.is_some() { @@ -5744,7 +5744,7 @@ impl<'de> serde::Deserialize<'de> for MoveType { return Err(serde::de::Error::duplicate_field("reference")); } content__ = map.next_value::<::std::option::Option<_>>()?.map(move_type::Content::Reference) -; + ; } GeneratedField::Unparsable => { if content__.is_some() { @@ -5841,8 +5841,8 @@ impl<'de> serde::Deserialize<'de> for move_type::ReferenceType { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut mutable__ = None; let mut to__ = None; @@ -6072,8 +6072,8 @@ impl<'de> serde::Deserialize<'de> for MultiAgentSignature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut sender__ = None; let mut secondary_signer_addresses__ = None; @@ -6208,8 +6208,8 @@ impl<'de> serde::Deserialize<'de> for MultiEd25519Signature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut public_keys__ = None; let mut signatures__ = None; @@ -6354,8 +6354,8 @@ impl<'de> serde::Deserialize<'de> for MultiKeySignature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut public_keys__ = None; let mut signatures__ = None; @@ -6474,8 +6474,8 @@ impl<'de> serde::Deserialize<'de> for MultisigPayload { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut multisig_address__ = None; let mut transaction_payload__ = None; @@ -6596,8 +6596,8 @@ impl<'de> serde::Deserialize<'de> for MultisigTransactionPayload { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut payload__ = None; @@ -6614,7 +6614,7 @@ impl<'de> serde::Deserialize<'de> for MultisigTransactionPayload { return Err(serde::de::Error::duplicate_field("entryFunctionPayload")); } payload__ = map.next_value::<::std::option::Option<_>>()?.map(multisig_transaction_payload::Payload::EntryFunctionPayload) -; + ; } GeneratedField::AutomationPayload => { if payload__.is_some() { @@ -6798,8 +6798,8 @@ impl<'de> serde::Deserialize<'de> for ScriptPayload { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut code__ = None; let mut type_arguments__ = None; @@ -6915,8 +6915,8 @@ impl<'de> serde::Deserialize<'de> for ScriptWriteSet { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut execute_as__ = None; let mut script__ = None; @@ -7014,8 +7014,8 @@ impl<'de> serde::Deserialize<'de> for Secp256k1Ecdsa { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut signature__ = None; while let Some(k) = map.next_key()? { @@ -7150,8 +7150,8 @@ impl<'de> serde::Deserialize<'de> for Signature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut signature__ = None; @@ -7168,35 +7168,35 @@ impl<'de> serde::Deserialize<'de> for Signature { return Err(serde::de::Error::duplicate_field("ed25519")); } signature__ = map.next_value::<::std::option::Option<_>>()?.map(signature::Signature::Ed25519) -; + ; } GeneratedField::MultiEd25519 => { if signature__.is_some() { return Err(serde::de::Error::duplicate_field("multiEd25519")); } signature__ = map.next_value::<::std::option::Option<_>>()?.map(signature::Signature::MultiEd25519) -; + ; } GeneratedField::MultiAgent => { if signature__.is_some() { return Err(serde::de::Error::duplicate_field("multiAgent")); } signature__ = map.next_value::<::std::option::Option<_>>()?.map(signature::Signature::MultiAgent) -; + ; } GeneratedField::FeePayer => { if signature__.is_some() { return Err(serde::de::Error::duplicate_field("feePayer")); } signature__ = map.next_value::<::std::option::Option<_>>()?.map(signature::Signature::FeePayer) -; + ; } GeneratedField::SingleSender => { if signature__.is_some() { return Err(serde::de::Error::duplicate_field("singleSender")); } signature__ = map.next_value::<::std::option::Option<_>>()?.map(signature::Signature::SingleSender) -; + ; } } } @@ -7373,8 +7373,8 @@ impl<'de> serde::Deserialize<'de> for SingleKeySignature { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut public_key__ = None; let mut signature__ = None; @@ -7472,8 +7472,8 @@ impl<'de> serde::Deserialize<'de> for SingleSender { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut sender__ = None; while let Some(k) = map.next_key()? { @@ -7537,7 +7537,7 @@ impl<'de> serde::Deserialize<'de> for StateCheckpointTransaction { where E: serde::de::Error, { - Err(serde::de::Error::unknown_field(value, FIELDS)) + Err(serde::de::Error::unknown_field(value, FIELDS)) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -7552,8 +7552,8 @@ impl<'de> serde::Deserialize<'de> for StateCheckpointTransaction { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { while map.next_key::()?.is_some() { let _ = map.next_value::()?; @@ -7744,8 +7744,8 @@ impl<'de> serde::Deserialize<'de> for Transaction { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut timestamp__ = None; let mut version__ = None; @@ -7810,49 +7810,49 @@ impl<'de> serde::Deserialize<'de> for Transaction { return Err(serde::de::Error::duplicate_field("blockMetadata")); } txn_data__ = map.next_value::<::std::option::Option<_>>()?.map(transaction::TxnData::BlockMetadata) -; + ; } GeneratedField::Genesis => { if txn_data__.is_some() { return Err(serde::de::Error::duplicate_field("genesis")); } txn_data__ = map.next_value::<::std::option::Option<_>>()?.map(transaction::TxnData::Genesis) -; + ; } GeneratedField::StateCheckpoint => { if txn_data__.is_some() { return Err(serde::de::Error::duplicate_field("stateCheckpoint")); } txn_data__ = map.next_value::<::std::option::Option<_>>()?.map(transaction::TxnData::StateCheckpoint) -; + ; } GeneratedField::User => { if txn_data__.is_some() { return Err(serde::de::Error::duplicate_field("user")); } txn_data__ = map.next_value::<::std::option::Option<_>>()?.map(transaction::TxnData::User) -; + ; } GeneratedField::Validator => { if txn_data__.is_some() { return Err(serde::de::Error::duplicate_field("validator")); } txn_data__ = map.next_value::<::std::option::Option<_>>()?.map(transaction::TxnData::Validator) -; + ; } GeneratedField::BlockEpilogue => { if txn_data__.is_some() { return Err(serde::de::Error::duplicate_field("blockEpilogue")); } txn_data__ = map.next_value::<::std::option::Option<_>>()?.map(transaction::TxnData::BlockEpilogue) -; + ; } GeneratedField::Automated => { if txn_data__.is_some() { return Err(serde::de::Error::duplicate_field("automated")); } txn_data__ = map.next_value::<::std::option::Option<_>>()?.map(transaction::TxnData::Automated) -; + ; } } } @@ -8109,8 +8109,8 @@ impl<'de> serde::Deserialize<'de> for TransactionInfo { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut hash__ = None; let mut state_change_hash__ = None; @@ -8327,8 +8327,8 @@ impl<'de> serde::Deserialize<'de> for TransactionPayload { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut payload__ = None; @@ -8345,35 +8345,35 @@ impl<'de> serde::Deserialize<'de> for TransactionPayload { return Err(serde::de::Error::duplicate_field("entryFunctionPayload")); } payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_payload::Payload::EntryFunctionPayload) -; + ; } GeneratedField::ScriptPayload => { if payload__.is_some() { return Err(serde::de::Error::duplicate_field("scriptPayload")); } payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_payload::Payload::ScriptPayload) -; + ; } GeneratedField::WriteSetPayload => { if payload__.is_some() { return Err(serde::de::Error::duplicate_field("writeSetPayload")); } payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_payload::Payload::WriteSetPayload) -; + ; } GeneratedField::MultisigPayload => { if payload__.is_some() { return Err(serde::de::Error::duplicate_field("multisigPayload")); } payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_payload::Payload::MultisigPayload) -; + ; } GeneratedField::AutomationPayload => { if payload__.is_some() { return Err(serde::de::Error::duplicate_field("automationPayload")); } payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_payload::Payload::AutomationPayload) -; + ; } GeneratedField::AutomationPayloads => { if payload__.is_some() { @@ -8571,8 +8571,8 @@ impl<'de> serde::Deserialize<'de> for TransactionSizeInfo { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut transaction_bytes__ = None; let mut event_size_info__ = None; @@ -8689,8 +8689,8 @@ impl<'de> serde::Deserialize<'de> for UserTransaction { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut request__ = None; let mut events__ = None; @@ -8846,8 +8846,8 @@ impl<'de> serde::Deserialize<'de> for UserTransactionRequest { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut sender__ = None; let mut sequence_number__ = None; @@ -8948,6 +8948,9 @@ impl serde::Serialize for ValidatorTransaction { validator_transaction::ValidatorTransactionType::DkgUpdate(v) => { struct_ser.serialize_field("dkgUpdate", v)?; } + validator_transaction::ValidatorTransactionType::Dkg(v) => { + struct_ser.serialize_field("dkg", v)?; + } } } struct_ser.end() @@ -9012,8 +9015,8 @@ impl<'de> serde::Deserialize<'de> for ValidatorTransaction { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut events__ = None; let mut validator_transaction_type__ = None; @@ -9030,14 +9033,14 @@ impl<'de> serde::Deserialize<'de> for ValidatorTransaction { return Err(serde::de::Error::duplicate_field("observedJwkUpdate")); } validator_transaction_type__ = map.next_value::<::std::option::Option<_>>()?.map(validator_transaction::ValidatorTransactionType::ObservedJwkUpdate) -; + ; } GeneratedField::DkgUpdate => { if validator_transaction_type__.is_some() { return Err(serde::de::Error::duplicate_field("dkgUpdate")); } validator_transaction_type__ = map.next_value::<::std::option::Option<_>>()?.map(validator_transaction::ValidatorTransactionType::DkgUpdate) -; + ; } } } @@ -9120,8 +9123,8 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::DkgUpdate { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut dkg_transcript__ = None; while let Some(k) = map.next_key()? { @@ -9229,8 +9232,8 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::dkg_update::DkgTran } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut epoch__ = None; let mut author__ = None; @@ -9271,7 +9274,7 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::dkg_update::DkgTran deserializer.deserialize_struct("aptos.transaction.v1.ValidatorTransaction.DkgUpdate.DkgTranscript", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for validator_transaction::ObservedJwkUpdate { +impl serde::Serialize for validator_transaction::DkgTransactionData { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9279,30 +9282,30 @@ impl serde::Serialize for validator_transaction::ObservedJwkUpdate { { use serde::ser::SerializeStruct; let mut len = 0; - if self.quorum_certified_update.is_some() { + if self.dkg_data.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("aptos.transaction.v1.ValidatorTransaction.ObservedJwkUpdate", len)?; - if let Some(v) = self.quorum_certified_update.as_ref() { - struct_ser.serialize_field("quorumCertifiedUpdate", v)?; + let mut struct_ser = serializer.serialize_struct("aptos.transaction.v1.ValidatorTransaction.DkgTransactionData", len)?; + if let Some(v) = self.dkg_data.as_ref() { + struct_ser.serialize_field("dkgData", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for validator_transaction::ObservedJwkUpdate { +impl<'de> serde::Deserialize<'de> for validator_transaction::DkgTransactionData { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "quorum_certified_update", - "quorumCertifiedUpdate", + "dkg_data", + "dkgData", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - QuorumCertifiedUpdate, + DkgData, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -9324,7 +9327,7 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::ObservedJwkUpdate { E: serde::de::Error, { match value { - "quorumCertifiedUpdate" | "quorum_certified_update" => Ok(GeneratedField::QuorumCertifiedUpdate), + "dkgData" | "dkg_data" => Ok(GeneratedField::DkgData), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -9334,15 +9337,297 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::ObservedJwkUpdate { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = validator_transaction::ObservedJwkUpdate; + type Value = validator_transaction::DkgTransactionData; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct aptos.transaction.v1.ValidatorTransaction.ObservedJwkUpdate") + formatter.write_str("struct aptos.transaction.v1.ValidatorTransaction.DkgTransactionData") } - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut dkg_data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::DkgData => { + if dkg_data__.is_some() { + return Err(serde::de::Error::duplicate_field("dkgData")); + } + dkg_data__ = map.next_value()?; + } + } + } + Ok(validator_transaction::DkgTransactionData { + dkg_data: dkg_data__, + }) + } + } + deserializer.deserialize_struct("aptos.transaction.v1.ValidatorTransaction.DkgTransactionData", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for validator_transaction::dkg_data::DkgTransactionData { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.epoch != 0 { + len += 1; + } + if !self.author.is_empty() { + len += 1; + } + if !self.bls_aggregate_signature.is_empty() { + len += 1; + } + if !self.signer_indices_clan_committee.is_empty() { + len += 1; + } + if self.transaction_type != 0 { + len += 1; + } + if !self.payload.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("aptos.transaction.v1.ValidatorTransaction.DkgTransactionData.DkgTransactionData", len)?; + if self.epoch != 0 { + struct_ser.serialize_field("epoch", ToString::to_string(&self.epoch).as_str())?; + } + if !self.author.is_empty() { + struct_ser.serialize_field("author", &self.author)?; + } + if !self.bls_aggregate_signature.is_empty() { + struct_ser.serialize_field("blsAggregateSignature", pbjson::private::base64::encode(&self.bls_aggregate_signature).as_str())?; + } + if !self.signer_indices_clan_committee.is_empty() { + struct_ser.serialize_field("signerIndicesClanCommittee", &self.signer_indices_clan_committee.iter().map(ToString::to_string).collect::>())?; + } + if self.transaction_type != 0 { + struct_ser.serialize_field("transactionType", ToString::to_string(&self.transaction_type).as_str())?; + } + if !self.payload.is_empty() { + struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for validator_transaction::dkg_data::DkgTransactionData { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "epoch", + "author", + "bls_aggregate_signature", + "blsAggregateSignature", + "signer_indices_clan_committee", + "signerIndicesClanCommittee", + "transaction_type", + "transactionType", + "payload", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Epoch, + Author, + BlsAggregateSignature, + SignerIndicesClanCommittee, + TransactionType, + Payload, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "epoch" => Ok(GeneratedField::Epoch), + "author" => Ok(GeneratedField::Author), + "blsAggregateSignature" | "bls_aggregate_signature" => Ok(GeneratedField::BlsAggregateSignature), + "signerIndicesClanCommittee" | "signer_indices_clan_committee" => Ok(GeneratedField::SignerIndicesClanCommittee), + "transactionType" | "transaction_type" => Ok(GeneratedField::TransactionType), + "payload" => Ok(GeneratedField::Payload), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = validator_transaction::dkg_data::DkgTransactionData; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct aptos.transaction.v1.ValidatorTransaction.DkgTransactionData.DkgTransactionData") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut epoch__ = None; + let mut author__ = None; + let mut bls_aggregate_signature__ = None; + let mut signer_indices_clan_committee__ = None; + let mut transaction_type__ = None; + let mut payload__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Epoch => { + if epoch__.is_some() { + return Err(serde::de::Error::duplicate_field("epoch")); + } + epoch__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Author => { + if author__.is_some() { + return Err(serde::de::Error::duplicate_field("author")); + } + author__ = Some(map.next_value()?); + } + GeneratedField::BlsAggregateSignature => { + if bls_aggregate_signature__.is_some() { + return Err(serde::de::Error::duplicate_field("blsAggregateSignature")); + } + bls_aggregate_signature__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + GeneratedField::SignerIndicesClanCommittee => { + if signer_indices_clan_committee__.is_some() { + return Err(serde::de::Error::duplicate_field("signerIndicesClanCommittee")); + } + signer_indices_clan_committee__ = + Some(map.next_value::>>()? + .into_iter().map(|x| x.0).collect()) + ; + } + GeneratedField::TransactionType => { + if transaction_type__.is_some() { + return Err(serde::de::Error::duplicate_field("transactionType")); + } + transaction_type__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Payload => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("payload")); + } + payload__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(validator_transaction::dkg_data::DkgTransactionData { + epoch: epoch__.unwrap_or_default(), + author: author__.unwrap_or_default(), + bls_aggregate_signature: bls_aggregate_signature__.unwrap_or_default(), + signer_indices_clan_committee: signer_indices_clan_committee__.unwrap_or_default(), + transaction_type: transaction_type__.unwrap_or_default(), + payload: payload__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("aptos.transaction.v1.ValidatorTransaction.DkgTransactionData.DkgTransactionData", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for validator_transaction::ObservedJwkUpdate { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.quorum_certified_update.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("aptos.transaction.v1.ValidatorTransaction.ObservedJwkUpdate", len)?; + if let Some(v) = self.quorum_certified_update.as_ref() { + struct_ser.serialize_field("quorumCertifiedUpdate", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for validator_transaction::ObservedJwkUpdate { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "quorum_certified_update", + "quorumCertifiedUpdate", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + QuorumCertifiedUpdate, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "quorumCertifiedUpdate" | "quorum_certified_update" => Ok(GeneratedField::QuorumCertifiedUpdate), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = validator_transaction::ObservedJwkUpdate; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct aptos.transaction.v1.ValidatorTransaction.ObservedJwkUpdate") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, { let mut quorum_certified_update__ = None; while let Some(k) = map.next_key()? { @@ -9442,8 +9727,8 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::observed_jwk_update } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut signer_indices__ = None; let mut sig__ = None; @@ -9564,8 +9849,8 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::observed_jwk_update } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut issuer__ = None; let mut version__ = None; @@ -9684,8 +9969,8 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::observed_jwk_update } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut jwk_type__ = None; while let Some(k) = map.next_key()? { @@ -9695,14 +9980,14 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::observed_jwk_update return Err(serde::de::Error::duplicate_field("unsupportedJwk")); } jwk_type__ = map.next_value::<::std::option::Option<_>>()?.map(validator_transaction::observed_jwk_update::exported_provider_jw_ks::jwk::JwkType::UnsupportedJwk) -; + ; } GeneratedField::Rsa => { if jwk_type__.is_some() { return Err(serde::de::Error::duplicate_field("rsa")); } jwk_type__ = map.next_value::<::std::option::Option<_>>()?.map(validator_transaction::observed_jwk_update::exported_provider_jw_ks::jwk::JwkType::Rsa) -; + ; } } } @@ -9819,8 +10104,8 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::observed_jwk_update } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut kid__ = None; let mut kty__ = None; @@ -9951,8 +10236,8 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::observed_jwk_update } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut id__ = None; let mut payload__ = None; @@ -10064,8 +10349,8 @@ impl<'de> serde::Deserialize<'de> for validator_transaction::observed_jwk_update } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut update__ = None; let mut multi_sig__ = None; @@ -10163,8 +10448,8 @@ impl<'de> serde::Deserialize<'de> for WebAuthn { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut signature__ = None; while let Some(k) = map.next_key()? { @@ -10275,8 +10560,8 @@ impl<'de> serde::Deserialize<'de> for WriteModule { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut state_key_hash__ = None; @@ -10395,8 +10680,8 @@ impl<'de> serde::Deserialize<'de> for WriteOpSizeInfo { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut key_bytes__ = None; let mut value_bytes__ = None; @@ -10536,8 +10821,8 @@ impl<'de> serde::Deserialize<'de> for WriteResource { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut address__ = None; let mut state_key_hash__ = None; @@ -10685,8 +10970,8 @@ impl<'de> serde::Deserialize<'de> for WriteSet { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut write_set_type__ = None; let mut write_set__ = None; @@ -10703,14 +10988,14 @@ impl<'de> serde::Deserialize<'de> for WriteSet { return Err(serde::de::Error::duplicate_field("scriptWriteSet")); } write_set__ = map.next_value::<::std::option::Option<_>>()?.map(write_set::WriteSet::ScriptWriteSet) -; + ; } GeneratedField::DirectWriteSet => { if write_set__.is_some() { return Err(serde::de::Error::duplicate_field("directWriteSet")); } write_set__ = map.next_value::<::std::option::Option<_>>()?.map(write_set::WriteSet::DirectWriteSet) -; + ; } } } @@ -10919,8 +11204,8 @@ impl<'de> serde::Deserialize<'de> for WriteSetChange { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut r#type__ = None; let mut change__ = None; @@ -10937,42 +11222,42 @@ impl<'de> serde::Deserialize<'de> for WriteSetChange { return Err(serde::de::Error::duplicate_field("deleteModule")); } change__ = map.next_value::<::std::option::Option<_>>()?.map(write_set_change::Change::DeleteModule) -; + ; } GeneratedField::DeleteResource => { if change__.is_some() { return Err(serde::de::Error::duplicate_field("deleteResource")); } change__ = map.next_value::<::std::option::Option<_>>()?.map(write_set_change::Change::DeleteResource) -; + ; } GeneratedField::DeleteTableItem => { if change__.is_some() { return Err(serde::de::Error::duplicate_field("deleteTableItem")); } change__ = map.next_value::<::std::option::Option<_>>()?.map(write_set_change::Change::DeleteTableItem) -; + ; } GeneratedField::WriteModule => { if change__.is_some() { return Err(serde::de::Error::duplicate_field("writeModule")); } change__ = map.next_value::<::std::option::Option<_>>()?.map(write_set_change::Change::WriteModule) -; + ; } GeneratedField::WriteResource => { if change__.is_some() { return Err(serde::de::Error::duplicate_field("writeResource")); } change__ = map.next_value::<::std::option::Option<_>>()?.map(write_set_change::Change::WriteResource) -; + ; } GeneratedField::WriteTableItem => { if change__.is_some() { return Err(serde::de::Error::duplicate_field("writeTableItem")); } change__ = map.next_value::<::std::option::Option<_>>()?.map(write_set_change::Change::WriteTableItem) -; + ; } } } @@ -11143,8 +11428,8 @@ impl<'de> serde::Deserialize<'de> for WriteSetPayload { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut write_set__ = None; while let Some(k) = map.next_key()? { @@ -11263,8 +11548,8 @@ impl<'de> serde::Deserialize<'de> for WriteTableData { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut key__ = None; let mut key_type__ = None; @@ -11406,8 +11691,8 @@ impl<'de> serde::Deserialize<'de> for WriteTableItem { } fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + where + V: serde::de::MapAccess<'de>, { let mut state_key_hash__ = None; let mut handle__ = None; @@ -11453,4 +11738,4 @@ impl<'de> serde::Deserialize<'de> for WriteTableItem { } deserializer.deserialize_struct("aptos.transaction.v1.WriteTableItem", FIELDS, GeneratedVisitor) } -} +} \ No newline at end of file diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 30329882ad821..68afe52383ab5 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.78.0" +channel = "1.89.0" # Note: we don't specify cargofmt in our toolchain because we rely on # the nightly version of cargofmt and verify formatting in CI/CD. diff --git a/sdk/src/transaction_builder.rs b/sdk/src/transaction_builder.rs index 7b048adbb34e1..9cbca9ef9263f 100644 --- a/sdk/src/transaction_builder.rs +++ b/sdk/src/transaction_builder.rs @@ -174,14 +174,14 @@ impl TransactionFactory { &self, additional_owners: Vec, signatures_required: u64, - timeout_duration: u64, + timeout_duration: u64, ) -> TransactionBuilder { self.payload(aptos_stdlib::multisig_account_create_with_owners( additional_owners, signatures_required, vec![], vec![], - timeout_duration, + timeout_duration, )) } diff --git a/storage/aptosdb/Cargo.toml b/storage/aptosdb/Cargo.toml index a3a5c3d439002..19890caff8974 100644 --- a/storage/aptosdb/Cargo.toml +++ b/storage/aptosdb/Cargo.toml @@ -72,6 +72,23 @@ rand = { workspace = true } [features] default = [] -fuzzing = ["proptest", "proptest-derive", "aptos-proptest-helpers", "aptos-temppath", "aptos-crypto/fuzzing", "aptos-jellyfish-merkle/fuzzing", "aptos-types/fuzzing", "aptos-executor-types/fuzzing", "aptos-schemadb/fuzzing", "aptos-scratchpad/fuzzing"] +fuzzing = [ + "proptest", + "proptest-derive", + "aptos-proptest-helpers", + "aptos-temppath", + "aptos-crypto/fuzzing", + "aptos-jellyfish-merkle/fuzzing", + "aptos-types/fuzzing", + "aptos-executor-types/fuzzing", + "aptos-schemadb/fuzzing", + "aptos-scratchpad/fuzzing", +] consensus-only-perf-test = [] -db-debugger = ["aptos-temppath", "clap", "crossbeam-channel", "owo-colors", "indicatif"] +db-debugger = [ + "aptos-temppath", + "clap", + "crossbeam-channel", + "owo-colors", + "indicatif", +] diff --git a/storage/backup/backup-cli/src/backup_types/transaction/analysis.rs b/storage/backup/backup-cli/src/backup_types/transaction/analysis.rs index 605a139648d5b..172e33a5bec55 100644 --- a/storage/backup/backup-cli/src/backup_types/transaction/analysis.rs +++ b/storage/backup/backup-cli/src/backup_types/transaction/analysis.rs @@ -114,8 +114,9 @@ impl TransactionAnalysis { match txn { UserTransaction(signed_txn) => signed_txn.raw_txn_bytes_len(), - AutomatedTransaction(automated_txn) - | SystemAutomatedTransaction(automated_txn) => automated_txn.raw_txn_bytes_len(), + AutomatedTransaction(automated_txn) | SystemAutomatedTransaction(automated_txn) => { + automated_txn.raw_txn_bytes_len() + }, GenesisTransaction(_) | BlockMetadata(_) | BlockMetadataExt(_) diff --git a/storage/indexer_schemas/Cargo.toml b/storage/indexer_schemas/Cargo.toml index 1768053160c89..639a54c1ebca5 100644 --- a/storage/indexer_schemas/Cargo.toml +++ b/storage/indexer_schemas/Cargo.toml @@ -33,4 +33,9 @@ rand = { workspace = true } [features] default = [] -fuzzing = ["proptest", "proptest-derive", "aptos-types/fuzzing", "aptos-schemadb/fuzzing"] +fuzzing = [ + "proptest", + "proptest-derive", + "aptos-types/fuzzing", + "aptos-schemadb/fuzzing", +] diff --git a/storage/jellyfish-merkle/Cargo.toml b/storage/jellyfish-merkle/Cargo.toml index 3894481f9d179..d2438ad608f83 100644 --- a/storage/jellyfish-merkle/Cargo.toml +++ b/storage/jellyfish-merkle/Cargo.toml @@ -45,4 +45,9 @@ rand = { workspace = true } [features] default = [] -fuzzing = ["proptest", "proptest-derive", "aptos-crypto/fuzzing", "aptos-types/fuzzing"] +fuzzing = [ + "proptest", + "proptest-derive", + "aptos-crypto/fuzzing", + "aptos-types/fuzzing", +] diff --git a/testsuite/forge/Cargo.toml b/testsuite/forge/Cargo.toml index caa3c1f34ba78..7ab69e5b22920 100644 --- a/testsuite/forge/Cargo.toml +++ b/testsuite/forge/Cargo.toml @@ -44,9 +44,14 @@ hyper = { workspace = true } itertools = { workspace = true } json-patch = { workspace = true } k8s-openapi = { version = "0.13.1", default-features = false, features = [ - "v1_22", + "v1_22", +] } +kube = { version = "0.65.0", default-features = false, features = [ + "jsonpatch", + "client", + "rustls-tls", + "derive", ] } -kube = { version = "0.65.0", default-features = false, features = ["jsonpatch", "client", "rustls-tls", "derive"] } num_cpus = { workspace = true } once_cell = { workspace = true } prometheus-http-query = { workspace = true } diff --git a/testsuite/fuzzer/.cargo/config.toml b/testsuite/fuzzer/.cargo/config.toml index 94b9a7ade260b..3e4d65a48d0cc 100644 --- a/testsuite/fuzzer/.cargo/config.toml +++ b/testsuite/fuzzer/.cargo/config.toml @@ -1,7 +1,25 @@ target-applies-to-host = false [host.aarch64-apple-darwin] -rustflags = ["--cfg", "tokio_unstable", "-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes"] +rustflags = [ + "--cfg", + "tokio_unstable", + "-C", + "force-frame-pointers=yes", + "-C", + "force-unwind-tables=yes", +] [host.x86_64-unknown-linux-gnu] -rustflags = ["--cfg", "tokio_unstable", "-C", "link-arg=-fuse-ld=lld", "-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes", "-C", "target-feature=+sse4.2"] +rustflags = [ + "--cfg", + "tokio_unstable", + "-C", + "link-arg=-fuse-ld=lld", + "-C", + "force-frame-pointers=yes", + "-C", + "force-unwind-tables=yes", + "-C", + "target-feature=+sse4.2", +] diff --git a/testsuite/pyproject.toml b/testsuite/pyproject.toml index 3eb002623c0ae..fad50f770ae4e 100644 --- a/testsuite/pyproject.toml +++ b/testsuite/pyproject.toml @@ -27,4 +27,4 @@ build-backend = "poetry.core.masonry.api" [tool.pyright] reportUndefinedVariable = "none" -typeCheckingMode = "basic" # TODO(rustielin): eventually make this strict +typeCheckingMode = "basic" # TODO(rustielin): eventually make this strict diff --git a/testsuite/smoke-test/Cargo.toml b/testsuite/smoke-test/Cargo.toml index 31d1d2339702a..547438b3ac7d6 100644 --- a/testsuite/smoke-test/Cargo.toml +++ b/testsuite/smoke-test/Cargo.toml @@ -46,11 +46,11 @@ aptos-types = { workspace = true } aptos-vm = { workspace = true } bcs = { workspace = true } diesel = { workspace = true, features = [ - "chrono", - "postgres", - "r2d2", - "numeric", - "serde_json", + "chrono", + "postgres", + "r2d2", + "numeric", + "serde_json", ] } digest = { workspace = true } hex = { workspace = true } @@ -80,4 +80,3 @@ regex = { workspace = true } reqwest = { workspace = true } serde_yaml = { workspace = true } tempfile = { workspace = true } - diff --git a/third_party/move/extensions/async/move-async-vm/Cargo.toml b/third_party/move/extensions/async/move-async-vm/Cargo.toml index e26411780b9f4..4546557fa27bb 100644 --- a/third_party/move/extensions/async/move-async-vm/Cargo.toml +++ b/third_party/move/extensions/async/move-async-vm/Cargo.toml @@ -17,7 +17,9 @@ move-binary-format = { path = "../../../move-binary-format" } move-command-line-common = { path = "../../../move-command-line-common" } move-compiler = { path = "../../../move-compiler" } move-core-types = { path = "../../../move-core/types" } -move-vm-runtime = { path = "../../../move-vm/runtime", features = ["debugging"] } +move-vm-runtime = { path = "../../../move-vm/runtime", features = [ + "debugging", +] } move-vm-test-utils = { path = "../../../move-vm/test-utils" } move-vm-types = { path = "../../../move-vm/types" } sha3 = { workspace = true } diff --git a/third_party/move/extensions/move-table-extension/Cargo.toml b/third_party/move/extensions/move-table-extension/Cargo.toml index 1dee926a611e0..7dbaa3a4cd770 100644 --- a/third_party/move/extensions/move-table-extension/Cargo.toml +++ b/third_party/move/extensions/move-table-extension/Cargo.toml @@ -22,5 +22,7 @@ smallvec = { workspace = true } move-cli = { path = "../../tools/move-cli" } move-package = { path = "../../tools/move-package" } move-stdlib = { path = "../../move-stdlib", features = ["testing"] } -move-unit-test = { path = "../../tools/move-unit-test", features = ["table-extension"] } +move-unit-test = { path = "../../tools/move-unit-test", features = [ + "table-extension", +] } tempfile = { workspace = true } diff --git a/third_party/move/move-binary-format/Cargo.toml b/third_party/move/move-binary-format/Cargo.toml index eac71298e6626..4cce56ee7478d 100644 --- a/third_party/move/move-binary-format/Cargo.toml +++ b/third_party/move/move-binary-format/Cargo.toml @@ -30,5 +30,10 @@ serde_json = { workspace = true } [features] default = [] -fuzzing = ["proptest", "proptest-derive", "arbitrary", "move-core-types/fuzzing"] +fuzzing = [ + "proptest", + "proptest-derive", + "arbitrary", + "move-core-types/fuzzing", +] testing = [] diff --git a/third_party/move/move-bytecode-verifier/bytecode-verifier-tests/Cargo.toml b/third_party/move/move-bytecode-verifier/bytecode-verifier-tests/Cargo.toml index 4e5c437cddfdb..edce5afabff8c 100644 --- a/third_party/move/move-bytecode-verifier/bytecode-verifier-tests/Cargo.toml +++ b/third_party/move/move-bytecode-verifier/bytecode-verifier-tests/Cargo.toml @@ -13,7 +13,9 @@ edition = "2021" fail = { workspace = true, features = ['failpoints'] } hex = { workspace = true } invalid-mutations = { path = "../invalid-mutations" } -move-binary-format = { path = "../../move-binary-format", features = ["fuzzing"] } +move-binary-format = { path = "../../move-binary-format", features = [ + "fuzzing", +] } move-bytecode-verifier = { path = "../" } move-core-types = { path = "../../move-core/types" } petgraph = { workspace = true } diff --git a/third_party/move/move-bytecode-verifier/fuzz/Cargo.toml b/third_party/move/move-bytecode-verifier/fuzz/Cargo.toml index c89658cc77f8c..5eb1bdb8259f8 100644 --- a/third_party/move/move-bytecode-verifier/fuzz/Cargo.toml +++ b/third_party/move/move-bytecode-verifier/fuzz/Cargo.toml @@ -12,7 +12,9 @@ cargo-fuzz = true [dependencies] arbitrary = { workspace = true } libfuzzer-sys = { workspace = true } -move-binary-format = { path = "../../move-binary-format", features = ["fuzzing"] } +move-binary-format = { path = "../../move-binary-format", features = [ + "fuzzing", +] } move-bytecode-verifier = { path = "../" } move-core-types = { path = "../../move-core/types", features = ["fuzzing"] } # Prevent this from interfering with workspaces diff --git a/third_party/move/move-core/types/Cargo.toml b/third_party/move/move-core/types/Cargo.toml index 591721a90796a..3efc4a5a98ca6 100644 --- a/third_party/move/move-core/types/Cargo.toml +++ b/third_party/move/move-core/types/Cargo.toml @@ -11,7 +11,9 @@ edition = "2021" [dependencies] anyhow = { workspace = true } -arbitrary = { workspace = true, features = ["derive_arbitrary"], optional = true } +arbitrary = { workspace = true, features = [ + "derive_arbitrary", +], optional = true } bcs = { workspace = true } bytes = { workspace = true } ethnum = { workspace = true } diff --git a/third_party/move/move-core/types/src/vm_status.rs b/third_party/move/move-core/types/src/vm_status.rs index e02d1d675da22..77afbb355f329 100644 --- a/third_party/move/move-core/types/src/vm_status.rs +++ b/third_party/move/move-core/types/src/vm_status.rs @@ -609,7 +609,26 @@ pub enum StatusCode { // Gas unit price capacity submitted for the automation-task is above the maximum // gas price set in the VM. AUTOMATION_TASK_GAS_PRICE_CAP_ABOVE_MAX_BOUND = 50, - + // DKG session is currently not in progress + DKG_SESSION_NOT_IN_PROGRESS = 51, + // DKG transaction has a future epoch number + DKG_TRANSACTION_FUTURE_EPOCH_NUM = 52, + // DKG transaction has a past epoch number + DKG_TRANSACTION_PAST_EPOCH_NUM = 53, + // DKG meta has already set so DKGMeta transaction should fail + DKG_META_ALREADY_SET = 54, + // DKG transaction data is invalid + DKG_TRANSACTION_NOT_VALID = 55, + // The sender of the dkg transaction is not a family node + DKG_TRANSACTION_SENDER_NOT_FAMILY_NODE = 56, + // Failed to get the public keys for the signer clan nodes + DKG_FAILED_TO_GET_CLAN_NODE_PUBKEYS = 57, + // Failed to deserialize the aggregated signature + DKG_FAILED_TO_DESER_AGG_SIG = 58, + // Failed to aggregate the public keys for the signer clan nodes + DKG_FAILED_TO_AGGREGATE_PUBLIC_KEYS = 59, + // Failed to verify the clan committee aggregated signature + DKG_AGG_SIG_VERIFICATION_FAILED = 60, // When a code module/script is published it is verified. These are the // possible errors that can arise from the verification process. // Verification Errors: 1000-1999 diff --git a/third_party/move/move-examples/diem-framework/crates/crypto/Cargo.toml b/third_party/move/move-examples/diem-framework/crates/crypto/Cargo.toml index 7c07613b50bdf..07bebc1b12444 100644 --- a/third_party/move/move-examples/diem-framework/crates/crypto/Cargo.toml +++ b/third_party/move/move-examples/diem-framework/crates/crypto/Cargo.toml @@ -10,10 +10,15 @@ license = "Apache-2.0" aes-gcm = { workspace = true } anyhow = { workspace = true } bytes = { workspace = true } -curve25519-dalek = { workspace = true, package = "curve25519-dalek-fiat", features = ["std"] } +curve25519-dalek = { workspace = true, package = "curve25519-dalek-fiat", features = [ + "std", +] } diem-crypto-derive = { path = "../crypto-derive" } digest = { workspace = true } -ed25519-dalek = { workspace = true, package = "ed25519-dalek-fiat", features = ["std", "serde"] } +ed25519-dalek = { workspace = true, package = "ed25519-dalek-fiat", features = [ + "std", + "serde", +] } hex = { workspace = true } hkdf = { workspace = true } mirai-annotations = { workspace = true } @@ -28,7 +33,9 @@ sha2 = { workspace = true } static_assertions = { workspace = true } thiserror = { workspace = true } tiny-keccak = { workspace = true, features = ["sha3"] } -x25519-dalek = { workspace = true, package = "x25519-dalek-fiat", features = ["std"] } +x25519-dalek = { workspace = true, package = "x25519-dalek-fiat", features = [ + "std", +] } bcs = { workspace = true } @@ -49,9 +56,21 @@ default = ["fiat"] assert-private-keys-not-cloneable = [] cloneable-private-keys = [] fuzzing = ["proptest", "proptest-derive", "cloneable-private-keys"] -fiat = ["curve25519-dalek/fiat_u64_backend", "ed25519-dalek/fiat_u64_backend", "x25519-dalek/fiat_u64_backend"] -u64 = ["curve25519-dalek/u64_backend", "ed25519-dalek/u64_backend", "x25519-dalek/u64_backend"] -u32 = ["curve25519-dalek/u32_backend", "ed25519-dalek/u32_backend", "x25519-dalek/u32_backend"] +fiat = [ + "curve25519-dalek/fiat_u64_backend", + "ed25519-dalek/fiat_u64_backend", + "x25519-dalek/fiat_u64_backend", +] +u64 = [ + "curve25519-dalek/u64_backend", + "ed25519-dalek/u64_backend", + "x25519-dalek/u64_backend", +] +u32 = [ + "curve25519-dalek/u32_backend", + "ed25519-dalek/u32_backend", + "x25519-dalek/u32_backend", +] [[bench]] name = "noise" diff --git a/third_party/move/move-prover/lab/Cargo.toml b/third_party/move/move-prover/lab/Cargo.toml index 58d250941ebd0..95e949f5b6241 100644 --- a/third_party/move/move-prover/lab/Cargo.toml +++ b/third_party/move/move-prover/lab/Cargo.toml @@ -25,7 +25,7 @@ codespan-reporting = { workspace = true } itertools = { workspace = true } log = { workspace = true, features = ["serde"] } plotters = { workspace = true, features = [ - "evcxr", - "line_series", - "histogram", + "evcxr", + "line_series", + "histogram", ] } diff --git a/third_party/move/move-prover/lab/data/aptos-framework/prover.toml b/third_party/move/move-prover/lab/data/aptos-framework/prover.toml index a2468e645a5e7..6537a808ccfee 100644 --- a/third_party/move/move-prover/lab/data/aptos-framework/prover.toml +++ b/third_party/move/move-prover/lab/data/aptos-framework/prover.toml @@ -1,14 +1,14 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-framework/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-framework/sources", ] diff --git a/third_party/move/move-prover/lab/data/diem-framework/prover.toml b/third_party/move/move-prover/lab/data/diem-framework/prover.toml index 5c0fe4c002f72..b990557b1d6da 100644 --- a/third_party/move/move-prover/lab/data/diem-framework/prover.toml +++ b/third_party/move/move-prover/lab/data/diem-framework/prover.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "DiemFramework=0x1", - "DiemRoot=0xA550C18", - "TreasuryCompliance=0xB1E55ED", - "CurrencyInfo=0xA550C18", - "VMReserved=0x0", + "std=0x1", + "DiemFramework=0x1", + "DiemRoot=0xA550C18", + "TreasuryCompliance=0xB1E55ED", + "CurrencyInfo=0xA550C18", + "VMReserved=0x0", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-framework/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-framework/sources", ] diff --git a/third_party/move/move-prover/lab/data/mono/mono_backend.toml b/third_party/move/move-prover/lab/data/mono/mono_backend.toml index e69de29bb2d1d..8b137891791fe 100644 --- a/third_party/move/move-prover/lab/data/mono/mono_backend.toml +++ b/third_party/move/move-prover/lab/data/mono/mono_backend.toml @@ -0,0 +1 @@ + diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_1.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_1.toml index a2468e645a5e7..6537a808ccfee 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_1.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_1.toml @@ -1,14 +1,14 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-framework/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-framework/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_2.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_2.toml index a2468e645a5e7..6537a808ccfee 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_2.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_2.toml @@ -1,14 +1,14 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-framework/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-framework/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_3.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_3.toml index a2468e645a5e7..6537a808ccfee 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_3.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/current_boogie_3.toml @@ -1,14 +1,14 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-framework/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-framework/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_1.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_1.toml index a2468e645a5e7..6537a808ccfee 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_1.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_1.toml @@ -1,14 +1,14 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-framework/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-framework/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_2.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_2.toml index a2468e645a5e7..6537a808ccfee 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_2.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_2.toml @@ -1,14 +1,14 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-framework/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-framework/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_3.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_3.toml index a2468e645a5e7..6537a808ccfee 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_3.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-framework/new_boogie_3.toml @@ -1,14 +1,14 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-framework/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-framework/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_1.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_1.toml index beb39012e9e85..d215563a2d26d 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_1.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_1.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_2.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_2.toml index beb39012e9e85..d215563a2d26d 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_2.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_2.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_3.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_3.toml index beb39012e9e85..d215563a2d26d 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_3.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/current_boogie_3.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_1.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_1.toml index beb39012e9e85..d215563a2d26d 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_1.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_1.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_2.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_2.toml index beb39012e9e85..d215563a2d26d 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_2.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_2.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_3.toml b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_3.toml index beb39012e9e85..d215563a2d26d 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_3.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-aptos-stdlib/new_boogie_3.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "aptos_std=0x1", - "aptos_framework=0x1", - "aptos_token=0x3", - "core_resources=0xA550C18", - "vm_reserved=0x0", - "Extensions=0x1", + "std=0x1", + "aptos_std=0x1", + "aptos_framework=0x1", + "aptos_token=0x3", + "core_resources=0xA550C18", + "vm_reserved=0x0", + "Extensions=0x1", ] move_deps = [ - "../../../../../../aptos-move/framework/move-stdlib/sources", - "../../../../../../aptos-move/framework/aptos-stdlib/sources", + "../../../../../../aptos-move/framework/move-stdlib/sources", + "../../../../../../aptos-move/framework/aptos-stdlib/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/current_boogie.toml b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/current_boogie.toml index 394a15e27d78b..46c347b222bfa 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/current_boogie.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/current_boogie.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "DiemFramework=0x1", - "DiemRoot=0xA550C18", - "TreasuryCompliance=0xB1E55ED", - "CurrencyInfo=0xA550C18", - "VMReserved=0x0", + "std=0x1", + "DiemFramework=0x1", + "DiemRoot=0xA550C18", + "TreasuryCompliance=0xB1E55ED", + "CurrencyInfo=0xA550C18", + "VMReserved=0x0", ] move_deps = [ - "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", - "../../../../move-stdlib/sources", - "../../../../move-stdlib/nursery/sources", + "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", + "../../../../move-stdlib/sources", + "../../../../move-stdlib/nursery/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie.toml b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie.toml index 394a15e27d78b..46c347b222bfa 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "DiemFramework=0x1", - "DiemRoot=0xA550C18", - "TreasuryCompliance=0xB1E55ED", - "CurrencyInfo=0xA550C18", - "VMReserved=0x0", + "std=0x1", + "DiemFramework=0x1", + "DiemRoot=0xA550C18", + "TreasuryCompliance=0xB1E55ED", + "CurrencyInfo=0xA550C18", + "VMReserved=0x0", ] move_deps = [ - "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", - "../../../../move-stdlib/sources", - "../../../../move-stdlib/nursery/sources", + "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", + "../../../../move-stdlib/sources", + "../../../../move-stdlib/nursery/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_1.toml b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_1.toml index 394a15e27d78b..46c347b222bfa 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_1.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_1.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "DiemFramework=0x1", - "DiemRoot=0xA550C18", - "TreasuryCompliance=0xB1E55ED", - "CurrencyInfo=0xA550C18", - "VMReserved=0x0", + "std=0x1", + "DiemFramework=0x1", + "DiemRoot=0xA550C18", + "TreasuryCompliance=0xB1E55ED", + "CurrencyInfo=0xA550C18", + "VMReserved=0x0", ] move_deps = [ - "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", - "../../../../move-stdlib/sources", - "../../../../move-stdlib/nursery/sources", + "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", + "../../../../move-stdlib/sources", + "../../../../move-stdlib/nursery/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_2.toml b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_2.toml index 394a15e27d78b..46c347b222bfa 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_2.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_2.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "DiemFramework=0x1", - "DiemRoot=0xA550C18", - "TreasuryCompliance=0xB1E55ED", - "CurrencyInfo=0xA550C18", - "VMReserved=0x0", + "std=0x1", + "DiemFramework=0x1", + "DiemRoot=0xA550C18", + "TreasuryCompliance=0xB1E55ED", + "CurrencyInfo=0xA550C18", + "VMReserved=0x0", ] move_deps = [ - "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", - "../../../../move-stdlib/sources", - "../../../../move-stdlib/nursery/sources", + "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", + "../../../../move-stdlib/sources", + "../../../../move-stdlib/nursery/sources", ] diff --git a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_3.toml b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_3.toml index 394a15e27d78b..46c347b222bfa 100644 --- a/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_3.toml +++ b/third_party/move/move-prover/lab/data/new-boogie-diem-framework/new_boogie_3.toml @@ -1,13 +1,13 @@ move_named_address_values = [ - "std=0x1", - "DiemFramework=0x1", - "DiemRoot=0xA550C18", - "TreasuryCompliance=0xB1E55ED", - "CurrencyInfo=0xA550C18", - "VMReserved=0x0", + "std=0x1", + "DiemFramework=0x1", + "DiemRoot=0xA550C18", + "TreasuryCompliance=0xB1E55ED", + "CurrencyInfo=0xA550C18", + "VMReserved=0x0", ] move_deps = [ - "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", - "../../../../move-stdlib/sources", - "../../../../move-stdlib/nursery/sources", + "../../../../documentation/examples/diem-framework/move-packages/DPN/sources", + "../../../../move-stdlib/sources", + "../../../../move-stdlib/nursery/sources", ] diff --git a/third_party/move/move-prover/lab/data/test/prover_stdlib.toml b/third_party/move/move-prover/lab/data/test/prover_stdlib.toml index 793c70611ffa7..5177472aa2dc7 100644 --- a/third_party/move/move-prover/lab/data/test/prover_stdlib.toml +++ b/third_party/move/move-prover/lab/data/test/prover_stdlib.toml @@ -1,5 +1,5 @@ move_named_address_values = ["std=0x1"] move_deps = [ - "../../../../move-stdlib/sources", - "../../../../move-stdlib/nursery/sources", + "../../../../move-stdlib/sources", + "../../../../move-stdlib/nursery/sources", ] diff --git a/third_party/move/move-vm/integration-tests/Cargo.toml b/third_party/move/move-vm/integration-tests/Cargo.toml index 99a7339b94520..7065a370cf46b 100644 --- a/third_party/move/move-vm/integration-tests/Cargo.toml +++ b/third_party/move/move-vm/integration-tests/Cargo.toml @@ -14,7 +14,9 @@ edition = "2021" anyhow = { workspace = true } bytes = { workspace = true } memory-stats = { workspace = true } -move-binary-format = { path = "../../move-binary-format", features = ["testing"] } +move-binary-format = { path = "../../move-binary-format", features = [ + "testing", +] } move-bytecode-verifier = { path = "../../move-bytecode-verifier" } move-compiler = { path = "../../move-compiler" } smallvec = { workspace = true } @@ -28,6 +30,4 @@ move-vm-types = { path = "../types" } [features] default = [] -table-extension = [ - "move-vm-test-utils/table-extension" -] +table-extension = ["move-vm-test-utils/table-extension"] diff --git a/third_party/move/move-vm/paranoid-tests/Cargo.toml b/third_party/move/move-vm/paranoid-tests/Cargo.toml index bf4e6bb08686f..1c9de8dfc0954 100644 --- a/third_party/move/move-vm/paranoid-tests/Cargo.toml +++ b/third_party/move/move-vm/paranoid-tests/Cargo.toml @@ -9,7 +9,9 @@ license = "Apache-2.0" [dev-dependencies] datatest-stable = { workspace = true } fail = { workspace = true, features = ['failpoints'] } -move-transactional-test-runner = { path = "../../testing-infra/transactional-test-runner", features = ['failpoints'] } +move-transactional-test-runner = { path = "../../testing-infra/transactional-test-runner", features = [ + 'failpoints', +] } [[test]] name = "tests" diff --git a/third_party/move/move-vm/types/Cargo.toml b/third_party/move/move-vm/types/Cargo.toml index 4952f0cdf0b7b..af9555b939c5d 100644 --- a/third_party/move/move-vm/types/Cargo.toml +++ b/third_party/move/move-vm/types/Cargo.toml @@ -25,7 +25,9 @@ move-core-types = { path = "../../move-core/types" } [dev-dependencies] claims = { workspace = true } -move-binary-format = { path = "../../move-binary-format", features = ["fuzzing"] } +move-binary-format = { path = "../../move-binary-format", features = [ + "fuzzing", +] } proptest = { workspace = true } rand = { workspace = true } diff --git a/third_party/move/testing-infra/transactional-test-runner/Cargo.toml b/third_party/move/testing-infra/transactional-test-runner/Cargo.toml index 4c534c46f0330..d2a9dd87caf4e 100644 --- a/third_party/move/testing-infra/transactional-test-runner/Cargo.toml +++ b/third_party/move/testing-infra/transactional-test-runner/Cargo.toml @@ -12,7 +12,9 @@ edition = "2021" [dependencies] anyhow = { workspace = true } clap = { workspace = true, features = ["derive"] } -move-binary-format = { path = "../../move-binary-format", features = ["testing"] } +move-binary-format = { path = "../../move-binary-format", features = [ + "testing", +] } move-bytecode-source-map = { path = "../../move-ir-compiler/move-bytecode-source-map" } move-bytecode-verifier = { path = "../../move-bytecode-verifier" } move-command-line-common = { path = "../../move-command-line-common" } diff --git a/third_party/move/tools/move-package/tests/test_sources/compilation/multiple_deps_rename/Move.toml b/third_party/move/tools/move-package/tests/test_sources/compilation/multiple_deps_rename/Move.toml index a13ae9d9e4f72..0a037bf8dfd7c 100644 --- a/third_party/move/tools/move-package/tests/test_sources/compilation/multiple_deps_rename/Move.toml +++ b/third_party/move/tools/move-package/tests/test_sources/compilation/multiple_deps_rename/Move.toml @@ -6,5 +6,5 @@ version = "0.0.0" A = "0x3" [dependencies] -C = { local = "./deps_only/C", addr_subst = {"CA" = "A" } } -D = { local = "./deps_only/D" , addr_subst = {"DA" = "A" } } +C = { local = "./deps_only/C", addr_subst = { "CA" = "A" } } +D = { local = "./deps_only/D", addr_subst = { "DA" = "A" } } diff --git a/third_party/move/tools/move-package/tests/test_sources/compilation/multiple_deps_rename_one/Move.toml b/third_party/move/tools/move-package/tests/test_sources/compilation/multiple_deps_rename_one/Move.toml index 423f3f880f113..70a39f3ee6558 100644 --- a/third_party/move/tools/move-package/tests/test_sources/compilation/multiple_deps_rename_one/Move.toml +++ b/third_party/move/tools/move-package/tests/test_sources/compilation/multiple_deps_rename_one/Move.toml @@ -9,4 +9,4 @@ A = "0x1" [dependencies] C = { local = "./deps_only/C" } -D = { local = "./deps_only/D" , addr_subst = {"DA" = "A" } } +D = { local = "./deps_only/D", addr_subst = { "DA" = "A" } } diff --git a/third_party/move/tools/move-package/tests/test_sources/model/multiple_deps_rename/Move.toml b/third_party/move/tools/move-package/tests/test_sources/model/multiple_deps_rename/Move.toml index a13ae9d9e4f72..0a037bf8dfd7c 100644 --- a/third_party/move/tools/move-package/tests/test_sources/model/multiple_deps_rename/Move.toml +++ b/third_party/move/tools/move-package/tests/test_sources/model/multiple_deps_rename/Move.toml @@ -6,5 +6,5 @@ version = "0.0.0" A = "0x3" [dependencies] -C = { local = "./deps_only/C", addr_subst = {"CA" = "A" } } -D = { local = "./deps_only/D" , addr_subst = {"DA" = "A" } } +C = { local = "./deps_only/C", addr_subst = { "CA" = "A" } } +D = { local = "./deps_only/D", addr_subst = { "DA" = "A" } } diff --git a/third_party/move/tools/move-package/tests/test_sources/parsing/no_path_set_for_dependency/Move.toml b/third_party/move/tools/move-package/tests/test_sources/parsing/no_path_set_for_dependency/Move.toml index dbd5527360866..ff10e27d5d6f4 100644 --- a/third_party/move/tools/move-package/tests/test_sources/parsing/no_path_set_for_dependency/Move.toml +++ b/third_party/move/tools/move-package/tests/test_sources/parsing/no_path_set_for_dependency/Move.toml @@ -3,4 +3,4 @@ name = "name" version = "0.1.2" [dependencies] -A = { } +A = {} diff --git a/third_party/move/tools/move-package/tests/test_sources/parsing/non_identifier_address_name_in_subst/Move.toml b/third_party/move/tools/move-package/tests/test_sources/parsing/non_identifier_address_name_in_subst/Move.toml index 8b78acf0abca1..bf549e92df8d6 100644 --- a/third_party/move/tools/move-package/tests/test_sources/parsing/non_identifier_address_name_in_subst/Move.toml +++ b/third_party/move/tools/move-package/tests/test_sources/parsing/non_identifier_address_name_in_subst/Move.toml @@ -3,4 +3,4 @@ name = "name" version = "0.1.2" [dependencies] -A = { local = "a", addr_subst = { "©" = "A" } } +A = { local = "a", addr_subst = { "©" = "A" } } diff --git a/third_party/move/tools/move-package/tests/test_sources/resolution/dep_good_digest/Move.toml b/third_party/move/tools/move-package/tests/test_sources/resolution/dep_good_digest/Move.toml index adfaac538f74b..1cf7c5aea303d 100644 --- a/third_party/move/tools/move-package/tests/test_sources/resolution/dep_good_digest/Move.toml +++ b/third_party/move/tools/move-package/tests/test_sources/resolution/dep_good_digest/Move.toml @@ -6,4 +6,4 @@ version = "0.0.0" A = "0x1" [dependencies] -OtherDep = { local = "./deps_only/other_dep", addr_subst = { "A" = "B" }, digest = "6A88B7888D6049EB0121900E22B6FA2C0E702F042C8C8D4FD62AD5C990B9F9A8"} +OtherDep = { local = "./deps_only/other_dep", addr_subst = { "A" = "B" }, digest = "6A88B7888D6049EB0121900E22B6FA2C0E702F042C8C8D4FD62AD5C990B9F9A8" } diff --git a/third_party/move/tools/move-package/tests/test_sources/resolution/multiple_deps_rename/Move.toml b/third_party/move/tools/move-package/tests/test_sources/resolution/multiple_deps_rename/Move.toml index 6bac3c7efc807..292d9a373754d 100644 --- a/third_party/move/tools/move-package/tests/test_sources/resolution/multiple_deps_rename/Move.toml +++ b/third_party/move/tools/move-package/tests/test_sources/resolution/multiple_deps_rename/Move.toml @@ -3,5 +3,5 @@ name = "test" version = "0.0.0" [dependencies] -C = { local = "./deps_only/C", addr_subst = {"CA" = "A" } } -D = { local = "./deps_only/D" , addr_subst = {"DA" = "A" } } +C = { local = "./deps_only/C", addr_subst = { "CA" = "A" } } +D = { local = "./deps_only/D", addr_subst = { "DA" = "A" } } diff --git a/third_party/move/tools/move-package/tests/test_sources/resolution/one_dep_bad_digest/Move.toml b/third_party/move/tools/move-package/tests/test_sources/resolution/one_dep_bad_digest/Move.toml index bb8f33a3b7549..7048f57b13fa0 100644 --- a/third_party/move/tools/move-package/tests/test_sources/resolution/one_dep_bad_digest/Move.toml +++ b/third_party/move/tools/move-package/tests/test_sources/resolution/one_dep_bad_digest/Move.toml @@ -6,4 +6,4 @@ version = "0.0.0" A = "0x1" [dependencies] -OtherDep = { local = "./deps_only/other_dep", addr_subst = { "A" = "B" }, digest = "BAD_DIGEST"} +OtherDep = { local = "./deps_only/other_dep", addr_subst = { "A" = "B" }, digest = "BAD_DIGEST" } diff --git a/third_party/move/tools/move-unit-test/Cargo.toml b/third_party/move/tools/move-unit-test/Cargo.toml index 3bd0fbfd08a6c..e8bee74f5dc18 100644 --- a/third_party/move/tools/move-unit-test/Cargo.toml +++ b/third_party/move/tools/move-unit-test/Cargo.toml @@ -54,7 +54,5 @@ harness = false [features] evm-backend = ["move-to-yul", "evm-exec-utils", "evm", "primitive-types"] -table-extension = [ - "move-vm-test-utils/table-extension" -] +table-extension = ["move-vm-test-utils/table-extension"] debugging = ["move-vm-runtime/debugging"] diff --git a/types/Cargo.toml b/types/Cargo.toml index b25532ea0d7d1..a5485d4ee4468 100644 --- a/types/Cargo.toml +++ b/types/Cargo.toml @@ -29,6 +29,7 @@ base64 = { workspace = true } bcs = { workspace = true } bytes = { workspace = true } derive-getters = { workspace = true } +crypto = { workspace = true } fixed = { workspace = true } fxhash = { workspace = true } hashbrown = { workspace = true } @@ -90,7 +91,12 @@ url = { workspace = true } [features] default = [] -fuzzing = ["proptest", "proptest-derive", "aptos-crypto/fuzzing", "move-core-types/fuzzing"] +fuzzing = [ + "proptest", + "proptest-derive", + "aptos-crypto/fuzzing", + "move-core-types/fuzzing", +] [[bench]] name = "keyless" diff --git a/types/src/account_config/events/coin.rs b/types/src/account_config/events/coin.rs index 46761d1f56b68..96d2af6c3e81e 100644 --- a/types/src/account_config/events/coin.rs +++ b/types/src/account_config/events/coin.rs @@ -1,9 +1,13 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + +use derive_getters::Getters; use move_core_types::{ - account_address::AccountAddress, ident_str, identifier::IdentStr, language_storage::TypeTag, move_resource::MoveStructType, parser::parse_type_tag + account_address::AccountAddress, ident_str, identifier::IdentStr, language_storage::TypeTag, + move_resource::MoveStructType, parser::parse_type_tag, }; use once_cell::sync::Lazy; use serde::{Deserialize, Serialize}; -use derive_getters::Getters; pub static COIN_WITHDRAW_EVENT_TYPE_TAG: Lazy = Lazy::new(|| TypeTag::Struct(Box::new(CoinWithdraw::struct_tag()))); pub static COIN_DEPOSIT_EVENT_TYPE_TAG: Lazy = @@ -42,4 +46,4 @@ impl MoveStructType for CoinWithdraw { impl MoveStructType for CoinDeposit { const MODULE_NAME: &'static IdentStr = ident_str!("coin"); const STRUCT_NAME: &'static IdentStr = ident_str!("CoinDeposit"); -} \ No newline at end of file +} diff --git a/types/src/account_config/events/fa.rs b/types/src/account_config/events/fa.rs index b34cb7c1ac577..a9e78ce5d8413 100644 --- a/types/src/account_config/events/fa.rs +++ b/types/src/account_config/events/fa.rs @@ -1,5 +1,11 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + use derive_getters::Getters; -use move_core_types::{account_address::AccountAddress, ident_str, identifier::IdentStr, language_storage::TypeTag, move_resource::MoveStructType}; +use move_core_types::{ + account_address::AccountAddress, ident_str, identifier::IdentStr, language_storage::TypeTag, + move_resource::MoveStructType, +}; use once_cell::sync::Lazy; use serde::{Deserialize, Serialize}; diff --git a/types/src/account_config/events/mod.rs b/types/src/account_config/events/mod.rs index 179e5f8a92086..83d5fa1fcee9a 100644 --- a/types/src/account_config/events/mod.rs +++ b/types/src/account_config/events/mod.rs @@ -2,16 +2,16 @@ // Parts of the project are originally copyright © Meta Platforms, Inc. // SPDX-License-Identifier: Apache-2.0 +pub mod coin; pub mod deposit; +pub mod fa; pub mod new_block; pub mod new_epoch; pub mod withdraw; -pub mod coin; -pub mod fa; +pub use coin::*; pub use deposit::*; +pub use fa::*; pub use new_block::*; pub use new_epoch::*; pub use withdraw::*; -pub use coin::*; -pub use fa::*; \ No newline at end of file diff --git a/types/src/dkg/dummy_dkg/mod.rs b/types/src/aptos_dkg/dummy_dkg/mod.rs similarity index 98% rename from types/src/dkg/dummy_dkg/mod.rs rename to types/src/aptos_dkg/dummy_dkg/mod.rs index 56bd781ff9198..559892833279b 100644 --- a/types/src/dkg/dummy_dkg/mod.rs +++ b/types/src/aptos_dkg/dummy_dkg/mod.rs @@ -1,7 +1,7 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -use crate::dkg::{DKGSessionMetadata, DKGTrait}; +use crate::aptos_dkg::{DKGSessionMetadata, DKGTrait}; use anyhow::{anyhow, ensure}; use aptos_crypto::{ed25519, Uniform}; use rand::{CryptoRng, Rng, RngCore}; diff --git a/types/src/dkg/dummy_dkg/tests.rs b/types/src/aptos_dkg/dummy_dkg/tests.rs similarity index 99% rename from types/src/dkg/dummy_dkg/tests.rs rename to types/src/aptos_dkg/dummy_dkg/tests.rs index b3dcb9137eda7..b3902cd08d709 100644 --- a/types/src/dkg/dummy_dkg/tests.rs +++ b/types/src/aptos_dkg/dummy_dkg/tests.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::{ - dkg::{ + aptos_dkg::{ dummy_dkg::{DummyDKG, DummyDKGTranscript, DummySecret}, DKGSessionMetadata, DKGTrait, }, diff --git a/types/src/aptos_dkg/mod.rs b/types/src/aptos_dkg/mod.rs new file mode 100644 index 0000000000000..e8ff50d530f62 --- /dev/null +++ b/types/src/aptos_dkg/mod.rs @@ -0,0 +1,219 @@ +// Copyright © Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + +use self::real_dkg::RealDKG; +use crate::{ + aptos_dkg::real_dkg::rounding::DKGRoundingProfile, + on_chain_config::{OnChainConfig, OnChainRandomnessConfig, RandomnessConfigMoveStruct}, + validator_verifier::{ValidatorConsensusInfo, ValidatorConsensusInfoMoveStruct}, +}; +use anyhow::Result; +use aptos_crypto::Uniform; +use aptos_crypto_derive::{BCSCryptoHash, CryptoHasher}; +use move_core_types::{ + account_address::AccountAddress, ident_str, identifier::IdentStr, language_storage::TypeTag, + move_resource::MoveStructType, +}; +use once_cell::sync::Lazy; +use rand::{CryptoRng, RngCore}; +use serde::{Deserialize, Serialize}; +use std::{ + collections::BTreeSet, + fmt::{Debug, Formatter}, + time::Duration, +}; + +#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq, CryptoHasher, BCSCryptoHash)] +pub struct DKGTranscriptMetadata { + pub epoch: u64, + pub author: AccountAddress, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct DKGStartEvent { + pub session_metadata: DKGSessionMetadata, + pub start_time_us: u64, +} + +impl MoveStructType for DKGStartEvent { + const MODULE_NAME: &'static IdentStr = ident_str!("dkg"); + const STRUCT_NAME: &'static IdentStr = ident_str!("DKGStartEvent"); +} + +pub static DKG_START_EVENT_MOVE_TYPE_TAG: Lazy = + Lazy::new(|| TypeTag::Struct(Box::new(DKGStartEvent::struct_tag()))); + +/// DKG transcript and its metadata. +#[derive(Clone, Serialize, Deserialize, PartialEq, Eq)] +pub struct DKGTranscript { + pub metadata: DKGTranscriptMetadata, + #[serde(with = "serde_bytes")] + pub transcript_bytes: Vec, +} + +impl Debug for DKGTranscript { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("DKGTranscript") + .field("metadata", &self.metadata) + .field("transcript_bytes_len", &self.transcript_bytes.len()) + .finish() + } +} + +impl DKGTranscript { + pub fn new(epoch: u64, author: AccountAddress, transcript_bytes: Vec) -> Self { + Self { + metadata: DKGTranscriptMetadata { epoch, author }, + transcript_bytes, + } + } + + pub fn dummy() -> Self { + Self { + metadata: DKGTranscriptMetadata { + epoch: 0, + author: AccountAddress::ZERO, + }, + transcript_bytes: vec![], + } + } +} + +/// Reflection of `0x1::dkg::DKGSessionMetadata` in rust. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +pub struct DKGSessionMetadata { + pub dealer_epoch: u64, + pub randomness_config: RandomnessConfigMoveStruct, + pub dealer_validator_set: Vec, + pub target_validator_set: Vec, +} + +impl DKGSessionMetadata { + pub fn target_validator_consensus_infos_cloned(&self) -> Vec { + self.target_validator_set + .clone() + .into_iter() + .map(|obj| obj.try_into().unwrap()) + .collect() + } + + pub fn dealer_consensus_infos_cloned(&self) -> Vec { + self.dealer_validator_set + .clone() + .into_iter() + .map(|obj| obj.try_into().unwrap()) + .collect() + } + + pub fn randomness_config_derived(&self) -> Option { + OnChainRandomnessConfig::try_from(self.randomness_config.clone()).ok() + } +} + +impl MayHaveRoundingSummary for DKGSessionMetadata { + fn rounding_summary(&self) -> Option<&RoundingSummary> { + None + } +} + +/// Reflection of Move type `0x1::dkg::DKGSessionState`. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +pub struct DKGSessionState { + pub metadata: DKGSessionMetadata, + pub start_time_us: u64, + pub transcript: Vec, +} + +impl DKGSessionState { + pub fn target_epoch(&self) -> u64 { + self.metadata.dealer_epoch + 1 + } +} +/// Reflection of Move type `0x1::dkg::DKGState`. +#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)] +pub struct DKGState { + pub last_completed: Option, + pub in_progress: Option, +} + +impl DKGState { + pub fn maybe_last_complete(&self, epoch: u64) -> Option<&DKGSessionState> { + match &self.last_completed { + Some(session) if session.target_epoch() == epoch => Some(session), + _ => None, + } + } + + pub fn last_complete(&self) -> &DKGSessionState { + self.last_completed.as_ref().unwrap() + } +} + +impl OnChainConfig for DKGState { + const MODULE_IDENTIFIER: &'static str = "dkg"; + const TYPE_IDENTIFIER: &'static str = "DKGState"; +} + +#[derive(Clone, Debug, Default)] +pub struct RoundingSummary { + pub method: String, + pub output: DKGRoundingProfile, + pub error: Option, + pub exec_time: Duration, +} + +pub trait MayHaveRoundingSummary { + fn rounding_summary(&self) -> Option<&RoundingSummary>; +} + +/// NOTE: this is a subset of the full scheme. Some data items/algorithms are not used in DKG and are omitted. +pub trait DKGTrait: Debug { + type DealerPrivateKey; + type PublicParams: Clone + Debug + Send + Sync + MayHaveRoundingSummary; + type Transcript: Clone + Send + Sync + Serialize + for<'a> Deserialize<'a>; + type InputSecret: Uniform; + type DealtSecret; + type DealtSecretShare; + type DealtPubKeyShare; + type NewValidatorDecryptKey: Uniform; + + fn new_public_params(dkg_session_metadata: &DKGSessionMetadata) -> Self::PublicParams; + fn aggregate_input_secret(secrets: Vec) -> Self::InputSecret; + fn dealt_secret_from_input( + pub_params: &Self::PublicParams, + input: &Self::InputSecret, + ) -> Self::DealtSecret; + fn generate_transcript( + rng: &mut R, + params: &Self::PublicParams, + input_secret: &Self::InputSecret, + my_index: u64, + sk: &Self::DealerPrivateKey, + ) -> Self::Transcript; + + fn verify_transcript(params: &Self::PublicParams, trx: &Self::Transcript) -> Result<()>; + + fn aggregate_transcripts( + params: &Self::PublicParams, + accumulator: &mut Self::Transcript, + element: Self::Transcript, + ); + + fn decrypt_secret_share_from_transcript( + pub_params: &Self::PublicParams, + trx: &Self::Transcript, + player_idx: u64, + dk: &Self::NewValidatorDecryptKey, + ) -> Result<(Self::DealtSecretShare, Self::DealtPubKeyShare)>; + + fn reconstruct_secret_from_shares( + pub_params: &Self::PublicParams, + player_share_pairs: Vec<(u64, Self::DealtSecretShare)>, + ) -> Result; + fn get_dealers(transcript: &Self::Transcript) -> BTreeSet; +} + +pub mod dummy_dkg; +pub mod real_dkg; + +pub type DefaultDKG = RealDKG; diff --git a/types/src/dkg/real_dkg/mod.rs b/types/src/aptos_dkg/real_dkg/mod.rs similarity index 99% rename from types/src/dkg/real_dkg/mod.rs rename to types/src/aptos_dkg/real_dkg/mod.rs index 012261a79731b..403f9dbc41e01 100644 --- a/types/src/dkg/real_dkg/mod.rs +++ b/types/src/aptos_dkg/real_dkg/mod.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::{ - dkg::{ + aptos_dkg::{ real_dkg::rounding::DKGRounding, DKGSessionMetadata, DKGTrait, MayHaveRoundingSummary, RoundingSummary, }, diff --git a/types/src/dkg/real_dkg/rounding/mod.rs b/types/src/aptos_dkg/real_dkg/rounding/mod.rs similarity index 100% rename from types/src/dkg/real_dkg/rounding/mod.rs rename to types/src/aptos_dkg/real_dkg/rounding/mod.rs diff --git a/types/src/dkg/real_dkg/rounding/tests.rs b/types/src/aptos_dkg/real_dkg/rounding/tests.rs similarity index 99% rename from types/src/dkg/real_dkg/rounding/tests.rs rename to types/src/aptos_dkg/real_dkg/rounding/tests.rs index cdb29db527a72..55a85096a8f7f 100644 --- a/types/src/dkg/real_dkg/rounding/tests.rs +++ b/types/src/aptos_dkg/real_dkg/rounding/tests.rs @@ -1,7 +1,7 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -use crate::dkg::real_dkg::rounding::{ +use crate::aptos_dkg::real_dkg::rounding::{ is_valid_profile, total_weight_lower_bound, total_weight_upper_bound, DKGRounding, DKGRoundingProfile, DEFAULT_FAST_PATH_SECRECY_THRESHOLD, DEFAULT_RECONSTRUCT_THRESHOLD, DEFAULT_SECRECY_THRESHOLD, diff --git a/types/src/contract_event.rs b/types/src/contract_event.rs index 59d9a27fae406..3ce5ee659b984 100644 --- a/types/src/contract_event.rs +++ b/types/src/contract_event.rs @@ -4,7 +4,7 @@ use crate::{ account_config::{DepositEvent, NewBlockEvent, NewEpochEvent, WithdrawEvent}, - dkg::DKGStartEvent, + dkg::events::{DKGFinishEvent, DKGMetaSetEvent, DKGStartEvent}, event::EventKey, jwks::ObservedJWKsUpdated, on_chain_config::new_epoch_event_key, @@ -299,6 +299,24 @@ impl From<(u64, NewEpochEvent)> for ContractEvent { } } +impl TryFrom<&ContractEvent> for crate::aptos_dkg::DKGStartEvent { + type Error = Error; + + fn try_from(event: &ContractEvent) -> Result { + match event { + ContractEvent::V1(_) => { + bail!("conversion to dkg start event failed with wrong contract event version"); + }, + ContractEvent::V2(event) => { + if event.type_tag != TypeTag::Struct(Box::new(Self::struct_tag())) { + bail!("conversion to dkg start event failed with wrong type tag") + } + bcs::from_bytes(&event.event_data).map_err(Into::into) + }, + } + } +} + impl TryFrom<&ContractEvent> for DKGStartEvent { type Error = Error; @@ -317,6 +335,69 @@ impl TryFrom<&ContractEvent> for DKGStartEvent { } } +impl From for ContractEvent { + fn from(event: DKGStartEvent) -> Self { + Self::new_v2( + TypeTag::from(DKGStartEvent::struct_tag()), + bcs::to_bytes(&event).unwrap(), + ) + } +} + +impl TryFrom<&ContractEvent> for DKGFinishEvent { + type Error = Error; + + fn try_from(event: &ContractEvent) -> Result { + match event { + ContractEvent::V1(_) => { + bail!("conversion to dkg finish event failed with wrong contract event version"); + }, + ContractEvent::V2(event) => { + if event.type_tag != TypeTag::Struct(Box::new(Self::struct_tag())) { + bail!("conversion to dkg finish event failed with wrong type tag") + } + bcs::from_bytes(&event.event_data).map_err(Into::into) + }, + } + } +} + +impl From for ContractEvent { + fn from(event: DKGFinishEvent) -> Self { + Self::new_v2( + TypeTag::from(DKGFinishEvent::struct_tag()), + bcs::to_bytes(&event).unwrap(), + ) + } +} + +impl TryFrom<&ContractEvent> for DKGMetaSetEvent { + type Error = Error; + + fn try_from(event: &ContractEvent) -> Result { + match event { + ContractEvent::V1(_) => { + bail!("conversion to dkg meta set event failed with wrong contract event version"); + }, + ContractEvent::V2(event) => { + if event.type_tag != TypeTag::Struct(Box::new(Self::struct_tag())) { + bail!("conversion to dkg meta set event failed with wrong type tag") + } + bcs::from_bytes(&event.event_data).map_err(Into::into) + }, + } + } +} + +impl From for ContractEvent { + fn from(event: DKGMetaSetEvent) -> Self { + Self::new_v2( + TypeTag::from(DKGMetaSetEvent::struct_tag()), + bcs::to_bytes(&event).unwrap(), + ) + } +} + impl TryFrom<&ContractEvent> for NewEpochEvent { type Error = Error; diff --git a/types/src/dkg/dkg_committee.rs b/types/src/dkg/dkg_committee.rs new file mode 100644 index 0000000000000..c531cd35f822e --- /dev/null +++ b/types/src/dkg/dkg_committee.rs @@ -0,0 +1,55 @@ +use derive_getters::Getters; +use move_core_types::account_address::AccountAddress; +use serde::{Deserialize, Serialize}; + +/// Reflection of `0x1::dkg_committee::DkgNodeConfig` in rust. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Getters)] +pub struct DkgNodeConfig { + pool_address: AccountAddress, + identity: Vec, + dkg_pubkey: Vec, +} + +impl DkgNodeConfig { + pub fn new(pool_address: AccountAddress, identity: Vec, dkg_pubkey: Vec) -> Self { + Self { + pool_address, + identity, + dkg_pubkey, + } + } +} + +/// Reflection of `0x1::dkg_committee::DkgCommittee` in rust. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Getters)] +pub struct DkgCommittee { + committee: Vec, + threshold_type: u8, +} + +impl DkgCommittee { + pub fn new(committee: Vec, threshold_type: u8) -> Self { + Self { + committee, + threshold_type, + } + } +} + +/// Reflection of `0x1::dkg_committee::ReceiverCommittee` in rust. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Getters)] +pub struct ReceiverCommittee { + is_resharing: bool, + dkg_threshold_type: u8, + committee: DkgCommittee, +} + +impl ReceiverCommittee { + pub fn new(is_resharing: bool, dkg_threshold_type: u8, committee: DkgCommittee) -> Self { + Self { + is_resharing, + dkg_threshold_type, + committee, + } + } +} diff --git a/types/src/dkg/events.rs b/types/src/dkg/events.rs new file mode 100644 index 0000000000000..bb08f2ebb7e93 --- /dev/null +++ b/types/src/dkg/events.rs @@ -0,0 +1,46 @@ +use crate::dkg::state::DKGSessionMetadata; +use move_core_types::{ + ident_str, identifier::IdentStr, language_storage::TypeTag, move_resource::MoveStructType, +}; +use once_cell::sync::Lazy; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct DKGStartEvent { + pub session_metadata: DKGSessionMetadata, + pub start_time_us: u64, +} + +impl MoveStructType for DKGStartEvent { + const MODULE_NAME: &'static IdentStr = ident_str!("dkg"); + const STRUCT_NAME: &'static IdentStr = ident_str!("DKGStartEvent"); +} + +pub static DKG_START_EVENT_MOVE_TYPE_TAG: Lazy = + Lazy::new(|| TypeTag::Struct(Box::new(DKGStartEvent::struct_tag()))); + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct DKGMetaSetEvent { + pub dkg_meta_transcript: Vec, +} + +impl MoveStructType for DKGMetaSetEvent { + const MODULE_NAME: &'static IdentStr = ident_str!("dkg"); + const STRUCT_NAME: &'static IdentStr = ident_str!("DKGMetaSetEvent"); +} + +pub static DKG_META_SET_EVENT_MOVE_TYPE_TAG: Lazy = + Lazy::new(|| TypeTag::Struct(Box::new(DKGMetaSetEvent::struct_tag()))); + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct DKGFinishEvent { + pub target_committees_public_key_shares: Vec, +} + +impl MoveStructType for DKGFinishEvent { + const MODULE_NAME: &'static IdentStr = ident_str!("dkg"); + const STRUCT_NAME: &'static IdentStr = ident_str!("DKGFinishEvent"); +} + +pub static DKG_FINISH_EVENT_MOVE_TYPE_TAG: Lazy = + Lazy::new(|| TypeTag::Struct(Box::new(DKGFinishEvent::struct_tag()))); diff --git a/types/src/dkg/mod.rs b/types/src/dkg/mod.rs index 2e3bde94085ab..c45d9fe1a9146 100644 --- a/types/src/dkg/mod.rs +++ b/types/src/dkg/mod.rs @@ -1,219 +1,58 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -use self::real_dkg::RealDKG; -use crate::{ - dkg::real_dkg::rounding::DKGRoundingProfile, - on_chain_config::{OnChainConfig, OnChainRandomnessConfig, RandomnessConfigMoveStruct}, - validator_verifier::{ValidatorConsensusInfo, ValidatorConsensusInfoMoveStruct}, -}; -use anyhow::Result; -use aptos_crypto::Uniform; -use aptos_crypto_derive::{BCSCryptoHash, CryptoHasher}; -use move_core_types::{ - account_address::AccountAddress, ident_str, identifier::IdentStr, language_storage::TypeTag, - move_resource::MoveStructType, -}; -use once_cell::sync::Lazy; -use rand::{CryptoRng, RngCore}; -use serde::{Deserialize, Serialize}; -use std::{ - collections::BTreeSet, - fmt::{Debug, Formatter}, - time::Duration, -}; - -#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq, CryptoHasher, BCSCryptoHash)] -pub struct DKGTranscriptMetadata { - pub epoch: u64, - pub author: AccountAddress, -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct DKGStartEvent { - pub session_metadata: DKGSessionMetadata, - pub start_time_us: u64, -} - -impl MoveStructType for DKGStartEvent { - const MODULE_NAME: &'static IdentStr = ident_str!("dkg"); - const STRUCT_NAME: &'static IdentStr = ident_str!("DKGStartEvent"); -} - -pub static DKG_START_EVENT_MOVE_TYPE_TAG: Lazy = - Lazy::new(|| TypeTag::Struct(Box::new(DKGStartEvent::struct_tag()))); - -/// DKG transcript and its metadata. -#[derive(Clone, Serialize, Deserialize, PartialEq, Eq)] -pub struct DKGTranscript { - pub metadata: DKGTranscriptMetadata, - #[serde(with = "serde_bytes")] - pub transcript_bytes: Vec, -} - -impl Debug for DKGTranscript { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - f.debug_struct("DKGTranscript") - .field("metadata", &self.metadata) - .field("transcript_bytes_len", &self.transcript_bytes.len()) - .finish() - } -} - -impl DKGTranscript { - pub fn new(epoch: u64, author: AccountAddress, transcript_bytes: Vec) -> Self { - Self { - metadata: DKGTranscriptMetadata { epoch, author }, - transcript_bytes, +use crate::{dkg::dkg_committee::DkgCommittee, validator_public_keys::ValidatorPublicKeys}; +use anyhow::{anyhow, Result}; +use aptos_crypto::bls12381::PublicKey; +use crypto::utils::get_clan_node_indices; + +pub mod dkg_committee; +pub mod events; +pub mod state; +pub mod transactions; + +/// The threshold required to ensure the presence of honest majority in clan where +/// N = 2f+1 with f byzantine nodes +fn clan_threshold(total: u64) -> u64 { + total / 2 + 1 +} + +pub fn get_clan_nodes_bls_keys_from_indices( + dealer_committee: &DkgCommittee, + signers: &Vec, + random_seed: &Vec, +) -> Result> { + let committee = dealer_committee.committee(); + let dealer_clan_committee_indices = + get_clan_node_indices(committee.len() as u32, random_seed.clone()); + + let mut clan_committee_bls_keys = Vec::new(); + if let Some(clan_committee_indices) = dealer_clan_committee_indices { + let clan_threshold = clan_threshold(clan_committee_indices.len() as u64); + + if signers.len() as u64 != clan_threshold { + return Err(anyhow!("dkg::number of signers must match clan_threshold")); } - } - pub fn dummy() -> Self { - Self { - metadata: DKGTranscriptMetadata { - epoch: 0, - author: AccountAddress::ZERO, - }, - transcript_bytes: vec![], + for signer in signers { + let clan_node_index = clan_committee_indices + .get(*signer as usize) + .ok_or(anyhow!("dkg::node Invalid signer index: {signer}"))?; + let clan_node_key = committee + .get(*clan_node_index) + .ok_or(anyhow!("dkg::node Invalid clan node index: {signer}"))? + .dkg_pubkey(); + let clan_node_pk = ValidatorPublicKeys::try_from(clan_node_key).map_err(|e| { + anyhow!("dkg::node validator public key deserialization failed: {e}") + })?; + let clan_node_bls_pubkey_bytes = clan_node_pk.supra_keys().bls_multisig_key(); + let clan_node_bls_pubkey = + PublicKey::try_from(clan_node_bls_pubkey_bytes.as_slice()) + .map_err(|e| anyhow!("dkg::node bls public key deserialization failed: {e}"))?; + clan_committee_bls_keys.push(clan_node_bls_pubkey); } + Ok(clan_committee_bls_keys) + } else { + Err(anyhow!("dkg::cannot derive clan committee")) } } - -/// Reflection of `0x1::dkg::DKGSessionMetadata` in rust. -#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] -pub struct DKGSessionMetadata { - pub dealer_epoch: u64, - pub randomness_config: RandomnessConfigMoveStruct, - pub dealer_validator_set: Vec, - pub target_validator_set: Vec, -} - -impl DKGSessionMetadata { - pub fn target_validator_consensus_infos_cloned(&self) -> Vec { - self.target_validator_set - .clone() - .into_iter() - .map(|obj| obj.try_into().unwrap()) - .collect() - } - - pub fn dealer_consensus_infos_cloned(&self) -> Vec { - self.dealer_validator_set - .clone() - .into_iter() - .map(|obj| obj.try_into().unwrap()) - .collect() - } - - pub fn randomness_config_derived(&self) -> Option { - OnChainRandomnessConfig::try_from(self.randomness_config.clone()).ok() - } -} - -impl MayHaveRoundingSummary for DKGSessionMetadata { - fn rounding_summary(&self) -> Option<&RoundingSummary> { - None - } -} - -/// Reflection of Move type `0x1::dkg::DKGSessionState`. -#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] -pub struct DKGSessionState { - pub metadata: DKGSessionMetadata, - pub start_time_us: u64, - pub transcript: Vec, -} - -impl DKGSessionState { - pub fn target_epoch(&self) -> u64 { - self.metadata.dealer_epoch + 1 - } -} -/// Reflection of Move type `0x1::dkg::DKGState`. -#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)] -pub struct DKGState { - pub last_completed: Option, - pub in_progress: Option, -} - -impl DKGState { - pub fn maybe_last_complete(&self, epoch: u64) -> Option<&DKGSessionState> { - match &self.last_completed { - Some(session) if session.target_epoch() == epoch => Some(session), - _ => None, - } - } - - pub fn last_complete(&self) -> &DKGSessionState { - self.last_completed.as_ref().unwrap() - } -} - -impl OnChainConfig for DKGState { - const MODULE_IDENTIFIER: &'static str = "dkg"; - const TYPE_IDENTIFIER: &'static str = "DKGState"; -} - -#[derive(Clone, Debug, Default)] -pub struct RoundingSummary { - pub method: String, - pub output: DKGRoundingProfile, - pub error: Option, - pub exec_time: Duration, -} - -pub trait MayHaveRoundingSummary { - fn rounding_summary(&self) -> Option<&RoundingSummary>; -} - -/// NOTE: this is a subset of the full scheme. Some data items/algorithms are not used in DKG and are omitted. -pub trait DKGTrait: Debug { - type DealerPrivateKey; - type PublicParams: Clone + Debug + Send + Sync + MayHaveRoundingSummary; - type Transcript: Clone + Send + Sync + Serialize + for<'a> Deserialize<'a>; - type InputSecret: Uniform; - type DealtSecret; - type DealtSecretShare; - type DealtPubKeyShare; - type NewValidatorDecryptKey: Uniform; - - fn new_public_params(dkg_session_metadata: &DKGSessionMetadata) -> Self::PublicParams; - fn aggregate_input_secret(secrets: Vec) -> Self::InputSecret; - fn dealt_secret_from_input( - pub_params: &Self::PublicParams, - input: &Self::InputSecret, - ) -> Self::DealtSecret; - fn generate_transcript( - rng: &mut R, - params: &Self::PublicParams, - input_secret: &Self::InputSecret, - my_index: u64, - sk: &Self::DealerPrivateKey, - ) -> Self::Transcript; - - fn verify_transcript(params: &Self::PublicParams, trx: &Self::Transcript) -> Result<()>; - - fn aggregate_transcripts( - params: &Self::PublicParams, - accumulator: &mut Self::Transcript, - element: Self::Transcript, - ); - - fn decrypt_secret_share_from_transcript( - pub_params: &Self::PublicParams, - trx: &Self::Transcript, - player_idx: u64, - dk: &Self::NewValidatorDecryptKey, - ) -> Result<(Self::DealtSecretShare, Self::DealtPubKeyShare)>; - - fn reconstruct_secret_from_shares( - pub_params: &Self::PublicParams, - player_share_pairs: Vec<(u64, Self::DealtSecretShare)>, - ) -> Result; - fn get_dealers(transcript: &Self::Transcript) -> BTreeSet; -} - -pub mod dummy_dkg; -pub mod real_dkg; - -pub type DefaultDKG = RealDKG; diff --git a/types/src/dkg/state.rs b/types/src/dkg/state.rs new file mode 100644 index 0000000000000..18bbf8f1dbcfa --- /dev/null +++ b/types/src/dkg/state.rs @@ -0,0 +1,70 @@ +use crate::{ + dkg::dkg_committee::{DkgCommittee, ReceiverCommittee}, + on_chain_config::OnChainConfig, +}; +use serde::{Deserialize, Serialize}; + +// Reflection of `0x1::dkg::DKGSessionMetadata` in rust. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +pub struct DKGSessionMetadata { + pub dealer_epoch: u64, + pub randomness_seed: Vec, + pub dealer_committee: DkgCommittee, + pub target_committees: Vec, +} + +impl DKGSessionMetadata { + pub fn target_committee_cloned(&self) -> Vec { + self.target_committees.clone() + } + + pub fn dealer_committee_cloned(&self) -> DkgCommittee { + self.dealer_committee.clone() + } +} + +/// Reflection of Move type `0x1::dkg::DKGSessionState`. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +pub struct DKGSessionState { + pub metadata: DKGSessionMetadata, + pub start_time_us: u64, + pub dkg_meta_transcript: Vec, + pub target_committees_public_key_shares: Vec, +} + +impl DKGSessionState { + pub fn target_epoch(&self) -> u64 { + self.metadata.dealer_epoch + 1 + } +} +/// Reflection of Move type `0x1::dkg::DKGState`. +#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)] +pub struct DKGState { + pub last_completed: Option, + pub in_progress: Option, +} + +impl DKGState { + pub fn maybe_last_complete(&self, epoch: u64) -> Option<&DKGSessionState> { + match &self.last_completed { + Some(session) if session.target_epoch() == epoch => Some(session), + _ => None, + } + } + + pub fn maybe_in_progress(&self, epoch: u64) -> Option<&DKGSessionState> { + match &self.in_progress { + Some(session) if session.target_epoch() == epoch => Some(session), + _ => None, + } + } + + pub fn last_complete(&self) -> &DKGSessionState { + self.last_completed.as_ref().unwrap() + } +} + +impl OnChainConfig for DKGState { + const MODULE_IDENTIFIER: &'static str = "dkg"; + const TYPE_IDENTIFIER: &'static str = "DKGState"; +} diff --git a/types/src/dkg/transactions.rs b/types/src/dkg/transactions.rs new file mode 100644 index 0000000000000..dd1054520f146 --- /dev/null +++ b/types/src/dkg/transactions.rs @@ -0,0 +1,77 @@ +use aptos_crypto_derive::{BCSCryptoHash, CryptoHasher}; +use derive_getters::Getters; +use move_core_types::account_address::AccountAddress; +use serde::{Deserialize, Serialize}; +use std::fmt::{Debug, Formatter}; + +#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)] +pub enum DKGTransactionType { + DKGMeta, + PublicKeyShares, +} + +#[derive( + Clone, Serialize, Deserialize, Debug, PartialEq, Eq, CryptoHasher, BCSCryptoHash, Getters, +)] +pub struct DKGTransactionMetadata { + epoch: u64, + author: AccountAddress, + bls_aggregate_signature: Vec, + signer_indices_clan_committee: Vec, + transaction_type: DKGTransactionType, +} + +/// DKG transcript and its metadata. +#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Getters)] +pub struct DKGTransactionData { + metadata: DKGTransactionMetadata, + #[serde(with = "serde_bytes")] + data_bytes: Vec, +} + +impl Debug for DKGTransactionData { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("DKGTransactionData") + .field("metadata", &self.metadata) + .field("data_bytes_len", &self.data_bytes.len()) + .finish() + } +} + +impl DKGTransactionData { + pub fn new( + epoch: u64, + author: AccountAddress, + transcript_bytes: Vec, + bls_aggregate_signature: Vec, + signer_indices_clan_committee: Vec, + transaction_type: DKGTransactionType, + ) -> Self { + Self { + metadata: DKGTransactionMetadata { + epoch, + author, + bls_aggregate_signature, + signer_indices_clan_committee, + transaction_type, + }, + data_bytes: transcript_bytes, + } + } +} + +#[cfg(test)] +impl DKGTransactionData { + pub fn dummy() -> Self { + Self { + metadata: DKGTransactionMetadata { + epoch: 0, + author: AccountAddress::ZERO, + bls_aggregate_signature: vec![], + signer_indices_clan_committee: vec![], + transaction_type: DKGTransactionType::DKGMeta, + }, + data_bytes: vec![], + } + } +} diff --git a/types/src/lib.rs b/types/src/lib.rs index 9081b6c0f0a4d..302c948787a07 100644 --- a/types/src/lib.rs +++ b/types/src/lib.rs @@ -7,6 +7,7 @@ pub mod access_path; pub mod account_address; pub mod account_config; +pub mod aptos_dkg; pub mod block_info; pub mod block_metadata; pub mod block_metadata_ext; @@ -48,6 +49,7 @@ pub mod utility_coin; pub mod validator_config; pub mod validator_info; pub mod validator_performances; +pub mod validator_public_keys; pub mod validator_signer; pub mod validator_txn; pub mod validator_verifier; diff --git a/types/src/on_chain_config/aptos_features.rs b/types/src/on_chain_config/aptos_features.rs index 4f250fac06da9..b783c08061f56 100644 --- a/types/src/on_chain_config/aptos_features.rs +++ b/types/src/on_chain_config/aptos_features.rs @@ -97,8 +97,13 @@ pub enum FeatureFlag { SUPRA_RLP_ENCODE = 94, SUPRA_DELEGATION_POOL_IDENTITY = 95, SUPRA_AUTOMATION_V2 = 96, + /// This flag should only be enabled after all Validators have updated their keys to the new format, including the BLS keys. + SUPRA_BLS_KEYS = 97, + SUPRA_BCFT_CERTIFICATES = 98, + SUPRA_DKG = 99, } +//TODO: add dkg feature impl FeatureFlag { pub fn default_features() -> Vec { vec![ @@ -169,6 +174,9 @@ impl FeatureFlag { FeatureFlag::SUPRA_COUNT_FAILED_PROPOSALS, FeatureFlag::SUPRA_DELEGATION_POOL_IDENTITY, FeatureFlag::SUPRA_AUTOMATION_V2, + FeatureFlag::SUPRA_BLS_KEYS, + FeatureFlag::SUPRA_BCFT_CERTIFICATES, + FeatureFlag::SUPRA_DKG, ] } } diff --git a/types/src/on_chain_config/automation_registry.rs b/types/src/on_chain_config/automation_registry.rs index 95779e36300d3..4f68aa1266945 100644 --- a/types/src/on_chain_config/automation_registry.rs +++ b/types/src/on_chain_config/automation_registry.rs @@ -1,12 +1,19 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2025 Supra. // SPDX-License-Identifier: Apache-2.0 use crate::on_chain_config::OnChainConfig; use derive_getters::Getters; use derive_more::Constructor; -use move_core_types::account_address::AccountAddress; -use move_core_types::value::{serialize_values, MoveValue}; -use move_core_types::{ident_str, identifier::IdentStr, move_resource::MoveStructType}; +use move_core_types::{ + account_address::AccountAddress, + ident_str, + identifier::IdentStr, + move_resource::MoveStructType, + value::{serialize_values, MoveValue}, +}; use serde::{Deserialize, Serialize}; const ONE_MONTH_IN_SECS: u64 = 2_626_560; diff --git a/types/src/on_chain_config/evm_genesis_config.rs b/types/src/on_chain_config/evm_genesis_config.rs index 66a157ba7bb84..1901bc9bb6405 100644 --- a/types/src/on_chain_config/evm_genesis_config.rs +++ b/types/src/on_chain_config/evm_genesis_config.rs @@ -1,15 +1,17 @@ -// Copyright (c) Supra Foundation +// Copyright (c) Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -use once_cell::sync::Lazy; +// Copyright (c) Supra Foundation +// SPDX-License-Identifier: Apache-2.0 use super::OnChainConfig; use crate::chain_id::ChainId; use anyhow::{anyhow, Result}; -use serde::{Deserialize, Serialize}; use move_core_types::{ ident_str, identifier::IdentStr, language_storage::TypeTag, move_resource::MoveStructType, }; +use once_cell::sync::Lazy; +use serde::{Deserialize, Serialize}; /// The Genesis configuration for EVM that can only be set once at genesis epoch. #[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize)] @@ -45,7 +47,11 @@ pub struct GenesisEvmContract { impl OnChainEvmGenesisConfig { /// Create a new OnChainEvmGenesisConfig with the given parameters. - pub fn new(chain_id: ChainId, eoas: Vec, contracts: Vec) -> Self { + pub fn new( + chain_id: ChainId, + eoas: Vec, + contracts: Vec, + ) -> Self { let chain_id = Self::derive_evm_chain_id_from_move_chain_id(chain_id); Self { @@ -54,7 +60,7 @@ impl OnChainEvmGenesisConfig { contracts, } } - + /// Derive the EVM chain ID from the Move chain ID. fn derive_evm_chain_id_from_move_chain_id(move_chain_id: ChainId) -> u64 { let chain_id = move_chain_id.id() as u64; @@ -86,13 +92,10 @@ impl OnChainConfig for OnChainEvmGenesisConfig { } } - - /// Move event type `0x1::evm_genesis_config::EvmGenesisEvent` in rust. /// See its doc in Move for more details. #[derive(Serialize, Deserialize)] -pub struct EvmGenesisEvent { -} +pub struct EvmGenesisEvent {} impl MoveStructType for EvmGenesisEvent { const MODULE_NAME: &'static IdentStr = ident_str!("evm_genesis_config"); diff --git a/types/src/on_chain_config/mod.rs b/types/src/on_chain_config/mod.rs index 30fd0b8c79549..325a040923ef1 100644 --- a/types/src/on_chain_config/mod.rs +++ b/types/src/on_chain_config/mod.rs @@ -8,7 +8,7 @@ use crate::{ event::{EventHandle, EventKey}, state_store::{state_key::StateKey, StateView}, }; -use anyhow::{format_err, Result}; +use anyhow::{format_err, Context, Result}; use bytes::Bytes; use move_core_types::{ account_address::AccountAddress, @@ -46,7 +46,8 @@ pub use self::{ }, automation_registry::{ AutomationCycleDetails, AutomationCycleEvent, AutomationCycleInfo, AutomationCycleState, - AutomationRegistryConfig, AutomationRegistryConfigV1, AutomationRegistryConfigV2, AutomationCycleTransitionState + AutomationCycleTransitionState, AutomationRegistryConfig, AutomationRegistryConfigV1, + AutomationRegistryConfigV2, }, commit_history::CommitHistoryResource, consensus_config::{ @@ -54,6 +55,9 @@ pub use self::{ LeaderReputationType, OnChainConsensusConfig, ProposerAndVoterConfig, ProposerElectionType, ValidatorTxnConfig, }, + evm_genesis_config::{ + GenesisEvmContract, GenesisEvmEOA, OnChainEvmGenesisConfig, EVM_GENESIS_EVENT_MOVE_TYPE_TAG, + }, execution_config::{ BlockGasLimitType, ExecutionConfigV1, ExecutionConfigV2, ExecutionConfigV4, OnChainExecutionConfig, TransactionDeduperType, TransactionShufflerType, @@ -69,7 +73,6 @@ pub use self::{ timestamp::CurrentTimeMicroseconds, transaction_fee::TransactionFeeBurnCap, validator_set::{ConsensusScheme, ValidatorSet}, - evm_genesis_config::{OnChainEvmGenesisConfig, GenesisEvmContract, GenesisEvmEOA, EVM_GENESIS_EVENT_MOVE_TYPE_TAG}, }; /// To register an on-chain config in Rust: @@ -185,9 +188,18 @@ pub trait OnChainConfig: Send + Sync + DeserializeOwned { where T: ConfigStorage + ?Sized, { - let state_key = StateKey::on_chain_config::().ok()?; - let bytes = storage.fetch_config_bytes(&state_key)?; - Self::deserialize_into_config(&bytes).ok() + Self::try_fetch_config(storage).ok() + } + + fn try_fetch_config(storage: &T) -> Result + where + T: ConfigStorage + ?Sized, + { + let state_key = StateKey::on_chain_config::()?; + let bytes = storage + .fetch_config_bytes(&state_key) + .context("Could not fetch config bytes from storage")?; + Self::deserialize_into_config(&bytes) } fn address() -> &'static AccountAddress { diff --git a/types/src/proptest_types.rs b/types/src/proptest_types.rs index 906d4ce84ca9e..d81e8a68f2497 100644 --- a/types/src/proptest_types.rs +++ b/types/src/proptest_types.rs @@ -14,7 +14,7 @@ use crate::{ block_metadata_ext::BlockMetadataExt, chain_id::ChainId, contract_event::ContractEvent, - dkg::{DKGTranscript, DKGTranscriptMetadata}, + dkg::transactions::{DKGTransactionData, DKGTransactionType}, epoch_state::EpochState, event::{EventHandle, EventKey}, ledger_info::{generate_ledger_info_with_sig, LedgerInfo, LedgerInfoWithSignatures}, @@ -1287,13 +1287,14 @@ impl Arbitrary for ValidatorTransaction { fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { (any::>()) .prop_map(|payload| { - ValidatorTransaction::DKGResult(DKGTranscript { - metadata: DKGTranscriptMetadata { - epoch: 0, - author: AccountAddress::ZERO, - }, - transcript_bytes: payload, - }) + ValidatorTransaction::DKG(DKGTransactionData::new( + 0, + AccountAddress::ZERO, + payload, + vec![], + vec![], + DKGTransactionType::DKGMeta, + )) }) .boxed() } diff --git a/types/src/stake_pool.rs b/types/src/stake_pool.rs index 8f7d9098d590d..4f8e235f511d3 100644 --- a/types/src/stake_pool.rs +++ b/types/src/stake_pool.rs @@ -2,10 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 use crate::{account_address::AccountAddress, event::EventHandle}; +use move_core_types::{ + ident_str, + identifier::IdentStr, + move_resource::{MoveResource, MoveStructType}, +}; use serde::{Deserialize, Serialize}; -use move_core_types::ident_str; -use move_core_types::identifier::IdentStr; -use move_core_types::move_resource::{MoveResource, MoveStructType}; #[derive(Debug, Serialize, Deserialize)] pub struct StakePool { diff --git a/types/src/transaction/automated_transaction.rs b/types/src/transaction/automated_transaction.rs index 7b1d1cf042c4d..317547326be31 100644 --- a/types/src/transaction/automated_transaction.rs +++ b/types/src/transaction/automated_transaction.rs @@ -1,10 +1,16 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. // SPDX-License-Identifier: Apache-2.0 -use std::cmp::Ordering; -use crate::chain_id::ChainId; -use crate::transaction::automation::{AutomationTaskMetaData, AutomationTaskType, Priority}; -use crate::transaction::{EntryFunction, RawTransaction, Transaction, TransactionPayload}; +use crate::{ + chain_id::ChainId, + transaction::{ + automation::{AutomationTaskMetaData, AutomationTaskType, Priority}, + EntryFunction, RawTransaction, Transaction, TransactionPayload, + }, +}; use anyhow::anyhow; use aptos_crypto::HashValue; use derive_getters::Getters; @@ -12,9 +18,7 @@ use derive_more::Constructor; use move_core_types::account_address::AccountAddress; use once_cell::sync::OnceCell; use serde::{Deserialize, Serialize}; -use std::fmt; -use std::fmt::Debug; -use std::ops::Deref; +use std::{cmp::Ordering, fmt, fmt::Debug, ops::Deref}; /// A transaction that has been created based on the automation-task in automation registry. /// @@ -172,7 +176,6 @@ impl From for Transaction { } } - impl PartialOrd for AutomatedTransactionDescriptor { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) @@ -182,21 +185,15 @@ impl PartialOrd for AutomatedTransactionDescriptor { impl Ord for AutomatedTransactionDescriptor { fn cmp(&self, other: &Self) -> Ordering { match self.task_type.cmp(&other.task_type) { - Ordering::Less => { - Ordering::Less - } - Ordering::Equal => { - self.priority.cmp(&other.priority) - } - Ordering::Greater => { - Ordering::Greater - } + Ordering::Less => Ordering::Less, + Ordering::Equal => self.priority.cmp(&other.priority), + Ordering::Greater => Ordering::Greater, } } } macro_rules! value_or_missing { - ($value: ident , $message: literal) => { + ($value:ident, $message:literal) => { match $value { Some(v) => v, None => return BuilderResult::missing_value($message), @@ -285,6 +282,7 @@ impl AutomatedTransactionBuilder { pub fn new() -> Self { Self::default() } + pub fn with_gas_price_cap(mut self, cap: u64) -> Self { self.gas_price_cap = cap; self @@ -294,10 +292,12 @@ impl AutomatedTransactionBuilder { self.sender = Some(sender); self } + pub fn with_sequence_number(mut self, seq: u64) -> Self { self.sequence_number = Some(seq); self } + pub fn with_payload(mut self, payload: TransactionPayload) -> Self { self.payload = Some(payload); self @@ -307,26 +307,32 @@ impl AutomatedTransactionBuilder { self.payload = Some(TransactionPayload::EntryFunction(entry_fn)); self } + pub fn with_max_gas_amount(mut self, max_gas_amount: u64) -> Self { self.max_gas_amount = Some(max_gas_amount); self } + pub fn with_gas_unit_price(mut self, gas_unit_price: u64) -> Self { self.gas_unit_price = Some(gas_unit_price); self } + pub fn with_expiration_timestamp_secs(mut self, secs: u64) -> Self { self.expiration_timestamp_secs = Some(secs); self } + pub fn with_chain_id(mut self, chain_id: ChainId) -> Self { self.chain_id = Some(chain_id); self } + pub fn with_authenticator(mut self, authenticator: HashValue) -> Self { self.authenticator = Some(authenticator); self } + pub fn with_block_height(mut self, block_height: u64) -> Self { self.block_height = Some(block_height); self diff --git a/types/src/transaction/automation.rs b/types/src/transaction/automation.rs index bb874ebda39bc..c374987485d16 100644 --- a/types/src/transaction/automation.rs +++ b/types/src/transaction/automation.rs @@ -1,17 +1,23 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2025 Supra. // SPDX-License-Identifier: Apache-2.0 -use crate::on_chain_config::{FeatureFlag, Features}; -use crate::transaction::{EntryFunction, Transaction}; +use crate::{ + on_chain_config::{FeatureFlag, Features}, + transaction::{EntryFunction, Transaction}, +}; use aptos_crypto::HashValue; use derive_getters::Getters; use derive_more::Constructor; -use move_core_types::account_address::AccountAddress; -use move_core_types::identifier::{IdentStr, Identifier}; -use move_core_types::language_storage::{ModuleId, TypeTag, CORE_CODE_ADDRESS}; -use move_core_types::value::{serialize_values, MoveValue}; -use once_cell::sync::Lazy; -use once_cell::unsync::OnceCell; +use move_core_types::{ + account_address::AccountAddress, + identifier::{IdentStr, Identifier}, + language_storage::{ModuleId, TypeTag, CORE_CODE_ADDRESS}, + value::{serialize_values, MoveValue}, +}; +use once_cell::{sync::Lazy, unsync::OnceCell}; #[cfg(any(test, feature = "fuzzing"))] use proptest_derive::Arbitrary; use serde::{Deserialize, Serialize}; @@ -219,6 +225,7 @@ impl RegistrationParams { }, } } + pub fn task_type(&self) -> AutomationTaskType { match self { RegistrationParams::V1(p) => p.task_type(), @@ -262,6 +269,7 @@ impl RegistrationParamsV1 { self.aux_data, ) } + /// Module id containing registration function. pub fn module_id(&self) -> &ModuleId { &AUTOMATION_REGISTRY_PRIVATE_ENTRY_REFS.module_id @@ -371,6 +379,7 @@ impl RegistrationParamsV2 { self.priority_value, ) } + /// Module id containing registration function. pub fn module_id(&self) -> &ModuleId { &AUTOMATION_REGISTRY_PRIVATE_ENTRY_REFS.module_id @@ -518,7 +527,6 @@ impl TryFrom<&[u8]> for AutomationTaskType { } } - /// Describes the state of the automation task // The order of the entries is important, a new one should be appended at the end. #[derive(Clone, Copy, Debug, Hash, Serialize, Deserialize, PartialEq, Eq)] @@ -535,13 +543,11 @@ impl AutomationTaskState { pub fn is_active(&self) -> bool { match self { AutomationTaskState::Pending => false, - AutomationTaskState::Active | - AutomationTaskState::Cancelled => true + AutomationTaskState::Active | AutomationTaskState::Cancelled => true, } } } - /// Rust representation of the Automation task meta information in Move. #[derive(Clone, Debug, Serialize, Deserialize, Getters, Constructor)] pub struct AutomationTaskMetaData { @@ -578,8 +584,8 @@ pub struct AutomationTaskMetaData { pub(crate) priority: OnceCell>, } impl AutomationTaskMetaData { - const TASK_TYPE_AUX_INDEX: usize = 0; const TASK_PRIORITY_AUX_INDEX: usize = 1; + const TASK_TYPE_AUX_INDEX: usize = 0; #[allow(clippy::too_many_arguments)] pub fn create( @@ -682,35 +688,37 @@ impl AutomationTaskMetaData { /// Consumes the input and returns properties flattened. /// No property is modified. /// To get exact values of the task type and priority corresponding special getter functions should be used. - pub fn flatten(self) -> - (u64, - AccountAddress, - Vec, - u64, - Vec, - u64, - u64, - u64, - Vec>, - u64, - AutomationTaskState, - u64, - ) { - ( - self.id, - self.owner, - self.payload_tx, - self.expiry_time, - self.tx_hash, - self.max_gas_amount, - self.gas_price_cap, - self.automation_fee_cap_for_epoch, - self.aux_data, - self.registration_time, - self.state, - self.locked_fee_for_next_epoch, - ) - } + pub fn flatten( + self, + ) -> ( + u64, + AccountAddress, + Vec, + u64, + Vec, + u64, + u64, + u64, + Vec>, + u64, + AutomationTaskState, + u64, + ) { + ( + self.id, + self.owner, + self.payload_tx, + self.expiry_time, + self.tx_hash, + self.max_gas_amount, + self.gas_price_cap, + self.automation_fee_cap_for_epoch, + self.aux_data, + self.registration_time, + self.state, + self.locked_fee_for_next_epoch, + ) + } } /// Action to be performed on automation registry. diff --git a/types/src/transaction/mod.rs b/types/src/transaction/mod.rs index 4bd736c65b5df..5d36872db6489 100644 --- a/types/src/transaction/mod.rs +++ b/types/src/transaction/mod.rs @@ -56,24 +56,32 @@ pub mod user_transaction_context; pub mod webauthn; pub use self::block_epilogue::{BlockEndInfo, BlockEpiloguePayload}; -use crate::move_utils::MemberId; -use crate::serde_helper::vec_bytes; #[cfg(any(test, feature = "fuzzing"))] use crate::state_store::create_empty_sharded_state_updates; -use crate::transaction::automated_transaction::AutomatedTransaction; -use crate::transaction::automation::{AutomationRegistryRecord, RegistrationParams}; use crate::{ - block_metadata_ext::BlockMetadataExt, contract_event::TransactionEvent, executable::ModulePath, - fee_statement::FeeStatement, proof::accumulator::InMemoryEventAccumulator, - validator_txn::ValidatorTransaction, write_set::TransactionWrite, + block_metadata_ext::BlockMetadataExt, + contract_event::TransactionEvent, + executable::ModulePath, + fee_statement::FeeStatement, + move_utils::MemberId, + proof::accumulator::InMemoryEventAccumulator, + serde_helper::vec_bytes, + transaction::{ + automated_transaction::AutomatedTransaction, + automation::{AutomationRegistryRecord, RegistrationParams}, + }, + validator_txn::ValidatorTransaction, + write_set::TransactionWrite, }; pub use block_output::BlockOutput; pub use change_set::ChangeSet; pub use module::{Module, ModuleBundle}; -use move_core_types::identifier::{IdentStr, Identifier}; -use move_core_types::language_storage::{ModuleId, TypeTag}; pub use move_core_types::transaction_argument::TransactionArgument; -use move_core_types::vm_status::AbortLocation; +use move_core_types::{ + identifier::{IdentStr, Identifier}, + language_storage::{ModuleId, TypeTag}, + vm_status::AbortLocation, +}; use move_vm_types::delayed_values::delayed_field_id::{ ExtractUniqueIndex, ExtractWidth, TryFromMoveValue, TryIntoMoveValue, }; @@ -2084,7 +2092,7 @@ impl Transaction { Transaction::BlockMetadataExt(_) => "block_metadata_ext", Transaction::AutomatedTransaction(_) => "automated_transaction", Transaction::AutomationRegistryTransaction(_) => "automation_registry_transaction", - Transaction::SystemAutomatedTransaction(_) => "system_automated_transaction" + Transaction::SystemAutomatedTransaction(_) => "system_automated_transaction", } } diff --git a/types/src/transaction/multisig.rs b/types/src/transaction/multisig.rs index 4ee6704f826d0..129b39c3a56da 100644 --- a/types/src/transaction/multisig.rs +++ b/types/src/transaction/multisig.rs @@ -1,10 +1,11 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -use crate::transaction::{user_transaction_context::MultisigPayload, EntryFunction}; +use crate::transaction::{ + automation::RegistrationParams, user_transaction_context::MultisigPayload, EntryFunction, +}; use move_core_types::{account_address::AccountAddress, vm_status::VMStatus}; use serde::{Deserialize, Serialize}; -use crate::transaction::automation::RegistrationParams; /// A multisig transaction that allows an owner of a multisig account to execute a pre-approved /// transaction as the multisig account. @@ -21,34 +22,27 @@ pub struct Multisig { #[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)] pub enum MultisigTransactionPayload { EntryFunction(EntryFunction), - AutomationRegistration(RegistrationParams) + AutomationRegistration(RegistrationParams), } impl Multisig { pub fn as_multisig_payload(&self) -> MultisigPayload { match &self.transaction_payload { - None => { - MultisigPayload { - multisig_address: self.multisig_address, - entry_function_payload: None, - is_automation_registration: None, - } - } - Some(MultisigTransactionPayload::AutomationRegistration(_)) => { - MultisigPayload { - multisig_address: self.multisig_address, - entry_function_payload: None, - is_automation_registration: Some(true), - } - } - Some(MultisigTransactionPayload::EntryFunction(entry)) => { - MultisigPayload { - multisig_address: self.multisig_address, - entry_function_payload: - Some(entry.as_entry_function_payload()), - is_automation_registration: Some(false), - } - } + None => MultisigPayload { + multisig_address: self.multisig_address, + entry_function_payload: None, + is_automation_registration: None, + }, + Some(MultisigTransactionPayload::AutomationRegistration(_)) => MultisigPayload { + multisig_address: self.multisig_address, + entry_function_payload: None, + is_automation_registration: Some(true), + }, + Some(MultisigTransactionPayload::EntryFunction(entry)) => MultisigPayload { + multisig_address: self.multisig_address, + entry_function_payload: Some(entry.as_entry_function_payload()), + is_automation_registration: Some(false), + }, } } } diff --git a/types/src/transaction/user_transaction_context.rs b/types/src/transaction/user_transaction_context.rs index 4ca99a07129b3..4d9e504fce0af 100644 --- a/types/src/transaction/user_transaction_context.rs +++ b/types/src/transaction/user_transaction_context.rs @@ -20,7 +20,6 @@ pub enum PayloadTypeReference { AutomationRegistration, } - impl PayloadTypeReference where EFP: Clone + Debug, diff --git a/types/src/unit_tests/automation.rs b/types/src/unit_tests/automation.rs index 46ddc7134349b..eb361d3845cd0 100644 --- a/types/src/unit_tests/automation.rs +++ b/types/src/unit_tests/automation.rs @@ -1,12 +1,22 @@ +// Copyright (c) Aptos Foundation +// SPDX-License-Identifier: Apache-2.0 + // Copyright (c) 2024 Supra. // SPDX-License-Identifier: Apache-2.0 -use crate::chain_id::ChainId; -use crate::move_utils::MemberId; -use crate::on_chain_config::{FeatureFlag, Features}; -use crate::transaction::automated_transaction::{AutomatedTransactionBuilder, BuilderResult}; -use crate::transaction::automation::{AutomationRegistryAction, AutomationRegistryRecordBuilder, AutomationTaskMetaData, AutomationTaskState, AutomationTaskType, RegistrationParams}; -use crate::transaction::{EntryFunction, TransactionPayload}; +use crate::{ + chain_id::ChainId, + move_utils::MemberId, + on_chain_config::{FeatureFlag, Features}, + transaction::{ + automated_transaction::{AutomatedTransactionBuilder, BuilderResult}, + automation::{ + AutomationRegistryAction, AutomationRegistryRecordBuilder, AutomationTaskMetaData, + AutomationTaskState, AutomationTaskType, RegistrationParams, + }, + EntryFunction, TransactionPayload, + }, +}; use aptos_crypto::HashValue; use move_core_types::account_address::AccountAddress; use std::str::FromStr; @@ -23,7 +33,9 @@ fn test_registration_params_serde() { let automation_fee_cap_for_epoch = 50_000_000; let aux_data = vec![vec![1u8, 1, 2, 3]]; // Includes task type prepended to the user specified one. - let expected_aux_data = vec![vec![AutomationTaskType::User as u8], vec![], vec![1u8, 1, 2, 3]]; + let expected_aux_data = vec![vec![AutomationTaskType::User as u8], vec![], vec![ + 1u8, 1, 2, 3, + ]]; let entry_function = EntryFunction::new(module_id, member_id, vec![], vec![]); let registration_params = RegistrationParams::new_user_automation_task_v1( entry_function.clone(), @@ -157,7 +169,9 @@ fn test_registration_params_v2_user_task_serde() { aux_data.clone(), None, ); - let expected_aux_data = vec![vec![AutomationTaskType::User as u8], vec![], vec![1u8, 1, 2, 3]]; + let expected_aux_data = vec![vec![AutomationTaskType::User as u8], vec![], vec![ + 1u8, 1, 2, 3, + ]]; let serialized = registration_params.serialized_args_with_sender_and_parent_hash( address, parent_hash.to_vec(), @@ -245,7 +259,9 @@ fn test_registration_params_system_task_serde() { aux_data.clone(), None, ); - let expected_aux_data = vec![vec![AutomationTaskType::System as u8], vec![], vec![1u8, 1, 2, 3]]; + let expected_aux_data = vec![vec![AutomationTaskType::System as u8], vec![], vec![ + 1u8, 1, 2, 3, + ]]; let serialized = registration_params.serialized_args_with_sender_and_parent_hash( address, parent_hash.to_vec(), @@ -317,7 +333,10 @@ fn automation_task_metadata_type_priority_expansion() { // Aux data with type info, and valid priority results with specified priority and type let task_meta_with_valid_type_priority = AutomationTaskMetaData { - aux_data: vec![vec![AutomationTaskType::System as u8], bcs::to_bytes(&42u64).unwrap()], + aux_data: vec![ + vec![AutomationTaskType::System as u8], + bcs::to_bytes(&42u64).unwrap(), + ], task_type: Default::default(), priority: Default::default(), ..task_meta.clone() @@ -458,7 +477,10 @@ fn automated_txn_builder_from_task_meta() { // Check builder construction when type is specified and priority is valid data. let task_meta_with_valid_type_and_priority = AutomationTaskMetaData { - aux_data: vec![vec![AutomationTaskType::System as u8], bcs::to_bytes(&45u64).unwrap()], + aux_data: vec![ + vec![AutomationTaskType::System as u8], + bcs::to_bytes(&45u64).unwrap(), + ], ..task_meta_valid.clone() }; let builder = diff --git a/types/src/unit_tests/mod.rs b/types/src/unit_tests/mod.rs index 2185535d8b3c5..ceae6f8b7b75e 100644 --- a/types/src/unit_tests/mod.rs +++ b/types/src/unit_tests/mod.rs @@ -3,6 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 mod access_path_test; +mod automation; mod block_metadata_test; mod code_debug_fmt_test; mod contract_event_test; @@ -11,4 +12,3 @@ mod transaction_test; mod trusted_state_test; mod validator_set_test; mod write_set_test; -mod automation; diff --git a/types/src/validator_config.rs b/types/src/validator_config.rs index 3e2354ee998dc..65baf9ed0eac5 100644 --- a/types/src/validator_config.rs +++ b/types/src/validator_config.rs @@ -2,8 +2,8 @@ // Parts of the project are originally copyright © Meta Platforms, Inc. // SPDX-License-Identifier: Apache-2.0 -use crate::network_address::NetworkAddress; -use aptos_crypto::ed25519; +use crate::{network_address::NetworkAddress, validator_public_keys::ValidatorPublicKeys}; +use aptos_crypto::{ed25519, ed25519::PublicKey as Ed25519PublicKey}; use move_core_types::{ ident_str, identifier::IdentStr, @@ -35,7 +35,7 @@ impl MoveResource for ValidatorOperatorConfigResource {} #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[cfg_attr(any(test, feature = "fuzzing"), derive(Arbitrary))] pub struct ValidatorConfig { - pub consensus_public_key: ed25519::PublicKey, + consensus_public_key: Vec, /// This is an bcs serialized `Vec` pub validator_network_addresses: Vec, /// This is an bcs serialized `Vec` @@ -51,13 +51,29 @@ impl ValidatorConfig { validator_index: u64, ) -> Self { ValidatorConfig { - consensus_public_key, + consensus_public_key: consensus_public_key.to_bytes().to_vec(), validator_network_addresses, fullnode_network_addresses, validator_index, } } + pub fn consensus_key_raw(&self) -> Vec { + self.consensus_public_key.clone() + } + + pub fn consensus_public_key(&self) -> Ed25519PublicKey { + let keys = bcs::from_bytes::(&self.consensus_public_key); + if let Ok(keys) = keys { + let ed_key = Ed25519PublicKey::try_from(keys.supra_keys().ed25519_key().as_slice()) + .expect("Failed to deserialize consensus public key from on-chain representation"); + return ed_key; + } + + Ed25519PublicKey::try_from(&self.consensus_public_key[..]) + .expect("Failed to deserialize consensus public key from on-chain representation") + } + pub fn fullnode_network_addresses(&self) -> Result, bcs::Error> { bcs::from_bytes(&self.fullnode_network_addresses) } diff --git a/types/src/validator_info.rs b/types/src/validator_info.rs index 01f5c7f3fd09d..999ec011df952 100644 --- a/types/src/validator_info.rs +++ b/types/src/validator_info.rs @@ -81,8 +81,13 @@ impl ValidatorInfo { } /// Returns the key for validating signed messages from this validator - pub fn consensus_public_key(&self) -> &ed25519::PublicKey { - &self.config.consensus_public_key + pub fn consensus_public_key(&self) -> ed25519::PublicKey { + self.config.consensus_public_key() + } + + /// Returns the key for validating signed messages from this validator + pub fn consensus_key_bytes(&self) -> ed25519::PublicKey { + self.config.consensus_public_key() } /// Returns the voting power for this validator diff --git a/types/src/validator_public_keys.rs b/types/src/validator_public_keys.rs new file mode 100644 index 0000000000000..61b59b9b81276 --- /dev/null +++ b/types/src/validator_public_keys.rs @@ -0,0 +1,82 @@ +use derive_getters::Getters; +use serde::{Deserialize, Serialize}; +use std::fmt; + +/// Reflection of supra_framework::validator_public_keys::InternalPublicKeys in Rust +#[derive(Clone, Debug, Serialize, Deserialize, Getters)] +pub struct InternalPublicKeys { + bls_multisig_key: Vec, + bls_threshold_validity_certificate_key: Option>, + bls_threshold_quorum_certificate_key: Option>, + bls_threshold_unanimous_certificate_key: Option>, + bls_threshold_bcft_validity_certificate_key: Option>, + bls_threshold_bcft_quorum_certificate_key: Option>, + bls_threshold_bcft_fallback_view_change_certificate_key: Option>, + bls_threshold_clan_majority_certificate_key: Option>, + class_group_key: Vec, + ed25519_key: Vec, +} + +/// Reflection of supra_framework::validator_public_keys::ValidatorPublicKeys in Rust +#[derive(Clone, Debug, Serialize, Deserialize, Getters)] +pub struct ValidatorPublicKeys { + network_key: Vec, + supra_keys: InternalPublicKeys, +} + +impl ValidatorPublicKeys { + pub fn new( + network_key: Vec, + bls_multisig_key: Vec, + bls_threshold_validity_certificate_key: Option>, + bls_threshold_quorum_certificate_key: Option>, + bls_threshold_unanimous_certificate_key: Option>, + bls_threshold_bcft_validity_certificate_key: Option>, + bls_threshold_bcft_quorum_certificate_key: Option>, + bls_threshold_bcft_fallback_view_change_certificate_key: Option>, + bls_threshold_clan_majority_certificate_key: Option>, + class_group_key: Vec, + ed25519_key: Vec, + ) -> Self { + ValidatorPublicKeys { + network_key, + supra_keys: InternalPublicKeys { + bls_multisig_key, + bls_threshold_validity_certificate_key, + bls_threshold_quorum_certificate_key, + bls_threshold_unanimous_certificate_key, + bls_threshold_bcft_validity_certificate_key, + bls_threshold_bcft_quorum_certificate_key, + bls_threshold_bcft_fallback_view_change_certificate_key, + bls_threshold_clan_majority_certificate_key, + class_group_key, + ed25519_key, + }, + } + } +} + +#[derive(Debug)] +pub enum ValidatorPublicKeysError { + InvalidPublicKey, +} + +impl fmt::Display for ValidatorPublicKeysError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + ValidatorPublicKeysError::InvalidPublicKey => write!(f, "Invalid public key format"), + } + } +} + +impl std::error::Error for ValidatorPublicKeysError {} + +impl TryFrom<&Vec> for ValidatorPublicKeys { + type Error = ValidatorPublicKeysError; + + fn try_from(bytes: &Vec) -> Result { + let validator_public_keys: ValidatorPublicKeys = + bcs::from_bytes(bytes).map_err(|_| ValidatorPublicKeysError::InvalidPublicKey)?; + Ok(validator_public_keys) + } +} diff --git a/types/src/validator_txn.rs b/types/src/validator_txn.rs index ad6481b36f52f..36fe59ff03afa 100644 --- a/types/src/validator_txn.rs +++ b/types/src/validator_txn.rs @@ -1,17 +1,14 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 -#[cfg(any(test, feature = "fuzzing"))] -use crate::dkg::DKGTranscriptMetadata; -use crate::{dkg::DKGTranscript, jwks}; +use crate::{aptos_dkg::DKGTranscript, dkg::transactions::DKGTransactionData, jwks}; use aptos_crypto_derive::{BCSCryptoHash, CryptoHasher}; -#[cfg(any(test, feature = "fuzzing"))] -use move_core_types::account_address::AccountAddress; use serde::{Deserialize, Serialize}; use std::fmt::Debug; #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, CryptoHasher, BCSCryptoHash)] pub enum ValidatorTransaction { + DKG(DKGTransactionData), DKGResult(DKGTranscript), ObservedJWKUpdate(jwks::QuorumCertifiedUpdate), } @@ -19,13 +16,14 @@ pub enum ValidatorTransaction { impl ValidatorTransaction { #[cfg(any(test, feature = "fuzzing"))] pub fn dummy(payload: Vec) -> Self { - Self::DKGResult(DKGTranscript { - metadata: DKGTranscriptMetadata { - epoch: 999, - author: AccountAddress::ZERO, - }, - transcript_bytes: payload, - }) + Self::DKG(DKGTransactionData::new( + 999, + move_core_types::account_address::AccountAddress::ZERO, + payload, + vec![], + vec![], + crate::dkg::transactions::DKGTransactionType::DKGMeta, + )) } pub fn size_in_bytes(&self) -> usize { @@ -34,7 +32,8 @@ impl ValidatorTransaction { pub fn topic(&self) -> Topic { match self { - ValidatorTransaction::DKGResult(_) => Topic::DKG, + ValidatorTransaction::DKG(_) => Topic::DKG, + ValidatorTransaction::DKGResult(_) => Topic::DKG_RESULT, ValidatorTransaction::ObservedJWKUpdate(update) => { Topic::JWK_CONSENSUS(update.update.issuer.clone()) }, @@ -43,6 +42,7 @@ impl ValidatorTransaction { pub fn type_name(&self) -> &'static str { match self { + ValidatorTransaction::DKG(_) => "validator_transaction__dkg", ValidatorTransaction::DKGResult(_) => "validator_transaction__dkg_result", ValidatorTransaction::ObservedJWKUpdate(_) => { "validator_transaction__observed_jwk_update" @@ -55,5 +55,6 @@ impl ValidatorTransaction { #[allow(non_camel_case_types)] pub enum Topic { DKG, + DKG_RESULT, JWK_CONSENSUS(jwks::Issuer), } diff --git a/vm-validator/Cargo.toml b/vm-validator/Cargo.toml index 9372eb2cf1894..132f4093ef0b6 100644 --- a/vm-validator/Cargo.toml +++ b/vm-validator/Cargo.toml @@ -27,7 +27,7 @@ aptos-cached-packages = { workspace = true } aptos-crypto = { workspace = true } aptos-db = { workspace = true } aptos-executor-test-helpers = { workspace = true } -aptos-gas-schedule = { workspace = true, features = ["testing"] } +aptos-gas-schedule = { workspace = true, features = ["testing"] } aptos-temppath = { workspace = true } aptos-types = { workspace = true } aptos-vm-genesis = { workspace = true } diff --git a/vm-validator/src/mocks/mock_vm_validator.rs b/vm-validator/src/mocks/mock_vm_validator.rs index 4e32e3a8bd47a..4048644919bcd 100644 --- a/vm-validator/src/mocks/mock_vm_validator.rs +++ b/vm-validator/src/mocks/mock_vm_validator.rs @@ -6,11 +6,12 @@ use crate::vm_validator::TransactionValidation; use anyhow::Result; use aptos_types::{ account_address::AccountAddress, + dkg::transactions::DKGTransactionData, state_store::StateView, transaction::{SignedTransaction, VMValidatorResult}, vm_status::StatusCode, }; -use aptos_vm::VMValidator; +use aptos_vm::{move_vm_ext::AptosMoveResolver, VMValidator}; pub const ACCOUNT_DNE_TEST_ADD: AccountAddress = AccountAddress::new([0_u8; AccountAddress::LENGTH]); @@ -38,6 +39,14 @@ impl VMValidator for MockVMValidator { ) -> VMValidatorResult { VMValidatorResult::new(None, 0) } + + fn validate_dkg_validator_transaction( + &self, + _transaction: DKGTransactionData, + _state_view: &impl AptosMoveResolver, + ) -> VMValidatorResult { + VMValidatorResult::new(None, 0) + } } impl TransactionValidation for MockVMValidator {