From 6c10836db76123a8dd1143d9745cb41872f9dc77 Mon Sep 17 00:00:00 2001 From: Juan Munoz Date: Fri, 20 Feb 2026 18:32:52 -0300 Subject: [PATCH 1/7] chore: continue with update --- Cargo.lock | 2432 ++++++----------- Cargo.toml | 2 +- bin/integration-tests/src/tests/client.rs | 39 +- bin/integration-tests/src/tests/fpi.rs | 147 +- .../templates/basic-fungible-faucet.toml | 2 +- bin/miden-cli/tests/cli.rs | 66 +- crates/idxdb-store/src/transaction/utils.rs | 2 +- crates/rust-client/Cargo.toml | 2 +- crates/rust-client/src/rpc/domain/sync.rs | 113 +- .../rust-client/src/rpc/domain/transaction.rs | 11 +- crates/rust-client/src/rpc/errors/node/mod.rs | 2 +- .../src/rpc/generated/nostd/rpc.rs | 84 +- .../rust-client/src/rpc/generated/std/rpc.rs | 84 +- crates/rust-client/src/rpc/mod.rs | 29 +- .../rust-client/src/rpc/tonic_client/mod.rs | 32 +- crates/rust-client/src/sync/state_sync.rs | 100 +- .../rust-client/src/sync/state_sync_update.rs | 11 + crates/rust-client/src/test_utils/mock.rs | 155 +- crates/sqlite-store/src/transaction.rs | 2 +- crates/testing/node-builder/src/lib.rs | 54 +- crates/testing/prover/Cargo.toml | 7 +- crates/testing/prover/src/main.rs | 78 +- crates/web-client/Cargo.toml | 18 +- crates/web-client/src/models/account.rs | 4 +- .../src/models/account_component.rs | 50 +- .../web-client/src/models/account_header.rs | 4 +- crates/web-client/src/models/account_id.rs | 4 +- crates/web-client/src/models/address.rs | 4 +- .../components/auth_falcon512_rpo_multisig.rs | 12 +- crates/web-client/src/models/note.rs | 12 +- crates/web-client/src/models/note_metadata.rs | 2 +- crates/web-client/src/sync.rs | 4 +- crates/web-client/test/account.test.ts | 14 +- crates/web-client/test/account_reader.test.ts | 2 +- crates/web-client/test/import.test.ts | 4 +- crates/web-client/test/import_export.test.ts | 2 +- crates/web-client/test/new_account.test.ts | 2 +- .../web-client/test/new_transactions.test.ts | 8 +- crates/web-client/test/token_symbol.test.ts | 8 +- crates/web-client/test/webClientTestUtils.ts | 4 +- crates/web-client/yarn.lock | 77 +- docs/typedoc/web-client/classes/Account.md | 24 +- .../web-client/classes/AccountHeader.md | 24 +- rust-toolchain.toml | 2 +- 44 files changed, 1563 insertions(+), 2176 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ea7117562..e4f08abb04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,19 +27,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "getrandom 0.3.4", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.4" @@ -49,21 +36,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "allocator-api2" version = "0.2.21" @@ -138,15 +110,6 @@ dependencies = [ "backtrace", ] -[[package]] -name = "arc-swap" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f3647c145568cec02c42054e07bdf9a5a698e15b466fb2341bfc393cd24aa5" -dependencies = [ - "rustversion", -] - [[package]] name = "arrayref" version = "0.3.9" @@ -210,21 +173,399 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] -name = "atty" -version = "0.2.14" +name = "autocfg" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "aws-config" +version = "1.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a8fc176d53d6fe85017f230405e3255cedb4a02221cb55ed6d76dccbbb099b2" dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", + "aws-credential-types", + "aws-runtime", + "aws-sdk-sso", + "aws-sdk-ssooidc", + "aws-sdk-sts", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "hex", + "http 1.4.0", + "ring", + "time", + "tokio", + "tracing", + "url", + "zeroize", ] [[package]] -name = "autocfg" -version = "1.5.0" +name = "aws-credential-types" +version = "1.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "6d203b0bf2626dcba8665f5cd0871d7c2c0930223d6b6be9097592fea21242d0" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + +[[package]] +name = "aws-lc-rs" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9a7b350e3bb1767102698302bc37256cbd48422809984b98d292c40e2579aa9" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.37.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b092fe214090261288111db7a2b2c2118e5a7f30dc2569f1732c4069a6840549" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "aws-runtime" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede2ddc593e6c8acc6ce3358c28d6677a6dc49b65ba4b37a2befe14a11297e75" +dependencies = [ + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "bytes-utils", + "fastrand", + "http 1.4.0", + "http-body 1.0.1", + "percent-encoding", + "pin-project-lite", + "tracing", + "uuid", +] + +[[package]] +name = "aws-sdk-kms" +version = "1.102.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22b682ef733ec24c300b11cec2df9bfea7ee4bf48ab2030c832e27db92b69c68" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-observability", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.4.0", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-sso" +version = "1.95.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00c5ff27c6ba2cbd95e6e26e2e736676fdf6bcf96495b187733f521cfe4ce448" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-observability", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.4.0", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-ssooidc" +version = "1.97.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d186f1e5a3694a188e5a0640b3115ccc6e084d104e16fd6ba968dca072ffef8" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-observability", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.4.0", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-sts" +version = "1.99.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9acba7c62f3d4e2408fa998a3a8caacd8b9a5b5549cf36e2372fbdae329d5449" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-observability", + "aws-smithy-query", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "fastrand", + "http 0.2.12", + "http 1.4.0", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37411f8e0f4bea0c3ca0958ce7f18f6439db24d555dbd809787262cd00926aa9" +dependencies = [ + "aws-credential-types", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "form_urlencoded", + "hex", + "hmac", + "http 0.2.12", + "http 1.4.0", + "percent-encoding", + "sha2", + "time", + "tracing", +] + +[[package]] +name = "aws-smithy-async" +version = "1.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc50d0f63e714784b84223abd7abbc8577de8c35d699e0edd19f0a88a08ae13" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "aws-smithy-http" +version = "0.63.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d619373d490ad70966994801bc126846afaa0d1ee920697a031f0cf63f2568e7" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "futures-util", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-http-client" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00ccbb08c10f6bcf912f398188e42ee2eab5f1767ce215a02a73bc5df1bbdd95" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "h2 0.3.27", + "h2 0.4.13", + "http 0.2.12", + "http 1.4.0", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper 1.8.1", + "hyper-rustls 0.24.2", + "hyper-rustls 0.27.7", + "hyper-util", + "pin-project-lite", + "rustls 0.21.12", + "rustls 0.23.36", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.4", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.62.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b3a779093e18cad88bbae08dc4261e1d95018c4c5b9356a52bcae7c0b6e9bb" +dependencies = [ + "aws-smithy-types", +] + +[[package]] +name = "aws-smithy-observability" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d3f39d5bb871aaf461d59144557f16d5927a5248a983a40654d9cf3b9ba183b" +dependencies = [ + "aws-smithy-runtime-api", +] + +[[package]] +name = "aws-smithy-query" +version = "0.60.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f76a580e3d8f8961e5d48763214025a2af65c2fa4cd1fb7f270a0e107a71b0" +dependencies = [ + "aws-smithy-types", + "urlencoding", +] + +[[package]] +name = "aws-smithy-runtime" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ccf7f6eba8b2dcf8ce9b74806c6c185659c311665c4bf8d6e71ebd454db6bf" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-http-client", + "aws-smithy-observability", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.4.0", + "http-body 0.4.6", + "http-body 1.0.1", + "http-body-util", + "pin-project-lite", + "pin-utils", + "tokio", + "tracing", +] + +[[package]] +name = "aws-smithy-runtime-api" +version = "1.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4af6e5def28be846479bbeac55aa4603d6f7986fc5da4601ba324dd5d377516" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.4.0", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-types" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca2734c16913a45343b37313605d84e7d8b34a4611598ce1d25b35860a2bed3" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http 1.4.0", + "http-body 0.4.6", + "http-body 1.0.1", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", + "tokio", + "tokio-util", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.60.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b53543b4b86ed43f051644f704a98c7291b3618b67adf057ee77a366fa52fcaa" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "aws-types" +version = "1.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0470cc047657c6e286346bdf10a8719d26efd6a91626992e0e64481e44323e96" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "rustc_version 0.4.1", + "tracing", +] [[package]] name = "axum" @@ -234,13 +575,10 @@ checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" dependencies = [ "axum-core", "bytes", - "form_urlencoded", "futures-util", - "http", - "http-body", + "http 1.4.0", + "http-body 1.0.1", "http-body-util", - "hyper", - "hyper-util", "itoa", "matchit", "memchr", @@ -248,15 +586,10 @@ dependencies = [ "percent-encoding", "pin-project-lite", "serde_core", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", "sync_wrapper", - "tokio", "tower", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -267,15 +600,14 @@ checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", - "http", - "http-body", + "http 1.4.0", + "http-body 1.0.1", "http-body-util", "mime", "pin-project-lite", "sync_wrapper", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -314,6 +646,16 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + [[package]] name = "base64ct" version = "1.8.3" @@ -351,7 +693,7 @@ version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.11.0", + "bitflags", "cexpr", "clang-sys", "itertools 0.13.0", @@ -378,27 +720,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest", -] - [[package]] name = "blake3" version = "1.8.3" @@ -422,27 +749,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "brotli" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - [[package]] name = "bstr" version = "1.12.1" @@ -478,6 +784,16 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + [[package]] name = "bzip2-sys" version = "0.1.13+1.0.8" @@ -509,34 +825,6 @@ dependencies = [ "nom", ] -[[package]] -name = "cf-rustracing" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f85c3824e4191621dec0551e3cef3d511f329da9a8990bf3e450a85651d97e" -dependencies = [ - "backtrace", - "rand 0.8.5", - "tokio", - "trackable", -] - -[[package]] -name = "cf-rustracing-jaeger" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a5f80d44c257c3300a7f45ada676c211e64bbbac591bbec19344a8f61fbcab" -dependencies = [ - "cf-rustracing", - "hostname", - "local-ip-address", - "percent-encoding", - "rand 0.9.2", - "thrift_codec", - "tokio", - "trackable", -] - [[package]] name = "cfg-if" version = "1.0.4" @@ -602,23 +890,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive 3.2.25", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "once_cell", - "strsim 0.10.0", - "termcolor", - "textwrap", -] - [[package]] name = "clap" version = "4.5.59" @@ -626,7 +897,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5caf74d17c3aec5495110c34cc3f78644bfa89af6c8993ed4de2790e49b6499" dependencies = [ "clap_builder", - "clap_derive 4.5.55", + "clap_derive", ] [[package]] @@ -637,21 +908,8 @@ checksum = "370daa45065b80218950227371916a1633217ae42b2715b2287b606dcd618e24" dependencies = [ "anstream", "anstyle", - "clap_lex 1.0.0", - "strsim 0.11.1", -] - -[[package]] -name = "clap_derive" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" -dependencies = [ - "heck 0.4.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "clap_lex", + "strsim", ] [[package]] @@ -660,21 +918,12 @@ version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.116", ] -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "clap_lex" version = "1.0.0" @@ -729,16 +978,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation" version = "0.10.1" @@ -764,15 +1003,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - [[package]] name = "crossbeam-deque" version = "0.8.6" @@ -792,15 +1022,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "crossbeam-queue" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.21" @@ -813,7 +1034,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "bitflags 2.11.0", + "bitflags", "crossterm_winapi", "document-features", "parking_lot", @@ -862,41 +1083,22 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "rustc_version 0.4.1", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.116", -] - -[[package]] -name = "daemonize" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfdaacb3c887a54d41bdf48d3af8873b3f5566469f8ba21b92057509f116e" -dependencies = [ - "libc", + "digest", + "fiat-crypto", + "rustc_version 0.4.1", + "subtle", + "zeroize", ] [[package]] -name = "darling" -version = "0.20.11" +name = "curve25519-dalek-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "darling_core 0.20.11", - "darling_macro 0.20.11", + "proc-macro2", + "quote", + "syn 2.0.116", ] [[package]] @@ -905,22 +1107,8 @@ 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]] -name = "darling_core" -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.116", + "darling_core", + "darling_macro", ] [[package]] @@ -933,18 +1121,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", - "syn 2.0.116", -] - -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core 0.20.11", - "quote", + "strsim", "syn 2.0.116", ] @@ -954,7 +1131,7 @@ version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ - "darling_core 0.21.3", + "darling_core", "quote", "syn 2.0.116", ] @@ -998,7 +1175,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524bc3df0d57e98ecd022e21ba31166c2625e7d3e5bcc4510efaeeab4abcab04" dependencies = [ "deadpool-runtime", - "tracing", ] [[package]] @@ -1020,48 +1196,6 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" -dependencies = [ - "darling 0.20.11", - "proc-macro2", - "quote", - "syn 2.0.116", -] - -[[package]] -name = "derive_builder_macro" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" -dependencies = [ - "derive_builder_core", - "syn 2.0.116", -] - [[package]] name = "derive_more" version = "2.1.1" @@ -1175,7 +1309,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -1216,14 +1350,20 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd122633e4bef06db27737f21d3738fb89c8f6d5360d6d9d7635dda142a7757e" dependencies = [ - "darling 0.21.3", + "darling", "either", - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.116", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "ecdsa" version = "0.16.9" @@ -1297,15 +1437,6 @@ dependencies = [ "log", ] -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - [[package]] name = "env_filter" version = "1.0.0" @@ -1342,7 +1473,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -1405,17 +1536,6 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" -[[package]] -name = "flate2" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" -dependencies = [ - "crc32fast", - "libz-ng-sys", - "miniz_oxide", -] - [[package]] name = "float-cmp" version = "0.10.0" @@ -1455,21 +1575,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1488,6 +1593,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fslock" version = "0.2.1" @@ -1646,22 +1757,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasip2", "wasip3", -] - -[[package]] -name = "getset" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf0fc11e47561d47397154977bc219f4cf809b2974facc3ccb3b89e2436f912" -dependencies = [ - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.116", + "wasm-bindgen", ] [[package]] @@ -1689,17 +1790,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.13" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" dependencies = [ - "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http", - "indexmap 2.13.0", + "futures-util", + "http 0.2.12", + "indexmap", "slab", "tokio", "tokio-util", @@ -1707,10 +1808,23 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "h2" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.4.0", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] [[package]] name = "hashbrown" @@ -1718,8 +1832,6 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "allocator-api2", - "equivalent", "foldhash 0.1.5", ] @@ -1746,27 +1858,12 @@ dependencies = [ "hashbrown 0.15.5", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.5.2" @@ -1798,14 +1895,14 @@ dependencies = [ ] [[package]] -name = "hostname" -version = "0.4.2" +name = "http" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617aaa3557aef3810a6369d0a99fac8a080891b68bd9f9812a1eeda0c0730cbd" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "cfg-if", - "libc", - "windows-link", + "bytes", + "fnv", + "itoa", ] [[package]] @@ -1818,6 +1915,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + [[package]] name = "http-body" version = "1.0.1" @@ -1825,7 +1933,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http", + "http 1.4.0", ] [[package]] @@ -1836,8 +1944,8 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http", - "http-body", + "http 1.4.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -1854,10 +1962,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] -name = "humantime" -version = "2.3.0" +name = "hyper" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] [[package]] name = "hyper" @@ -1869,9 +1995,9 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2", - "http", - "http-body", + "h2 0.4.13", + "http 1.4.0", + "http-body 1.0.1", "httparse", "httpdate", "itoa", @@ -1882,19 +2008,35 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.32", + "log", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + [[package]] name = "hyper-rustls" version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http", - "hyper", + "http 1.4.0", + "hyper 1.8.1", "hyper-util", - "rustls", + "rustls 0.23.36", + "rustls-native-certs", "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.4", "tower-service", ] @@ -1904,29 +2046,13 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper", + "hyper 1.8.1", "hyper-util", "pin-project-lite", "tokio", "tower-service", ] -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - [[package]] name = "hyper-util" version = "0.1.20" @@ -1937,19 +2063,17 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http", - "http-body", - "hyper", + "http 1.4.0", + "http-body 1.0.1", + "hyper 1.8.1", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2", - "system-configuration", + "socket2 0.5.10", "tokio", "tower-service", "tracing", - "windows-registry", ] [[package]] @@ -2096,16 +2220,6 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.13.0" @@ -2139,16 +2253,6 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" -[[package]] -name = "iri-string" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "is_ci" version = "1.2.0" @@ -2221,9 +2325,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.82" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -2322,7 +2426,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ - "bitflags 2.11.0", + "bitflags", "libc", ] @@ -2351,16 +2455,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "libz-ng-sys" -version = "1.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bf914b7dd154ca9193afec311d8e39345c1bd93b48b3faa77329f0db8f553c0" -dependencies = [ - "cmake", - "libc", -] - [[package]] name = "libz-sys" version = "1.1.23" @@ -2372,12 +2466,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -2402,17 +2490,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" -[[package]] -name = "local-ip-address" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ef8c257c92ade496781a32a581d43e3d512cf8ce714ecf04ea80f93ed0ff4a" -dependencies = [ - "libc", - "neli", - "windows-sys 0.61.2", -] - [[package]] name = "lock_api" version = "0.4.14" @@ -2475,15 +2552,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "lru" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f8cc7106155f10bdf99a6f379688f543ad6596a415375b36a59a054ceda1198" -dependencies = [ - "hashbrown 0.15.5", -] - [[package]] name = "lru" version = "0.16.3" @@ -2527,19 +2595,10 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "miden-agglayer" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#753fb1c9a24bad4dc891bc784a635ba5089c2c99" +source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" dependencies = [ "fs-err", "miden-assembly", @@ -2561,7 +2620,7 @@ checksum = "5cca9632323bd4e32ae5b21b101ed417a646f5d72196b1bf3f1ca889a148322a" dependencies = [ "miden-core", "miden-utils-indexing", - "thiserror 2.0.18", + "thiserror", "winter-air", "winter-prover", ] @@ -2578,7 +2637,7 @@ dependencies = [ "miden-core", "miden-mast-package", "smallvec", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -2602,16 +2661,16 @@ dependencies = [ "rustc_version 0.4.1", "semver 1.0.27", "smallvec", - "thiserror 2.0.18", + "thiserror", ] [[package]] name = "miden-block-prover" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#753fb1c9a24bad4dc891bc784a635ba5089c2c99" +source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" dependencies = [ "miden-protocol", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -2635,10 +2694,10 @@ dependencies = [ "miette", "prost", "prost-types", - "rand 0.9.2", + "rand", "serde", "serde_json", - "thiserror 2.0.18", + "thiserror", "tokio", "tonic", "tonic-health", @@ -2656,13 +2715,13 @@ version = "0.14.0" dependencies = [ "anyhow", "assert_cmd", - "clap 4.5.59", + "clap", "comfy-table", "miden-client", "miden-client-sqlite-store", "predicates", - "rand 0.9.2", - "rand_chacha 0.9.0", + "rand", + "rand_chacha", "serial_test", "tokio", ] @@ -2673,7 +2732,7 @@ version = "0.14.0" dependencies = [ "anyhow", "assert_cmd", - "clap 4.5.59", + "clap", "comfy-table", "dirs", "figment", @@ -2681,11 +2740,11 @@ dependencies = [ "miden-client-sqlite-store", "miette", "predicates", - "rand 0.9.2", + "rand", "regex", "serde", "serial_test", - "thiserror 2.0.18", + "thiserror", "tokio", "toml 0.9.12+spec-1.1.0", "tracing", @@ -2699,11 +2758,11 @@ version = "0.14.0" dependencies = [ "anyhow", "async-trait", - "clap 4.5.59", + "clap", "miden-client", "miden-client-sqlite-store", "num_cpus", - "rand 0.9.2", + "rand", "regex", "serde", "serde_json", @@ -2727,7 +2786,7 @@ dependencies = [ "miden-standards", "rusqlite", "rusqlite_migration", - "thiserror 2.0.18", + "thiserror", "tokio", ] @@ -2740,7 +2799,7 @@ dependencies = [ "miden-protocol", "miden-standards", "miden-testing", - "rand 0.9.2", + "rand", "tokio", ] @@ -2756,9 +2815,9 @@ dependencies = [ "miden-idxdb-store", "miden-protocol", "miden-standards", - "rand 0.9.2", + "rand", "serde-wasm-bindgen", - "thiserror 2.0.18", + "thiserror", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2781,7 +2840,7 @@ dependencies = [ "num-traits", "proptest", "proptest-derive", - "thiserror 2.0.18", + "thiserror", "winter-math", "winter-utils", ] @@ -2800,14 +2859,14 @@ dependencies = [ "miden-processor", "miden-utils-sync", "sha2", - "thiserror 2.0.18", + "thiserror", ] [[package]] name = "miden-crypto" -version = "0.19.4" +version = "0.19.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e28b6e110f339c2edc2760a8cb94863f0a055ee658a49bc90c8560eff2feef4" +checksum = "999926d48cf0929a39e06ce22299084f11d307ca9e765801eb56bf192b07054b" dependencies = [ "blake3", "cc", @@ -2822,8 +2881,8 @@ dependencies = [ "miden-crypto-derive", "num", "num-complex", - "rand 0.9.2", - "rand_chacha 0.9.0", + "rand", + "rand_chacha", "rand_core 0.9.5", "rand_hc", "rayon", @@ -2831,7 +2890,7 @@ dependencies = [ "sha2", "sha3", "subtle", - "thiserror 2.0.18", + "thiserror", "winter-crypto", "winter-math", "winter-utils", @@ -2863,7 +2922,7 @@ dependencies = [ "paste", "serde", "serde_spanned 1.0.4", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -2900,7 +2959,7 @@ dependencies = [ "derive_more", "miden-assembly-syntax", "miden-core", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -2929,7 +2988,7 @@ dependencies = [ "syn 2.0.116", "terminal_size 0.3.0", "textwrap", - "thiserror 2.0.18", + "thiserror", "trybuild", "unicode-width 0.1.14", ] @@ -2948,7 +3007,7 @@ dependencies = [ [[package]] name = "miden-node-block-producer" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "anyhow", "futures", @@ -2960,21 +3019,35 @@ dependencies = [ "miden-remote-prover-client", "miden-standards", "miden-tx-batch-prover", - "rand 0.9.2", - "thiserror 2.0.18", + "rand", + "thiserror", "tokio", "tokio-stream", "tonic", "tonic-reflection", "tower-http", "tracing", - "url", + "url", +] + +[[package]] +name = "miden-node-db" +version = "0.14.0" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +dependencies = [ + "deadpool", + "deadpool-diesel", + "deadpool-sync", + "diesel", + "miden-protocol", + "thiserror", + "tracing", ] [[package]] name = "miden-node-grpc-error-macro" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "quote", "syn 2.0.116", @@ -2983,23 +3056,21 @@ dependencies = [ [[package]] name = "miden-node-ntx-builder" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "anyhow", - "deadpool", - "deadpool-diesel", - "deadpool-sync", "diesel", "diesel_migrations", "futures", - "indexmap 2.13.0", "libsqlite3-sys", + "miden-node-db", "miden-node-proto", "miden-node-utils", "miden-protocol", "miden-remote-prover-client", "miden-tx", - "thiserror 2.0.18", + "prost", + "thiserror", "tokio", "tokio-stream", "tokio-util", @@ -3011,12 +3082,12 @@ dependencies = [ [[package]] name = "miden-node-proto" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "anyhow", "fs-err", "hex", - "http", + "http 1.4.0", "miden-node-grpc-error-macro", "miden-node-proto-build", "miden-node-rocksdb-cxx-linkage-fix", @@ -3025,7 +3096,7 @@ dependencies = [ "miden-standards", "miette", "prost", - "thiserror 2.0.18", + "thiserror", "tonic", "tonic-prost", "tonic-prost-build", @@ -3035,7 +3106,7 @@ dependencies = [ [[package]] name = "miden-node-proto-build" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "fs-err", "miette", @@ -3046,16 +3117,16 @@ dependencies = [ [[package]] name = "miden-node-rocksdb-cxx-linkage-fix" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" [[package]] name = "miden-node-rpc" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "anyhow", "futures", - "http", + "http 1.4.0", "mediatype", "miden-node-proto", "miden-node-proto-build", @@ -3063,7 +3134,7 @@ dependencies = [ "miden-protocol", "miden-tx", "semver 1.0.27", - "thiserror 2.0.18", + "thiserror", "tokio", "tokio-stream", "tonic", @@ -3078,21 +3149,22 @@ dependencies = [ [[package]] name = "miden-node-store" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "anyhow", "deadpool", "deadpool-diesel", - "deadpool-sync", "diesel", "diesel_migrations", "fs-err", "futures", "hex", - "indexmap 2.13.0", + "indexmap", "libsqlite3-sys", + "miden-agglayer", "miden-block-prover", "miden-crypto", + "miden-node-db", "miden-node-proto", "miden-node-proto-build", "miden-node-rocksdb-cxx-linkage-fix", @@ -3101,13 +3173,13 @@ dependencies = [ "miden-remote-prover-client", "miden-standards", "pretty_assertions", - "rand 0.9.2", - "rand_chacha 0.9.0", + "rand", + "rand_chacha", "serde", - "thiserror 2.0.18", + "thiserror", "tokio", "tokio-stream", - "toml 0.9.12+spec-1.1.0", + "toml 1.0.2+spec-1.1.0", "tonic", "tonic-reflection", "tower-http", @@ -3118,23 +3190,21 @@ dependencies = [ [[package]] name = "miden-node-utils" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "anyhow", "bytes", - "figment", - "http", + "http 1.4.0", "http-body-util", "itertools 0.14.0", - "lru 0.16.3", + "lru", "miden-node-rocksdb-cxx-linkage-fix", "miden-protocol", "opentelemetry", "opentelemetry-otlp", "opentelemetry_sdk", - "rand 0.9.2", - "serde", - "thiserror 2.0.18", + "rand", + "thiserror", "tokio", "tonic", "tower-http", @@ -3148,15 +3218,21 @@ dependencies = [ [[package]] name = "miden-node-validator" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "anyhow", + "aws-config", + "aws-sdk-kms", + "diesel", + "diesel_migrations", + "k256", + "miden-node-db", "miden-node-proto", "miden-node-proto-build", "miden-node-utils", "miden-protocol", "miden-tx", - "thiserror 2.0.18", + "thiserror", "tokio", "tokio-stream", "tonic", @@ -3191,7 +3267,7 @@ dependencies = [ "miden-utils-indexing", "paste", "rayon", - "thiserror 2.0.18", + "thiserror", "tokio", "tracing", "winter-prover", @@ -3200,7 +3276,7 @@ dependencies = [ [[package]] name = "miden-protocol" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#753fb1c9a24bad4dc891bc784a635ba5089c2c99" +source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" dependencies = [ "bech32", "fs-err", @@ -3215,13 +3291,13 @@ dependencies = [ "miden-protocol-macros", "miden-utils-sync", "miden-verifier", - "rand 0.9.2", - "rand_chacha 0.9.0", + "rand", + "rand_chacha", "rand_xoshiro", "regex", "semver 1.0.27", "serde", - "thiserror 2.0.18", + "thiserror", "toml 0.9.12+spec-1.1.0", "walkdir", "winter-rand-utils", @@ -3230,7 +3306,7 @@ dependencies = [ [[package]] name = "miden-protocol-macros" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#753fb1c9a24bad4dc891bc784a635ba5089c2c99" +source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" dependencies = [ "proc-macro2", "quote", @@ -3251,65 +3327,19 @@ dependencies = [ "winter-prover", ] -[[package]] -name = "miden-remote-prover" -version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" -dependencies = [ - "anyhow", - "async-trait", - "axum", - "bytes", - "clap 4.5.59", - "http", - "humantime", - "miden-block-prover", - "miden-node-proto", - "miden-node-proto-build", - "miden-node-rocksdb-cxx-linkage-fix", - "miden-node-utils", - "miden-protocol", - "miden-tx", - "miden-tx-batch-prover", - "miette", - "opentelemetry", - "pingora", - "pingora-core", - "pingora-limits", - "pingora-proxy", - "prometheus 0.14.0", - "prost", - "reqwest", - "semver 1.0.27", - "serde", - "serde_qs", - "thiserror 2.0.18", - "tokio", - "tokio-stream", - "tonic", - "tonic-health", - "tonic-prost", - "tonic-prost-build", - "tonic-web", - "tower-http", - "tracing", - "tracing-opentelemetry", - "uuid", -] - [[package]] name = "miden-remote-prover-client" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#2340d92ccb8c582bf4289aab6c546d36f5f31e80" +source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" dependencies = [ "fs-err", - "getrandom 0.3.4", + "getrandom 0.4.1", "miden-node-proto-build", "miden-protocol", "miden-tx", "miette", "prost", - "thiserror 2.0.18", + "thiserror", "tokio", "tonic", "tonic-prost", @@ -3320,7 +3350,7 @@ dependencies = [ [[package]] name = "miden-standards" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#753fb1c9a24bad4dc891bc784a635ba5089c2c99" +source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" dependencies = [ "fs-err", "miden-assembly", @@ -3328,16 +3358,16 @@ dependencies = [ "miden-core-lib", "miden-processor", "miden-protocol", - "rand 0.9.2", + "rand", "regex", - "thiserror 2.0.18", + "thiserror", "walkdir", ] [[package]] name = "miden-testing" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#753fb1c9a24bad4dc891bc784a635ba5089c2c99" +source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" dependencies = [ "anyhow", "itertools 0.14.0", @@ -3351,29 +3381,29 @@ dependencies = [ "miden-standards", "miden-tx", "miden-tx-batch-prover", - "rand 0.9.2", - "rand_chacha 0.9.0", - "thiserror 2.0.18", + "rand", + "rand_chacha", + "thiserror", "winterfell", ] [[package]] name = "miden-tx" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#753fb1c9a24bad4dc891bc784a635ba5089c2c99" +source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" dependencies = [ "miden-processor", "miden-protocol", "miden-prover", "miden-standards", "miden-verifier", - "thiserror 2.0.18", + "thiserror", ] [[package]] name = "miden-tx-batch-prover" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#753fb1c9a24bad4dc891bc784a635ba5089c2c99" +source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" dependencies = [ "miden-protocol", "miden-tx", @@ -3409,7 +3439,7 @@ version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eeff7bcb7875b222424bdfb657a7cf21a55e036aa7558ebe1f5d2e413b440d0d" dependencies = [ - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -3431,7 +3461,7 @@ checksum = "b13816663794beb15c8a4721c15252eb21f3b3233525684f60c7888837a98ff4" dependencies = [ "miden-air", "miden-core", - "thiserror 2.0.18", + "thiserror", "tracing", "winter-verifier", ] @@ -3444,7 +3474,7 @@ checksum = "9d4cfab04baffdda3fb9eafa5f873604059b89a1699aa95e4f1057397a69f0b5" dependencies = [ "miden-formatting", "smallvec", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -3517,7 +3547,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", - "simd-adler32", ] [[package]] @@ -3546,70 +3575,12 @@ dependencies = [ "getrandom 0.2.17", ] -[[package]] -name = "native-tls" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5d26952a508f321b4d3d2e80e78fc2603eaefcdf0c30783867f19586518bdc" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe 0.2.1", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "neli" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22f9786d56d972959e1408b6a93be6af13b9c1392036c5c1fafa08a1b0c6ee87" -dependencies = [ - "bitflags 2.11.0", - "byteorder", - "derive_builder", - "getset", - "libc", - "log", - "neli-proc-macros", - "parking_lot", -] - -[[package]] -name = "neli-proc-macros" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d8d08c6e98f20a62417478ebf7be8e1425ec9acecc6f63e22da633f6b71609" -dependencies = [ - "either", - "proc-macro2", - "quote", - "serde", - "syn 2.0.116", -] - [[package]] name = "new_debug_unreachable" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" -[[package]] -name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset", -] - [[package]] name = "node-builder" version = "0.14.0" @@ -3623,8 +3594,8 @@ dependencies = [ "miden-node-validator", "miden-protocol", "miden-standards", - "rand 0.9.2", - "rand_chacha 0.9.0", + "rand", + "rand_chacha", "tempfile", "tokio", "url", @@ -3652,7 +3623,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3752,7 +3723,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.5.2", + "hermit-abi", "libc", ] @@ -3783,56 +3754,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "openssl" -version = "0.10.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" -dependencies = [ - "bitflags 2.11.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.116", -] - -[[package]] -name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - [[package]] name = "openssl-probe" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" -[[package]] -name = "openssl-sys" -version = "0.9.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "opentelemetry" version = "0.31.0" @@ -3843,7 +3770,7 @@ dependencies = [ "futures-sink", "js-sys", "pin-project-lite", - "thiserror 2.0.18", + "thiserror", "tracing", ] @@ -3853,12 +3780,12 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2366db2dca4d2ad033cad11e6ee42844fd727007af5ad04a1730f4cb8163bf" dependencies = [ - "http", + "http 1.4.0", "opentelemetry", "opentelemetry-proto", "opentelemetry_sdk", "prost", - "thiserror 2.0.18", + "thiserror", "tokio", "tonic", ] @@ -3887,8 +3814,8 @@ dependencies = [ "futures-util", "opentelemetry", "percent-encoding", - "rand 0.9.2", - "thiserror 2.0.18", + "rand", + "thiserror", "tokio", "tokio-stream", ] @@ -3900,10 +3827,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] -name = "os_str_bytes" -version = "6.6.1" +name = "outref" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" [[package]] name = "owo-colors" @@ -3916,365 +3843,120 @@ name = "parking_lot" version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pear" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" -dependencies = [ - "inlinable_string", - "pear_codegen", - "yansi", -] - -[[package]] -name = "pear_codegen" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147" -dependencies = [ - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "syn 2.0.116", -] - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "petgraph" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" -dependencies = [ - "fixedbitset", - "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", - "hashbrown 0.15.5", - "indexmap 2.13.0", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.116", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pingora" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a1f02a6347e81953ab831fdcf090a028db12d67ec3badf47831d1299dac6e20" -dependencies = [ - "pingora-core", - "pingora-http", - "pingora-load-balancing", - "pingora-proxy", - "pingora-timeout", -] - -[[package]] -name = "pingora-cache" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef622051fbb2cb98a524df3a8112f02d0919ccda600a44d705ec550f1a28fe2" -dependencies = [ - "ahash", - "async-trait", - "blake2", - "bytes", - "cf-rustracing", - "cf-rustracing-jaeger", - "hex", - "http", - "httparse", - "httpdate", - "indexmap 1.9.3", - "log", - "lru 0.14.0", - "once_cell", - "parking_lot", - "pingora-core", - "pingora-error", - "pingora-header-serde", - "pingora-http", - "pingora-lru", - "pingora-timeout", - "rand 0.8.5", - "regex", - "rmp", - "rmp-serde", - "serde", - "strum", - "tokio", +dependencies = [ + "lock_api", + "parking_lot_core", ] [[package]] -name = "pingora-core" -version = "0.6.0" +name = "parking_lot_core" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f63d3f67d99c95a1f85623fc43242fd644dd12ccbaa18c38a54e1580c6846a" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ - "ahash", - "async-trait", - "brotli", - "bytes", - "chrono", - "clap 3.2.25", - "daemonize", - "derivative", - "flate2", - "futures", - "h2", - "http", - "httparse", - "httpdate", + "cfg-if", "libc", - "log", - "nix", - "once_cell", - "openssl-probe 0.1.6", - "parking_lot", - "percent-encoding", - "pingora-error", - "pingora-http", - "pingora-pool", - "pingora-runtime", - "pingora-timeout", - "prometheus 0.13.4", - "rand 0.8.5", - "regex", - "serde", - "serde_yaml", - "sfv", - "socket2", - "strum", - "strum_macros", - "tokio", - "tokio-test", - "unicase", - "windows-sys 0.59.0", - "zstd", + "redox_syscall", + "smallvec", + "windows-link", ] [[package]] -name = "pingora-error" -version = "0.6.0" +name = "paste" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52119570d3f4644e09654ad24df2b7d851bf12eaa8c4148b4674c7f90916598e" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "pingora-header-serde" -version = "0.6.0" +name = "pear" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "252a16def05c7adbbdda776e87b2be36e9481c8a77249207a2f3b563e8933b35" +checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" dependencies = [ - "bytes", - "http", - "httparse", - "pingora-error", - "pingora-http", - "thread_local", - "zstd", - "zstd-safe", + "inlinable_string", + "pear_codegen", + "yansi", ] [[package]] -name = "pingora-http" -version = "0.6.0" +name = "pear_codegen" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3542fd0fd0a83212882c5066ae739ba51804f20d624ff7e12ec85113c5c89a" +checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147" dependencies = [ - "bytes", - "http", - "pingora-error", + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "syn 2.0.116", ] [[package]] -name = "pingora-ketama" -version = "0.6.0" +name = "percent-encoding" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f5dd8546b1874d5cfca594375c1cfb852c3dffd4f060428fa031a6e790dea18" -dependencies = [ - "crc32fast", -] +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] -name = "pingora-limits" -version = "0.6.0" +name = "petgraph" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93c897e8cc04ff0d077ee2a655142910618222aeefc83f7f99f5b9fc59ccb13" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ - "ahash", + "fixedbitset", + "indexmap", ] [[package]] -name = "pingora-load-balancing" -version = "0.6.0" +name = "petgraph" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b5bb0314830a64b73b50b3782f3089f87947b61b4324c804d6f8d4ff9ce1c70" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ - "arc-swap", - "async-trait", - "derivative", - "fnv", - "futures", - "http", - "log", - "pingora-core", - "pingora-error", - "pingora-http", - "pingora-ketama", - "pingora-runtime", - "rand 0.8.5", - "tokio", + "fixedbitset", + "hashbrown 0.15.5", + "indexmap", ] [[package]] -name = "pingora-lru" -version = "0.6.0" +name = "phf_shared" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba89e4400cb978f0d7be1c14bd7ab4168c8e2c00d97ff19f964fc0048780237c" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ - "arrayvec", - "hashbrown 0.16.1", - "parking_lot", - "rand 0.8.5", + "siphasher", ] [[package]] -name = "pingora-pool" -version = "0.6.0" +name = "pin-project" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "996c574f30a6e1ad10b47ac1626a86e0e47d5075953dd049d60df16ba5f7076e" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ - "crossbeam-queue", - "log", - "lru 0.14.0", - "parking_lot", - "pingora-timeout", - "thread_local", - "tokio", + "pin-project-internal", ] [[package]] -name = "pingora-proxy" -version = "0.6.0" +name = "pin-project-internal" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c4097fd2639905bf5b81f3618551cd826d5e03aac063e17fd7a4137f19c1a5b" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ - "async-trait", - "bytes", - "clap 3.2.25", - "futures", - "h2", - "http", - "log", - "once_cell", - "pingora-cache", - "pingora-core", - "pingora-error", - "pingora-http", - "rand 0.8.5", - "regex", - "tokio", + "proc-macro2", + "quote", + "syn 2.0.116", ] [[package]] -name = "pingora-runtime" -version = "0.6.0" +name = "pin-project-lite" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccc165021cf55a39b9e760121b22c4260b17a0b2c530d5b93092fc5bc765b94" -dependencies = [ - "once_cell", - "rand 0.8.5", - "thread_local", - "tokio", -] +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] -name = "pingora-timeout" -version = "0.6.0" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548cd21d41611c725827677937e68f2cd008bbfa09f3416d3fbad07e1e42f6d7" -dependencies = [ - "once_cell", - "parking_lot", - "pin-project-lite", - "thread_local", - "tokio", -] +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" @@ -4398,52 +4080,6 @@ dependencies = [ "syn 2.0.116", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "proc-macro-error2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" -dependencies = [ - "proc-macro-error-attr2", - "proc-macro2", - "quote", - "syn 2.0.116", -] - [[package]] name = "proc-macro2" version = "1.0.106" @@ -4466,46 +4102,16 @@ dependencies = [ "yansi", ] -[[package]] -name = "prometheus" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" -dependencies = [ - "cfg-if", - "fnv", - "lazy_static", - "memchr", - "parking_lot", - "protobuf 2.28.0", - "thiserror 1.0.69", -] - -[[package]] -name = "prometheus" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ca5326d8d0b950a9acd87e6a3f94745394f62e4dae1b1ee22b2bc0c394af43a" -dependencies = [ - "cfg-if", - "fnv", - "lazy_static", - "memchr", - "parking_lot", - "protobuf 3.7.2", - "thiserror 2.0.18", -] - [[package]] name = "proptest" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37566cb3fdacef14c0737f9546df7cfeadbfbc9fef10991038bf5015d0c80532" dependencies = [ - "bitflags 2.11.0", + "bitflags", "num-traits", - "rand 0.9.2", - "rand_chacha 0.9.0", + "rand", + "rand_chacha", "rand_xorshift", "regex-syntax", "unarray", @@ -4538,7 +4144,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" dependencies = [ - "heck 0.5.0", + "heck", "itertools 0.14.0", "log", "multimap", @@ -4587,32 +4193,6 @@ dependencies = [ "prost", ] -[[package]] -name = "protobuf" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" - -[[package]] -name = "protobuf" -version = "3.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65a1d4ddae7d8b5de68153b48f6aa3bba8cb002b243dbdbc55a5afbc98f99f4" -dependencies = [ - "once_cell", - "protobuf-support", - "thiserror 1.0.69", -] - -[[package]] -name = "protobuf-support" -version = "3.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e36c2f31e0a47f9280fb347ef5e461ffcd2c52dd520d8e216b52f93b0b0d7d6" -dependencies = [ - "thiserror 1.0.69", -] - [[package]] name = "protox" version = "0.9.1" @@ -4625,7 +4205,7 @@ dependencies = [ "prost-reflect", "prost-types", "protox-parse", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -4637,7 +4217,7 @@ dependencies = [ "logos", "miette", "prost-types", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -4646,7 +4226,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" dependencies = [ - "bitflags 2.11.0", + "bitflags", "memchr", "unicase", ] @@ -4675,37 +4255,16 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "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_chacha", "rand_core 0.9.5", ] -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - [[package]] name = "rand_chacha" version = "0.9.0" @@ -4787,7 +4346,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.11.0", + "bitflags", ] [[package]] @@ -4798,7 +4357,7 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.17", "libredox", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -4809,67 +4368,33 @@ checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" - -[[package]] -name = "reqwest" -version = "0.12.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" + +[[package]] +name = "regex-syntax" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" + [[package]] name = "rfc6979" version = "0.4.0" @@ -4894,25 +4419,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rmp" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c" -dependencies = [ - "num-traits", -] - -[[package]] -name = "rmp-serde" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155" -dependencies = [ - "rmp", - "serde", -] - [[package]] name = "rocksdb" version = "0.24.0" @@ -4930,7 +4436,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8a1f2315036ef6b1fbacd1972e8ee7688030b0a2121edfc2a6550febd41574d" dependencies = [ "hashbrown 0.16.1", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -4939,7 +4445,7 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "165ca6e57b20e1351573e3729b958bc62f0e48025386970b6e4d29e7a7e71f3f" dependencies = [ - "bitflags 2.11.0", + "bitflags", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -4957,16 +4463,6 @@ dependencies = [ "rusqlite", ] -[[package]] -name = "rust_decimal" -version = "1.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f703d19852dbf87cbc513643fa81428361eb6940f1ac14fd58155d295a3eb0" -dependencies = [ - "arrayvec", - "num-traits", -] - [[package]] name = "rustc-demangle" version = "0.1.27" @@ -5003,7 +4499,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.11.0", + "bitflags", "errno", "libc", "linux-raw-sys 0.4.15", @@ -5016,11 +4512,23 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ - "bitflags 2.11.0", + "bitflags", "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.7", + "sct", ] [[package]] @@ -5029,11 +4537,12 @@ version = "0.23.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.103.9", "subtle", "zeroize", ] @@ -5044,7 +4553,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" dependencies = [ - "openssl-probe 0.2.1", + "openssl-probe", "rustls-pki-types", "schannel", "security-framework", @@ -5059,12 +4568,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustls-webpki" version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -5121,6 +4641,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "sdd" version = "3.0.10" @@ -5147,8 +4677,8 @@ version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d17b898a6d6948c3a8ee4372c17cb384f90d2e6e912ef00895b14fd7ab54ec38" dependencies = [ - "bitflags 2.11.0", - "core-foundation 0.10.1", + "bitflags", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -5243,28 +4773,6 @@ dependencies = [ "zmij", ] -[[package]] -name = "serde_path_to_error" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" -dependencies = [ - "itoa", - "serde", - "serde_core", -] - -[[package]] -name = "serde_qs" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3faaf9e727533a19351a43cc5a8de957372163c7d35cc48c90b75cdda13c352" -dependencies = [ - "percent-encoding", - "serde", - "thiserror 2.0.18", -] - [[package]] name = "serde_spanned" version = "0.6.9" @@ -5283,30 +4791,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap 1.9.3", - "ryu", - "serde", - "yaml-rust", -] - [[package]] name = "serial_test" version = "3.3.1" @@ -5334,17 +4818,6 @@ dependencies = [ "syn 2.0.116", ] -[[package]] -name = "sfv" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa1f336066b758b7c9df34ed049c0e693a426afe2b27ff7d5b14f410ab1a132" -dependencies = [ - "base64", - "indexmap 2.13.0", - "rust_decimal", -] - [[package]] name = "sha2" version = "0.10.9" @@ -5401,12 +4874,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "simd-adler32" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" - [[package]] name = "siphasher" version = "1.0.2" @@ -5431,6 +4898,16 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "socket2" version = "0.6.2" @@ -5499,40 +4976,12 @@ dependencies = [ "vte", ] -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.116", -] - [[package]] name = "subtle" version = "2.6.1" @@ -5587,9 +5036,6 @@ name = "sync_wrapper" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] [[package]] name = "synstructure" @@ -5602,27 +5048,6 @@ dependencies = [ "syn 2.0.116", ] -[[package]] -name = "system-configuration" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" -dependencies = [ - "bitflags 2.11.0", - "core-foundation 0.9.4", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "target-triple" version = "1.0.0" @@ -5639,7 +5064,7 @@ dependencies = [ "getrandom 0.4.1", "once_cell", "rustix 1.1.3", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5648,7 +5073,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8c27177b12a6399ffc08b98f76f7c9a1f4fe9fc967c784c5a071fa8d93cf7e1" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5691,8 +5116,11 @@ name = "testing-remote-prover" version = "0.14.0" dependencies = [ "anyhow", + "async-trait", + "miden-node-proto", "miden-node-utils", - "miden-remote-prover", + "miden-protocol", + "miden-tx", "tokio", "tokio-stream", "tonic", @@ -5712,33 +5140,13 @@ dependencies = [ "unicode-width 0.2.2", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" 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 = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.116", + "thiserror-impl", ] [[package]] @@ -5761,16 +5169,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "thrift_codec" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d957f535b242b91aa9f47bde08080f9a6fef276477e55b0079979d002759d5" -dependencies = [ - "byteorder", - "trackable", -] - [[package]] name = "time" version = "0.3.47" @@ -5821,10 +5219,9 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.6.2", "tokio-macros", "windows-sys 0.61.2", ] @@ -5841,12 +5238,12 @@ dependencies = [ ] [[package]] -name = "tokio-native-tls" -version = "0.3.1" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "native-tls", + "rustls 0.21.12", "tokio", ] @@ -5856,7 +5253,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls", + "rustls 0.23.36", "tokio", ] @@ -5872,17 +5269,6 @@ dependencies = [ "tokio-util", ] -[[package]] -name = "tokio-test" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6d24790a10a7af737693a3e8f1d03faef7e6ca0cc99aae5066f533766de545" -dependencies = [ - "futures-core", - "tokio", - "tokio-stream", -] - [[package]] name = "tokio-util" version = "0.7.18" @@ -5914,7 +5300,7 @@ 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", + "indexmap", "serde_core", "serde_spanned 1.0.4", "toml_datetime 0.7.5+spec-1.1.0", @@ -5929,7 +5315,7 @@ version = "1.0.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1dfefef6a142e93f346b64c160934eb13b5594b84ab378133ac6815cb2bd57f" dependencies = [ - "indexmap 2.13.0", + "indexmap", "serde_core", "serde_spanned 1.0.4", "toml_datetime 1.0.0+spec-1.1.0", @@ -5971,7 +5357,7 @@ version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.13.0", + "indexmap", "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.11", @@ -6010,20 +5396,20 @@ dependencies = [ "axum", "base64", "bytes", - "h2", - "http", - "http-body", + "h2 0.4.13", + "http 1.4.0", + "http-body 1.0.1", "http-body-util", - "hyper", + "hyper 1.8.1", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", "rustls-native-certs", - "socket2", + "socket2 0.6.2", "sync_wrapper", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.4", "tokio-stream", "tower", "tower-layer", @@ -6105,8 +5491,8 @@ checksum = "b1d56db85992f978d0c35a091674c03d42c48e029357833d311e95c6f7ec8f5a" dependencies = [ "base64", "bytes", - "http", - "http-body", + "http 1.4.0", + "http-body 1.0.1", "pin-project", "tokio-stream", "tonic", @@ -6117,21 +5503,21 @@ dependencies = [ [[package]] name = "tonic-web-wasm-client" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898cd44be5e23e59d2956056538f1d6b3c5336629d384ffd2d92e76f87fb98ff" +checksum = "e8e21e20b94f808d6f2244a5d960d02c28dd82066abddd2f27019bac0535f310" dependencies = [ "base64", "byteorder", "bytes", "futures-util", - "http", - "http-body", + "http 1.4.0", + "http-body 1.0.1", "http-body-util", "httparse", "js-sys", "pin-project", - "thiserror 2.0.18", + "thiserror", "tonic", "tower-service", "wasm-bindgen", @@ -6148,7 +5534,7 @@ checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", - "indexmap 2.13.0", + "indexmap", "pin-project-lite", "slab", "sync_wrapper", @@ -6165,13 +5551,12 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags 2.11.0", + "bitflags", "bytes", "futures-util", - "http", - "http-body", + "http 1.4.0", + "http-body 1.0.1", "http-body-util", - "iri-string", "pin-project-lite", "tower", "tower-layer", @@ -6197,7 +5582,6 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -6226,13 +5610,13 @@ dependencies = [ [[package]] name = "tracing-forest" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3298fe855716711a00474eceb89cc7dc254bbe67f6bc4afafdeec5f0c538771c" +checksum = "f09cb459317a3811f76644334473239d696cd8efc606963ae7d1c308cead3b74" dependencies = [ "chrono", "smallvec", - "thiserror 2.0.18", + "thiserror", "tracing", "tracing-subscriber", ] @@ -6295,25 +5679,6 @@ dependencies = [ "tracing-serde", ] -[[package]] -name = "trackable" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15bd114abb99ef8cee977e517c8f37aee63f184f2d08e3e6ceca092373369ae" -dependencies = [ - "trackable_derive", -] - -[[package]] -name = "trackable_derive" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebeb235c5847e2f82cfe0f07eb971d1e5f6804b18dac2ae16349cc604380f82f" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6428,6 +5793,12 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf8_iter" version = "1.0.4" @@ -6470,6 +5841,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "vte" version = "0.14.1" @@ -6533,9 +5910,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.105" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -6548,11 +5925,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.55" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -6561,9 +5939,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.105" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6571,9 +5949,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.105" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", @@ -6584,9 +5962,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.105" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] @@ -6608,16 +5986,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", - "indexmap 2.13.0", + "indexmap", "wasm-encoder", "wasmparser", ] [[package]] name = "wasm-streams" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" dependencies = [ "futures-util", "js-sys", @@ -6632,17 +6010,17 @@ version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "bitflags 2.11.0", + "bitflags", "hashbrown 0.15.5", - "indexmap 2.13.0", + "indexmap", "semver 1.0.27", ] [[package]] name = "web-sys" -version = "0.3.82" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -6680,7 +6058,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] @@ -6730,17 +6108,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" -dependencies = [ - "windows-link", - "windows-result", - "windows-strings", -] - [[package]] name = "windows-result" version = "0.4.1" @@ -7075,7 +6442,7 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4ff3b651754a7bd216f959764d0a5ab6f4b551c9a3a08fb9ccecbed594b614a" dependencies = [ - "rand 0.9.2", + "rand", "winter-utils", ] @@ -7128,7 +6495,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" dependencies = [ "anyhow", - "heck 0.5.0", + "heck", "wit-parser", ] @@ -7139,8 +6506,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" dependencies = [ "anyhow", - "heck 0.5.0", - "indexmap 2.13.0", + "heck", + "indexmap", "prettyplease", "syn 2.0.116", "wasm-metadata", @@ -7170,8 +6537,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", - "bitflags 2.11.0", - "indexmap 2.13.0", + "bitflags", + "indexmap", "log", "serde", "serde_derive", @@ -7190,7 +6557,7 @@ checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" dependencies = [ "anyhow", "id-arena", - "indexmap 2.13.0", + "indexmap", "log", "semver 1.0.27", "serde", @@ -7217,13 +6584,10 @@ dependencies = [ ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "xmlparser" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" [[package]] name = "yansi" @@ -7339,31 +6703,3 @@ name = "zmij" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" - -[[package]] -name = "zstd" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.16+zstd.1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/Cargo.toml b/Cargo.toml index 7383e9b397..a5e6a6dfe7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,13 +43,13 @@ miden-tx = { branch = "next", default-features = false, git = "https://gi # Miden node dependencies miden-node-block-producer = { branch = "next", git = "https://github.com/0xMiden/miden-node" } miden-node-ntx-builder = { branch = "next", git = "https://github.com/0xMiden/miden-node" } +miden-node-proto = { branch = "next", git = "https://github.com/0xMiden/miden-node" } miden-node-proto-build = { branch = "next", default-features = false, git = "https://github.com/0xMiden/miden-node" } miden-node-rpc = { branch = "next", git = "https://github.com/0xMiden/miden-node" } miden-node-store = { branch = "next", git = "https://github.com/0xMiden/miden-node" } miden-node-utils = { branch = "next", git = "https://github.com/0xMiden/miden-node" } miden-node-validator = { branch = "next", git = "https://github.com/0xMiden/miden-node" } miden-note-transport-proto-build = { default-features = false, version = "0.2" } -miden-remote-prover = { branch = "next", features = ["concurrent"], git = "https://github.com/0xMiden/miden-node" } miden-remote-prover-client = { branch = "next", default-features = false, features = [ "tx-prover", ], git = "https://github.com/0xMiden/miden-node" } diff --git a/bin/integration-tests/src/tests/client.rs b/bin/integration-tests/src/tests/client.rs index feed6739da..fca805c54d 100644 --- a/bin/integration-tests/src/tests/client.rs +++ b/bin/integration-tests/src/tests/client.rs @@ -152,8 +152,9 @@ pub async fn test_multiple_tx_on_same_block(client_config: ClientConfig) -> Resu // wait for 1 block wait_for_blocks(&mut client, 1).await; - // wait for 1 block + // wait for both transactions to be committed wait_for_tx(&mut client, transaction_id_1).await?; + wait_for_tx(&mut client, transaction_id_2).await?; let transactions = client .get_transactions(TransactionFilter::All) @@ -710,20 +711,38 @@ pub async fn test_consume_multiple_expected_notes(client_config: ClientConfig) - let faucet_account_id = faucet_account_header.id(); let to_account_ids = [target_basic_account_1.id(), target_basic_account_2.id()]; - // Mint tokens to the accounts let fungible_asset = FungibleAsset::new(faucet_account_id, TRANSFER_AMOUNT).unwrap(); - let mint_tx_request = mint_multiple_fungible_asset( - fungible_asset, - &[to_account_ids[0], to_account_ids[0], to_account_ids[1], to_account_ids[1]], - NoteType::Private, - client.rng(), - ); - execute_tx_and_sync(&mut client, faucet_account_id, mint_tx_request.clone()).await?; + // TODO: mint tokens in a single transaction once multiple note minting is fixed on protocol + // https://github.com/0xMiden/protocol/issues/2519 + // Mint tokens to the accounts + // let mint_tx_request = mint_multiple_fungible_asset( + // fungible_asset, + // &[to_account_ids[0], to_account_ids[0], to_account_ids[1], to_account_ids[1]], + // NoteType::Private, + // client.rng(), + // ); + // execute_tx_and_sync(&mut client, faucet_account_id, mint_tx_request.clone()).await?; + + // Mint tokens individually to work around a protocol bug where minting + // multiple notes in a single transaction fails (0xMiden/protocol#2519). + let targets = [to_account_ids[0], to_account_ids[0], to_account_ids[1], to_account_ids[1]]; + let mut all_expected_notes = Vec::new(); + + for &target_id in &targets { + let tx_request = TransactionRequestBuilder::new() + .build_mint_fungible_asset(fungible_asset, target_id, NoteType::Private, client.rng()) + .unwrap(); + + all_expected_notes.extend(tx_request.expected_output_own_notes()); + execute_tx_and_sync(&mut client, faucet_account_id, tx_request).await?; + } + unauth_client.sync_state().await.unwrap(); // Filter notes by ownership - let expected_notes = mint_tx_request.expected_output_own_notes().into_iter(); + // let expected_notes = mint_tx_request.expected_output_own_notes().into_iter(); + let expected_notes = all_expected_notes.into_iter(); let client_notes: Vec<_> = client.get_input_notes(NoteFilter::All).await.unwrap(); let client_notes_ids: Vec<_> = client_notes.iter().map(|note| note.id()).collect(); diff --git a/bin/integration-tests/src/tests/fpi.rs b/bin/integration-tests/src/tests/fpi.rs index 0f7bfec58c..48989d6a01 100644 --- a/bin/integration-tests/src/tests/fpi.rs +++ b/bin/integration-tests/src/tests/fpi.rs @@ -51,21 +51,14 @@ pub async fn test_fpi_execute_program(client_config: ClientConfig) -> Result<()> &mut client, &keystore, AccountStorageMode::Public, - format!( - r#" - const MAP_STORAGE_SLOT = word("{MAP_SLOT_NAME}") + " + use miden::protocol::active_account pub proc get_fpi_map_item - # map key - push.{map_key} - - # item slot - push.MAP_STORAGE_SLOT[0..2] - - exec.::miden::protocol::active_account::get_map_item - swapw dropw - end"#, - map_key = Word::from(MAP_KEY) - ), + # inputs are passed as foreign_procedure_inputs: + # [slot_id_prefix, slot_id_suffix, KEY, pad(10)] + exec.active_account::get_map_item + end" + .to_string(), RPO_FALCON_SCHEME_ID, ) .await?; @@ -73,17 +66,33 @@ pub async fn test_fpi_execute_program(client_config: ClientConfig) -> Result<()> let code = format!( " use miden::protocol::tx + use miden::core::sys + const MAP_STORAGE_SLOT = word(\"{MAP_SLOT_NAME}\") begin - # push the root of the `get_fpi_item` account procedure + # pad the stack for the foreign procedure inputs + padw padw push.0.0 + + # push the key of the desired storage item + push.{map_key} + + # push the slot name of the desired storage item + push.MAP_STORAGE_SLOT[0..2] + + # push the root of the `get_fpi_map_item` account procedure push.{proc_root} # push the foreign account id push.{account_id_suffix} push.{account_id_prefix} - # => [foreign_id_prefix, foreign_id_suffix, FOREIGN_PROC_ROOT, storage_item_index] + # => [foreign_id_prefix, foreign_id_suffix, FOREIGN_PROC_ROOT, + # slot_id_prefix, slot_id_suffix, KEY, pad(10)] exec.tx::execute_foreign_procedure + # => [VALUE, pad(12)] + + exec.sys::truncate_stack end ", + map_key = Word::from(MAP_KEY), account_id_prefix = foreign_account_id.prefix().as_u64(), account_id_suffix = foreign_account_id.suffix(), ); @@ -144,22 +153,14 @@ pub async fn test_nested_fpi_calls(client_config: ClientConfig) -> Result<()> { &mut client, &keystore, AccountStorageMode::Public, - format!( - r#" - const STORAGE_MAP_SLOT = word("{MAP_SLOT_NAME}") + " + use miden::protocol::active_account pub proc get_fpi_map_item - # map key - push.{map_key} - - # push item slot - push.STORAGE_MAP_SLOT[0..2] - - # get item - exec.::miden::protocol::active_account::get_map_item - swapw dropw - end"#, - map_key = Word::from(MAP_KEY) - ), + # inputs are passed as foreign_procedure_inputs: + # [slot_id_prefix, slot_id_suffix, KEY, pad(10)] + exec.active_account::get_map_item + end" + .to_string(), RPO_FALCON_SCHEME_ID, ) .await?; @@ -172,20 +173,40 @@ pub async fn test_nested_fpi_calls(client_config: ClientConfig) -> Result<()> { format!( " use miden::protocol::tx + use miden::core::sys + const STORAGE_MAP_SLOT = word(\"{MAP_SLOT_NAME}\") pub proc get_fpi_map_item - # push the hash of the `get_fpi_item` account procedure + # The outer foreign procedure receives foreign_procedure_inputs(16) on the stack. + # We need to set up the inner FPI call with map key and slot as inputs. + + # pad the stack for the inner foreign procedure inputs + padw padw push.0.0 + + # push the key of the desired storage item + push.{map_key} + + # push the slot name of the desired storage item + push.STORAGE_MAP_SLOT[0..2] + + # push the hash of the inner account procedure push.{inner_proc_root} # push the foreign account id push.{account_id_suffix} push.{account_id_prefix} - # => [foreign_id_prefix, foreign_id_suffix, FOREIGN_PROC_ROOT, storage_item_index] + # => [foreign_id_prefix, foreign_id_suffix, FOREIGN_PROC_ROOT, + # slot_id_prefix, slot_id_suffix, KEY, pad(10)] exec.tx::execute_foreign_procedure + # => [VALUE, pad(12)] - # add one to the result of the foreign procedure call + # add one to the first element of the result add.1 + + # truncate any remaining stack items to ensure stack depth is 16 + exec.sys::truncate_stack end ", + map_key = Word::from(MAP_KEY), account_id_prefix = inner_foreign_account_id.prefix().as_u64(), account_id_suffix = inner_foreign_account_id.suffix(), ), @@ -199,17 +220,26 @@ pub async fn test_nested_fpi_calls(client_config: ClientConfig) -> Result<()> { let tx_script = format!( " use miden::protocol::tx - use miden::protocol::native_account + use miden::core::sys begin - # push the hash of the `get_fpi_item` account procedure + # pad the stack for the outer foreign procedure inputs (it doesn't use inputs directly) + padw padw padw push.0.0.0.0 + + # push the root of the outer account procedure push.{outer_proc_root} # push the foreign account id push.{account_id_suffix} push.{account_id_prefix} - # => [foreign_id_prefix, foreign_id_suffix, FOREIGN_PROC_ROOT, storage_item_index] + # => [foreign_id_prefix, foreign_id_suffix, FOREIGN_PROC_ROOT, pad(16)] exec.tx::execute_foreign_procedure + # => [result(16)] + + # assert the top word equals FPI_STORAGE_VALUE + 1 push.{fpi_value} add.1 assert_eqw + + # truncate any remaining stack items + exec.sys::truncate_stack end ", fpi_value = Word::from(FPI_STORAGE_VALUE), @@ -279,21 +309,14 @@ async fn standard_fpi( &mut client, &keystore, storage_mode, - format!( - r#" - const STORAGE_MAP_SLOT = word("{MAP_SLOT_NAME}") + " + use miden::protocol::active_account pub proc get_fpi_map_item - # map key - push.{map_key} - - # push item slot name - push.STORAGE_MAP_SLOT[0..2] - - exec.::miden::protocol::active_account::get_map_item - swapw dropw - end"#, - map_key = Word::from(MAP_KEY) - ), + # inputs are passed as foreign_procedure_inputs: + # [slot_id_prefix, slot_id_suffix, KEY, pad(10)] + exec.active_account::get_map_item + end" + .to_string(), auth_scheme, ) .await?; @@ -305,18 +328,36 @@ async fn standard_fpi( let tx_script = format!( " use miden::protocol::tx + use miden::core::sys + const STORAGE_MAP_SLOT = word(\"{MAP_SLOT_NAME}\") begin - # push the hash of the `get_fpi_item` account procedure + # pad the stack for the foreign procedure inputs + padw padw push.0.0 + + # push the key of the desired storage item + push.{map_key} + + # push the slot name of the desired storage item + push.STORAGE_MAP_SLOT[0..2] + + # push the hash of the `get_fpi_map_item` account procedure push.{proc_root} # push the foreign account id push.{account_id_suffix} push.{account_id_prefix} - # => [foreign_id_prefix, foreign_id_suffix, FOREIGN_PROC_ROOT, storage_item_index] + # => [foreign_id_prefix, foreign_id_suffix, FOREIGN_PROC_ROOT, + # slot_id_prefix, slot_id_suffix, KEY, pad(10)] exec.tx::execute_foreign_procedure + # => [VALUE, pad(12)] + push.{fpi_value} assert_eqw + + # truncate any remaining stack items + exec.sys::truncate_stack end ", + map_key = Word::from(MAP_KEY), fpi_value = Word::from(FPI_STORAGE_VALUE), account_id_prefix = foreign_account_id.prefix().as_u64(), account_id_suffix = foreign_account_id.suffix(), diff --git a/bin/miden-cli/templates/basic-fungible-faucet.toml b/bin/miden-cli/templates/basic-fungible-faucet.toml index 167833e9fe..66268bfcce 100644 --- a/bin/miden-cli/templates/basic-fungible-faucet.toml +++ b/bin/miden-cli/templates/basic-fungible-faucet.toml @@ -8,8 +8,8 @@ supported-types = ["FungibleFaucet"] name = "miden::standards::fungible_faucets::metadata" description = "Contains metadata about the token associated to the faucet account" type = [ + { type = "void" }, { name = "max_supply", description = "Maximum supply of the token in base units" }, { name = "decimals", type = "u8", description = "Number of decimal places" }, { name = "ticker", type = "miden::standards::fungible_faucets::metadata::token_symbol", description = "Token symbol of the faucet's asset, limited to 4 characters." }, - { type = "void" }, ] diff --git a/bin/miden-cli/tests/cli.rs b/bin/miden-cli/tests/cli.rs index 7b77f31449..febbf880ef 100644 --- a/bin/miden-cli/tests/cli.rs +++ b/bin/miden-cli/tests/cli.rs @@ -295,8 +295,10 @@ async fn mint_with_untracked_account() -> Result<()> { &fungible_faucet_account_id, ); - // Sleep for a while to ensure the note is committed on the node - sync_until_committed_note(&temp_dir); + // Wait until the faucet's mint transaction is committed on the node. + // We sync for a committed transaction (not note) because the target account is untracked, + // so the output note's tag won't be requested during sync and the note will never appear. + sync_until_committed_transaction(&temp_dir); Ok(()) } @@ -329,7 +331,12 @@ async fn token_symbol_mapping() -> Result<()> { ]); let output = mint_cmd.current_dir(&temp_dir).output().unwrap(); - assert!(output.status.success()); + assert!( + output.status.success(), + "token_symbol mint failed.\nstdout: {}\nstderr: {}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + ); let note_id = String::from_utf8(output.stdout) .unwrap() @@ -413,8 +420,9 @@ async fn import_genesis_accounts_can_be_used_for_transactions() -> Result<()> { &fungible_faucet_account_id, ); - // Wait until the note is committed on the node - sync_until_committed_note(&temp_dir); + // Wait until the mint transaction is committed on the node. + // We sync for a committed transaction (not note) because the target account is untracked. + sync_until_committed_transaction(&temp_dir); Ok(()) } @@ -957,10 +965,15 @@ fn set_isolated_miden_home() -> PathBuf { path } +struct SyncResult { + committed_notes: u64, + committed_transactions: u64, +} + // Syncs CLI on directory. It'll try syncing until the command executes successfully. If it never // executes successfully, eventually the test will time out (provided the nextest config has a -// timeout set). It returns the number of updated notes after the sync. -fn sync_cli(cli_path: &Path) -> u64 { +// timeout set). It returns the number of committed notes and transactions after the sync. +fn sync_cli(cli_path: &Path) -> SyncResult { loop { let mut sync_cmd = cargo_bin_cmd!("miden-client"); sync_cmd.args(["sync"]); @@ -968,19 +981,25 @@ fn sync_cli(cli_path: &Path) -> u64 { let output = sync_cmd.current_dir(cli_path).output().unwrap(); if output.status.success() { - let updated_notes = String::from_utf8(output.stdout) - .unwrap() + let stdout = String::from_utf8(output.stdout).unwrap(); + + let committed_notes = stdout .lines() .find_map(|line| { - if let Some(rest) = line.strip_prefix("Committed notes: ") { - rest.trim().parse::().ok() - } else { - None - } + line.strip_prefix("Committed notes: ") + .and_then(|rest| rest.trim().parse::().ok()) }) .unwrap(); - return updated_notes; + let committed_transactions = stdout + .lines() + .find_map(|line| { + line.strip_prefix("Committed transactions: ") + .and_then(|rest| rest.trim().parse::().ok()) + }) + .unwrap(); + + return SyncResult { committed_notes, committed_transactions }; } std::thread::sleep(std::time::Duration::from_secs(3)); } @@ -990,6 +1009,7 @@ fn sync_cli(cli_path: &Path) -> u64 { /// successfully given account using the CLI given by `cli_path`. fn mint_cli(cli_path: &Path, target_account_id: &str, faucet_id: &str) -> String { let mut mint_cmd = cargo_bin_cmd!("miden-client"); + mint_cmd.env("MIDEN_DEBUG", "true"); mint_cmd.args([ "mint", "--target", @@ -1002,7 +1022,12 @@ fn mint_cli(cli_path: &Path, target_account_id: &str, faucet_id: &str) -> String ]); let output = mint_cmd.current_dir(cli_path).output().unwrap(); - assert!(output.status.success()); + assert!( + output.status.success(), + "mint_cli failed.\nstdout: {}\nstderr: {}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + ); String::from_utf8(output.stdout) .unwrap() @@ -1047,7 +1072,14 @@ fn send_cli(cli_path: &Path, from_account_id: &str, to_account_id: &str, faucet_ /// Syncs until a tracked note gets committed. fn sync_until_committed_note(cli_path: &Path) { - while sync_cli(cli_path) == 0 { + while sync_cli(cli_path).committed_notes == 0 { + std::thread::sleep(std::time::Duration::from_secs(1)); + } +} + +/// Syncs until a tracked transaction gets committed. +fn sync_until_committed_transaction(cli_path: &Path) { + while sync_cli(cli_path).committed_transactions == 0 { std::thread::sleep(std::time::Duration::from_secs(1)); } } diff --git a/crates/idxdb-store/src/transaction/utils.rs b/crates/idxdb-store/src/transaction/utils.rs index 2fe4a81eb8..a961aa4c48 100644 --- a/crates/idxdb-store/src/transaction/utils.rs +++ b/crates/idxdb-store/src/transaction/utils.rs @@ -56,7 +56,7 @@ pub async fn insert_proven_transaction_data( let details = TransactionDetails { account_id: executed_transaction.account_id(), - init_account_state: executed_transaction.initial_account().to_commitment(), + init_account_state: executed_transaction.initial_account().initial_commitment(), final_account_state: executed_transaction.final_account().to_commitment(), input_note_nullifiers: nullifiers, output_notes: output_notes.clone(), diff --git a/crates/rust-client/Cargo.toml b/crates/rust-client/Cargo.toml index 1ee2ef2960..4dd98e9fe8 100644 --- a/crates/rust-client/Cargo.toml +++ b/crates/rust-client/Cargo.toml @@ -65,7 +65,7 @@ uuid = { features = ["js", "serde", "v4"], optional = true, version = "1 [target.'cfg(target_arch = "wasm32")'.dependencies] getrandom = { features = ["wasm_js"], version = "0.3" } -tonic-web-wasm-client = { default-features = false, version = "0.8" } +tonic-web-wasm-client = { default-features = false, version = "0.9" } web-sys = { features = ["Storage", "Window", "console"], version = "0.3" } [build-dependencies] diff --git a/crates/rust-client/src/rpc/domain/sync.rs b/crates/rust-client/src/rpc/domain/sync.rs index 2a123f793b..d4a1c77eae 100644 --- a/crates/rust-client/src/rpc/domain/sync.rs +++ b/crates/rust-client/src/rpc/domain/sync.rs @@ -4,8 +4,6 @@ use miden_protocol::Word; use miden_protocol::account::AccountId; use miden_protocol::block::{BlockHeader, BlockNumber}; use miden_protocol::crypto::merkle::mmr::MmrDelta; -use miden_protocol::note::NoteId; -use miden_protocol::transaction::TransactionId; use super::note::CommittedNote; use super::transaction::TransactionInclusion; @@ -15,7 +13,8 @@ use crate::rpc::{RpcError, generated as proto}; // STATE SYNC INFO // ================================================================================================ -/// Represents a `proto::rpc::SyncStateResponse` with fields converted into domain types. +/// Represents the composed result of `sync_notes`, `sync_chain_mmr`, and `sync_transactions` +/// with fields converted into domain types. pub struct StateSyncInfo { /// The block number of the chain tip at the moment of the response. pub chain_tip: BlockNumber, @@ -33,110 +32,24 @@ pub struct StateSyncInfo { pub transactions: Vec, } -// STATE SYNC INFO CONVERSION +// CHAIN MMR INFO // ================================================================================================ -impl TryFrom for StateSyncInfo { - type Error = RpcError; - - fn try_from(value: proto::rpc::SyncStateResponse) -> Result { - let chain_tip = value.chain_tip; +/// Represents the result of a `SyncChainMmr` RPC call, with fields converted into domain types. +pub struct ChainMmrInfo { + /// The MMR delta for the requested block range. + pub mmr_delta: MmrDelta, +} - // Validate and convert block header - let block_header: BlockHeader = value - .block_header - .ok_or(proto::rpc::SyncStateResponse::missing_field(stringify!(block_header)))? - .try_into()?; +impl TryFrom for ChainMmrInfo { + type Error = RpcError; - // Validate and convert MMR Delta + fn try_from(value: proto::rpc::SyncChainMmrResponse) -> Result { let mmr_delta = value .mmr_delta - .ok_or(proto::rpc::SyncStateResponse::missing_field(stringify!(mmr_delta)))? + .ok_or(proto::rpc::SyncChainMmrResponse::missing_field(stringify!(mmr_delta)))? .try_into()?; - // Validate and convert account commitment updates into an (AccountId, Word) tuple - let mut account_commitment_updates = vec![]; - for update in value.accounts { - let account_id = update - .account_id - .ok_or(proto::rpc::SyncStateResponse::missing_field(stringify!( - accounts.account_id - )))? - .try_into()?; - let account_commitment = update - .account_commitment - .ok_or(proto::rpc::SyncStateResponse::missing_field(stringify!( - accounts.account_commitment - )))? - .try_into()?; - account_commitment_updates.push((account_id, account_commitment)); - } - - // Validate and convert account note inclusions into an (AccountId, Word) tuple - let mut note_inclusions = vec![]; - for note in value.notes { - let note_id: NoteId = note - .note_id - .ok_or(proto::rpc::SyncStateResponse::missing_field(stringify!(notes.note_id)))? - .try_into()?; - - let inclusion_path = note - .inclusion_path - .ok_or(proto::rpc::SyncStateResponse::missing_field(stringify!( - notes.inclusion_path - )))? - .try_into()?; - - let metadata = note - .metadata - .ok_or(proto::rpc::SyncStateResponse::missing_field(stringify!(notes.metadata)))? - .try_into()?; - - let committed_note = super::note::CommittedNote::new( - note_id, - u16::try_from(note.note_index_in_block).expect("note index out of range"), - inclusion_path, - metadata, - ); - - note_inclusions.push(committed_note); - } - - let transactions = value - .transactions - .iter() - .map(|transaction_summary| { - let transaction_id = transaction_summary.transaction_id.ok_or( - proto::rpc::SyncStateResponse::missing_field(stringify!( - transactions.transaction_id - )), - )?; - let transaction_id = TransactionId::try_from(transaction_id)?; - - let transaction_block_num = transaction_summary.block_num; - - let transaction_account_id = transaction_summary.account_id.clone().ok_or( - proto::rpc::SyncStateResponse::missing_field(stringify!( - transactions.account_id - )), - )?; - let transaction_account_id = AccountId::try_from(transaction_account_id)?; - - Ok(TransactionInclusion { - transaction_id, - block_num: transaction_block_num.into(), - account_id: transaction_account_id, - }) - }) - .collect::, RpcError>>()?; - - Ok(Self { - chain_tip: chain_tip.into(), - block_header, - mmr_delta, - account_commitment_updates, - note_inclusions, - transactions, - }) + Ok(Self { mmr_delta }) } } diff --git a/crates/rust-client/src/rpc/domain/transaction.rs b/crates/rust-client/src/rpc/domain/transaction.rs index f2e48f8d07..59de08e7a2 100644 --- a/crates/rust-client/src/rpc/domain/transaction.rs +++ b/crates/rust-client/src/rpc/domain/transaction.rs @@ -64,6 +64,8 @@ pub struct TransactionInclusion { pub block_num: BlockNumber, /// The account that the transaction was executed against. pub account_id: AccountId, + /// The initial account state commitment before the transaction was executed. + pub initial_state_commitment: Word, } // TRANSACTIONS INFO @@ -169,11 +171,12 @@ impl TryFrom for TransactionHeader { .nullifiers .into_iter() .map(|d| { - Nullifier::from_hex(&d.to_string()) - .map(InputNoteCommitment::from) - .map_err(|e| RpcError::InvalidResponse(e.to_string())) + let word: Word = d + .try_into() + .map_err(|e: RpcConversionError| RpcError::InvalidResponse(e.to_string()))?; + Ok(InputNoteCommitment::from(Nullifier::from_raw(word))) }) - .collect::, _>>()?; + .collect::, RpcError>>()?; let input_notes = InputNotes::new_unchecked(note_commitments); let output_notes = value diff --git a/crates/rust-client/src/rpc/errors/node/mod.rs b/crates/rust-client/src/rpc/errors/node/mod.rs index f69dba5a45..2aed0b215a 100644 --- a/crates/rust-client/src/rpc/errors/node/mod.rs +++ b/crates/rust-client/src/rpc/errors/node/mod.rs @@ -110,7 +110,7 @@ pub fn parse_node_error( Some(EndpointError::GetAccount(GetAccountError::from_code(code, message))) }, // These endpoints don't have typed errors from the node - NodeRpcClientEndpoint::SyncState + NodeRpcClientEndpoint::SyncChainMmr | NodeRpcClientEndpoint::Status | NodeRpcClientEndpoint::GetLimits => None, } diff --git a/crates/rust-client/src/rpc/generated/nostd/rpc.rs b/crates/rust-client/src/rpc/generated/nostd/rpc.rs index cafbca28d8..a1796a70ba 100644 --- a/crates/rust-client/src/rpc/generated/nostd/rpc.rs +++ b/crates/rust-client/src/rpc/generated/nostd/rpc.rs @@ -428,51 +428,27 @@ pub struct SyncNotesResponse { #[prost(message, repeated, tag = "4")] pub notes: ::prost::alloc::vec::Vec, } -/// State synchronization request. -/// -/// Specifies state updates the requester is interested in. The server will return the first block which -/// contains a note matching `note_tags` or the chain tip. And the corresponding updates to -/// `account_ids` for that block range. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SyncStateRequest { - /// Last block known by the requester. The response will contain data starting from the next block, - /// until the first block which contains a note of matching the requested tag, or the chain tip - /// if there are no notes. - #[prost(fixed32, tag = "1")] - pub block_num: u32, - /// Accounts' commitment to include in the response. +/// Chain MMR synchronization request. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SyncChainMmrRequest { + /// Block range from which to synchronize the chain MMR. /// - /// An account commitment will be included if-and-only-if it is the latest update. Meaning it is - /// possible there was an update to the account for the given range, but if it is not the latest, - /// it won't be included in the response. - #[prost(message, repeated, tag = "2")] - pub account_ids: ::prost::alloc::vec::Vec, - /// Specifies the tags which the requester is interested in. - #[prost(fixed32, repeated, tag = "3")] - pub note_tags: ::prost::alloc::vec::Vec, + /// The response will contain MMR delta starting after `block_range.block_from` up to + /// `block_range.block_to` or the chain tip (whichever is lower). Set `block_from` to the last + /// block already present in the caller's MMR so the delta begins at the next block. + #[prost(message, optional, tag = "1")] + pub block_range: ::core::option::Option, } -/// Represents the result of syncing state request. +/// Represents the result of syncing chain MMR. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct SyncStateResponse { - /// Number of the latest block in the chain. - #[prost(fixed32, tag = "1")] - pub chain_tip: u32, - /// Block header of the block with the first note matching the specified criteria. +pub struct SyncChainMmrResponse { + /// For which block range the MMR delta is returned. + #[prost(message, optional, tag = "1")] + pub block_range: ::core::option::Option, + /// Data needed to update the partial MMR from `request.block_range.block_from + 1` to + /// `response.block_range.block_to` or the chain tip. #[prost(message, optional, tag = "2")] - pub block_header: ::core::option::Option, - /// Data needed to update the partial MMR from `request.block_num + 1` to `response.block_header.block_num`. - #[prost(message, optional, tag = "3")] pub mmr_delta: ::core::option::Option, - /// List of account commitments updated after `request.block_num + 1` but not after `response.block_header.block_num`. - #[prost(message, repeated, tag = "5")] - pub accounts: ::prost::alloc::vec::Vec, - /// List of transactions executed against requested accounts between `request.block_num + 1` and - /// `response.block_header.block_num`. - #[prost(message, repeated, tag = "6")] - pub transactions: ::prost::alloc::vec::Vec, - /// List of all notes together with the Merkle paths from `response.block_header.note_root`. - #[prost(message, repeated, tag = "7")] - pub notes: ::prost::alloc::vec::Vec, } /// Storage map synchronization request. /// @@ -585,7 +561,7 @@ pub struct TransactionRecord { #[derive(Clone, PartialEq, ::prost::Message)] pub struct RpcLimits { /// Maps RPC endpoint names to their parameter limits. - /// Key: endpoint name (e.g., "CheckNullifiers", "SyncState") + /// Key: endpoint name (e.g., "CheckNullifiers") /// Value: map of parameter names to their limit values #[prost(btree_map = "string, message", tag = "1")] pub endpoints: ::prost::alloc::collections::BTreeMap< @@ -1068,26 +1044,12 @@ pub mod api_client { .insert(GrpcMethod::new("rpc.Api", "SyncAccountStorageMaps")); self.inner.unary(req, path, codec).await } - /// Returns info which can be used by the client to sync up to the latest state of the chain - /// for the objects (accounts and notes) the client is interested in. - /// - /// This request returns the next block containing requested data. It also returns `chain_tip` - /// which is the latest block number in the chain. Client is expected to repeat these requests - /// in a loop until `response.block_header.block_num == response.chain_tip`, at which point - /// the client is fully synchronized with the chain. - /// - /// Each update response also contains info about new notes, accounts etc. created. It also - /// returns Chain MMR delta that can be used to update the state of Chain MMR. This includes - /// both chain MMR peaks and chain MMR nodes. - /// - /// For preserving some degree of privacy, note tags contain only high - /// part of hashes. Thus, returned data contains excessive notes, client can make - /// additional filtering of that data on its side. - pub async fn sync_state( + /// Returns MMR delta needed to synchronize the chain MMR within the requested block range. + pub async fn sync_chain_mmr( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> core::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1099,9 +1061,9 @@ pub mod api_client { ) })?; let codec = tonic_prost::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/rpc.Api/SyncState"); + let path = http::uri::PathAndQuery::from_static("/rpc.Api/SyncChainMmr"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncState")); + req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncChainMmr")); self.inner.unary(req, path, codec).await } } diff --git a/crates/rust-client/src/rpc/generated/std/rpc.rs b/crates/rust-client/src/rpc/generated/std/rpc.rs index 7a920113ae..fc0d2ab7a4 100644 --- a/crates/rust-client/src/rpc/generated/std/rpc.rs +++ b/crates/rust-client/src/rpc/generated/std/rpc.rs @@ -428,51 +428,27 @@ pub struct SyncNotesResponse { #[prost(message, repeated, tag = "4")] pub notes: ::prost::alloc::vec::Vec, } -/// State synchronization request. -/// -/// Specifies state updates the requester is interested in. The server will return the first block which -/// contains a note matching `note_tags` or the chain tip. And the corresponding updates to -/// `account_ids` for that block range. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SyncStateRequest { - /// Last block known by the requester. The response will contain data starting from the next block, - /// until the first block which contains a note of matching the requested tag, or the chain tip - /// if there are no notes. - #[prost(fixed32, tag = "1")] - pub block_num: u32, - /// Accounts' commitment to include in the response. +/// Chain MMR synchronization request. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SyncChainMmrRequest { + /// Block range from which to synchronize the chain MMR. /// - /// An account commitment will be included if-and-only-if it is the latest update. Meaning it is - /// possible there was an update to the account for the given range, but if it is not the latest, - /// it won't be included in the response. - #[prost(message, repeated, tag = "2")] - pub account_ids: ::prost::alloc::vec::Vec, - /// Specifies the tags which the requester is interested in. - #[prost(fixed32, repeated, tag = "3")] - pub note_tags: ::prost::alloc::vec::Vec, + /// The response will contain MMR delta starting after `block_range.block_from` up to + /// `block_range.block_to` or the chain tip (whichever is lower). Set `block_from` to the last + /// block already present in the caller's MMR so the delta begins at the next block. + #[prost(message, optional, tag = "1")] + pub block_range: ::core::option::Option, } -/// Represents the result of syncing state request. +/// Represents the result of syncing chain MMR. #[derive(Clone, PartialEq, ::prost::Message)] -pub struct SyncStateResponse { - /// Number of the latest block in the chain. - #[prost(fixed32, tag = "1")] - pub chain_tip: u32, - /// Block header of the block with the first note matching the specified criteria. +pub struct SyncChainMmrResponse { + /// For which block range the MMR delta is returned. + #[prost(message, optional, tag = "1")] + pub block_range: ::core::option::Option, + /// Data needed to update the partial MMR from `request.block_range.block_from + 1` to + /// `response.block_range.block_to` or the chain tip. #[prost(message, optional, tag = "2")] - pub block_header: ::core::option::Option, - /// Data needed to update the partial MMR from `request.block_num + 1` to `response.block_header.block_num`. - #[prost(message, optional, tag = "3")] pub mmr_delta: ::core::option::Option, - /// List of account commitments updated after `request.block_num + 1` but not after `response.block_header.block_num`. - #[prost(message, repeated, tag = "5")] - pub accounts: ::prost::alloc::vec::Vec, - /// List of transactions executed against requested accounts between `request.block_num + 1` and - /// `response.block_header.block_num`. - #[prost(message, repeated, tag = "6")] - pub transactions: ::prost::alloc::vec::Vec, - /// List of all notes together with the Merkle paths from `response.block_header.note_root`. - #[prost(message, repeated, tag = "7")] - pub notes: ::prost::alloc::vec::Vec, } /// Storage map synchronization request. /// @@ -585,7 +561,7 @@ pub struct TransactionRecord { #[derive(Clone, PartialEq, ::prost::Message)] pub struct RpcLimits { /// Maps RPC endpoint names to their parameter limits. - /// Key: endpoint name (e.g., "CheckNullifiers", "SyncState") + /// Key: endpoint name (e.g., "CheckNullifiers") /// Value: map of parameter names to their limit values #[prost(map = "string, message", tag = "1")] pub endpoints: ::std::collections::HashMap< @@ -1076,26 +1052,12 @@ pub mod api_client { .insert(GrpcMethod::new("rpc.Api", "SyncAccountStorageMaps")); self.inner.unary(req, path, codec).await } - /// Returns info which can be used by the client to sync up to the latest state of the chain - /// for the objects (accounts and notes) the client is interested in. - /// - /// This request returns the next block containing requested data. It also returns `chain_tip` - /// which is the latest block number in the chain. Client is expected to repeat these requests - /// in a loop until `response.block_header.block_num == response.chain_tip`, at which point - /// the client is fully synchronized with the chain. - /// - /// Each update response also contains info about new notes, accounts etc. created. It also - /// returns Chain MMR delta that can be used to update the state of Chain MMR. This includes - /// both chain MMR peaks and chain MMR nodes. - /// - /// For preserving some degree of privacy, note tags contain only high - /// part of hashes. Thus, returned data contains excessive notes, client can make - /// additional filtering of that data on its side. - pub async fn sync_state( + /// Returns MMR delta needed to synchronize the chain MMR within the requested block range. + pub async fn sync_chain_mmr( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1107,9 +1069,9 @@ pub mod api_client { ) })?; let codec = tonic_prost::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/rpc.Api/SyncState"); + let path = http::uri::PathAndQuery::from_static("/rpc.Api/SyncChainMmr"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncState")); + req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncChainMmr")); self.inner.unary(req, path, codec).await } } diff --git a/crates/rust-client/src/rpc/mod.rs b/crates/rust-client/src/rpc/mod.rs index 9342723db3..eef8171ff5 100644 --- a/crates/rust-client/src/rpc/mod.rs +++ b/crates/rust-client/src/rpc/mod.rs @@ -49,7 +49,7 @@ use core::fmt; use domain::account::{AccountProof, FetchedAccount}; use domain::note::{FetchedNote, NoteSyncInfo}; use domain::nullifier::NullifierUpdate; -use domain::sync::StateSyncInfo; +use domain::sync::ChainMmrInfo; use miden_protocol::Word; use miden_protocol::account::{Account, AccountCode, AccountHeader, AccountId}; use miden_protocol::address::NetworkId; @@ -149,24 +149,15 @@ pub trait NodeRpcClient: Send + Sync { /// verify that each note is part of the block's note tree. async fn get_notes_by_id(&self, note_ids: &[NoteId]) -> Result, RpcError>; - /// Fetches info from the node necessary to perform a state sync using the - /// `/SyncState` RPC endpoint. + /// Fetches the MMR delta for a given block range using the `/SyncChainMmr` RPC endpoint. /// - /// - `block_num` is the last block number known by the client. The returned [`StateSyncInfo`] - /// should contain data starting from the next block, until the first block which contains a - /// note of matching the requested tag, or the chain tip if there are no notes. - /// - `account_ids` is a list of account IDs and determines the accounts the client is - /// interested in and should receive account updates of. - /// - `note_tags` is a list of tags used to filter the notes the client is interested in, which - /// serves as a "note group" filter. Notice that you can't filter by a specific note ID. - /// - `nullifiers_tags` similar to `note_tags`, is a list of tags used to filter the nullifiers - /// corresponding to some notes the client is interested in. - async fn sync_state( + /// - `block_from` is the last block number already present in the caller's MMR. + /// - `block_to` is the optional upper bound of the range. If `None`, syncs up to the chain tip. + async fn sync_chain_mmr( &self, - block_num: BlockNumber, - account_ids: &[AccountId], - note_tags: &BTreeSet, - ) -> Result; + block_from: BlockNumber, + block_to: Option, + ) -> Result; /// Fetches the current state of an account from the node using the `/GetAccountDetails` RPC /// endpoint. @@ -410,7 +401,7 @@ pub enum NodeRpcClientEndpoint { GetBlockByNumber, GetBlockHeaderByNumber, GetNotesById, - SyncState, + SyncChainMmr, SubmitProvenTx, SyncNotes, GetNoteScriptByRoot, @@ -434,7 +425,7 @@ impl fmt::Display for NodeRpcClientEndpoint { write!(f, "get_block_header_by_number") }, NodeRpcClientEndpoint::GetNotesById => write!(f, "get_notes_by_id"), - NodeRpcClientEndpoint::SyncState => write!(f, "sync_state"), + NodeRpcClientEndpoint::SyncChainMmr => write!(f, "sync_chain_mmr"), NodeRpcClientEndpoint::SubmitProvenTx => write!(f, "submit_proven_transaction"), NodeRpcClientEndpoint::SyncNotes => write!(f, "sync_notes"), NodeRpcClientEndpoint::GetNoteScriptByRoot => write!(f, "get_note_script_by_root"), diff --git a/crates/rust-client/src/rpc/tonic_client/mod.rs b/crates/rust-client/src/rpc/tonic_client/mod.rs index 858e4d8c2f..dd8a7236ee 100644 --- a/crates/rust-client/src/rpc/tonic_client/mod.rs +++ b/crates/rust-client/src/rpc/tonic_client/mod.rs @@ -30,8 +30,9 @@ use super::generated::rpc::account_request::AccountDetailRequest; use super::generated::rpc::AccountRequest; use super::{ Endpoint, FetchedAccount, NodeRpcClient, NodeRpcClientEndpoint, NoteSyncInfo, RpcError, - RpcStatusInfo, StateSyncInfo, + RpcStatusInfo, }; +use crate::rpc::domain::sync::ChainMmrInfo; use crate::rpc::domain::account_vault::{AccountVaultInfo, AccountVaultUpdate}; use crate::rpc::domain::storage_map::{StorageMapInfo, StorageMapUpdate}; use crate::rpc::domain::transaction::TransactionsInfo; @@ -492,29 +493,24 @@ impl NodeRpcClient for GrpcClient { Ok(notes) } - /// Sends a sync state request to the Miden node, validates and converts the response - /// into a [`StateSyncInfo`] struct. - async fn sync_state( + async fn sync_chain_mmr( &self, - block_num: BlockNumber, - account_ids: &[AccountId], - note_tags: &BTreeSet, - ) -> Result { - let account_ids = account_ids.iter().map(|acc| (*acc).into()).collect(); - - let note_tags = note_tags.iter().map(|¬e_tag| note_tag.into()).collect(); + block_from: BlockNumber, + block_to: Option, + ) -> Result { + let block_range = Some(BlockRange { + block_from: block_from.as_u32(), + block_to: block_to.map(|b| b.as_u32()), + }); - let request = proto::rpc::SyncStateRequest { - block_num: block_num.as_u32(), - account_ids, - note_tags, - }; + let request = proto::rpc::SyncChainMmrRequest { block_range }; let mut rpc_api = self.ensure_connected().await?; - let response = rpc_api.sync_state(request).await.map_err(|status| { - self.rpc_error_from_status(NodeRpcClientEndpoint::SyncState, status) + let response = rpc_api.sync_chain_mmr(request).await.map_err(|status| { + self.rpc_error_from_status(NodeRpcClientEndpoint::SyncChainMmr, status) })?; + response.into_inner().try_into() } diff --git a/crates/rust-client/src/sync/state_sync.rs b/crates/rust-client/src/sync/state_sync.rs index 872919e81e..f6749d8e38 100644 --- a/crates/rust-client/src/sync/state_sync.rs +++ b/crates/rust-client/src/sync/state_sync.rs @@ -18,7 +18,7 @@ use crate::note::NoteUpdateTracker; use crate::rpc::NodeRpcClient; use crate::rpc::domain::note::CommittedNote; use crate::rpc::domain::sync::StateSyncInfo; -use crate::rpc::domain::transaction::TransactionInclusion; +use crate::rpc::domain::transaction::{self as rpc_tx, TransactionInclusion}; use crate::store::{InputNoteRecord, OutputNoteRecord, StoreError}; use crate::transaction::TransactionRecord; @@ -258,12 +258,14 @@ impl StateSync { Ok(state_sync_update) } - /// Executes a single sync request and returns the node response if the chain advanced. + /// Executes a single sync step by composing calls to `sync_notes`, `sync_chain_mmr`, and + /// `sync_transactions`. /// - /// This method issues a `/SyncState` call starting from `current_block_num`. If the node - /// reports the same block number, `None` is returned, signalling that the client is already at - /// the requested height. Otherwise the full [`StateSyncInfo`] is returned for deferred - /// processing by the caller. + /// `sync_notes` drives the loop: it determines the target block (the first block containing + /// a matching note, or the chain tip). If the target block equals `current_block_num`, `None` + /// is returned, signalling that the client is already at the requested height. + /// + /// The other two calls use the same target block to ensure a consistent range. async fn sync_state_step( &self, current_block_num: BlockNumber, @@ -271,17 +273,59 @@ impl StateSync { note_tags: &Arc>, ) -> Result, ClientError> { info!("Performing sync state step."); - let response = self - .rpc_api - .sync_state(current_block_num, account_ids, note_tags.as_ref()) - .await?; - // We don't need to continue if the chain has not advanced, there are no new changes - if response.block_header.block_num() == current_block_num { + // Retrieve sync_notes + let note_sync = + self.rpc_api.sync_notes(current_block_num, None, note_tags.as_ref()).await?; + + let target_block = note_sync.block_header.block_num(); + + // We don't need to continue if the chain has not advanced + if target_block == current_block_num { return Ok(None); } - Ok(Some(response)) + // Get MMR delta for the same range + let mmr_delta = self + .rpc_api + .sync_chain_mmr(current_block_num, Some(target_block)) + .await? + .mmr_delta; + + // Gather transactions for tracked accounts (skip if none) + let (account_commitment_updates, transactions) = if account_ids.is_empty() { + (vec![], vec![]) + } else { + let tx_info = self + .rpc_api + .sync_transactions(current_block_num, Some(target_block), account_ids.to_vec()) + .await?; + + let account_updates = derive_account_commitment_updates(&tx_info.transaction_records); + + let tx_inclusions = tx_info + .transaction_records + .iter() + .map(|r| TransactionInclusion { + transaction_id: r.transaction_header.id(), + block_num: r.block_num, + account_id: r.transaction_header.account_id(), + initial_state_commitment: r.transaction_header.initial_state_commitment(), + }) + .collect(); + + (account_updates, tx_inclusions) + }; + + // Compose StateSyncInfo with sync results + Ok(Some(StateSyncInfo { + chain_tip: note_sync.chain_tip, + block_header: note_sync.block_header, + mmr_delta, + account_commitment_updates, + note_inclusions: note_sync.notes, + transactions, + })) } // HELPERS @@ -495,6 +539,36 @@ impl StateSync { // HELPERS // ================================================================================================ +/// Derives account commitment updates from transaction records. +/// +/// For each unique account, takes the `final_state_commitment` from the transaction with the +/// highest `block_num`. This replicates the old `SyncState` behavior where the node returned +/// the latest account commitment per account in the synced range. +fn derive_account_commitment_updates( + transaction_records: &[rpc_tx::TransactionRecord], +) -> Vec<(AccountId, Word)> { + let mut latest_by_account: BTreeMap = BTreeMap::new(); + + for record in transaction_records { + let account_id = record.transaction_header.account_id(); + latest_by_account + .entry(account_id) + .and_modify(|existing| { + if record.block_num > existing.block_num { + *existing = record; + } + }) + .or_insert(record); + } + + latest_by_account + .into_iter() + .map(|(account_id, record)| { + (account_id, record.transaction_header.final_state_commitment()) + }) + .collect() +} + /// Applies changes to the current MMR structure, returns the updated [`MmrPeaks`] and the /// authentication nodes for leaves we track. fn apply_mmr_changes( diff --git a/crates/rust-client/src/sync/state_sync_update.rs b/crates/rust-client/src/sync/state_sync_update.rs index b347542881..b1c7cf4faa 100644 --- a/crates/rust-client/src/sync/state_sync_update.rs +++ b/crates/rust-client/src/sync/state_sync_update.rs @@ -203,6 +203,17 @@ impl TransactionUpdateTracker { if let Some(transaction) = self.transactions.get_mut(&transaction_inclusion.transaction_id) { transaction.commit_transaction(transaction_inclusion.block_num, timestamp); + return; + } + + // Fallback for transactions with unauthenticated input notes: the node + // authenticates these notes during processing, which changes the transaction + // ID. Match by account ID and pre-transaction state instead. + if let Some(transaction) = self.transactions.values_mut().find(|tx| { + tx.details.account_id == transaction_inclusion.account_id + && tx.details.init_account_state == transaction_inclusion.initial_state_commitment + }) { + transaction.commit_transaction(transaction_inclusion.block_num, timestamp); } } diff --git a/crates/rust-client/src/test_utils/mock.rs b/crates/rust-client/src/test_utils/mock.rs index 2308e62906..86f4c84de5 100644 --- a/crates/rust-client/src/test_utils/mock.rs +++ b/crates/rust-client/src/test_utils/mock.rs @@ -31,12 +31,9 @@ use crate::rpc::domain::account_vault::{AccountVaultInfo, AccountVaultUpdate}; use crate::rpc::domain::note::{CommittedNote, FetchedNote, NoteSyncInfo}; use crate::rpc::domain::nullifier::NullifierUpdate; use crate::rpc::domain::storage_map::{StorageMapInfo, StorageMapUpdate}; -use crate::rpc::domain::sync::StateSyncInfo; +use crate::rpc::domain::sync::ChainMmrInfo; use crate::rpc::domain::transaction::{TransactionRecord, TransactionsInfo}; -use crate::rpc::generated::account::AccountSummary; use crate::rpc::generated::note::NoteSyncRecord; -use crate::rpc::generated::rpc::{BlockRange, SyncStateResponse}; -use crate::rpc::generated::transaction::TransactionSummary; use crate::rpc::{AccountStateAt, NodeRpcClient, RpcError, RpcStatusInfo}; use crate::transaction::ForeignAccount; @@ -109,89 +106,26 @@ impl MockRpcApi { self.mock_chain.read().block_header(block_num.as_usize()) } - /// Generates a sync state response based on the request block number. - fn get_sync_state_request( + /// Finds the next block containing a matching note after `block_from`, or the chain tip. + fn find_next_block_with_notes( &self, - request_block_range: BlockRange, + block_from: u32, note_tags: &BTreeSet, - account_ids: &[AccountId], - ) -> Result { - // Determine the next block number to sync - let next_block_num = self - .mock_chain + ) -> BlockNumber { + self.mock_chain .read() .committed_notes() .values() .filter_map(|note| { let block_num = note.inclusion_proof().location().block_num(); - if note_tags.contains(¬e.metadata().tag()) - && block_num.as_u32() > request_block_range.block_from - { + if note_tags.contains(¬e.metadata().tag()) && block_num.as_u32() > block_from { Some(block_num) } else { None } }) .min() - .unwrap_or_else(|| self.get_chain_tip_block_num()); - - // Retrieve the next block - let next_block = self.get_block_by_num(next_block_num); - - // Prepare the MMR delta - let from_block_num = - if request_block_range.block_from == self.get_chain_tip_block_num().as_u32() { - next_block_num.as_usize() - } else { - request_block_range.block_from as usize + 1 - }; - - let mmr_delta = self - .get_mmr() - .get_delta(Forest::new(from_block_num), Forest::new(next_block_num.as_usize())) - .unwrap(); - - // Collect notes that are in the next block - let notes = self.get_notes_in_block(next_block_num, note_tags, account_ids); - - let transactions = self - .mock_chain - .read() - .proven_blocks() - .iter() - .filter(|block| { - block.header().block_num().as_u32() > request_block_range.block_from - && block.header().block_num() <= next_block_num - }) - .flat_map(|block| { - block.body().transactions().as_slice().iter().map(|tx| TransactionSummary { - transaction_id: Some(tx.id().into()), - block_num: next_block_num.as_u32(), - account_id: Some(tx.account_id().into()), - }) - }) - .collect(); - - let mut accounts = vec![]; - - for (block_num, updates) in self.account_commitment_updates.read().iter() { - if block_num.as_u32() > request_block_range.block_from && *block_num <= next_block_num { - accounts.extend(updates.iter().map(|(account_id, commitment)| AccountSummary { - account_id: Some((*account_id).into()), - account_commitment: Some(commitment.into()), - block_num: block_num.as_u32(), - })); - } - } - - Ok(SyncStateResponse { - chain_tip: self.get_chain_tip_block_num().as_u32(), - block_header: Some(next_block.into()), - mmr_delta: Some(mmr_delta.try_into()?), - accounts, - transactions, - notes, - }) + .unwrap_or_else(|| self.get_chain_tip_block_num()) } /// Retrieves account vault updates in a given block range. @@ -417,51 +351,54 @@ impl NodeRpcClient for MockRpcApi { async fn sync_notes( &self, block_num: BlockNumber, - block_to: Option, + _block_to: Option, note_tags: &BTreeSet, ) -> Result { - let block_range = BlockRange { - block_from: block_num.as_u32(), - block_to: block_to.map(|b| b.as_u32()), - }; + let next_block_num = self.find_next_block_with_notes(block_num.as_u32(), note_tags); + let next_block = self.get_block_by_num(next_block_num); - let response = self.get_sync_state_request(block_range, note_tags, &[])?; + let note_records = self.get_notes_in_block(next_block_num, note_tags, &[]); - let response = NoteSyncInfo { - chain_tip: response.chain_tip.into(), - block_header: response.block_header.unwrap().try_into().unwrap(), - mmr_path: self.get_mmr().open(block_num.as_usize()).unwrap().merkle_path, - notes: response - .notes - .into_iter() - .map(|note| { - let note_id: NoteId = note.note_id.unwrap().try_into().unwrap(); - let note_index = u16::try_from(note.note_index_in_block).unwrap(); - let merkle_path = note.inclusion_path.unwrap().try_into().unwrap(); - let metadata = note.metadata.unwrap().try_into().unwrap(); - - CommittedNote::new(note_id, note_index, merkle_path, metadata) - }) - .collect(), - }; + let notes = note_records + .into_iter() + .map(|note| { + let note_id: NoteId = note.note_id.unwrap().try_into().unwrap(); + let note_index = u16::try_from(note.note_index_in_block).unwrap(); + let merkle_path = note.inclusion_path.unwrap().try_into().unwrap(); + let metadata = note.metadata.unwrap().try_into().unwrap(); - Ok(response) + CommittedNote::new(note_id, note_index, merkle_path, metadata) + }) + .collect(); + + Ok(NoteSyncInfo { + chain_tip: self.get_chain_tip_block_num(), + block_header: next_block, + mmr_path: self.get_mmr().open(block_num.as_usize()).unwrap().merkle_path, + notes, + }) } - /// Executes the specified sync state request and returns the response. - async fn sync_state( + async fn sync_chain_mmr( &self, - block_num: BlockNumber, - account_ids: &[AccountId], - note_tags: &BTreeSet, - ) -> Result { - let block_range = BlockRange { - block_from: block_num.as_u32(), - block_to: None, + block_from: BlockNumber, + block_to: Option, + ) -> Result { + let chain_tip = self.get_chain_tip_block_num(); + let target_block = block_to.unwrap_or(chain_tip).min(chain_tip); + + let from_forest = if block_from == chain_tip { + target_block.as_usize() + } else { + block_from.as_u32() as usize + 1 }; - let response = self.get_sync_state_request(block_range, note_tags, account_ids)?; - Ok(response.try_into().unwrap()) + let mmr_delta = self + .get_mmr() + .get_delta(Forest::new(from_forest), Forest::new(target_block.as_usize())) + .unwrap(); + + Ok(ChainMmrInfo { mmr_delta }) } /// Retrieves the block header for the specified block number. If the block number is not diff --git a/crates/sqlite-store/src/transaction.rs b/crates/sqlite-store/src/transaction.rs index 324950ad06..d232aea02e 100644 --- a/crates/sqlite-store/src/transaction.rs +++ b/crates/sqlite-store/src/transaction.rs @@ -137,7 +137,7 @@ impl SqliteStore { let details = TransactionDetails { account_id: executed_transaction.account_id(), - init_account_state: executed_transaction.initial_account().to_commitment(), + init_account_state: executed_transaction.initial_account().initial_commitment(), final_account_state: executed_transaction.final_account().to_commitment(), input_note_nullifiers: nullifiers, output_notes: output_notes.clone(), diff --git a/crates/testing/node-builder/src/lib.rs b/crates/testing/node-builder/src/lib.rs index 66362aae31..b703ec3fb7 100644 --- a/crates/testing/node-builder/src/lib.rs +++ b/crates/testing/node-builder/src/lib.rs @@ -19,7 +19,7 @@ use miden_node_ntx_builder::NtxBuilderConfig; use miden_node_rpc::Rpc; use miden_node_store::{GenesisState, Store}; use miden_node_utils::crypto::get_rpo_random_coin; -use miden_node_validator::Validator; +use miden_node_validator::{Validator, ValidatorSigner}; use miden_protocol::account::auth::AuthSecretKey; use miden_protocol::account::{ Account, @@ -137,40 +137,41 @@ impl NodeBuilder { // Bootstrap the store database Store::bootstrap(genesis_state, &self.data_directory) - .context("failed to bootstrap store")?; + .await + .with_context(|| "failed to bootstrap store")?; // Start listening on all gRPC urls so that inter-component connections can be created // before each component is fully started up. let grpc_rpc = TcpListener::bind(format!("127.0.0.1:{}", self.rpc_port)) .await - .context("failed to bind to RPC gRPC endpoint")?; + .with_context(|| "failed to bind to RPC gRPC endpoint")?; let store_rpc_listener = TcpListener::bind("127.0.0.1:0") .await - .context("failed to bind to store RPC gRPC endpoint")?; + .with_context(|| "failed to bind to store RPC gRPC endpoint")?; let store_ntx_builder_listener = TcpListener::bind("127.0.0.1:0") .await - .context("failed to bind to store ntx-builder gRPC endpoint")?; + .with_context(|| "failed to bind to store ntx-builder gRPC endpoint")?; let store_block_producer_listener = TcpListener::bind("127.0.0.1:0") .await - .context("failed to bind to store block-producer gRPC endpoint")?; + .with_context(|| "failed to bind to store block-producer gRPC endpoint")?; let store_rpc_address = store_rpc_listener .local_addr() - .context("failed to retrieve the store's RPC gRPC address")?; + .with_context(|| "failed to retrieve the store's RPC gRPC address")?; let store_block_producer_address = store_block_producer_listener .local_addr() - .context("failed to retrieve the store's block-producer gRPC address")?; + .with_context(|| "failed to retrieve the store's block-producer gRPC address")?; let store_ntx_builder_address = store_ntx_builder_listener .local_addr() - .context("failed to retrieve the store's ntx-builder gRPC address")?; + .with_context(|| "failed to retrieve the store's ntx-builder gRPC address")?; let block_producer_address = available_socket_addr() .await - .context("failed to bind to block-producer gRPC endpoint")?; + .with_context(|| "failed to bind to block-producer gRPC endpoint")?; let validator_address = available_socket_addr() .await - .context("failed to bind to validator gRPC endpoint")?; + .with_context(|| "failed to bind to validator gRPC endpoint")?; // Start components @@ -182,12 +183,13 @@ impl NodeBuilder { store_ntx_builder_listener, store_block_producer_listener, ) - .context("failed to start store")?; + .with_context(|| "failed to start store")?; let ntx_builder_id = Self::start_ntx_builder( block_producer_address, store_ntx_builder_address, validator_address, + self.data_directory.join("ntx-builder.sqlite3"), &mut join_set, ); @@ -204,7 +206,8 @@ impl NodeBuilder { Validator { address: validator_address, grpc_timeout: DEFAULT_TIMEOUT_DURATION, - signer: validator_signer, + signer: ValidatorSigner::Local(validator_signer), + data_directory: self.data_directory, } .serve() .await @@ -337,6 +340,7 @@ impl NodeBuilder { block_producer_address: SocketAddr, store_address: SocketAddr, validator_address: SocketAddr, + database_filepath: PathBuf, join_set: &mut JoinSet>, ) -> Id { let store_url = @@ -354,13 +358,18 @@ impl NodeBuilder { join_set .spawn(async move { - NtxBuilderConfig::new(store_url, block_producer_url, validator_url) - .build() - .await - .context("failed to build ntx builder")? - .run() - .await - .context("failed while serving ntx builder component") + NtxBuilderConfig::new( + store_url, + block_producer_url, + validator_url, + database_filepath, + ) + .build() + .await + .context("failed to build ntx builder")? + .run() + .await + .context("failed while serving ntx builder component") }) .id() } @@ -512,10 +521,9 @@ fn create_test_account_with_many_assets(faucets: &[Account]) -> anyhow::Result, +} + +impl TransactionProverService { + fn new() -> Self { + Self { + prover: tokio::sync::Mutex::new(LocalTransactionProver::default()), + } + } +} + +#[async_trait::async_trait] +impl api_server::Api for TransactionProverService { + async fn prove( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + let request = request.into_inner(); + + let inputs = + miden_protocol::transaction::TransactionInputs::read_from_bytes(&request.payload) + .map_err(|e| { + tonic::Status::invalid_argument(format!("failed to decode request: {e}")) + })?; + + let prover = self.prover.lock().await; + let proven_tx = tokio::task::block_in_place(|| prover.prove(inputs)) + .map_err(|e| tonic::Status::internal(format!("failed to prove transaction: {e}")))?; + + Ok(tonic::Response::new(proto::Proof { payload: proven_tx.to_bytes() })) + } +} + +// STATUS SERVICE +// ================================================================================================ + +struct StatusService; + +#[async_trait::async_trait] +impl worker_status_api_server::WorkerStatusApi for StatusService { + async fn status( + &self, + _: tonic::Request<()>, + ) -> Result, tonic::Status> { + Ok(tonic::Response::new(proto::WorkerStatus { + version: env!("CARGO_PKG_VERSION").to_string(), + supported_proof_type: proto::ProofType::Transaction as i32, + })) + } +} + +// MAIN +// ================================================================================================ + #[tokio::main] async fn main() -> anyhow::Result<()> { let subscriber = Registry::default() @@ -17,17 +81,19 @@ async fn main() -> anyhow::Result<()> { tracing::subscriber::set_global_default(subscriber)?; let addr = format!("127.0.0.1:{DEFAULT_PROVER_PORT}"); - let rpc = RpcListener::new(TcpListener::bind(&addr).await?, ProofType::Transaction); + let listener = TcpListener::bind(&addr).await?; + println!("Remote prover listening on {}", listener.local_addr()?); - println!("Remote prover listening on {}", rpc.listener.local_addr()?); + let api_service = api_server::ApiServer::new(TransactionProverService::new()); + let status_service = worker_status_api_server::WorkerStatusApiServer::new(StatusService); tonic::transport::Server::builder() .accept_http1(true) .layer(cors_for_grpc_web_layer()) .layer(GrpcWebLayer::new()) - .add_service(rpc.api_service) - .add_service(rpc.status_service) - .serve_with_incoming(TcpListenerStream::new(rpc.listener)) + .add_service(api_service) + .add_service(status_service) + .serve_with_incoming(TcpListenerStream::new(listener)) .await?; Ok(()) diff --git a/crates/web-client/Cargo.toml b/crates/web-client/Cargo.toml index ad654201f6..4bb3276594 100644 --- a/crates/web-client/Cargo.toml +++ b/crates/web-client/Cargo.toml @@ -29,17 +29,15 @@ miden-protocol = { workspace = true } miden-standards = { workspace = true } # External dependencies -async-trait = { workspace = true } +async-trait = { workspace = true } console_error_panic_hook = { version = "0.1.7" } -hex = { version = "0.4" } -js-sys = { version = "0.3" } -rand = { workspace = true } -serde-wasm-bindgen = { version = "0.6" } -thiserror.workspace = true -wasm-bindgen = { features = [ - "serde-serialize", -], version = "=0.2.105" } # Lock version as .106 removed doc generation for structs -wasm-bindgen-futures = { version = "0.4" } +hex = { version = "0.4" } +js-sys = { version = "0.3" } +rand = { workspace = true } +serde-wasm-bindgen = { version = "0.6" } +thiserror.workspace = true +wasm-bindgen = { features = ["serde-serialize"], version = "=0.2.108" } +wasm-bindgen-futures = { version = "0.4" } [dev-dependencies] web-sys = { features = ["console"], version = "0.3" } diff --git a/crates/web-client/src/models/account.rs b/crates/web-client/src/models/account.rs index 8eefbbe28f..0e4d8ab44c 100644 --- a/crates/web-client/src/models/account.rs +++ b/crates/web-client/src/models/account.rs @@ -46,8 +46,8 @@ impl Account { } /// Returns the commitment to the account header, storage, and code. - pub fn commitment(&self) -> Word { - self.0.commitment().into() + pub fn to_commitment(&self) -> Word { + self.0.to_commitment().into() } /// Returns the account nonce, which is incremented on every state update. diff --git a/crates/web-client/src/models/account_component.rs b/crates/web-client/src/models/account_component.rs index c79f327467..439c776d9f 100644 --- a/crates/web-client/src/models/account_component.rs +++ b/crates/web-client/src/models/account_component.rs @@ -1,5 +1,8 @@ use miden_client::Word as NativeWord; -use miden_client::account::component::AccountComponent as NativeAccountComponent; +use miden_client::account::component::{ + AccountComponent as NativeAccountComponent, + AccountComponentMetadata, +}; use miden_client::account::{ AccountComponentCode as NativeAccountComponentCode, StorageSlot as NativeStorageSlot, @@ -72,16 +75,25 @@ impl AccountComponent { let native_account_code: NativeAccountComponentCode = account_code.into(); - NativeAccountComponent::new(native_account_code, native_slots) - .map(AccountComponent) - .map_err(|e| js_error_with_context(e, "Failed to compile account component")) + NativeAccountComponent::new( + native_account_code, + native_slots, + AccountComponentMetadata::new("custom"), + ) + .map(AccountComponent) + .map_err(|e| js_error_with_context(e, "Failed to compile account component")) } /// Marks the component as supporting all account types. #[wasm_bindgen(js_name = "withSupportsAllTypes")] - pub fn with_supports_all_types(mut self) -> Self { - self.0 = self.0.with_supports_all_types(); - self + pub fn with_supports_all_types(self) -> Self { + let metadata = self.0.metadata().clone().with_supports_all_types(); + let code = self.0.component_code().clone(); + let slots = self.0.storage_slots().to_vec(); + AccountComponent( + NativeAccountComponent::new(code, slots, metadata) + .expect("reconstructing component with updated metadata should not fail"), + ) } /// Returns the hex-encoded MAST root for a procedure by name. @@ -187,11 +199,13 @@ impl AccountComponent { .map(|storage_slot| storage_slot.clone().into()) .collect(); - NativeAccountComponent::new(native_library, native_slots) - .map(AccountComponent) - .map_err(|e| { - js_error_with_context(e, "Failed to create account component from package") - }) + NativeAccountComponent::new( + native_library, + native_slots, + AccountComponentMetadata::new("custom"), + ) + .map(AccountComponent) + .map_err(|e| js_error_with_context(e, "Failed to create account component from package")) } /// Creates an account component from a compiled library and storage slots. @@ -204,11 +218,13 @@ impl AccountComponent { let native_slots: Vec = storage_slots.into_iter().map(Into::into).collect(); - NativeAccountComponent::new(native_library, native_slots) - .map(AccountComponent) - .map_err(|e| { - js_error_with_context(e, "Failed to create account component from library") - }) + NativeAccountComponent::new( + native_library, + native_slots, + AccountComponentMetadata::new("custom"), + ) + .map(AccountComponent) + .map_err(|e| js_error_with_context(e, "Failed to create account component from library")) } } diff --git a/crates/web-client/src/models/account_header.rs b/crates/web-client/src/models/account_header.rs index b3693df2d5..ba8e6b70e2 100644 --- a/crates/web-client/src/models/account_header.rs +++ b/crates/web-client/src/models/account_header.rs @@ -21,8 +21,8 @@ pub struct AccountHeader(NativeAccountHeader); #[wasm_bindgen] impl AccountHeader { /// Returns the full account commitment. - pub fn commitment(&self) -> Word { - self.0.commitment().into() + pub fn to_commitment(&self) -> Word { + self.0.to_commitment().into() } /// Returns the account ID. diff --git a/crates/web-client/src/models/account_id.rs b/crates/web-client/src/models/account_id.rs index 4938ee6c96..5a523d762f 100644 --- a/crates/web-client/src/models/account_id.rs +++ b/crates/web-client/src/models/account_id.rs @@ -144,9 +144,7 @@ impl AccountId { let network_id: NativeNetworkId = network_id.into(); let routing_params = RoutingParameters::new(account_interface.into()); - let address = Address::new(self.0) - .with_routing_parameters(routing_params) - .map_err(|err| js_error_with_context(err, "failed to set routing parameters"))?; + let address = Address::new(self.0).with_routing_parameters(routing_params); Ok(address.encode(network_id)) } diff --git a/crates/web-client/src/models/address.rs b/crates/web-client/src/models/address.rs index e9a4cfdf6d..1db145c2a4 100644 --- a/crates/web-client/src/models/address.rs +++ b/crates/web-client/src/models/address.rs @@ -48,9 +48,7 @@ impl Address { None => NativeAddress::new(native_account_id), Some(interface) if &interface == "BasicWallet" => { let routing_params = RoutingParameters::new(NativeAddressInterface::BasicWallet); - NativeAddress::new(native_account_id) - .with_routing_parameters(routing_params) - .map_err(|err| js_error_with_context(err, "failed to set routing params"))? + NativeAddress::new(native_account_id).with_routing_parameters(routing_params) }, Some(other_interface) => { return Err(JsValue::from_str(&format!( diff --git a/crates/web-client/src/models/components/auth_falcon512_rpo_multisig.rs b/crates/web-client/src/models/components/auth_falcon512_rpo_multisig.rs index 8eb68ca7c0..fa8ac68dc3 100644 --- a/crates/web-client/src/models/components/auth_falcon512_rpo_multisig.rs +++ b/crates/web-client/src/models/components/auth_falcon512_rpo_multisig.rs @@ -1,6 +1,7 @@ use miden_client::Word as NativeWord; use miden_client::account::component::{ AccountComponent as NativeAccountComponent, + AccountComponentMetadata, AuthFalcon512RpoMultisigConfig as NativeAuthFalcon512RpoMultisigConfig, falcon_512_rpo_multisig_library, }; @@ -196,10 +197,13 @@ pub fn create_auth_falcon512_rpo_multisig( .map_err(|e| js_error_with_context(e, "Failed to build proc thresholds map"))?; storage_slots.push(NativeStorageSlot::with_map(proc_map_name, proc_map)); - let native_component = - NativeAccountComponent::new(falcon_512_rpo_multisig_library(), storage_slots) - .map_err(|e| js_error_with_context(e, "Failed to create multisig account component"))? - .with_supports_all_types(); + let native_component = NativeAccountComponent::new( + falcon_512_rpo_multisig_library(), + storage_slots, + AccountComponentMetadata::new("miden::auth::falcon_512_rpo_multisig") + .with_supports_all_types(), + ) + .map_err(|e| js_error_with_context(e, "Failed to create multisig account component"))?; Ok(native_component.into()) } diff --git a/crates/web-client/src/models/note.rs b/crates/web-client/src/models/note.rs index 95af50c425..ddbd2e864d 100644 --- a/crates/web-client/src/models/note.rs +++ b/crates/web-client/src/models/note.rs @@ -1,13 +1,9 @@ use miden_client::asset::Asset as NativeAsset; use miden_client::block::BlockNumber as NativeBlockNumber; use miden_client::crypto::RpoRandomCoin; -use miden_client::note::{ - Note as NativeNote, - NoteAssets as NativeNoteAssets, - create_p2id_note, - create_p2ide_note, -}; +use miden_client::note::{Note as NativeNote, NoteAssets as NativeNoteAssets, P2idNote}; use miden_client::{Felt as NativeFelt, Word as NativeWord}; +use miden_standards::note::P2ideNote; use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; use wasm_bindgen::prelude::*; @@ -111,7 +107,7 @@ impl Note { let native_note_assets: NativeNoteAssets = assets.into(); let native_assets: Vec = native_note_assets.iter().copied().collect(); - let native_note = create_p2id_note( + let native_note = P2idNote::create( sender.into(), target.into(), native_assets, @@ -142,7 +138,7 @@ impl Note { let native_note_assets: NativeNoteAssets = assets.into(); let native_assets: Vec = native_note_assets.iter().copied().collect(); - let native_note = create_p2ide_note( + let native_note = P2ideNote::create( sender.into(), target.into(), native_assets, diff --git a/crates/web-client/src/models/note_metadata.rs b/crates/web-client/src/models/note_metadata.rs index 927edf9f09..8888021885 100644 --- a/crates/web-client/src/models/note_metadata.rs +++ b/crates/web-client/src/models/note_metadata.rs @@ -19,7 +19,7 @@ impl NoteMetadata { #[wasm_bindgen(constructor)] pub fn new(sender: &AccountId, note_type: NoteType, note_tag: &NoteTag) -> NoteMetadata { let native_note_metadata = - NativeNoteMetadata::new(sender.into(), note_type.into(), note_tag.into()); + NativeNoteMetadata::new(sender.into(), note_type.into()).with_tag(note_tag.into()); NoteMetadata(native_note_metadata) } diff --git a/crates/web-client/src/sync.rs b/crates/web-client/src/sync.rs index 939909d2bc..4e9c01cc46 100644 --- a/crates/web-client/src/sync.rs +++ b/crates/web-client/src/sync.rs @@ -1,5 +1,5 @@ use miden_client::asset::{Asset as NativeAsset, FungibleAsset as NativeFungibleAsset}; -use miden_client::note::build_swap_tag as native_build_swap_tag; +use miden_client::note::SwapNote; use wasm_bindgen::prelude::*; use crate::models::account_id::AccountId; @@ -64,7 +64,7 @@ impl WebClient { })? .into(); - let native_note_tag = native_build_swap_tag( + let native_note_tag = SwapNote::build_tag( note_type.into(), &offered_fungible_asset, &requested_fungible_asset, diff --git a/crates/web-client/test/account.test.ts b/crates/web-client/test/account.test.ts index d0a6f9591a..eb5ec826bc 100644 --- a/crates/web-client/test/account.test.ts +++ b/crates/web-client/test/account.test.ts @@ -24,8 +24,8 @@ export const getAccountOneMatch = async ( const result = await client.getAccount(newAccount.id()); return { - commitmentOfCreatedAccount: newAccount.commitment().toHex(), - commitmentOfGetAccountResult: result!.commitment().toHex(), + commitmentOfCreatedAccount: newAccount.to_commitment().toHex(), + commitmentOfGetAccountResult: result!.to_commitment().toHex(), isAccountType: result instanceof window.Account, }; }); @@ -46,7 +46,7 @@ export const getAccountNoMatch = async ( return { commitmentOfGetAccountResult: result - ? result.commitment().toHex() + ? result.to_commitment().toHex() : undefined, }; }); @@ -96,8 +96,8 @@ export const getAccountsManyMatches = async ( 0 ); const commitmentsOfCreatedAccounts = [ - newAccount1.commitment().toHex(), - newAccount2.commitment().toHex(), + newAccount1.to_commitment().toHex(), + newAccount2.to_commitment().toHex(), ]; const result = await client.getAccounts(); @@ -106,7 +106,7 @@ export const getAccountsManyMatches = async ( const resultTypes = []; for (let i = 0; i < result.length; i++) { - commitmentsOfGetAccountsResult.push(result[i].commitment().toHex()); + commitmentsOfGetAccountsResult.push(result[i].to_commitment().toHex()); resultTypes.push(result[i] instanceof window.AccountHeader); } @@ -130,7 +130,7 @@ export const getAccountsNoMatches = async ( const resultTypes = []; for (let i = 0; i < result.length; i++) { - commitmentsOfGetAccountsResult.push(result[i].commitment().toHex()); + commitmentsOfGetAccountsResult.push(result[i].to_commitment().toHex()); resultTypes.push(result[i] instanceof window.AccountHeader); } diff --git a/crates/web-client/test/account_reader.test.ts b/crates/web-client/test/account_reader.test.ts index 01f91a27ae..7cd66e97a5 100644 --- a/crates/web-client/test/account_reader.test.ts +++ b/crates/web-client/test/account_reader.test.ts @@ -26,7 +26,7 @@ test.describe("AccountReader tests", () => { readerId: reader.accountId().toString(), accountNonce: account.nonce().toString(), readerNonce: nonce.toString(), - accountCommitment: account.commitment().toHex(), + accountCommitment: account.to_commitment().toHex(), readerCommitment: commitment.toHex(), accountCodeCommitment: account.code().commitment().toHex(), readerCodeCommitment: codeCommitment.toHex(), diff --git a/crates/web-client/test/import.test.ts b/crates/web-client/test/import.test.ts index 70510cb9b8..4390335348 100644 --- a/crates/web-client/test/import.test.ts +++ b/crates/web-client/test/import.test.ts @@ -27,7 +27,7 @@ const importWalletFromSeed = async ( ); return { accountId: account.id().toString(), - accountCommitment: account.commitment().toHex(), + accountCommitment: account.to_commitment().toHex(), }; }, { @@ -46,7 +46,7 @@ const importAccountById = async (page: Page, accountId: string) => { const account = await client.getAccount(_accountId); return { accountId: account?.id().toString(), - accountCommitment: account?.commitment().toHex(), + accountCommitment: account?.to_commitment().toHex(), }; }, accountId); }; diff --git a/crates/web-client/test/import_export.test.ts b/crates/web-client/test/import_export.test.ts index eeab6b3f76..a1521dcb74 100644 --- a/crates/web-client/test/import_export.test.ts +++ b/crates/web-client/test/import_export.test.ts @@ -38,7 +38,7 @@ const getAccount = async (accountId: string, page: Page) => { const account = await client.getAccount(accountId); return { accountId: account?.id().toString(), - accountCommitment: account?.commitment().toHex(), + accountCommitment: account?.to_commitment().toHex(), }; }, accountId); }; diff --git a/crates/web-client/test/new_account.test.ts b/crates/web-client/test/new_account.test.ts index 1bbf180ec3..0beb1cdbdb 100644 --- a/crates/web-client/test/new_account.test.ts +++ b/crates/web-client/test/new_account.test.ts @@ -233,7 +233,7 @@ test.describe("new_faucet tests", () => { 0 ) ).rejects.toThrow( - `token symbol should have length between 1 and 6 characters, but 13 was provided` + `token symbol should have length between 1 and 12 characters, but 13 was provided` ); }); }); diff --git a/crates/web-client/test/new_transactions.test.ts b/crates/web-client/test/new_transactions.test.ts index 54da2a2d0c..dfb3ee21f1 100644 --- a/crates/web-client/test/new_transactions.test.ts +++ b/crates/web-client/test/new_transactions.test.ts @@ -1006,11 +1006,11 @@ export const discardedTransaction = async ( ); } - // Perform a `.commitment()` check on each account - const commitmentBeforeTx = accountStateBeforeTx.commitment().toHex(); - const commitmentAfterTx = accountStateAfterTx.commitment().toHex(); + // Perform a `.to_commitment()` check on each account + const commitmentBeforeTx = accountStateBeforeTx.to_commitment().toHex(); + const commitmentAfterTx = accountStateAfterTx.to_commitment().toHex(); const commitmentAfterDiscardedTx = accountStateAfterDiscardedTx - .commitment() + .to_commitment() .toHex(); return { diff --git a/crates/web-client/test/token_symbol.test.ts b/crates/web-client/test/token_symbol.test.ts index 726215117e..d8a20cb820 100644 --- a/crates/web-client/test/token_symbol.test.ts +++ b/crates/web-client/test/token_symbol.test.ts @@ -38,17 +38,17 @@ test.describe("new token symbol", () => { const tokenSymbol = ""; await expect(createNewTokenSymbol(page, tokenSymbol)).rejects.toThrow( - "failed to create token symbol: token symbol should have length between 1 and 6 characters, but 0 was provided" + "failed to create token symbol: token symbol should have length between 1 and 12 characters, but 0 was provided" ); }); - test("thrown an error when creating a token symbol with more than 6 characters", async ({ + test("thrown an error when creating a token symbol with more than 12 characters", async ({ page, }) => { - const tokenSymbol = "MIDENTOKEN"; + const tokenSymbol = "MIDENTOKENSSS"; await expect(createNewTokenSymbol(page, tokenSymbol)).rejects.toThrow( - "failed to create token symbol: token symbol should have length between 1 and 6 characters, but 10 was provided" + "failed to create token symbol: token symbol should have length between 1 and 12 characters, but 13 was provided" ); }); }); diff --git a/crates/web-client/test/webClientTestUtils.ts b/crates/web-client/test/webClientTestUtils.ts index 9c71154358..907a51a4e0 100644 --- a/crates/web-client/test/webClientTestUtils.ts +++ b/crates/web-client/test/webClientTestUtils.ts @@ -899,7 +899,7 @@ export const setupWalletAndFaucet = async ( return { accountId: account.id().toString(), - accountCommitment: account.commitment().toHex(), + accountCommitment: account.to_commitment().toHex(), faucetId: faucetAccount.id().toString(), }; }); @@ -912,7 +912,7 @@ export const getAccount = async (testingPage: Page, accountId: string) => { const account = await client.getAccount(accountId); return { id: account?.id().toString(), - commitment: account?.commitment().toHex(), + commitment: account?.to_commitment().toHex(), nonce: account?.nonce().toString(), vaultCommitment: account?.vault().root().toHex(), storageCommitment: account?.storage().commitment().toHex(), diff --git a/crates/web-client/yarn.lock b/crates/web-client/yarn.lock index 54514e86f7..7ed42a49c1 100644 --- a/crates/web-client/yarn.lock +++ b/crates/web-client/yarn.lock @@ -93,7 +93,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -195,7 +195,7 @@ dependencies: "@shikijs/types" "3.13.0" -"@shikijs/types@3.13.0", "@shikijs/types@^3.13.0": +"@shikijs/types@^3.13.0", "@shikijs/types@3.13.0": version "3.13.0" resolved "https://registry.npmjs.org/@shikijs/types/-/types-3.13.0.tgz" integrity sha512-oM9P+NCFri/mmQ8LoFGVfVyemm5Hi27330zuOBp0annwJdKH1kOLndw3zCtAVDehPLg9fKqoEx3Ht/wNZxolfw== @@ -463,6 +463,11 @@ binary-extensions@^2.0.0: resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== +binaryen@^121.0.0: + version "121.0.0" + resolved "https://registry.npmjs.org/binaryen/-/binaryen-121.0.0.tgz" + integrity sha512-St5LX+CmVdDQMf+DDHWdne7eDK+8tH9TE4Kc+Xk3s5+CzVYIKeJbWuXgsKVbkdLJXGUc2eflFqjThQy555mBag== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" @@ -628,16 +633,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + colorette@^1.1.0: version "1.4.0" resolved "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz" @@ -709,13 +714,6 @@ data-uri-to-buffer@^6.0.2: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz" integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== -debug@4, debug@^4.1.1, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6: - version "4.4.3" - resolved "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz" - integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== - dependencies: - ms "^2.1.3" - debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -723,6 +721,13 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.1.1, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@4: + version "4.4.3" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + decamelize@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" @@ -756,7 +761,7 @@ degenerator@^5.0.0: escodegen "^2.1.0" esprima "^4.0.1" -devtools-protocol@0.0.1330662: +devtools-protocol@*, devtools-protocol@0.0.1330662: version "0.0.1330662" resolved "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1330662.tgz" integrity sha512-pzh6YQ8zZfz3iKlCvgzVCu22NdpZ8hNmwU6WnQjNVquh0A9iVosPtNLWDwaWVGyrntQlltPFztTMK5Cg6lfCuw== @@ -1002,16 +1007,16 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - fsevents@~2.3.2: version "2.3.3" resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== +fsevents@2.3.2: + version "2.3.2" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -1098,7 +1103,18 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3, glob@^8.1.0: +glob@^8.0.3: + version "8.1.0" + resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +glob@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -1534,7 +1550,14 @@ minimatch@^5.0.1, minimatch@^5.1.6: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.4, minimatch@^9.0.5: +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.5: version "9.0.5" resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -1949,7 +1972,7 @@ rollup-plugin-copy@^3.5.0: globby "10.0.1" is-plain-object "^3.0.0" -rollup@^3.27.2: +rollup@^1.20.0||^2.0.0||^3.0.0||^4.0.0, rollup@^2.14.0||^3.0.0||^4.0.0, rollup@^2.68.0||^3.0.0||^4.0.0, rollup@^2.78.0||^3.0.0||^4.0.0, rollup@^3.27.2: version "3.29.4" resolved "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz" integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== @@ -1963,7 +1986,7 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@5.1.2, safe-buffer@^5.1.0: +safe-buffer@^5.1.0, safe-buffer@5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -2226,7 +2249,7 @@ ts-node@^10.9.2: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tslib@^2.0.1: +tslib@*, tslib@^2.0.1: version "2.8.1" resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -2241,7 +2264,7 @@ typedoc-plugin-markdown@^4.8.1: resolved "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz" integrity sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw== -typedoc@^0.28.1: +typedoc@^0.28.1, typedoc@0.28.x: version "0.28.13" resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.28.13.tgz" integrity sha512-dNWY8msnYB2a+7Audha+aTF1Pu3euiE7ySp53w8kEsXoYw7dMouV5A1UsTUY345aB152RHnmRMDiovuBi7BD+w== @@ -2252,7 +2275,7 @@ typedoc@^0.28.1: minimatch "^9.0.5" yaml "^2.8.1" -typescript@^5.5.4: +typescript@^5.5.4, typescript@>=2.7, typescript@>=3.7.0, typescript@>=4.9.5, "typescript@5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x": version "5.5.4" resolved "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz" integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== diff --git a/docs/typedoc/web-client/classes/Account.md b/docs/typedoc/web-client/classes/Account.md index 45b18610de..ca20d7268c 100644 --- a/docs/typedoc/web-client/classes/Account.md +++ b/docs/typedoc/web-client/classes/Account.md @@ -49,18 +49,6 @@ Returns the code commitment for this account. *** -### commitment() - -> **commitment**(): [`Word`](Word.md) - -Returns the commitment to the account header, storage, and code. - -#### Returns - -[`Word`](Word.md) - -*** - ### free() > **free**(): `void` @@ -215,6 +203,18 @@ Returns the account storage commitment. *** +### to\_commitment() + +> **to\_commitment**(): [`Word`](Word.md) + +Returns the commitment to the account header, storage, and code. + +#### Returns + +[`Word`](Word.md) + +*** + ### vault() > **vault**(): [`AssetVault`](AssetVault.md) diff --git a/docs/typedoc/web-client/classes/AccountHeader.md b/docs/typedoc/web-client/classes/AccountHeader.md index b3643a454d..a00664b81a 100644 --- a/docs/typedoc/web-client/classes/AccountHeader.md +++ b/docs/typedoc/web-client/classes/AccountHeader.md @@ -40,18 +40,6 @@ Returns the code commitment. *** -### commitment() - -> **commitment**(): [`Word`](Word.md) - -Returns the full account commitment. - -#### Returns - -[`Word`](Word.md) - -*** - ### free() > **free**(): `void` @@ -98,6 +86,18 @@ Returns the storage commitment. *** +### to\_commitment() + +> **to\_commitment**(): [`Word`](Word.md) + +Returns the full account commitment. + +#### Returns + +[`Word`](Word.md) + +*** + ### vaultCommitment() > **vaultCommitment**(): [`Word`](Word.md) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 6744e56e15..d9a424cef9 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.90" +channel = "1.91" components = ["clippy", "rust-src", "rustfmt"] profile = "minimal" targets = ["wasm32-unknown-unknown"] From 957fda7827781590087888e015ca05964e4a3a86 Mon Sep 17 00:00:00 2001 From: Juan Munoz Date: Fri, 27 Feb 2026 10:26:28 -0300 Subject: [PATCH 2/7] chore: update rust-version --- CHANGELOG.md | 1 + Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3b493ae94..d84aba43db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ### Changes +* [BREAKING] Incremented MSRV to 1.91. * [BREAKING] Added a `AccountReader` accessible through `Client::account_reader` to read account data without needing to load the whole `Account` ([#1713](https://github.com/0xMiden/miden-client/pull/1713), [#1716](https://github.com/0xMiden/miden-client/pull/1716)). * [BREAKING] Added `Keystore` trait that extends `TransactionAuthenticator` to provide a unified interface for key storage, retrieval, and account-key mapping, enabling custom keystore implementations. `Keystore` replaces `TransactionAuthenticator` in `Client` and provides a way to map from account IDs to public keys (registering them separately is not required anymore). ([#1726](https://github.com/0xMiden/miden-client/pull/1726)). * Refactored integration tests binary with subprocess-per-test execution; added automatic retry of failed tests (`--retry-count`), captured stdout/stderr per test, and tracing support via `RUST_LOG` ([#1743](https://github.com/0xMiden/miden-client/pull/1743)). diff --git a/Cargo.toml b/Cargo.toml index a5e6a6dfe7..7cd176f930 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ authors = ["miden contributors"] edition = "2024" license = "MIT" repository = "https://github.com/0xMiden/miden-client" -rust-version = "1.90" +rust-version = "1.91" version = "0.14.0" [profile.test-dev] From 0b37841197f603d21efa100a572ece05cf703b13 Mon Sep 17 00:00:00 2001 From: Juan Munoz Date: Mon, 2 Mar 2026 15:36:35 -0300 Subject: [PATCH 3/7] chore: bump base version to `3154a3` --- Cargo.lock | 116 +++++++++++++----- bin/integration-tests/src/tests/client.rs | 35 ++---- bin/integration-tests/src/tests/fpi.rs | 22 ++-- .../src/tests/pass_through.rs | 22 ++-- bin/miden-bench/src/deploy.rs | 7 +- .../src/generators/large_account.rs | 7 +- bin/miden-cli/build.rs | 31 ++--- bin/miden-cli/src/commands/new_account.rs | 8 +- bin/miden-cli/templates/acl-auth.toml | 17 ++- bin/miden-cli/templates/basic-auth.toml | 13 +- bin/miden-cli/templates/ecdsa-auth.toml | 9 +- bin/miden-cli/templates/multisig-auth.toml | 17 ++- bin/miden-cli/tests/cli.rs | 30 +++-- crates/rust-client/src/account/mod.rs | 17 +-- crates/rust-client/src/lib.rs | 12 +- crates/rust-client/src/note/mod.rs | 1 + .../src/rpc/generated/nostd/note.rs | 8 +- .../src/rpc/generated/nostd/rpc.rs | 2 +- .../src/rpc/generated/nostd/rpc_store.rs | 2 +- .../rust-client/src/rpc/generated/std/note.rs | 8 +- .../rust-client/src/rpc/generated/std/rpc.rs | 2 +- .../src/rpc/generated/std/rpc_store.rs | 2 +- .../rust-client/src/rpc/tonic_client/mod.rs | 2 +- crates/rust-client/src/test_utils/common.rs | 31 +++-- .../src/transaction/request/builder.rs | 10 +- .../src/transaction/request/mod.rs | 10 +- crates/sqlite-store/src/account/tests.rs | 55 +++++++-- .../testing/miden-client-tests/src/tests.rs | 63 +++++++--- .../miden-client-tests/src/tests/store.rs | 23 ++-- .../src/tests/transaction.rs | 7 +- crates/testing/node-builder/src/lib.rs | 20 +-- crates/web-client/src/helpers.rs | 21 ++-- .../src/models/account_component.rs | 8 +- crates/web-client/src/models/auth_scheme.rs | 2 +- .../components/auth_falcon512_rpo_multisig.rs | 107 +++------------- crates/web-client/src/models/note.rs | 12 +- crates/web-client/src/new_account.rs | 21 ++-- crates/web-client/test/account.test.ts | 10 +- crates/web-client/test/account_reader.test.ts | 2 +- crates/web-client/test/address.test.ts | 10 +- .../basic_fungible_faucet_component.test.ts | 4 +- crates/web-client/test/fpi.test.ts | 2 +- crates/web-client/test/import.test.ts | 4 +- crates/web-client/test/import_export.test.ts | 6 +- crates/web-client/test/miden_array.test.ts | 16 ++- crates/web-client/test/mockchain.test.ts | 4 +- crates/web-client/test/new_account.test.ts | 24 ++-- .../web-client/test/new_transactions.test.ts | 22 ++-- crates/web-client/test/note_transport.test.ts | 4 +- .../web-client/test/remote_keystore.test.ts | 9 +- .../web-client/test/store_isolation.test.ts | 46 +++++-- crates/web-client/test/sync_lock.test.ts | 4 +- crates/web-client/test/tags.test.ts | 5 +- crates/web-client/test/transactions.test.ts | 2 +- crates/web-client/test/webClientTestUtils.ts | 11 +- crates/web-client/yarn.lock | 77 ++++-------- 56 files changed, 568 insertions(+), 474 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e4f08abb04..1aeed02830 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -760,6 +760,15 @@ dependencies = [ "serde", ] +[[package]] +name = "build-rs" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc87f52297187fb5d25bde3d368f0480f88ac1d8f3cf4c80ac5575435511114" +dependencies = [ + "unicode-ident", +] + [[package]] name = "bumpalo" version = "3.19.1" @@ -1051,6 +1060,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + [[package]] name = "crypto-bigint" version = "0.5.5" @@ -1309,7 +1324,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1473,7 +1488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1530,6 +1545,15 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "static_assertions", +] + [[package]] name = "fixedbitset" version = "0.5.7" @@ -2070,7 +2094,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.5.10", + "socket2 0.6.2", "tokio", "tower-service", "tracing", @@ -2598,7 +2622,7 @@ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "miden-agglayer" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" +source = "git+https://github.com/0xMiden/miden-base?branch=next#3154a371939125e5cc3faf39a7c42447db67584f" dependencies = [ "fs-err", "miden-assembly", @@ -2608,7 +2632,9 @@ dependencies = [ "miden-protocol", "miden-standards", "miden-utils-sync", + "primitive-types", "regex", + "thiserror", "walkdir", ] @@ -2667,7 +2693,7 @@ dependencies = [ [[package]] name = "miden-block-prover" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" +source = "git+https://github.com/0xMiden/miden-base?branch=next#3154a371939125e5cc3faf39a7c42447db67584f" dependencies = [ "miden-protocol", "thiserror", @@ -3007,7 +3033,7 @@ dependencies = [ [[package]] name = "miden-node-block-producer" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ "anyhow", "futures", @@ -3033,7 +3059,7 @@ dependencies = [ [[package]] name = "miden-node-db" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ "deadpool", "deadpool-diesel", @@ -3047,7 +3073,7 @@ dependencies = [ [[package]] name = "miden-node-grpc-error-macro" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ "quote", "syn 2.0.116", @@ -3056,9 +3082,10 @@ dependencies = [ [[package]] name = "miden-node-ntx-builder" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ "anyhow", + "build-rs", "diesel", "diesel_migrations", "futures", @@ -3082,9 +3109,10 @@ dependencies = [ [[package]] name = "miden-node-proto" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ "anyhow", + "build-rs", "fs-err", "hex", "http 1.4.0", @@ -3106,8 +3134,9 @@ dependencies = [ [[package]] name = "miden-node-proto-build" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ + "build-rs", "fs-err", "miette", "protox", @@ -3117,12 +3146,12 @@ dependencies = [ [[package]] name = "miden-node-rocksdb-cxx-linkage-fix" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" [[package]] name = "miden-node-rpc" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ "anyhow", "futures", @@ -3149,9 +3178,10 @@ dependencies = [ [[package]] name = "miden-node-store" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ "anyhow", + "build-rs", "deadpool", "deadpool-diesel", "diesel", @@ -3190,7 +3220,7 @@ dependencies = [ [[package]] name = "miden-node-utils" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ "anyhow", "bytes", @@ -3218,11 +3248,12 @@ dependencies = [ [[package]] name = "miden-node-validator" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ "anyhow", "aws-config", "aws-sdk-kms", + "build-rs", "diesel", "diesel_migrations", "k256", @@ -3276,7 +3307,7 @@ dependencies = [ [[package]] name = "miden-protocol" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" +source = "git+https://github.com/0xMiden/miden-base?branch=next#3154a371939125e5cc3faf39a7c42447db67584f" dependencies = [ "bech32", "fs-err", @@ -3306,7 +3337,7 @@ dependencies = [ [[package]] name = "miden-protocol-macros" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" +source = "git+https://github.com/0xMiden/miden-base?branch=next#3154a371939125e5cc3faf39a7c42447db67584f" dependencies = [ "proc-macro2", "quote", @@ -3330,8 +3361,9 @@ dependencies = [ [[package]] name = "miden-remote-prover-client" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-node?branch=next#3b9298cbebfe67d8baa3de0c29c190929dfa6de8" +source = "git+https://github.com/0xMiden/miden-node?branch=next#35327afe18f220f63e2550586de221abb0d67e76" dependencies = [ + "build-rs", "fs-err", "getrandom 0.4.1", "miden-node-proto-build", @@ -3350,7 +3382,7 @@ dependencies = [ [[package]] name = "miden-standards" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" +source = "git+https://github.com/0xMiden/miden-base?branch=next#3154a371939125e5cc3faf39a7c42447db67584f" dependencies = [ "fs-err", "miden-assembly", @@ -3367,7 +3399,7 @@ dependencies = [ [[package]] name = "miden-testing" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" +source = "git+https://github.com/0xMiden/miden-base?branch=next#3154a371939125e5cc3faf39a7c42447db67584f" dependencies = [ "anyhow", "itertools 0.14.0", @@ -3390,7 +3422,7 @@ dependencies = [ [[package]] name = "miden-tx" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" +source = "git+https://github.com/0xMiden/miden-base?branch=next#3154a371939125e5cc3faf39a7c42447db67584f" dependencies = [ "miden-processor", "miden-protocol", @@ -3403,7 +3435,7 @@ dependencies = [ [[package]] name = "miden-tx-batch-prover" version = "0.14.0" -source = "git+https://github.com/0xMiden/miden-base?branch=next#0904e2c610ab49bf6ee13cf349c05c8621f23cd2" +source = "git+https://github.com/0xMiden/miden-base?branch=next#3154a371939125e5cc3faf39a7c42447db67584f" dependencies = [ "miden-protocol", "miden-tx", @@ -3623,7 +3655,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4080,6 +4112,16 @@ dependencies = [ "syn 2.0.116", ] +[[package]] +name = "primitive-types" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721a1da530b5a2633218dc9f75713394c983c352be88d2d7c9ee85e2c4c21794" +dependencies = [ + "fixed-hash", + "uint", +] + [[package]] name = "proc-macro2" version = "1.0.106" @@ -4516,7 +4558,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4955,6 +4997,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "string_cache" version = "0.8.9" @@ -5064,7 +5112,7 @@ dependencies = [ "getrandom 0.4.1", "once_cell", "rustix 1.1.3", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -5073,7 +5121,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8c27177b12a6399ffc08b98f76f7c9a1f4fe9fc967c784c5a071fa8d93cf7e1" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -5707,6 +5755,18 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +[[package]] +name = "uint" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + [[package]] name = "unarray" version = "0.1.4" @@ -6058,7 +6118,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/bin/integration-tests/src/tests/client.rs b/bin/integration-tests/src/tests/client.rs index fca805c54d..5510994932 100644 --- a/bin/integration-tests/src/tests/client.rs +++ b/bin/integration-tests/src/tests/client.rs @@ -711,38 +711,21 @@ pub async fn test_consume_multiple_expected_notes(client_config: ClientConfig) - let faucet_account_id = faucet_account_header.id(); let to_account_ids = [target_basic_account_1.id(), target_basic_account_2.id()]; - let fungible_asset = FungibleAsset::new(faucet_account_id, TRANSFER_AMOUNT).unwrap(); - - // TODO: mint tokens in a single transaction once multiple note minting is fixed on protocol - // https://github.com/0xMiden/protocol/issues/2519 // Mint tokens to the accounts - // let mint_tx_request = mint_multiple_fungible_asset( - // fungible_asset, - // &[to_account_ids[0], to_account_ids[0], to_account_ids[1], to_account_ids[1]], - // NoteType::Private, - // client.rng(), - // ); - // execute_tx_and_sync(&mut client, faucet_account_id, mint_tx_request.clone()).await?; - - // Mint tokens individually to work around a protocol bug where minting - // multiple notes in a single transaction fails (0xMiden/protocol#2519). - let targets = [to_account_ids[0], to_account_ids[0], to_account_ids[1], to_account_ids[1]]; - let mut all_expected_notes = Vec::new(); - - for &target_id in &targets { - let tx_request = TransactionRequestBuilder::new() - .build_mint_fungible_asset(fungible_asset, target_id, NoteType::Private, client.rng()) - .unwrap(); + let fungible_asset = FungibleAsset::new(faucet_account_id, TRANSFER_AMOUNT).unwrap(); + let mint_tx_request = mint_multiple_fungible_asset( + fungible_asset, + &[to_account_ids[0], to_account_ids[0], to_account_ids[1], to_account_ids[1]], + NoteType::Private, + client.rng(), + ); - all_expected_notes.extend(tx_request.expected_output_own_notes()); - execute_tx_and_sync(&mut client, faucet_account_id, tx_request).await?; - } + execute_tx_and_sync(&mut client, faucet_account_id, mint_tx_request.clone()).await?; unauth_client.sync_state().await.unwrap(); // Filter notes by ownership - // let expected_notes = mint_tx_request.expected_output_own_notes().into_iter(); - let expected_notes = all_expected_notes.into_iter(); + let expected_notes = mint_tx_request.expected_output_own_notes().into_iter(); let client_notes: Vec<_> = client.get_input_notes(NoteFilter::All).await.unwrap(); let client_notes_ids: Vec<_> = client_notes.iter().map(|note| note.id()).collect(); diff --git a/bin/integration-tests/src/tests/fpi.rs b/bin/integration-tests/src/tests/fpi.rs index 48989d6a01..96dc1d4e7b 100644 --- a/bin/integration-tests/src/tests/fpi.rs +++ b/bin/integration-tests/src/tests/fpi.rs @@ -11,13 +11,7 @@ use miden_client::account::{ StorageSlotName, }; use miden_client::assembly::CodeBuilder; -use miden_client::auth::{ - AuthEcdsaK256Keccak, - AuthFalcon512Rpo, - AuthSchemeId, - AuthSecretKey, - RPO_FALCON_SCHEME_ID, -}; +use miden_client::auth::{AuthSchemeId, AuthSecretKey, AuthSingleSig, RPO_FALCON_SCHEME_ID}; use miden_client::keystore::{FilesystemKeyStore, Keystore}; use miden_client::rpc::domain::account::{AccountStorageRequirements, StorageMapKey}; use miden_client::testing::common::*; @@ -487,14 +481,20 @@ fn foreign_account_with_code( let (key_pair, auth_component) = match auth_scheme { AuthSchemeId::Falcon512Rpo => { let key_pair = AuthSecretKey::new_falcon512_rpo(); - let auth_component: AccountComponent = - AuthFalcon512Rpo::new(key_pair.public_key().to_commitment()).into(); + let auth_component: AccountComponent = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + AuthSchemeId::Falcon512Rpo, + ) + .into(); (key_pair, auth_component) }, AuthSchemeId::EcdsaK256Keccak => { let key_pair = AuthSecretKey::new_ecdsa_k256_keccak(); - let auth_component: AccountComponent = - AuthEcdsaK256Keccak::new(key_pair.public_key().to_commitment()).into(); + let auth_component: AccountComponent = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + AuthSchemeId::EcdsaK256Keccak, + ) + .into(); (key_pair, auth_component) }, scheme => { diff --git a/bin/integration-tests/src/tests/pass_through.rs b/bin/integration-tests/src/tests/pass_through.rs index 311a87066a..e036c122c4 100644 --- a/bin/integration-tests/src/tests/pass_through.rs +++ b/bin/integration-tests/src/tests/pass_through.rs @@ -1,13 +1,14 @@ use anyhow::Result; -use miden_client::account::component::{ - AuthFalcon512RpoAcl, - AuthFalcon512RpoAclConfig, - BasicWallet, -}; +use miden_client::account::component::BasicWallet; use miden_client::account::{Account, AccountBuilder, AccountId, AccountStorageMode, AccountType}; use miden_client::assembly::CodeBuilder; use miden_client::asset::{Asset, FungibleAsset}; -use miden_client::auth::{AuthSchemeId, TransactionAuthenticator}; +use miden_client::auth::{ + AuthSchemeId, + AuthSingleSigAcl, + AuthSingleSigAclConfig, + TransactionAuthenticator, +}; use miden_client::crypto::FeltRng; use miden_client::crypto::rpo_falcon512::SecretKey; use miden_client::note::{ @@ -21,7 +22,7 @@ use miden_client::note::{ NoteStorage, NoteTag, NoteType, - P2idNote, + P2idNoteStorage, }; use miden_client::store::{InputNoteState, TransactionFilter}; use miden_client::testing::common::*; @@ -198,11 +199,12 @@ async fn create_pass_through_account( let key_pair = SecretKey::with_rng(client.rng()); let pub_key = key_pair.public_key().to_commitment(); - let acl_config = AuthFalcon512RpoAclConfig::new() + let acl_config = AuthSingleSigAclConfig::new() .with_allow_unauthorized_input_notes(true) .with_allow_unauthorized_output_notes(true); - let auth_component = AuthFalcon512RpoAcl::new(pub_key.into(), acl_config).unwrap(); + let auth_component = + AuthSingleSigAcl::new(pub_key.into(), AuthSchemeId::Falcon512Rpo, acl_config).unwrap(); let account = AccountBuilder::new(init_seed) .account_type(AccountType::RegularAccountImmutableCode) @@ -235,7 +237,7 @@ fn create_pass_through_note( let asset_word: Word = asset.into(); - let target_recipient = P2idNote::build_recipient(target, rng.draw_word())?; + let target_recipient = P2idNoteStorage::new(target).into_recipient(rng.draw_word()); let inputs = NoteStorage::new(vec![ asset_word[0], diff --git a/bin/miden-bench/src/deploy.rs b/bin/miden-bench/src/deploy.rs index 82929d46a8..596180aaf0 100644 --- a/bin/miden-bench/src/deploy.rs +++ b/bin/miden-bench/src/deploy.rs @@ -19,7 +19,7 @@ use miden_client::account::{ StorageSlotName, }; use miden_client::assembly::CodeBuilder; -use miden_client::auth::{AuthFalcon512Rpo, AuthSecretKey}; +use miden_client::auth::{AuthSchemeId, AuthSecretKey, AuthSingleSig}; use miden_client::keystore::{FilesystemKeyStore, Keystore}; use miden_client::transaction::TransactionRequestBuilder; use miden_client::{Client, Serializable}; @@ -107,7 +107,10 @@ fn create_account_with_empty_maps( .expect("basic wallet component should satisfy account component requirements"); let account = AccountBuilder::new(seed) - .with_auth_component(AuthFalcon512Rpo::new(sk.public_key().to_commitment())) + .with_auth_component(AuthSingleSig::new( + sk.public_key().to_commitment(), + AuthSchemeId::Falcon512Rpo, + )) .account_type(AccountType::RegularAccountUpdatableCode) .with_component(wallet_component) .with_component(expansion_component) diff --git a/bin/miden-bench/src/generators/large_account.rs b/bin/miden-bench/src/generators/large_account.rs index 8c5e8f388f..7ecb31a079 100644 --- a/bin/miden-bench/src/generators/large_account.rs +++ b/bin/miden-bench/src/generators/large_account.rs @@ -34,7 +34,7 @@ use miden_client::account::{ #[cfg(test)] use miden_client::assembly::CodeBuilder; #[cfg(test)] -use miden_client::auth::{AuthFalcon512Rpo, AuthSecretKey}; +use miden_client::auth::{AuthSchemeId, AuthSecretKey, AuthSingleSig}; /// Configuration for generating large accounts (used in tests) #[cfg(test)] @@ -151,7 +151,10 @@ fn create_large_account(config: &LargeAccountConfig) -> anyhow::Result<(Account, .expect("basic wallet component should satisfy account component requirements"); let account = AccountBuilder::new(config.seed) - .with_auth_component(AuthFalcon512Rpo::new(sk.public_key().to_commitment())) + .with_auth_component(AuthSingleSig::new( + sk.public_key().to_commitment(), + AuthSchemeId::Falcon512Rpo, + )) .account_type(AccountType::RegularAccountUpdatableCode) .with_component(wallet_component) .with_component(reader_component) diff --git a/bin/miden-cli/build.rs b/bin/miden-cli/build.rs index e98b54f05b..de556c2eb3 100644 --- a/bin/miden-cli/build.rs +++ b/bin/miden-cli/build.rs @@ -7,11 +7,10 @@ use miden_client::account::component::{ MIDEN_PACKAGE_EXTENSION, basic_fungible_faucet_library, basic_wallet_library, - ecdsa_k256_keccak_library, - falcon_512_rpo_acl_library, - falcon_512_rpo_library, - falcon_512_rpo_multisig_library, + multisig_library, no_auth_library, + singlesig_acl_library, + singlesig_library, }; use miden_client::assembly::Library; use miden_client::utils::Serializable; @@ -38,31 +37,15 @@ fn main() { None, ); - build_package( - &PathBuf::from("templates/basic-auth.toml"), - falcon_512_rpo_library(), - Some("auth"), - ); + build_package(&PathBuf::from("templates/basic-auth.toml"), singlesig_library(), Some("auth")); - build_package( - &PathBuf::from("templates/ecdsa-auth.toml"), - ecdsa_k256_keccak_library(), - Some("auth"), - ); + build_package(&PathBuf::from("templates/ecdsa-auth.toml"), singlesig_library(), Some("auth")); build_package(&PathBuf::from("templates/no-auth.toml"), no_auth_library(), Some("auth")); - build_package( - &PathBuf::from("templates/multisig-auth.toml"), - falcon_512_rpo_multisig_library(), - Some("auth"), - ); + build_package(&PathBuf::from("templates/multisig-auth.toml"), multisig_library(), Some("auth")); - build_package( - &PathBuf::from("templates/acl-auth.toml"), - falcon_512_rpo_acl_library(), - Some("auth"), - ); + build_package(&PathBuf::from("templates/acl-auth.toml"), singlesig_acl_library(), Some("auth")); } /// Builds a package and stores it under `{OUT_DIR}/{PACKAGE_DIR}` or diff --git a/bin/miden-cli/src/commands/new_account.rs b/bin/miden-cli/src/commands/new_account.rs index acd0d45c95..c4e24e3dce 100644 --- a/bin/miden-cli/src/commands/new_account.rs +++ b/bin/miden-cli/src/commands/new_account.rs @@ -14,7 +14,7 @@ use miden_client::account::component::{ StorageSlotSchema, }; use miden_client::account::{Account, AccountBuilder, AccountStorageMode, AccountType}; -use miden_client::auth::{AuthFalcon512Rpo, AuthSecretKey}; +use miden_client::auth::{AuthSchemeId, AuthSecretKey, AuthSingleSig}; use miden_client::keystore::Keystore; use miden_client::transaction::TransactionRequestBuilder; use miden_client::utils::Deserializable; @@ -391,8 +391,10 @@ async fn create_client_account( } else { debug!("Adding default Falcon auth component"); let kp = AuthSecretKey::new_falcon512_rpo_with_rng(client.rng()); - builder = - builder.with_auth_component(AuthFalcon512Rpo::new(kp.public_key().to_commitment())); + builder = builder.with_auth_component(AuthSingleSig::new( + kp.public_key().to_commitment(), + AuthSchemeId::Falcon512Rpo, + )); Some(kp) }; diff --git a/bin/miden-cli/templates/acl-auth.toml b/bin/miden-cli/templates/acl-auth.toml index 3340a7dc93..2a17a751ba 100644 --- a/bin/miden-cli/templates/acl-auth.toml +++ b/bin/miden-cli/templates/acl-auth.toml @@ -1,16 +1,21 @@ name = "acl_auth" -description = "Access Control List (ACL) authentication component using RPO Falcon512. Provides fine-grained authentication control based on procedure calls and note operations. Storage layout: Slot 0 - public key, Slot 1 - ACL config, Slot 2 - trigger procedures map" +description = "Access Control List (ACL) authentication component. Provides fine-grained authentication control based on procedure calls and note operations. Storage layout: Slot 0 - public key, Slot 1 - scheme ID, Slot 2 - ACL config, Slot 3 - trigger procedures map" version = "0.1.0" supported-types = ["RegularAccountUpdatableCode", "RegularAccountImmutableCode", "FungibleFaucet", "NonFungibleFaucet"] [storage] [[storage.slots]] -name = "miden::standards::auth::rpo_falcon512_acl::public_key" -description = "Falcon public key" -type = "miden::standards::auth::falcon512_rpo::pub_key" +name = "miden::standards::auth::singlesig_acl::pub_key" +description = "Public key commitment" +type = "miden::standards::auth::pub_key" [[storage.slots]] -name = "miden::standards::auth::rpo_falcon512_acl::config" +name = "miden::standards::auth::singlesig_acl::scheme" +description = "Authentication scheme ID" +type = "miden::standards::auth::scheme" + +[[storage.slots]] +name = "miden::standards::auth::singlesig_acl::config" description = "ACL configuration: [num_tracked_procs, allow_unauthorized_output_notes, allow_unauthorized_input_notes, 0]" type = [ { name = "num_tracked_procs", type = "u32", description = "Number of procedures tracked for authentication" }, @@ -20,6 +25,6 @@ type = [ ] [[storage.slots]] -name = "miden::standards::auth::rpo_falcon512_acl::trigger_procedure_roots" +name = "miden::standards::auth::singlesig_acl::trigger_procedure_roots" description = "Map with trigger procedure roots that require authentication" type = { key = "word", value = "word" } diff --git a/bin/miden-cli/templates/basic-auth.toml b/bin/miden-cli/templates/basic-auth.toml index f193e1c30d..7b52d1d13f 100644 --- a/bin/miden-cli/templates/basic-auth.toml +++ b/bin/miden-cli/templates/basic-auth.toml @@ -1,10 +1,15 @@ name = "basic_auth" -description = "Basic authentication component, for verifying RPO Falcon signatures." +description = "Basic authentication component, for verifying RPO Falcon or ECDSA K256 Keccak signatures." version = "0.1.0" supported-types = ["RegularAccountUpdatableCode", "RegularAccountImmutableCode", "FungibleFaucet", "NonFungibleFaucet"] [storage] [[storage.slots]] -name = "miden::standards::auth::rpo_falcon512::public_key" -description = "Falcon public key" -type = "miden::standards::auth::falcon512_rpo::pub_key" +name = "miden::standards::auth::singlesig::pub_key" +description = "Public key commitment" +type = "miden::standards::auth::pub_key" + +[[storage.slots]] +name = "miden::standards::auth::singlesig::scheme" +description = "Authentication scheme ID" +type = "miden::standards::auth::scheme" diff --git a/bin/miden-cli/templates/ecdsa-auth.toml b/bin/miden-cli/templates/ecdsa-auth.toml index d087168d55..34cbf209fb 100644 --- a/bin/miden-cli/templates/ecdsa-auth.toml +++ b/bin/miden-cli/templates/ecdsa-auth.toml @@ -5,6 +5,11 @@ supported-types = ["RegularAccountUpdatableCode", "RegularAccountImmutableCode", [storage] [[storage.slots]] -name = "miden::standards::auth::ecdsa_k256_keccak::public_key" +name = "miden::standards::auth::singlesig::pub_key" description = "ECDSA K256 Keccak public key" -type = "miden::standards::auth::ecdsa_k256_keccak::pub_key" +type = "miden::standards::auth::pub_key" + +[[storage.slots]] +name = "miden::standards::auth::singlesig::scheme" +description = "Authentication scheme ID" +type = "miden::standards::auth::scheme" diff --git a/bin/miden-cli/templates/multisig-auth.toml b/bin/miden-cli/templates/multisig-auth.toml index 3ffeaa8782..ce88aa5bd6 100644 --- a/bin/miden-cli/templates/multisig-auth.toml +++ b/bin/miden-cli/templates/multisig-auth.toml @@ -1,11 +1,11 @@ name = "multisig_auth" -description = "Multisig authentication component based on RPO Falcon512 signatures. Enforces a threshold of approver signatures for every transaction." +description = "Multisig authentication component using hybrid signature schemes. Enforces a threshold of approver signatures for every transaction." version = "0.1.0" supported-types = ["RegularAccountUpdatableCode", "RegularAccountImmutableCode", "FungibleFaucet", "NonFungibleFaucet"] [storage] [[storage.slots]] -name = "miden::standards::auth::falcon512_rpo_multisig::threshold_config" +name = "miden::standards::auth::multisig::threshold_config" description = "Contains default threshold and number of approvers: [threshold, num_approvers, 0, 0]" type = [ { name = "threshold", type = "u32", description = "Default threshold of signatures required" }, @@ -15,16 +15,21 @@ type = [ ] [[storage.slots]] -name = "miden::standards::auth::falcon512_rpo_multisig::approver_public_keys" +name = "miden::standards::auth::multisig::approver_public_keys" description = "Map with approver public keys (index -> pubkey)" -type = { key = "word", value = "miden::standards::auth::falcon512_rpo::pub_key" } +type = { key = "word", value = "miden::standards::auth::pub_key" } [[storage.slots]] -name = "miden::standards::auth::falcon512_rpo_multisig::executed_transactions" +name = "miden::standards::auth::multisig::approver_schemes" +description = "Map with approver authentication scheme IDs (index -> scheme_id)" +type = { key = "word", value = "word" } + +[[storage.slots]] +name = "miden::standards::auth::multisig::executed_transactions" description = "Map which stores executed transactions" type = { key = "word", value = "word" } [[storage.slots]] -name = "miden::standards::auth::falcon512_rpo_multisig::procedure_thresholds" +name = "miden::standards::auth::multisig::procedure_thresholds" description = "Map which stores procedure thresholds (PROC_ROOT -> threshold)" type = { key = "word", value = "u32" } diff --git a/bin/miden-cli/tests/cli.rs b/bin/miden-cli/tests/cli.rs index febbf880ef..83b332f030 100644 --- a/bin/miden-cli/tests/cli.rs +++ b/bin/miden-cli/tests/cli.rs @@ -1272,16 +1272,22 @@ fn create_account_with_multisig_auth() { // threshold_config is a value slot with [threshold, num_approvers, 0, 0] // approver_public_keys and procedure_thresholds are map slots let init_storage_data_toml = r#" - "miden::standards::auth::falcon512_rpo_multisig::threshold_config.threshold" = "2" - "miden::standards::auth::falcon512_rpo_multisig::threshold_config.num_approvers" = "3" + "miden::standards::auth::multisig::threshold_config.threshold" = "2" + "miden::standards::auth::multisig::threshold_config.num_approvers" = "3" - "miden::standards::auth::falcon512_rpo_multisig::approver_public_keys" = [ + "miden::standards::auth::multisig::approver_public_keys" = [ { key = ["0", "0", "0", "0"], value = "0x0000000000000000000000000000000000000000000000000000000000000001" }, { key = ["0", "0", "0", "1"], value = "0x0000000000000000000000000000000000000000000000000000000000000002" }, { key = ["0", "0", "0", "2"], value = "0x0000000000000000000000000000000000000000000000000000000000000003" } ] - "miden::standards::auth::falcon512_rpo_multisig::procedure_thresholds" = [ + "miden::standards::auth::multisig::approver_schemes" = [ + { key = ["0", "0", "0", "0"], value = ["2", "0", "0", "0"] }, + { key = ["0", "0", "0", "1"], value = ["2", "0", "0", "0"] }, + { key = ["0", "0", "0", "2"], value = ["2", "0", "0", "0"] } + ] + + "miden::standards::auth::multisig::procedure_thresholds" = [ { key = "0xd2d1b6229d7cfb9f2ada31c5cb61453cf464f91828e124437c708eec55b9cd07", value = "1" } ] "#; @@ -1313,12 +1319,13 @@ fn create_account_with_acl_auth() { // Create init storage data file for acl-auth with a test public key let init_storage_data_toml = r#" - "miden::standards::auth::rpo_falcon512_acl::public_key" = "0x0000000000000000000000000000000000000000000000000000000000000001" - "miden::standards::auth::rpo_falcon512_acl::config.num_tracked_procs" = "1" - "miden::standards::auth::rpo_falcon512_acl::config.allow_unauthorized_output_notes" = "0" - "miden::standards::auth::rpo_falcon512_acl::config.allow_unauthorized_input_notes" = "0" + "miden::standards::auth::singlesig_acl::pub_key" = "0x0000000000000000000000000000000000000000000000000000000000000001" + "miden::standards::auth::singlesig_acl::scheme" = "Falcon512Rpo" + "miden::standards::auth::singlesig_acl::config.num_tracked_procs" = "1" + "miden::standards::auth::singlesig_acl::config.allow_unauthorized_output_notes" = "0" + "miden::standards::auth::singlesig_acl::config.allow_unauthorized_input_notes" = "0" - "miden::standards::auth::rpo_falcon512_acl::trigger_procedure_roots" = [ + "miden::standards::auth::singlesig_acl::trigger_procedure_roots" = [ { key = ["0", "0", "0", "0"], value = "0xd2d1b6229d7cfb9f2ada31c5cb61453cf464f91828e124437c708eec55b9cd07" } ] "#; @@ -1348,9 +1355,10 @@ fn create_account_with_acl_auth() { fn create_account_with_ecdsa_auth() { let temp_dir = init_cli().1; - // Create init storage data file for ecdsa-auth with a test public key + // Create init storage data file for ecdsa-auth with a test public key and scheme let init_storage_data_toml = r#" - "miden::standards::auth::ecdsa_k256_keccak::public_key"="0x0000000000000000000000000000000000000000000000000000000000000001" + "miden::standards::auth::singlesig::pub_key" = "0x0000000000000000000000000000000000000000000000000000000000000001" + "miden::standards::auth::singlesig::scheme" = "EcdsaK256Keccak" "#; let file_path = temp_dir.join("ecdsa_init_data.toml"); fs::write(&file_path, init_storage_data_toml).unwrap(); diff --git a/crates/rust-client/src/account/mod.rs b/crates/rust-client/src/account/mod.rs index 414db34b88..a611ea881c 100644 --- a/crates/rust-client/src/account/mod.rs +++ b/crates/rust-client/src/account/mod.rs @@ -69,7 +69,7 @@ use miden_protocol::note::NoteTag; mod account_reader; pub use account_reader::AccountReader; -use miden_standards::account::auth::{AuthEcdsaK256Keccak, AuthFalcon512Rpo}; +use miden_standards::account::auth::AuthSingleSig; // RE-EXPORTS // ================================================================================================ pub use miden_standards::account::interface::AccountInterfaceExt; @@ -97,12 +97,12 @@ pub mod component { pub use miden_standards::account::components::{ basic_fungible_faucet_library, basic_wallet_library, - ecdsa_k256_keccak_library, - falcon_512_rpo_acl_library, - falcon_512_rpo_library, - falcon_512_rpo_multisig_library, + multisig_library, network_fungible_faucet_library, no_auth_library, + singlesig_acl_library, + singlesig_library, + storage_schema_library, }; pub use miden_standards::account::faucets::{BasicFungibleFaucet, NetworkFungibleFaucet}; pub use miden_standards::account::wallets::BasicWallet; @@ -396,7 +396,7 @@ impl Client { /// used seed is known). /// /// This function currently supports accounts composed of the [`BasicWallet`] component and one of -/// the supported authentication schemes ([`AuthFalcon512Rpo`] or [`AuthEcdsaK256Keccak`]). +/// the supported authentication schemes ([`AuthSingleSig`]). /// /// # Arguments /// - `init_seed`: Initial seed used to create the account. This is the seed passed to @@ -423,12 +423,13 @@ pub fn build_wallet_id( let auth_component = match auth_scheme { AuthSchemeId::Falcon512Rpo => { let auth_component: AccountComponent = - AuthFalcon512Rpo::new(public_key.to_commitment()).into(); + AuthSingleSig::new(public_key.to_commitment(), AuthSchemeId::Falcon512Rpo).into(); auth_component }, AuthSchemeId::EcdsaK256Keccak => { let auth_component: AccountComponent = - AuthEcdsaK256Keccak::new(public_key.to_commitment()).into(); + AuthSingleSig::new(public_key.to_commitment(), AuthSchemeId::EcdsaK256Keccak) + .into(); auth_component }, auth_scheme => { diff --git a/crates/rust-client/src/lib.rs b/crates/rust-client/src/lib.rs index c4968b16a5..41b7e045f4 100644 --- a/crates/rust-client/src/lib.rs +++ b/crates/rust-client/src/lib.rs @@ -192,10 +192,18 @@ pub mod auth { PublicKeyCommitment, Signature, }; - pub use miden_standards::AuthScheme; - pub use miden_standards::account::auth::{AuthEcdsaK256Keccak, AuthFalcon512Rpo, NoAuth}; + pub use miden_standards::account::auth::{ + AuthMultisig, + AuthMultisigConfig, + AuthSingleSig, + AuthSingleSigAcl, + AuthSingleSigAclConfig, + NoAuth, + }; pub use miden_tx::auth::{BasicAuthenticator, SigningInputs, TransactionAuthenticator}; + pub use crate::account::component::AuthScheme; + pub const RPO_FALCON_SCHEME_ID: AuthSchemeId = AuthSchemeId::Falcon512Rpo; pub const ECDSA_K256_KECCAK_SCHEME_ID: AuthSchemeId = AuthSchemeId::EcdsaK256Keccak; } diff --git a/crates/rust-client/src/note/mod.rs b/crates/rust-client/src/note/mod.rs index 0a7c66952d..9f8d708ac4 100644 --- a/crates/rust-client/src/note/mod.rs +++ b/crates/rust-client/src/note/mod.rs @@ -102,6 +102,7 @@ pub use miden_standards::note::{ NoteConsumptionStatus, NoteExecutionHint, P2idNote, + P2idNoteStorage, StandardNote, SwapNote, }; diff --git a/crates/rust-client/src/rpc/generated/nostd/note.rs b/crates/rust-client/src/rpc/generated/nostd/note.rs index 8bff5858cd..cc2d3c60a9 100644 --- a/crates/rust-client/src/rpc/generated/nostd/note.rs +++ b/crates/rust-client/src/rpc/generated/nostd/note.rs @@ -111,10 +111,10 @@ pub struct NoteSyncRecord { #[prost(message, optional, tag = "4")] pub inclusion_path: ::core::option::Option, } -/// Represents a note root. +/// Represents a commitment to a note script. #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] -pub struct NoteRoot { - /// The root of the note. +pub struct NoteScriptRoot { + /// Root of the note script. #[prost(message, optional, tag = "1")] pub root: ::core::option::Option, } @@ -124,7 +124,7 @@ pub struct NoteScript { /// Entrypoint of the script. #[prost(uint32, tag = "1")] pub entrypoint: u32, - /// Mast of the script. + /// MAST of the script. #[prost(bytes = "vec", tag = "2")] pub mast: ::prost::alloc::vec::Vec, } diff --git a/crates/rust-client/src/rpc/generated/nostd/rpc.rs b/crates/rust-client/src/rpc/generated/nostd/rpc.rs index a1796a70ba..2b6ce4b7fd 100644 --- a/crates/rust-client/src/rpc/generated/nostd/rpc.rs +++ b/crates/rust-client/src/rpc/generated/nostd/rpc.rs @@ -833,7 +833,7 @@ pub mod api_client { /// Returns the script for a note by its root. pub async fn get_note_script_by_root( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> core::result::Result< tonic::Response, tonic::Status, diff --git a/crates/rust-client/src/rpc/generated/nostd/rpc_store.rs b/crates/rust-client/src/rpc/generated/nostd/rpc_store.rs index 80a13e61cf..26eb7c5da9 100644 --- a/crates/rust-client/src/rpc/generated/nostd/rpc_store.rs +++ b/crates/rust-client/src/rpc/generated/nostd/rpc_store.rs @@ -690,7 +690,7 @@ pub mod rpc_client { /// Returns the script for a note by its root. pub async fn get_note_script_by_root( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> core::result::Result< tonic::Response, tonic::Status, diff --git a/crates/rust-client/src/rpc/generated/std/note.rs b/crates/rust-client/src/rpc/generated/std/note.rs index 8bff5858cd..cc2d3c60a9 100644 --- a/crates/rust-client/src/rpc/generated/std/note.rs +++ b/crates/rust-client/src/rpc/generated/std/note.rs @@ -111,10 +111,10 @@ pub struct NoteSyncRecord { #[prost(message, optional, tag = "4")] pub inclusion_path: ::core::option::Option, } -/// Represents a note root. +/// Represents a commitment to a note script. #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] -pub struct NoteRoot { - /// The root of the note. +pub struct NoteScriptRoot { + /// Root of the note script. #[prost(message, optional, tag = "1")] pub root: ::core::option::Option, } @@ -124,7 +124,7 @@ pub struct NoteScript { /// Entrypoint of the script. #[prost(uint32, tag = "1")] pub entrypoint: u32, - /// Mast of the script. + /// MAST of the script. #[prost(bytes = "vec", tag = "2")] pub mast: ::prost::alloc::vec::Vec, } diff --git a/crates/rust-client/src/rpc/generated/std/rpc.rs b/crates/rust-client/src/rpc/generated/std/rpc.rs index fc0d2ab7a4..54b2c8c6da 100644 --- a/crates/rust-client/src/rpc/generated/std/rpc.rs +++ b/crates/rust-client/src/rpc/generated/std/rpc.rs @@ -841,7 +841,7 @@ pub mod api_client { /// Returns the script for a note by its root. pub async fn get_note_script_by_root( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, tonic::Status, diff --git a/crates/rust-client/src/rpc/generated/std/rpc_store.rs b/crates/rust-client/src/rpc/generated/std/rpc_store.rs index 1af9c76635..4f55b35969 100644 --- a/crates/rust-client/src/rpc/generated/std/rpc_store.rs +++ b/crates/rust-client/src/rpc/generated/std/rpc_store.rs @@ -701,7 +701,7 @@ pub mod rpc_client { /// Returns the script for a note by its root. pub async fn get_note_script_by_root( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, tonic::Status, diff --git a/crates/rust-client/src/rpc/tonic_client/mod.rs b/crates/rust-client/src/rpc/tonic_client/mod.rs index dd8a7236ee..a17661b90a 100644 --- a/crates/rust-client/src/rpc/tonic_client/mod.rs +++ b/crates/rust-client/src/rpc/tonic_client/mod.rs @@ -812,7 +812,7 @@ impl NodeRpcClient for GrpcClient { } async fn get_note_script_by_root(&self, root: Word) -> Result { - let request = proto::note::NoteRoot { root: Some(root.into()) }; + let request = proto::note::NoteScriptRoot { root: Some(root.into()) }; let mut rpc_api = self.ensure_connected().await?; diff --git a/crates/rust-client/src/test_utils/common.rs b/crates/rust-client/src/test_utils/common.rs index 37048209d6..99d7cd8a07 100644 --- a/crates/rust-client/src/test_utils/common.rs +++ b/crates/rust-client/src/test_utils/common.rs @@ -16,7 +16,7 @@ use miden_protocol::asset::{FungibleAsset, TokenSymbol}; use miden_protocol::note::NoteType; use miden_protocol::testing::account_id::ACCOUNT_ID_REGULAR_PRIVATE_ACCOUNT_UPDATABLE_CODE; use miden_protocol::transaction::{OutputNote, TransactionId}; -use miden_standards::account::auth::{AuthEcdsaK256Keccak, AuthFalcon512Rpo}; +use miden_standards::account::auth::AuthSingleSig; use miden_standards::code_builder::CodeBuilder; use rand::RngCore; use uuid::Uuid; @@ -79,14 +79,18 @@ pub async fn insert_new_wallet_with_seed( let (key_pair, auth_component) = match auth_scheme { AuthSchemeId::Falcon512Rpo => { let key_pair = AuthSecretKey::new_falcon512_rpo(); - let auth_component: AccountComponent = - AuthFalcon512Rpo::new(key_pair.public_key().to_commitment()).into(); + let auth_component = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + AuthSchemeId::Falcon512Rpo, + ); (key_pair, auth_component) }, AuthSchemeId::EcdsaK256Keccak => { let key_pair = AuthSecretKey::new_ecdsa_k256_keccak(); - let auth_component: AccountComponent = - AuthEcdsaK256Keccak::new(key_pair.public_key().to_commitment()).into(); + let auth_component = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + AuthSchemeId::EcdsaK256Keccak, + ); (key_pair, auth_component) }, scheme => { @@ -121,14 +125,18 @@ pub async fn insert_new_fungible_faucet( let (key_pair, auth_component) = match auth_scheme { AuthSchemeId::Falcon512Rpo => { let key_pair = AuthSecretKey::new_falcon512_rpo(); - let auth_component: AccountComponent = - AuthFalcon512Rpo::new(key_pair.public_key().to_commitment()).into(); + let auth_component = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + AuthSchemeId::Falcon512Rpo, + ); (key_pair, auth_component) }, AuthSchemeId::EcdsaK256Keccak => { let key_pair = AuthSecretKey::new_ecdsa_k256_keccak(); - let auth_component: AccountComponent = - AuthEcdsaK256Keccak::new(key_pair.public_key().to_commitment()).into(); + let auth_component = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + AuthSchemeId::EcdsaK256Keccak, + ); (key_pair, auth_component) }, scheme => { @@ -561,7 +569,10 @@ pub async fn insert_account_with_custom_component( let account = AccountBuilder::new(init_seed) .account_type(AccountType::RegularAccountImmutableCode) .storage_mode(storage_mode) - .with_auth_component(AuthFalcon512Rpo::new(pub_key.to_commitment())) + .with_auth_component(AuthSingleSig::new( + pub_key.to_commitment(), + AuthSchemeId::Falcon512Rpo, + )) .with_component(BasicWallet) .with_component(custom_component) .build() diff --git a/crates/rust-client/src/transaction/request/builder.rs b/crates/rust-client/src/transaction/request/builder.rs index fda5eb5f03..277b7ef331 100644 --- a/crates/rust-client/src/transaction/request/builder.rs +++ b/crates/rust-client/src/transaction/request/builder.rs @@ -22,7 +22,7 @@ use miden_protocol::note::{ use miden_protocol::transaction::{OutputNote, TransactionScript}; use miden_protocol::vm::AdviceMap; use miden_protocol::{Felt, Word}; -use miden_standards::note::{P2idNote, P2ideNote, SwapNote}; +use miden_standards::note::{P2idNote, P2ideNote, P2ideNoteStorage, SwapNote}; use super::{ ForeignAccount, @@ -536,10 +536,12 @@ impl PaymentNoteDescription { // Create a P2IDE note P2ideNote::create( self.sender_account_id, - self.target_account_id, + P2ideNoteStorage::new( + self.target_account_id, + self.reclaim_height, + self.timelock_height, + ), self.assets, - self.reclaim_height, - self.timelock_height, note_type, NoteAttachment::default(), rng, diff --git a/crates/rust-client/src/transaction/request/mod.rs b/crates/rust-client/src/transaction/request/mod.rs index 514ad9198b..9dba080e4e 100644 --- a/crates/rust-client/src/transaction/request/mod.rs +++ b/crates/rust-client/src/transaction/request/mod.rs @@ -480,7 +480,7 @@ pub enum TransactionRequestError { mod tests { use std::vec::Vec; - use miden_protocol::account::auth::PublicKeyCommitment; + use miden_protocol::account::auth::{AuthScheme, PublicKeyCommitment}; use miden_protocol::account::{ AccountBuilder, AccountComponent, @@ -498,7 +498,7 @@ mod tests { }; use miden_protocol::transaction::OutputNote; use miden_protocol::{EMPTY_WORD, Felt, Word}; - use miden_standards::account::auth::{AuthEcdsaK256Keccak, AuthFalcon512Rpo}; + use miden_standards::account::auth::AuthSingleSig; use miden_standards::note::P2idNote; use miden_standards::testing::account_component::MockAccountComponent; use miden_tx::utils::{Deserializable, Serializable}; @@ -510,14 +510,16 @@ mod tests { #[test] fn transaction_request_serialization() { assert_transaction_request_serialization_with(|| { - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)).into() + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthScheme::Falcon512Rpo) + .into() }); } #[test] fn transaction_request_serialization_ecdsa() { assert_transaction_request_serialization_with(|| { - AuthEcdsaK256Keccak::new(PublicKeyCommitment::from(EMPTY_WORD)).into() + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthScheme::EcdsaK256Keccak) + .into() }); } diff --git a/crates/sqlite-store/src/account/tests.rs b/crates/sqlite-store/src/account/tests.rs index fa68bd3728..1fc887ab71 100644 --- a/crates/sqlite-store/src/account/tests.rs +++ b/crates/sqlite-store/src/account/tests.rs @@ -26,7 +26,7 @@ use miden_client::asset::{ NonFungibleAsset, NonFungibleAssetDetails, }; -use miden_client::auth::{AuthFalcon512Rpo, PublicKeyCommitment}; +use miden_client::auth::{AuthSchemeId, AuthSingleSig, PublicKeyCommitment}; use miden_client::store::Store; use miden_client::testing::common::ACCOUNT_ID_REGULAR; use miden_client::{EMPTY_WORD, ONE, ZERO}; @@ -53,7 +53,8 @@ async fn account_code_insertion_no_duplicates() -> anyhow::Result<()> { )?; let account_code = AccountCode::from_components( &[ - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)).into(), + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::Falcon512Rpo) + .into(), account_component, ], AccountType::RegularAccountUpdatableCode, @@ -111,7 +112,10 @@ async fn apply_account_delta_additions() -> anyhow::Result<()> { // Create and insert an account let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .build()?; @@ -210,7 +214,10 @@ async fn apply_account_delta_removals() -> anyhow::Result<()> { ]; let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .with_assets(assets.clone()) .build_existing()?; @@ -302,7 +309,10 @@ async fn get_account_storage_item_success() -> anyhow::Result<()> { let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .build_existing()?; @@ -332,7 +342,10 @@ async fn get_account_storage_item_not_found() -> anyhow::Result<()> { let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .build_existing()?; @@ -370,7 +383,10 @@ async fn get_account_map_item_success() -> anyhow::Result<()> { let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .build_existing()?; @@ -401,7 +417,10 @@ async fn get_account_map_item_value_slot_error() -> anyhow::Result<()> { let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .build_existing()?; @@ -429,7 +448,10 @@ async fn get_account_code() -> anyhow::Result<()> { let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .build_existing()?; @@ -479,7 +501,10 @@ async fn account_reader_nonce_and_status() -> anyhow::Result<()> { let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .build()?; @@ -552,7 +577,10 @@ async fn account_reader_storage_access() -> anyhow::Result<()> { let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .build_existing()?; @@ -586,7 +614,10 @@ async fn account_reader_addresses_access() -> anyhow::Result<()> { let account = AccountBuilder::new([0; 32]) .account_type(AccountType::RegularAccountImmutableCode) - .with_auth_component(AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))) + .with_auth_component(AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + )) .with_component(dummy_component) .build_existing()?; diff --git a/crates/testing/miden-client-tests/src/tests.rs b/crates/testing/miden-client-tests/src/tests.rs index e776c24df9..003c3d48b8 100644 --- a/crates/testing/miden-client-tests/src/tests.rs +++ b/crates/testing/miden-client-tests/src/tests.rs @@ -17,9 +17,9 @@ use miden_client::assembly::{ Path, }; use miden_client::auth::{ - AuthEcdsaK256Keccak, - AuthFalcon512Rpo, + AuthSchemeId, AuthSecretKey, + AuthSingleSig, PublicKeyCommitment, RPO_FALCON_SCHEME_ID, }; @@ -107,7 +107,7 @@ use miden_protocol::{EMPTY_WORD, Felt, ONE, Word}; use miden_standards::account::faucets::BasicFungibleFaucet; use miden_standards::account::interface::AccountInterfaceError; use miden_standards::account::wallets::BasicWallet; -use miden_standards::note::{NoteConsumptionStatus, P2idNote, StandardNote}; +use miden_standards::note::{NoteConsumptionStatus, P2idNoteStorage, StandardNote}; use miden_standards::testing::mock_account::MockAccountExt; use miden_standards::testing::note::NoteBuilder; use miden_testing::{MockChain, MockChainBuilder, TxContextInput}; @@ -292,7 +292,7 @@ async fn insert_same_account_twice_fails() { let account = Account::mock( ACCOUNT_ID_PUBLIC_FUNGIBLE_FAUCET_2, - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)), + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::Falcon512Rpo), ); assert!(client.add_account(&account, false).await.is_ok()); @@ -306,7 +306,7 @@ async fn account_code() { let account = Account::mock( ACCOUNT_ID_REGULAR_PRIVATE_ACCOUNT_UPDATABLE_CODE, - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)), + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::Falcon512Rpo), ); let account_code = account.code(); @@ -328,7 +328,7 @@ async fn get_account_by_id() { let account = Account::mock( ACCOUNT_ID_REGULAR_PUBLIC_ACCOUNT_UPDATABLE_CODE, - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)), + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::Falcon512Rpo), ); client.add_account(&account, false).await.unwrap(); @@ -726,7 +726,7 @@ async fn note_without_asset() { // Create note without assets let serial_num = client.rng().draw_word(); - let recipient = P2idNote::build_recipient(wallet.id(), serial_num).unwrap(); + let recipient = P2idNoteStorage::new(wallet.id()).into_recipient(serial_num); let tag = NoteTag::with_account_target(wallet.id()); let metadata = NoteMetadata::new(wallet.id(), NoteType::Private).with_tag(tag); let vault = NoteAssets::new(vec![]).unwrap(); @@ -2103,7 +2103,10 @@ async fn empty_storage_map() { let account = AccountBuilder::new(init_seed) .account_type(AccountType::RegularAccountImmutableCode) .storage_mode(AccountStorageMode::Public) - .with_auth_component(AuthFalcon512Rpo::new(pub_key.to_commitment())) + .with_auth_component(AuthSingleSig::new( + pub_key.to_commitment(), + AuthSchemeId::Falcon512Rpo, + )) .with_component(BasicWallet) .with_component(component) .build() @@ -2216,7 +2219,10 @@ async fn storage_and_vault_proofs() { let account = AccountBuilder::new(init_seed) .account_type(AccountType::RegularAccountImmutableCode) .storage_mode(AccountStorageMode::Public) - .with_auth_component(AuthFalcon512Rpo::new(pub_key.to_commitment())) + .with_auth_component(AuthSingleSig::new( + pub_key.to_commitment(), + AuthSchemeId::Falcon512Rpo, + )) .with_component(BasicWallet) .with_component(bump_item_component) .build() @@ -2309,7 +2315,7 @@ async fn account_addresses_basic_wallet() { let account = Account::mock( ACCOUNT_ID_PUBLIC_FUNGIBLE_FAUCET_2, - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)), + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::Falcon512Rpo), ); client.add_account(&account, false).await.unwrap(); @@ -2349,7 +2355,7 @@ async fn account_add_address_after_creation() { let account = Account::mock( ACCOUNT_ID_PUBLIC_FUNGIBLE_FAUCET_2, - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)), + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::Falcon512Rpo), ); client.add_account(&account, false).await.unwrap(); @@ -2476,7 +2482,10 @@ async fn add_account_fails_if_accounts_limit_is_exceeded() { .add_account( &Account::mock( (i << 8) as u128, - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)), + AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + ), ), false, ) @@ -2489,7 +2498,10 @@ async fn add_account_fails_if_accounts_limit_is_exceeded() { .add_account( &Account::mock( (RpcLimits::default().account_ids_limit << 8) as u128, - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)), + AuthSingleSig::new( + PublicKeyCommitment::from(EMPTY_WORD), + AuthSchemeId::Falcon512Rpo, + ), ), false, ) @@ -2753,7 +2765,10 @@ async fn insert_new_wallet( let account = AccountBuilder::new(init_seed) .account_type(AccountType::RegularAccountImmutableCode) .storage_mode(storage_mode) - .with_auth_component(AuthFalcon512Rpo::new(pub_key.to_commitment())) + .with_auth_component(AuthSingleSig::new( + pub_key.to_commitment(), + AuthSchemeId::Falcon512Rpo, + )) .with_component(BasicWallet) .build() .unwrap(); @@ -2779,7 +2794,10 @@ async fn insert_new_ecdsa_wallet( let account = AccountBuilder::new(init_seed) .account_type(AccountType::RegularAccountImmutableCode) .storage_mode(storage_mode) - .with_auth_component(AuthEcdsaK256Keccak::new(pub_key.to_commitment())) + .with_auth_component(AuthSingleSig::new( + pub_key.to_commitment(), + AuthSchemeId::EcdsaK256Keccak, + )) .with_component(BasicWallet) .build() .unwrap(); @@ -2810,7 +2828,10 @@ async fn insert_new_fungible_faucet( let account = AccountBuilder::new(init_seed) .account_type(AccountType::FungibleFaucet) .storage_mode(storage_mode) - .with_auth_component(AuthFalcon512Rpo::new(pub_key.to_commitment())) + .with_auth_component(AuthSingleSig::new( + pub_key.to_commitment(), + AuthSchemeId::Falcon512Rpo, + )) .with_component(BasicFungibleFaucet::new(symbol, 10, max_supply).unwrap()) .build() .unwrap(); @@ -2843,7 +2864,10 @@ async fn insert_new_ecdsa_fungible_faucet( let account = AccountBuilder::new(init_seed) .account_type(AccountType::FungibleFaucet) .storage_mode(storage_mode) - .with_auth_component(AuthEcdsaK256Keccak::new(pub_key.to_commitment())) + .with_auth_component(AuthSingleSig::new( + pub_key.to_commitment(), + AuthSchemeId::EcdsaK256Keccak, + )) .with_component(BasicFungibleFaucet::new(symbol, 10, max_supply).unwrap()) .build() .unwrap(); @@ -2916,7 +2940,10 @@ async fn storage_and_vault_proofs_ecdsa() { let account = AccountBuilder::new(init_seed) .account_type(AccountType::RegularAccountImmutableCode) .storage_mode(AccountStorageMode::Public) - .with_auth_component(AuthEcdsaK256Keccak::new(pub_key.to_commitment())) + .with_auth_component(AuthSingleSig::new( + pub_key.to_commitment(), + AuthSchemeId::EcdsaK256Keccak, + )) .with_component(BasicWallet) .with_component(bump_item_component) .build() diff --git a/crates/testing/miden-client-tests/src/tests/store.rs b/crates/testing/miden-client-tests/src/tests/store.rs index 9d5f084d2e..09b076808a 100644 --- a/crates/testing/miden-client-tests/src/tests/store.rs +++ b/crates/testing/miden-client-tests/src/tests/store.rs @@ -2,12 +2,7 @@ use alloc::boxed::Box; use alloc::vec::Vec; use std::collections::BTreeSet; -use miden_client::auth::{ - AuthEcdsaK256Keccak, - AuthFalcon512Rpo, - AuthSecretKey, - PublicKeyCommitment, -}; +use miden_client::auth::{AuthSchemeId, AuthSecretKey, AuthSingleSig, PublicKeyCommitment}; use miden_protocol::account::{Account, AccountFile}; use miden_protocol::testing::account_id::{ ACCOUNT_ID_PRIVATE_FUNGIBLE_FAUCET, @@ -19,15 +14,19 @@ use miden_standards::testing::mock_account::MockAccountExt; use crate::tests::create_test_client; fn create_account_data(account_id: u128) -> AccountFile { - let account = - Account::mock(account_id, AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD))); + let account = Account::mock( + account_id, + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::Falcon512Rpo), + ); AccountFile::new(account.clone(), vec![AuthSecretKey::new_falcon512_rpo()]) } fn create_ecdsa_account_data(account_id: u128) -> AccountFile { - let account = - Account::mock(account_id, AuthEcdsaK256Keccak::new(PublicKeyCommitment::from(EMPTY_WORD))); + let account = Account::mock( + account_id, + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::EcdsaK256Keccak), + ); AccountFile::new(account.clone(), vec![AuthSecretKey::new_falcon512_rpo()]) } @@ -61,7 +60,7 @@ pub async fn try_add_account() { let account = Account::mock( ACCOUNT_ID_PRIVATE_FUNGIBLE_FAUCET, - AuthFalcon512Rpo::new(PublicKeyCommitment::from(EMPTY_WORD)), + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::Falcon512Rpo), ); // The mock account has nonce 1, we need it to be 0 for the test. @@ -83,7 +82,7 @@ pub async fn try_add_ecdsa_account() { let account = Account::mock( ACCOUNT_ID_PRIVATE_FUNGIBLE_FAUCET, - AuthEcdsaK256Keccak::new(PublicKeyCommitment::from(EMPTY_WORD)), + AuthSingleSig::new(PublicKeyCommitment::from(EMPTY_WORD), AuthSchemeId::EcdsaK256Keccak), ); // The mock account has nonce 1, we need it to be 0 for the test. diff --git a/crates/testing/miden-client-tests/src/tests/transaction.rs b/crates/testing/miden-client-tests/src/tests/transaction.rs index 08c18cc1d3..ac87b5bc12 100644 --- a/crates/testing/miden-client-tests/src/tests/transaction.rs +++ b/crates/testing/miden-client-tests/src/tests/transaction.rs @@ -1,7 +1,7 @@ use alloc::boxed::Box; use alloc::sync::Arc; -use miden_client::auth::{AuthFalcon512Rpo, AuthSecretKey, RPO_FALCON_SCHEME_ID}; +use miden_client::auth::{AuthSchemeId, AuthSecretKey, AuthSingleSig, RPO_FALCON_SCHEME_ID}; use miden_client::keystore::Keystore; use miden_client::transaction::{ ProvenTransaction, @@ -43,7 +43,10 @@ async fn transaction_creates_two_notes() { let account = AccountBuilder::new(Default::default()) .with_component(BasicWallet) - .with_auth_component(AuthFalcon512Rpo::new(pub_key.to_commitment())) + .with_auth_component(AuthSingleSig::new( + pub_key.to_commitment(), + AuthSchemeId::Falcon512Rpo, + )) .with_assets([asset_1, asset_2]) .build_existing() .unwrap(); diff --git a/crates/testing/node-builder/src/lib.rs b/crates/testing/node-builder/src/lib.rs index b703ec3fb7..7888810cf6 100644 --- a/crates/testing/node-builder/src/lib.rs +++ b/crates/testing/node-builder/src/lib.rs @@ -20,7 +20,7 @@ use miden_node_rpc::Rpc; use miden_node_store::{GenesisState, Store}; use miden_node_utils::crypto::get_rpo_random_coin; use miden_node_validator::{Validator, ValidatorSigner}; -use miden_protocol::account::auth::AuthSecretKey; +use miden_protocol::account::auth::{AuthScheme, AuthSecretKey}; use miden_protocol::account::{ Account, AccountBuilder, @@ -35,7 +35,8 @@ use miden_protocol::crypto::dsa::ecdsa_k256_keccak; use miden_protocol::testing::account_id::ACCOUNT_ID_PUBLIC_FUNGIBLE_FAUCET; use miden_protocol::utils::Serializable; use miden_protocol::{Felt, ONE, Word}; -use miden_standards::AuthScheme; +use miden_standards::AuthMethod; +use miden_standards::account::auth::AuthSingleSig; use miden_standards::account::components::basic_wallet_library; use miden_standards::account::faucets::create_basic_fungible_faucet; use rand_chacha::ChaCha20Rng; @@ -408,15 +409,17 @@ fn generate_genesis_account() -> anyhow::Result { let mut rng = ChaCha20Rng::from_seed(random()); let secret = AuthSecretKey::new_falcon512_rpo_with_rng(&mut get_rpo_random_coin(&mut rng)); + let auth_method = AuthMethod::SingleSig { + approver: (secret.public_key().to_commitment(), AuthScheme::Falcon512Rpo), + }; + let account = create_basic_fungible_faucet( rng.random(), TokenSymbol::try_from("TST").expect("TST should be a valid token symbol"), 12, Felt::from(1_000_000u32), miden_protocol::account::AccountStorageMode::Public, - AuthScheme::Falcon512Rpo { - pub_key: secret.public_key().to_commitment(), - }, + auth_method, )?; // Force the account nonce to 1. @@ -493,8 +496,8 @@ fn create_single_test_faucet(index: u128, secret: &AuthSecretKey) -> anyhow::Res .try_into() .expect("concatenating two 16-byte arrays yields exactly 32 bytes"); - let auth_scheme = AuthScheme::Falcon512Rpo { - pub_key: secret.public_key().to_commitment(), + let auth_scheme = AuthMethod::SingleSig { + approver: (secret.public_key().to_commitment(), AuthScheme::Falcon512Rpo), }; let faucet = create_basic_fungible_faucet( @@ -533,8 +536,9 @@ fn create_test_account_with_many_assets(faucets: &[Account]) -> anyhow::Result { let key_pair = AuthSecretKey::new_falcon512_rpo_with_rng(&mut rng); - let auth_component: AccountComponent = - AuthFalcon512Rpo::new(key_pair.public_key().to_commitment()).into(); + let auth_component: AccountComponent = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + NativeAuthScheme::Falcon512Rpo, + ) + .into(); (key_pair, auth_component) }, NativeAuthScheme::EcdsaK256Keccak => { let key_pair = AuthSecretKey::new_ecdsa_k256_keccak_with_rng(&mut rng); - let auth_component: AccountComponent = - AuthEcdsaK256Keccak::new(key_pair.public_key().to_commitment()).into(); + let auth_component: AccountComponent = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + NativeAuthScheme::EcdsaK256Keccak, + ) + .into(); (key_pair, auth_component) }, _ => { diff --git a/crates/web-client/src/models/account_component.rs b/crates/web-client/src/models/account_component.rs index 439c776d9f..828ba6387b 100644 --- a/crates/web-client/src/models/account_component.rs +++ b/crates/web-client/src/models/account_component.rs @@ -9,9 +9,9 @@ use miden_client::account::{ }; use miden_client::assembly::{Library as NativeLibrary, MastNodeExt}; use miden_client::auth::{ - AuthEcdsaK256Keccak as NativeEcdsaK256Keccak, - AuthFalcon512Rpo as NativeFalcon512Rpo, + AuthSchemeId as NativeAuthSchemeId, AuthSecretKey as NativeSecretKey, + AuthSingleSig as NativeSingleSig, PublicKeyCommitment, }; use miden_client::vm::Package as NativePackage; @@ -140,11 +140,11 @@ impl AccountComponent { ) -> AccountComponent { match auth_scheme { AuthScheme::AuthRpoFalcon512 => { - let auth = NativeFalcon512Rpo::new(commitment); + let auth = NativeSingleSig::new(commitment, NativeAuthSchemeId::Falcon512Rpo); AccountComponent(auth.into()) }, AuthScheme::AuthEcdsaK256Keccak => { - let auth = NativeEcdsaK256Keccak::new(commitment); + let auth = NativeSingleSig::new(commitment, NativeAuthSchemeId::EcdsaK256Keccak); AccountComponent(auth.into()) }, } diff --git a/crates/web-client/src/models/auth_scheme.rs b/crates/web-client/src/models/auth_scheme.rs index 1b3470a65a..738a26c863 100644 --- a/crates/web-client/src/models/auth_scheme.rs +++ b/crates/web-client/src/models/auth_scheme.rs @@ -9,8 +9,8 @@ use wasm_bindgen::prelude::*; #[derive(Clone, Copy, Debug, Eq, PartialEq)] #[wasm_bindgen] pub enum AuthScheme { - AuthRpoFalcon512 = 0, AuthEcdsaK256Keccak = 1, + AuthRpoFalcon512 = 2, } // Compile-time check to ensure both enums stay aligned. diff --git a/crates/web-client/src/models/components/auth_falcon512_rpo_multisig.rs b/crates/web-client/src/models/components/auth_falcon512_rpo_multisig.rs index fa8ac68dc3..3b02850727 100644 --- a/crates/web-client/src/models/components/auth_falcon512_rpo_multisig.rs +++ b/crates/web-client/src/models/components/auth_falcon512_rpo_multisig.rs @@ -1,16 +1,10 @@ use miden_client::Word as NativeWord; -use miden_client::account::component::{ - AccountComponent as NativeAccountComponent, - AccountComponentMetadata, - AuthFalcon512RpoMultisigConfig as NativeAuthFalcon512RpoMultisigConfig, - falcon_512_rpo_multisig_library, +use miden_client::auth::{ + AuthMultisig as NativeAuthMultisig, + AuthMultisigConfig as NativeAuthMultisigConfig, + AuthSchemeId as NativeAuthSchemeId, + PublicKeyCommitment, }; -use miden_client::account::{ - StorageMap as NativeStorageMap, - StorageSlot as NativeStorageSlot, - StorageSlotName, -}; -use miden_client::auth::PublicKeyCommitment; use wasm_bindgen::prelude::*; use crate::js_error_with_context; @@ -45,7 +39,7 @@ impl ProcedureThreshold { /// Multisig auth configuration for `RpoFalcon512` signatures. #[wasm_bindgen] #[derive(Clone)] -pub struct AuthFalcon512RpoMultisigConfig(NativeAuthFalcon512RpoMultisigConfig); +pub struct AuthFalcon512RpoMultisigConfig(NativeAuthMultisigConfig); #[wasm_bindgen] impl AuthFalcon512RpoMultisigConfig { @@ -58,15 +52,15 @@ impl AuthFalcon512RpoMultisigConfig { approvers: Vec, default_threshold: u32, ) -> Result { - let native_approvers: Vec = approvers + let native_approvers: Vec<(PublicKeyCommitment, NativeAuthSchemeId)> = approvers .into_iter() .map(|word| { let native_word: NativeWord = word.into(); - PublicKeyCommitment::from(native_word) + (PublicKeyCommitment::from(native_word), NativeAuthSchemeId::Falcon512Rpo) }) .collect(); - let config = NativeAuthFalcon512RpoMultisigConfig::new(native_approvers, default_threshold) + let config = NativeAuthMultisigConfig::new(native_approvers, default_threshold) .map_err(|e| js_error_with_context(e, "Invalid multisig config"))?; Ok(AuthFalcon512RpoMultisigConfig(config)) @@ -105,7 +99,7 @@ impl AuthFalcon512RpoMultisigConfig { self.0 .approvers() .iter() - .map(|pkc| { + .map(|(pkc, _)| { let word: NativeWord = (*pkc).into(); word.into() }) @@ -131,84 +125,17 @@ impl AuthFalcon512RpoMultisigConfig { pub fn create_auth_falcon512_rpo_multisig( config: AuthFalcon512RpoMultisigConfig, ) -> Result { - let native_config: NativeAuthFalcon512RpoMultisigConfig = config.into(); - - let mut storage_slots = Vec::with_capacity(4); - - let num_approvers = u32::try_from(native_config.approvers().len()).map_err(|e| { - js_error_with_context(e, "Too many approvers (would truncate num_approvers)") - })?; - - // Slot 0: threshold_config - let threshold_config_name = - StorageSlotName::new("miden::standards::auth::falcon512_rpo_multisig::threshold_config") - .map_err(|e| { - js_error_with_context(e, "Failed to create storage slot name 'threshold_config'") - })?; - storage_slots.push(NativeStorageSlot::with_value( - threshold_config_name, - NativeWord::from([native_config.default_threshold(), num_approvers, 0, 0]), - )); - - let map_entries: Vec<_> = native_config - .approvers() - .iter() - .enumerate() - .map(|(i, pk)| { - let idx = u32::try_from(i).map_err(|e| { - js_error_with_context(e, "Too many approvers (would truncate approver index)") - })?; - Ok((NativeWord::from([idx, 0, 0, 0]), (*pk).into())) - }) - .collect::>()?; - let approver_map = NativeStorageMap::with_entries(map_entries.into_iter()) - .map_err(|e| js_error_with_context(e, "Failed to build approver map"))?; - let approver_map_name = StorageSlotName::new( - "miden::standards::auth::falcon512_rpo_multisig::approver_public_keys", - ) - .map_err(|e| { - js_error_with_context(e, "Failed to create storage slot name 'approver_public_keys'") - })?; - storage_slots.push(NativeStorageSlot::with_map(approver_map_name, approver_map)); - - // Slot 2: executed_transactions map (empty) - let executed_tx_map_name = StorageSlotName::new( - "miden::standards::auth::falcon512_rpo_multisig::executed_transactions", - ) - .map_err(|e| { - js_error_with_context(e, "Failed to create storage slot name 'executed_transactions'") - })?; - storage_slots - .push(NativeStorageSlot::with_map(executed_tx_map_name, NativeStorageMap::default())); - - // Slot 3: procedure_thresholds map - let proc_map_name = StorageSlotName::new( - "miden::standards::auth::falcon512_rpo_multisig::procedure_thresholds", - ) - .map_err(|e| { - js_error_with_context(e, "Failed to create storage slot name 'procedure_thresholds'") - })?; - let proc_map = NativeStorageMap::with_entries( - native_config - .proc_thresholds() - .iter() - .map(|(proc_root, threshold)| (*proc_root, NativeWord::from([*threshold, 0, 0, 0]))), - ) - .map_err(|e| js_error_with_context(e, "Failed to build proc thresholds map"))?; - storage_slots.push(NativeStorageSlot::with_map(proc_map_name, proc_map)); - - let native_component = NativeAccountComponent::new( - falcon_512_rpo_multisig_library(), - storage_slots, - AccountComponentMetadata::new("miden::auth::falcon_512_rpo_multisig") - .with_supports_all_types(), - ) - .map_err(|e| js_error_with_context(e, "Failed to create multisig account component"))?; + let native_config: NativeAuthMultisigConfig = config.into(); + + let multisig = NativeAuthMultisig::new(native_config) + .map_err(|e| js_error_with_context(e, "Failed to create multisig auth component"))?; + + let native_component: miden_client::account::AccountComponent = multisig.into(); Ok(native_component.into()) } -impl From for NativeAuthFalcon512RpoMultisigConfig { +impl From for NativeAuthMultisigConfig { fn from(config: AuthFalcon512RpoMultisigConfig) -> Self { config.0 } diff --git a/crates/web-client/src/models/note.rs b/crates/web-client/src/models/note.rs index ddbd2e864d..d9feded143 100644 --- a/crates/web-client/src/models/note.rs +++ b/crates/web-client/src/models/note.rs @@ -3,7 +3,7 @@ use miden_client::block::BlockNumber as NativeBlockNumber; use miden_client::crypto::RpoRandomCoin; use miden_client::note::{Note as NativeNote, NoteAssets as NativeNoteAssets, P2idNote}; use miden_client::{Felt as NativeFelt, Word as NativeWord}; -use miden_standards::note::P2ideNote; +use miden_standards::note::{P2ideNote, P2ideNoteStorage}; use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; use wasm_bindgen::prelude::*; @@ -138,12 +138,16 @@ impl Note { let native_note_assets: NativeNoteAssets = assets.into(); let native_assets: Vec = native_note_assets.iter().copied().collect(); - let native_note = P2ideNote::create( - sender.into(), + let storage = P2ideNoteStorage::new( target.into(), - native_assets, reclaim_height.map(NativeBlockNumber::from), timelock_height.map(NativeBlockNumber::from), + ); + + let native_note = P2ideNote::create( + sender.into(), + storage, + native_assets, note_type.into(), attachment.into(), &mut rng, diff --git a/crates/web-client/src/new_account.rs b/crates/web-client/src/new_account.rs index 980ef66a8c..176ffd6d47 100644 --- a/crates/web-client/src/new_account.rs +++ b/crates/web-client/src/new_account.rs @@ -2,12 +2,7 @@ use miden_client::Felt; use miden_client::account::component::BasicFungibleFaucet; use miden_client::account::{AccountBuilder, AccountComponent, AccountType}; use miden_client::asset::TokenSymbol; -use miden_client::auth::{ - AuthEcdsaK256Keccak, - AuthFalcon512Rpo, - AuthSchemeId as NativeAuthScheme, - AuthSecretKey, -}; +use miden_client::auth::{AuthSchemeId as NativeAuthScheme, AuthSecretKey, AuthSingleSig}; use miden_client::block::BlockNumber; use miden_client::keystore::Keystore; use rand::rngs::StdRng; @@ -98,14 +93,20 @@ impl WebClient { let (key_pair, auth_component) = match native_scheme { NativeAuthScheme::Falcon512Rpo => { let key_pair = AuthSecretKey::new_falcon512_rpo_with_rng(&mut faucet_rng); - let auth_component: AccountComponent = - AuthFalcon512Rpo::new(key_pair.public_key().to_commitment()).into(); + let auth_component: AccountComponent = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + NativeAuthScheme::Falcon512Rpo, + ) + .into(); (key_pair, auth_component) }, NativeAuthScheme::EcdsaK256Keccak => { let key_pair = AuthSecretKey::new_ecdsa_k256_keccak_with_rng(&mut faucet_rng); - let auth_component: AccountComponent = - AuthEcdsaK256Keccak::new(key_pair.public_key().to_commitment()).into(); + let auth_component: AccountComponent = AuthSingleSig::new( + key_pair.public_key().to_commitment(), + NativeAuthScheme::EcdsaK256Keccak, + ) + .into(); (key_pair, auth_component) }, _ => { diff --git a/crates/web-client/test/account.test.ts b/crates/web-client/test/account.test.ts index eb5ec826bc..68312d3021 100644 --- a/crates/web-client/test/account.test.ts +++ b/crates/web-client/test/account.test.ts @@ -18,7 +18,7 @@ export const getAccountOneMatch = async ( const newAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const result = await client.getAccount(newAccount.id()); @@ -88,12 +88,12 @@ export const getAccountsManyMatches = async ( const newAccount1 = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const newAccount2 = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const commitmentsOfCreatedAccounts = [ newAccount1.to_commitment().toHex(), @@ -209,7 +209,7 @@ test.describe("account public commitments", () => { const newAccount = await window.client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const accountId = newAccount.id(); @@ -289,7 +289,7 @@ test.describe("account public commitments", () => { const account = await window.client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const commitments = await window.client.getPublicKeyCommitmentsOfAccount( account.id() diff --git a/crates/web-client/test/account_reader.test.ts b/crates/web-client/test/account_reader.test.ts index 7cd66e97a5..e9b34c4024 100644 --- a/crates/web-client/test/account_reader.test.ts +++ b/crates/web-client/test/account_reader.test.ts @@ -11,7 +11,7 @@ test.describe("AccountReader tests", () => { const account = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const reader = client.accountReader(account.id()); diff --git a/crates/web-client/test/address.test.ts b/crates/web-client/test/address.test.ts index 8fc916a9b0..e7f65c5283 100644 --- a/crates/web-client/test/address.test.ts +++ b/crates/web-client/test/address.test.ts @@ -20,7 +20,7 @@ const instanceAddress = async ({ const newAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); _accountId = newAccount.id(); } @@ -38,7 +38,7 @@ const instanceNewAddressBech32 = async (page: Page, networkId: string) => { const newAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const address = window.Address.fromAccountId( newAccount.id(), @@ -65,7 +65,7 @@ const instanceAddressTestNoteTag = async (page: Page) => { const newAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const address = window.Address.fromAccountId( newAccount.id(), @@ -152,7 +152,7 @@ test.describe("Bech32 tests", () => { const newAccount = await window.client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const accountId = newAccount.id(); const asBech32 = accountId.toBech32( @@ -181,7 +181,7 @@ const instanceAddressRemoveThenInsert = async (page: Page) => { const newAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const accountId = newAccount.id().toString(); const address = window.Address.fromAccountId(newAccount.id(), null); diff --git a/crates/web-client/test/basic_fungible_faucet_component.test.ts b/crates/web-client/test/basic_fungible_faucet_component.test.ts index c5cb082fef..4ee2eac59b 100644 --- a/crates/web-client/test/basic_fungible_faucet_component.test.ts +++ b/crates/web-client/test/basic_fungible_faucet_component.test.ts @@ -20,7 +20,7 @@ export const getBasicFungibleFaucet = async ( tokenSymbol: string = "DAG", decimals: number = 8, maxSupply: bigint = BigInt(10000000), - authSchemeId: number = 0 + authSchemeId: number = 2 ): Promise => { return await page.evaluate( async ({ @@ -74,7 +74,7 @@ export const createWallet = async ( const account = await client.newWallet( window.AccountStorageMode.tryFromStr("PUBLIC"), false, - 0, + window.AuthScheme.AuthRpoFalcon512, undefined ); const basicFungibleFaucet = diff --git a/crates/web-client/test/fpi.test.ts b/crates/web-client/test/fpi.test.ts index d1ed3a12c8..32afc507d0 100644 --- a/crates/web-client/test/fpi.test.ts +++ b/crates/web-client/test/fpi.test.ts @@ -86,7 +86,7 @@ export const testStandardFpi = async (page: Page): Promise => { let newAccount = await client.newWallet( window.AccountStorageMode.public(), false, - 0 + window.AuthScheme.AuthRpoFalcon512 ); let txScript = ` diff --git a/crates/web-client/test/import.test.ts b/crates/web-client/test/import.test.ts index 4390335348..c519f9a5b2 100644 --- a/crates/web-client/test/import.test.ts +++ b/crates/web-client/test/import.test.ts @@ -58,7 +58,7 @@ test.describe("import from seed", () => { const mutable = false; const storageMode = StorageMode.PUBLIC; - const authSchemeId = 0; + const authSchemeId = 2; const initialWallet = await createNewWallet(page, { storageMode, @@ -116,7 +116,7 @@ test.describe("import public account by id", () => { const mutable = false; const storageMode = StorageMode.PUBLIC; - const authSchemeId = 0; + const authSchemeId = 2; const initialWallet = await createNewWallet(page, { storageMode, diff --git a/crates/web-client/test/import_export.test.ts b/crates/web-client/test/import_export.test.ts index a1521dcb74..4a058f35d7 100644 --- a/crates/web-client/test/import_export.test.ts +++ b/crates/web-client/test/import_export.test.ts @@ -86,7 +86,7 @@ test.describe("export and import account", () => { const mutable = false; const storageMode = StorageMode.PRIVATE; - const authSchemeId = 0; + const authSchemeId = 2; const initialWallet = await createNewWallet(page, { storageMode, @@ -241,12 +241,12 @@ test.describe("export and import note", () => { const account1 = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const account2 = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const p2IdNote = window.Note.createP2IDNote( diff --git a/crates/web-client/test/miden_array.test.ts b/crates/web-client/test/miden_array.test.ts index 049481c81d..b49dbf9f1b 100644 --- a/crates/web-client/test/miden_array.test.ts +++ b/crates/web-client/test/miden_array.test.ts @@ -80,7 +80,7 @@ const instanceAccountArrayFromAccounts = async ({ const account = await window.client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); accounts[i] = account.id(); } @@ -95,11 +95,15 @@ const mutateAccountIdArray = async ({ page, index }: { page: typeof Page }) => { const accountToSet = await window.client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const accounts = await Promise.all( Array.from({ length: 10 }, () => - window.client.newWallet(window.AccountStorageMode.private(), true) + window.client.newWallet( + window.AccountStorageMode.private(), + true, + window.AuthScheme.AuthRpoFalcon512 + ) ) ); const accountIds = accounts.map((account) => account.id()); @@ -125,7 +129,7 @@ const arrayReturnsClone = async ({ const account = await window.client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); accounts[i] = account.id(); } @@ -134,7 +138,7 @@ const arrayReturnsClone = async ({ cloned = await window.client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); let original = array.get(index); return cloned !== original; @@ -148,7 +152,7 @@ const arrayWithSingleAccount = async ({ page }: { page: typeof Page }) => { const account = await window.client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const array = new window.MidenArrays.AccountArray([]); diff --git a/crates/web-client/test/mockchain.test.ts b/crates/web-client/test/mockchain.test.ts index a43c0de1b0..d8d9e775b3 100644 --- a/crates/web-client/test/mockchain.test.ts +++ b/crates/web-client/test/mockchain.test.ts @@ -10,7 +10,7 @@ const mockChainTest = async (testingPage: Page) => { const account = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const faucetAccount = await client.newFaucet( window.AccountStorageMode.private(), @@ -18,7 +18,7 @@ const mockChainTest = async (testingPage: Page) => { "DAG", 8, BigInt(10000000), - 0 + window.AuthScheme.AuthRpoFalcon512 ); const mintTransactionRequest = await client.newMintTransactionRequest( diff --git a/crates/web-client/test/new_account.test.ts b/crates/web-client/test/new_account.test.ts index 0beb1cdbdb..7e92cbd0d9 100644 --- a/crates/web-client/test/new_account.test.ts +++ b/crates/web-client/test/new_account.test.ts @@ -16,7 +16,7 @@ test.describe("new_wallet tests", () => { description: "creates a new private, immutable wallet", storageMode: StorageMode.PRIVATE, mutable: false, - authSchemeId: 0, + authSchemeId: 2, expected: { isPublic: false, isPrivate: true, @@ -28,7 +28,7 @@ test.describe("new_wallet tests", () => { description: "creates a new public, immutable wallet", storageMode: StorageMode.PUBLIC, mutable: false, - authSchemeId: 0, + authSchemeId: 2, expected: { isPublic: true, isPrivate: false, @@ -40,7 +40,7 @@ test.describe("new_wallet tests", () => { description: "creates a new private, mutable wallet", storageMode: StorageMode.PRIVATE, mutable: true, - authSchemeId: 0, + authSchemeId: 2, expected: { isPublic: false, isPrivate: true, @@ -52,7 +52,7 @@ test.describe("new_wallet tests", () => { description: "creates a new public, mutable wallet", storageMode: StorageMode.PUBLIC, mutable: true, - authSchemeId: 0, + authSchemeId: 2, expected: { isPublic: true, isPrivate: false, @@ -67,7 +67,7 @@ test.describe("new_wallet tests", () => { const result = await createNewWallet(page, { storageMode, mutable, - authSchemeId: 0, + authSchemeId: 2, }); isValidAddress(result.id); @@ -102,7 +102,7 @@ test.describe("new_wallet tests", () => { await createNewWallet(page, { storageMode: StorageMode.PUBLIC, mutable: false, - authSchemeId: 0, + authSchemeId: 2, clientSeed: clientSeed1, isolatedClient: true, walletSeed: walletSeed, @@ -113,7 +113,7 @@ test.describe("new_wallet tests", () => { await createNewWallet(page, { storageMode: StorageMode.PUBLIC, mutable: false, - authSchemeId: 0, + authSchemeId: 2, clientSeed: clientSeed2, isolatedClient: true, walletSeed: walletSeed, @@ -133,7 +133,7 @@ test.describe("new_faucet tests", () => { tokenSymbol: "DAG", decimals: 8, maxSupply: BigInt(10000000), - authSchemeId: 0, + authSchemeId: 2, expected: { isPublic: false, isPrivate: true, @@ -150,7 +150,7 @@ test.describe("new_faucet tests", () => { tokenSymbol: "DAG", decimals: 8, maxSupply: BigInt(10000000), - authSchemeId: 0, + authSchemeId: 2, expected: { isPublic: true, isPrivate: false, @@ -214,7 +214,7 @@ test.describe("new_faucet tests", () => { "DAG", 8, BigInt(10000000), - 0 + 2 // AuthRpoFalcon512 ) ).rejects.toThrowError("Non-fungible faucets are not supported yet"); }); @@ -230,7 +230,7 @@ test.describe("new_faucet tests", () => { "INVALID_TOKEN", 8, BigInt(10000000), - 0 + 2 // AuthRpoFalcon512 ) ).rejects.toThrow( `token symbol should have length between 1 and 12 characters, but 13 was provided` @@ -255,7 +255,7 @@ test.describe("AccountStorage.getMapEntries tests", () => { const account = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); // Get the account to access its storage diff --git a/crates/web-client/test/new_transactions.test.ts b/crates/web-client/test/new_transactions.test.ts index dfb3ee21f1..ead914b293 100644 --- a/crates/web-client/test/new_transactions.test.ts +++ b/crates/web-client/test/new_transactions.test.ts @@ -296,7 +296,7 @@ export const customTransaction = async ( const walletAccount = await client.newWallet( window.AccountStorageMode.private(), false, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const faucetAccount = await client.newFaucet( window.AccountStorageMode.private(), @@ -304,7 +304,7 @@ export const customTransaction = async ( "DAG", 8, BigInt(10000000), - 0 + window.AuthScheme.AuthRpoFalcon512 ); await client.syncState(); @@ -525,7 +525,7 @@ const customTxWithMultipleNotes = async ( const targetAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const targetAccountId = targetAccount.id(); const senderAccountId = window.AccountId.fromHex(_senderAccountId); @@ -842,12 +842,12 @@ export const discardedTransaction = async ( const senderAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const targetAccount = await client.newWallet( window.AccountStorageMode.private(), - 0, - true + false, + window.AuthScheme.AuthRpoFalcon512 ); const faucetAccount = await client.newFaucet( window.AccountStorageMode.private(), @@ -855,7 +855,7 @@ export const discardedTransaction = async ( "DAG", 8, BigInt(10000000), - 0 + window.AuthScheme.AuthRpoFalcon512 ); await client.syncState(); @@ -1107,7 +1107,7 @@ export const counterAccountComponent = async ( const nativeAccount = await client.newWallet( window.AccountStorageMode.private(), false, - 0 + window.AuthScheme.AuthRpoFalcon512 ); await client.syncState(); @@ -1470,7 +1470,7 @@ test.describe("submitNewTransactionWithProver tests", () => { const targetAccount = await client.newWallet( window.AccountStorageMode.private(), false, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const faucetAccount = await client.newFaucet( @@ -1479,7 +1479,7 @@ test.describe("submitNewTransactionWithProver tests", () => { "DAG", 8, BigInt(10000000), - 0 + window.AuthScheme.AuthRpoFalcon512 ); await client.syncState(); @@ -1601,7 +1601,7 @@ test.describe("submitNewTransactionWithProver tests", () => { const senderAccount = await client.newWallet( window.AccountStorageMode.private(), false, - 0 + window.AuthScheme.AuthRpoFalcon512 ); await client.syncState(); diff --git a/crates/web-client/test/note_transport.test.ts b/crates/web-client/test/note_transport.test.ts index b58fe8802a..e990b7c76f 100644 --- a/crates/web-client/test/note_transport.test.ts +++ b/crates/web-client/test/note_transport.test.ts @@ -13,13 +13,13 @@ test("transport basic", async ({ page }) => { const senderAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0, + window.AuthScheme.AuthRpoFalcon512, senderSeed ); const recipientAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0, + window.AuthScheme.AuthRpoFalcon512, recipientSeed ); diff --git a/crates/web-client/test/remote_keystore.test.ts b/crates/web-client/test/remote_keystore.test.ts index a860e15ded..7dafd6cba1 100644 --- a/crates/web-client/test/remote_keystore.test.ts +++ b/crates/web-client/test/remote_keystore.test.ts @@ -54,7 +54,7 @@ test.describe("remote keystore", () => { await client.newWallet( window.AccountStorageMode.private(), true, - 0, + window.AuthScheme.AuthRpoFalcon512, undefined ); @@ -101,7 +101,7 @@ test.describe("remote keystore", () => { const wallet = await client.newWallet( window.AccountStorageMode.private(), true, - 0, + window.AuthScheme.AuthRpoFalcon512, undefined ); @@ -169,7 +169,8 @@ test.describe("remote keystore", () => { false, "DAG", 8, - BigInt(10000000) + BigInt(10000000), + window.AuthScheme.AuthRpoFalcon512 ); await client.syncState(); @@ -177,7 +178,7 @@ test.describe("remote keystore", () => { const wallet = await client.newWallet( window.AccountStorageMode.private(), true, - 0, + window.AuthScheme.AuthRpoFalcon512, undefined ); diff --git a/crates/web-client/test/store_isolation.test.ts b/crates/web-client/test/store_isolation.test.ts index 0935f27e02..cdc0861c19 100644 --- a/crates/web-client/test/store_isolation.test.ts +++ b/crates/web-client/test/store_isolation.test.ts @@ -32,7 +32,11 @@ test.describe("Store Isolation Tests", () => { const result = await page.evaluate(async () => { const client1 = window.client; - await client1.newWallet(window.AccountStorageMode.private(), true, 0); + await client1.newWallet( + window.AccountStorageMode.private(), + true, + window.AuthScheme.AuthRpoFalcon512 + ); const client2 = await window.WebClient.createClient( window.rpcUrl, @@ -76,7 +80,7 @@ test.describe("Store Isolation Tests", () => { const wallet = await client1.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const walletId = wallet.id().toString(); @@ -112,8 +116,16 @@ test.describe("Store Isolation Tests", () => { ); await client.syncState(); - await client.newWallet(window.AccountStorageMode.private(), true, 0); - await client.newWallet(window.AccountStorageMode.private(), true, 0); + await client.newWallet( + window.AccountStorageMode.private(), + true, + window.AuthScheme.AuthRpoFalcon512 + ); + await client.newWallet( + window.AccountStorageMode.private(), + true, + window.AuthScheme.AuthRpoFalcon512 + ); const databases = await window.indexedDB.databases(); const dbNames = databases.map((db) => db.name); @@ -151,9 +163,21 @@ test.describe("Store Isolation Tests", () => { await Promise.all([client1.syncState(), client2.syncState()]); await Promise.all([ - client1.newWallet(window.AccountStorageMode.private(), true, 0), - client1.newWallet(window.AccountStorageMode.private(), true, 0), - client2.newWallet(window.AccountStorageMode.private(), true, 0), + client1.newWallet( + window.AccountStorageMode.private(), + true, + window.AuthScheme.AuthRpoFalcon512 + ), + client1.newWallet( + window.AccountStorageMode.private(), + true, + window.AuthScheme.AuthRpoFalcon512 + ), + client2.newWallet( + window.AccountStorageMode.private(), + true, + window.AuthScheme.AuthRpoFalcon512 + ), ]); const [accounts1, accounts2] = await Promise.all([ @@ -191,23 +215,23 @@ test.describe("Store Isolation Tests", () => { const wallet1a = await client1.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const wallet1b = await client1.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const wallet1c = await client1.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const wallet2a = await client2.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const accounts1 = await client1.getAccounts(); diff --git a/crates/web-client/test/sync_lock.test.ts b/crates/web-client/test/sync_lock.test.ts index 0ce8532553..e9f704e69c 100644 --- a/crates/web-client/test/sync_lock.test.ts +++ b/crates/web-client/test/sync_lock.test.ts @@ -303,7 +303,7 @@ test.describe("Sync Lock Tests", () => { const wallet = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const walletId = wallet.id().toString(); @@ -749,7 +749,7 @@ test.describe("Sync Lock Timeout Race Condition", () => { const wallet = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const walletId = wallet.id().toString(); diff --git a/crates/web-client/test/tags.test.ts b/crates/web-client/test/tags.test.ts index eb3b6f23c7..4df09aa71f 100644 --- a/crates/web-client/test/tags.test.ts +++ b/crates/web-client/test/tags.test.ts @@ -83,14 +83,15 @@ test.describe("remove_tag tests", () => { const wallet = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const faucet = await client.newFaucet( window.AccountStorageMode.private(), false, "DAG", 8, - BigInt(10000000) + BigInt(10000000), + window.AuthScheme.AuthRpoFalcon512 ); // Mint a note (adds a tag with sourceNoteId for the output note) diff --git a/crates/web-client/test/transactions.test.ts b/crates/web-client/test/transactions.test.ts index fdcff755c1..3bf0a0732b 100644 --- a/crates/web-client/test/transactions.test.ts +++ b/crates/web-client/test/transactions.test.ts @@ -222,7 +222,7 @@ export const compileTxScript = async ( let walletAccount = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); let builder = client.createCodeBuilder(); diff --git a/crates/web-client/test/webClientTestUtils.ts b/crates/web-client/test/webClientTestUtils.ts index 907a51a4e0..3a1aa93457 100644 --- a/crates/web-client/test/webClientTestUtils.ts +++ b/crates/web-client/test/webClientTestUtils.ts @@ -561,6 +561,7 @@ export const createNewWallet = async ( { storageMode: storageMode, mutable: mutable, + authSchemeId: authSchemeId, _serializedClientSeed: serializedClientSeed, isolatedClient: isolatedClient, _serializedWalletSeed: serializedWalletSeed, @@ -575,7 +576,7 @@ export const createNewFaucet = async ( tokenSymbol: string = "DAG", decimals: number = 8, maxSupply: bigint = BigInt(10000000), - authSchemeId: number + authSchemeId: number = 2 ): Promise => { return await testingPage.evaluate( async ({ @@ -879,22 +880,22 @@ interface SetupWalletFaucetResult { } export const setupWalletAndFaucet = async ( - testingPage: Page, - authSchemeID: Number = 0 + testingPage: Page ): Promise => { return await testingPage.evaluate(async () => { const client = window.client; const account = await client.newWallet( window.AccountStorageMode.private(), true, - 0 + window.AuthScheme.AuthRpoFalcon512 ); const faucetAccount = await client.newFaucet( window.AccountStorageMode.private(), false, "DAG", 8, - BigInt(10000000) + BigInt(10000000), + window.AuthScheme.AuthRpoFalcon512 ); return { diff --git a/crates/web-client/yarn.lock b/crates/web-client/yarn.lock index 7ed42a49c1..54514e86f7 100644 --- a/crates/web-client/yarn.lock +++ b/crates/web-client/yarn.lock @@ -93,7 +93,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -195,7 +195,7 @@ dependencies: "@shikijs/types" "3.13.0" -"@shikijs/types@^3.13.0", "@shikijs/types@3.13.0": +"@shikijs/types@3.13.0", "@shikijs/types@^3.13.0": version "3.13.0" resolved "https://registry.npmjs.org/@shikijs/types/-/types-3.13.0.tgz" integrity sha512-oM9P+NCFri/mmQ8LoFGVfVyemm5Hi27330zuOBp0annwJdKH1kOLndw3zCtAVDehPLg9fKqoEx3Ht/wNZxolfw== @@ -463,11 +463,6 @@ binary-extensions@^2.0.0: resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== -binaryen@^121.0.0: - version "121.0.0" - resolved "https://registry.npmjs.org/binaryen/-/binaryen-121.0.0.tgz" - integrity sha512-St5LX+CmVdDQMf+DDHWdne7eDK+8tH9TE4Kc+Xk3s5+CzVYIKeJbWuXgsKVbkdLJXGUc2eflFqjThQy555mBag== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" @@ -633,16 +628,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + colorette@^1.1.0: version "1.4.0" resolved "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz" @@ -714,6 +709,13 @@ data-uri-to-buffer@^6.0.2: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz" integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== +debug@4, debug@^4.1.1, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6: + version "4.4.3" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -721,13 +723,6 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.1.1, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@4: - version "4.4.3" - resolved "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz" - integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== - dependencies: - ms "^2.1.3" - decamelize@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" @@ -761,7 +756,7 @@ degenerator@^5.0.0: escodegen "^2.1.0" esprima "^4.0.1" -devtools-protocol@*, devtools-protocol@0.0.1330662: +devtools-protocol@0.0.1330662: version "0.0.1330662" resolved "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1330662.tgz" integrity sha512-pzh6YQ8zZfz3iKlCvgzVCu22NdpZ8hNmwU6WnQjNVquh0A9iVosPtNLWDwaWVGyrntQlltPFztTMK5Cg6lfCuw== @@ -1007,16 +1002,16 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - fsevents@2.3.2: version "2.3.2" resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -1103,18 +1098,7 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3: - version "8.1.0" - resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -glob@^8.1.0: +glob@^8.0.3, glob@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -1550,14 +1534,7 @@ minimatch@^5.0.1, minimatch@^5.1.6: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.4: - version "9.0.5" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" - integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^9.0.5: +minimatch@^9.0.4, minimatch@^9.0.5: version "9.0.5" resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -1972,7 +1949,7 @@ rollup-plugin-copy@^3.5.0: globby "10.0.1" is-plain-object "^3.0.0" -rollup@^1.20.0||^2.0.0||^3.0.0||^4.0.0, rollup@^2.14.0||^3.0.0||^4.0.0, rollup@^2.68.0||^3.0.0||^4.0.0, rollup@^2.78.0||^3.0.0||^4.0.0, rollup@^3.27.2: +rollup@^3.27.2: version "3.29.4" resolved "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz" integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== @@ -1986,7 +1963,7 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@^5.1.0, safe-buffer@5.1.2: +safe-buffer@5.1.2, safe-buffer@^5.1.0: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -2249,7 +2226,7 @@ ts-node@^10.9.2: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tslib@*, tslib@^2.0.1: +tslib@^2.0.1: version "2.8.1" resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -2264,7 +2241,7 @@ typedoc-plugin-markdown@^4.8.1: resolved "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz" integrity sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw== -typedoc@^0.28.1, typedoc@0.28.x: +typedoc@^0.28.1: version "0.28.13" resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.28.13.tgz" integrity sha512-dNWY8msnYB2a+7Audha+aTF1Pu3euiE7ySp53w8kEsXoYw7dMouV5A1UsTUY345aB152RHnmRMDiovuBi7BD+w== @@ -2275,7 +2252,7 @@ typedoc@^0.28.1, typedoc@0.28.x: minimatch "^9.0.5" yaml "^2.8.1" -typescript@^5.5.4, typescript@>=2.7, typescript@>=3.7.0, typescript@>=4.9.5, "typescript@5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x": +typescript@^5.5.4: version "5.5.4" resolved "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz" integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== From f51d99198ba8bdfd8bc09cafec163e1ade94c203 Mon Sep 17 00:00:00 2001 From: Juan Munoz Date: Mon, 2 Mar 2026 16:36:05 -0300 Subject: [PATCH 4/7] fix: react-sdk changes --- crates/web-client/yarn.lock | 77 ++++++++++++------- .../web-client/enumerations/AuthScheme.md | 2 +- packages/react-sdk/src/index.ts | 2 +- packages/react-sdk/src/types/index.ts | 14 ++-- packages/react-sdk/src/utils/signerAccount.ts | 4 +- 5 files changed, 62 insertions(+), 37 deletions(-) diff --git a/crates/web-client/yarn.lock b/crates/web-client/yarn.lock index 54514e86f7..7ed42a49c1 100644 --- a/crates/web-client/yarn.lock +++ b/crates/web-client/yarn.lock @@ -93,7 +93,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -195,7 +195,7 @@ dependencies: "@shikijs/types" "3.13.0" -"@shikijs/types@3.13.0", "@shikijs/types@^3.13.0": +"@shikijs/types@^3.13.0", "@shikijs/types@3.13.0": version "3.13.0" resolved "https://registry.npmjs.org/@shikijs/types/-/types-3.13.0.tgz" integrity sha512-oM9P+NCFri/mmQ8LoFGVfVyemm5Hi27330zuOBp0annwJdKH1kOLndw3zCtAVDehPLg9fKqoEx3Ht/wNZxolfw== @@ -463,6 +463,11 @@ binary-extensions@^2.0.0: resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== +binaryen@^121.0.0: + version "121.0.0" + resolved "https://registry.npmjs.org/binaryen/-/binaryen-121.0.0.tgz" + integrity sha512-St5LX+CmVdDQMf+DDHWdne7eDK+8tH9TE4Kc+Xk3s5+CzVYIKeJbWuXgsKVbkdLJXGUc2eflFqjThQy555mBag== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" @@ -628,16 +633,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + colorette@^1.1.0: version "1.4.0" resolved "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz" @@ -709,13 +714,6 @@ data-uri-to-buffer@^6.0.2: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz" integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== -debug@4, debug@^4.1.1, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6: - version "4.4.3" - resolved "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz" - integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== - dependencies: - ms "^2.1.3" - debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -723,6 +721,13 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.1.1, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@4: + version "4.4.3" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + decamelize@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" @@ -756,7 +761,7 @@ degenerator@^5.0.0: escodegen "^2.1.0" esprima "^4.0.1" -devtools-protocol@0.0.1330662: +devtools-protocol@*, devtools-protocol@0.0.1330662: version "0.0.1330662" resolved "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1330662.tgz" integrity sha512-pzh6YQ8zZfz3iKlCvgzVCu22NdpZ8hNmwU6WnQjNVquh0A9iVosPtNLWDwaWVGyrntQlltPFztTMK5Cg6lfCuw== @@ -1002,16 +1007,16 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - fsevents@~2.3.2: version "2.3.3" resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== +fsevents@2.3.2: + version "2.3.2" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -1098,7 +1103,18 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3, glob@^8.1.0: +glob@^8.0.3: + version "8.1.0" + resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +glob@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -1534,7 +1550,14 @@ minimatch@^5.0.1, minimatch@^5.1.6: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.4, minimatch@^9.0.5: +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.5: version "9.0.5" resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -1949,7 +1972,7 @@ rollup-plugin-copy@^3.5.0: globby "10.0.1" is-plain-object "^3.0.0" -rollup@^3.27.2: +rollup@^1.20.0||^2.0.0||^3.0.0||^4.0.0, rollup@^2.14.0||^3.0.0||^4.0.0, rollup@^2.68.0||^3.0.0||^4.0.0, rollup@^2.78.0||^3.0.0||^4.0.0, rollup@^3.27.2: version "3.29.4" resolved "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz" integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== @@ -1963,7 +1986,7 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@5.1.2, safe-buffer@^5.1.0: +safe-buffer@^5.1.0, safe-buffer@5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -2226,7 +2249,7 @@ ts-node@^10.9.2: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tslib@^2.0.1: +tslib@*, tslib@^2.0.1: version "2.8.1" resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -2241,7 +2264,7 @@ typedoc-plugin-markdown@^4.8.1: resolved "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz" integrity sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw== -typedoc@^0.28.1: +typedoc@^0.28.1, typedoc@0.28.x: version "0.28.13" resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.28.13.tgz" integrity sha512-dNWY8msnYB2a+7Audha+aTF1Pu3euiE7ySp53w8kEsXoYw7dMouV5A1UsTUY345aB152RHnmRMDiovuBi7BD+w== @@ -2252,7 +2275,7 @@ typedoc@^0.28.1: minimatch "^9.0.5" yaml "^2.8.1" -typescript@^5.5.4: +typescript@^5.5.4, typescript@>=2.7, typescript@>=3.7.0, typescript@>=4.9.5, "typescript@5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x": version "5.5.4" resolved "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz" integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== diff --git a/docs/typedoc/web-client/enumerations/AuthScheme.md b/docs/typedoc/web-client/enumerations/AuthScheme.md index 2ed65ef6a7..a420a85d79 100644 --- a/docs/typedoc/web-client/enumerations/AuthScheme.md +++ b/docs/typedoc/web-client/enumerations/AuthScheme.md @@ -18,4 +18,4 @@ Authentication schemes supported by the web client. ### AuthRpoFalcon512 -> **AuthRpoFalcon512**: `0` +> **AuthRpoFalcon512**: `2` diff --git a/packages/react-sdk/src/index.ts b/packages/react-sdk/src/index.ts index c0f4c72f44..f2e8d44855 100644 --- a/packages/react-sdk/src/index.ts +++ b/packages/react-sdk/src/index.ts @@ -98,7 +98,7 @@ export type { } from "./types"; // Default configuration values -export { DEFAULTS } from "./types"; +export { DEFAULTS, AuthScheme } from "./types"; // Utilities export { toBech32AccountId } from "./utils/accountBech32"; diff --git a/packages/react-sdk/src/types/index.ts b/packages/react-sdk/src/types/index.ts index c7ee6c0304..d1f805c80e 100644 --- a/packages/react-sdk/src/types/index.ts +++ b/packages/react-sdk/src/types/index.ts @@ -1,3 +1,4 @@ +import { AuthScheme } from "@miden-sdk/miden-sdk"; import type { WebClient, Account, @@ -15,6 +16,7 @@ import type { } from "@miden-sdk/miden-sdk"; // Re-export SDK types for convenience +export { AuthScheme }; export type { WebClient, Account, @@ -212,8 +214,8 @@ export interface CreateWalletOptions { storageMode?: "private" | "public" | "network"; /** Whether code can be updated. Default: true */ mutable?: boolean; - /** Auth scheme: 0 = RpoFalcon512, 1 = EcdsaK256Keccak. Default: 0 */ - authScheme?: 0 | 1; + /** Auth scheme. Default: AuthScheme.AuthRpoFalcon512 */ + authScheme?: AuthScheme; /** Initial seed for deterministic account ID */ initSeed?: Uint8Array; } @@ -228,8 +230,8 @@ export interface CreateFaucetOptions { maxSupply: bigint; /** Storage mode. Default: private */ storageMode?: "private" | "public" | "network"; - /** Auth scheme: 0 = RpoFalcon512, 1 = EcdsaK256Keccak. Default: 0 */ - authScheme?: 0 | 1; + /** Auth scheme. Default: AuthScheme.AuthRpoFalcon512 */ + authScheme?: AuthScheme; } // Account import options @@ -246,7 +248,7 @@ export type ImportAccountOptions = type: "seed"; seed: Uint8Array; mutable?: boolean; - authScheme?: 0 | 1; + authScheme?: AuthScheme; }; // Send options @@ -394,7 +396,7 @@ export const DEFAULTS = { AUTO_SYNC_INTERVAL: 15000, STORAGE_MODE: "private" as const, WALLET_MUTABLE: true, - AUTH_SCHEME: 0 as const, + AUTH_SCHEME: AuthScheme.AuthRpoFalcon512, NOTE_TYPE: "private" as const, FAUCET_DECIMALS: 8, } as const; diff --git a/packages/react-sdk/src/utils/signerAccount.ts b/packages/react-sdk/src/utils/signerAccount.ts index ea760c1e7d..478f791cd0 100644 --- a/packages/react-sdk/src/utils/signerAccount.ts +++ b/packages/react-sdk/src/utils/signerAccount.ts @@ -56,7 +56,7 @@ export async function initializeSignerAccount( client: WebClient, config: SignerAccountConfig ): Promise { - const { AccountBuilder, AccountComponent, Word } = + const { AccountBuilder, AccountComponent, AuthScheme, Word } = await import("@miden-sdk/miden-sdk"); // Sync first to get latest state @@ -74,7 +74,7 @@ export async function initializeSignerAccount( .withAuthComponent( AccountComponent.createAuthComponentFromCommitment( commitmentWord, - 1 // ECDSA auth scheme (K256/Keccak) + AuthScheme.AuthEcdsaK256Keccak ) ) .accountType(accountType) From a28bddda171f8868b62713735c62f01430f8e278 Mon Sep 17 00:00:00 2001 From: Juan Munoz Date: Mon, 2 Mar 2026 17:03:25 -0300 Subject: [PATCH 5/7] ci: fix --- crates/rust-client/src/rpc/domain/account.rs | 3 +-- .../react-sdk/src/__tests__/hooks/useImportAccount.test.tsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/rust-client/src/rpc/domain/account.rs b/crates/rust-client/src/rpc/domain/account.rs index ab55445236..8674a35ba2 100644 --- a/crates/rust-client/src/rpc/domain/account.rs +++ b/crates/rust-client/src/rpc/domain/account.rs @@ -671,8 +671,7 @@ impl From for Vec Vec { - use account_detail_request; - use account_detail_request::storage_map_detail_request; + use account_detail_request::{self, storage_map_detail_request}; let request_map = value.0; let mut requests = Vec::with_capacity(request_map.len()); for (slot_name, _map_keys) in request_map { diff --git a/packages/react-sdk/src/__tests__/hooks/useImportAccount.test.tsx b/packages/react-sdk/src/__tests__/hooks/useImportAccount.test.tsx index f123adbc29..1608e41f07 100644 --- a/packages/react-sdk/src/__tests__/hooks/useImportAccount.test.tsx +++ b/packages/react-sdk/src/__tests__/hooks/useImportAccount.test.tsx @@ -169,7 +169,7 @@ describe("useImportAccount", () => { type: "seed", seed: new Uint8Array([1, 2, 3]), mutable: true, - authScheme: 0, + authScheme: 2, }); }); From 5884990d5045601fe744bbb33b7e51d16a12a82d Mon Sep 17 00:00:00 2001 From: Juan Munoz Date: Mon, 2 Mar 2026 17:24:27 -0300 Subject: [PATCH 6/7] fix: react-sdk-tests --- .../react-sdk/src/__tests__/hooks/useCreateFaucet.test.tsx | 4 ++-- .../react-sdk/src/__tests__/hooks/useCreateWallet.test.tsx | 2 +- packages/react-sdk/src/__tests__/setup.ts | 4 ++++ packages/react-sdk/src/__tests__/utils/signerAccount.test.ts | 4 ++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/react-sdk/src/__tests__/hooks/useCreateFaucet.test.tsx b/packages/react-sdk/src/__tests__/hooks/useCreateFaucet.test.tsx index d4ab5519f8..60d0095884 100644 --- a/packages/react-sdk/src/__tests__/hooks/useCreateFaucet.test.tsx +++ b/packages/react-sdk/src/__tests__/hooks/useCreateFaucet.test.tsx @@ -90,7 +90,7 @@ describe("useCreateFaucet", () => { "TEST", 8, // decimals (default) 1000000n, - 0 // authScheme (default: Falcon) + 2 // authScheme (default: AuthRpoFalcon512) ); }); @@ -367,7 +367,7 @@ describe("useCreateFaucet", () => { "BIG", 8, largeSupply, - 0 + 2 ); }); }); diff --git a/packages/react-sdk/src/__tests__/hooks/useCreateWallet.test.tsx b/packages/react-sdk/src/__tests__/hooks/useCreateWallet.test.tsx index c36b6b208c..635eb207a7 100644 --- a/packages/react-sdk/src/__tests__/hooks/useCreateWallet.test.tsx +++ b/packages/react-sdk/src/__tests__/hooks/useCreateWallet.test.tsx @@ -81,7 +81,7 @@ describe("useCreateWallet", () => { expect(mockClient.newWallet).toHaveBeenCalledWith( expect.anything(), // storageMode.private() true, // mutable (default) - 0, // authScheme (default: Falcon) + 2, // authScheme (default: AuthRpoFalcon512) undefined // initSeed ); }); diff --git a/packages/react-sdk/src/__tests__/setup.ts b/packages/react-sdk/src/__tests__/setup.ts index 7c23db4d8a..05c05a7692 100644 --- a/packages/react-sdk/src/__tests__/setup.ts +++ b/packages/react-sdk/src/__tests__/setup.ts @@ -73,6 +73,10 @@ vi.mock("@miden-sdk/miden-sdk", () => { return { WebClient, + AuthScheme: { + AuthRpoFalcon512: 2, + AuthEcdsaK256Keccak: 1, + }, AccountId: { fromHex: vi.fn((hex: string) => createMockAccountId(hex)), fromBech32: vi.fn((bech32: string) => createMockAccountId(bech32)), diff --git a/packages/react-sdk/src/__tests__/utils/signerAccount.test.ts b/packages/react-sdk/src/__tests__/utils/signerAccount.test.ts index 2378ad3305..5eb25bba7d 100644 --- a/packages/react-sdk/src/__tests__/utils/signerAccount.test.ts +++ b/packages/react-sdk/src/__tests__/utils/signerAccount.test.ts @@ -37,6 +37,10 @@ vi.mock("@miden-sdk/miden-sdk", async () => { AccountComponent: { createAuthComponentFromCommitment: vi.fn(() => "mockAuthComponent"), }, + AuthScheme: { + AuthRpoFalcon512: 2, + AuthEcdsaK256Keccak: 1, + }, Word: { deserialize: vi.fn(() => mockCommitmentWord), }, From 7ae2e296a80946fbcd463191d0dcfa7f44c817c5 Mon Sep 17 00:00:00 2001 From: Juan Munoz Date: Mon, 2 Mar 2026 18:34:02 -0300 Subject: [PATCH 7/7] fix: react-sdk integration tests --- crates/rust-client/src/sync/state_sync.rs | 4 ++-- packages/react-sdk/test/mockchain.test.ts | 18 +++++++++--------- packages/react-sdk/test/test-app/app.js | 7 ++++--- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/crates/rust-client/src/sync/state_sync.rs b/crates/rust-client/src/sync/state_sync.rs index f6749d8e38..7d95e86705 100644 --- a/crates/rust-client/src/sync/state_sync.rs +++ b/crates/rust-client/src/sync/state_sync.rs @@ -301,7 +301,7 @@ impl StateSync { .sync_transactions(current_block_num, Some(target_block), account_ids.to_vec()) .await?; - let account_updates = derive_account_commitment_updates(&tx_info.transaction_records); + let account_updates = derive_latest_commitments(&tx_info.transaction_records); let tx_inclusions = tx_info .transaction_records @@ -544,7 +544,7 @@ impl StateSync { /// For each unique account, takes the `final_state_commitment` from the transaction with the /// highest `block_num`. This replicates the old `SyncState` behavior where the node returned /// the latest account commitment per account in the synced range. -fn derive_account_commitment_updates( +fn derive_latest_commitments( transaction_records: &[rpc_tx::TransactionRecord], ) -> Vec<(AccountId, Word)> { let mut latest_by_account: BTreeMap = BTreeMap::new(); diff --git a/packages/react-sdk/test/mockchain.test.ts b/packages/react-sdk/test/mockchain.test.ts index 85c0dac106..63ec677c20 100644 --- a/packages/react-sdk/test/mockchain.test.ts +++ b/packages/react-sdk/test/mockchain.test.ts @@ -119,7 +119,7 @@ test.describe("MockWebClient Integration", () => { const wallet = await client.newWallet( (window as any).AccountStorageMode.private(), true, - 0 + (window as any).AuthScheme.AuthRpoFalcon512 ); return { @@ -149,7 +149,7 @@ test.describe("MockWebClient Integration", () => { "TEST", 8, BigInt(1000000), - 0 + (window as any).AuthScheme.AuthRpoFalcon512 ); return { @@ -177,7 +177,7 @@ test.describe("MockWebClient Integration", () => { await client.newWallet( (window as any).AccountStorageMode.private(), true, - 0 + (window as any).AuthScheme.AuthRpoFalcon512 ); // List accounts @@ -209,7 +209,7 @@ test.describe("MockWebClient Integration", () => { const wallet = await client.newWallet( (window as any).AccountStorageMode.private(), true, - 0 + (window as any).AuthScheme.AuthRpoFalcon512 ); const faucet = await client.newFaucet( (window as any).AccountStorageMode.private(), @@ -217,7 +217,7 @@ test.describe("MockWebClient Integration", () => { "TOKEN", 8, BigInt(10000000), - 0 + (window as any).AuthScheme.AuthRpoFalcon512 ); // Mint tokens @@ -287,12 +287,12 @@ test.describe("MockWebClient Integration", () => { const sender = await client.newWallet( (window as any).AccountStorageMode.private(), true, - 0 + (window as any).AuthScheme.AuthRpoFalcon512 ); const receiver = await client.newWallet( (window as any).AccountStorageMode.private(), true, - 0 + (window as any).AuthScheme.AuthRpoFalcon512 ); const faucet = await client.newFaucet( (window as any).AccountStorageMode.private(), @@ -300,7 +300,7 @@ test.describe("MockWebClient Integration", () => { "SEND", 8, BigInt(10000000), - 0 + (window as any).AuthScheme.AuthRpoFalcon512 ); // Mint tokens to sender @@ -403,7 +403,7 @@ test.describe("MockWebClient Integration", () => { await client.newWallet( (window as any).AccountStorageMode.private(), true, - 0 + (window as any).AuthScheme.AuthRpoFalcon512 ); // Second sync diff --git a/packages/react-sdk/test/test-app/app.js b/packages/react-sdk/test/test-app/app.js index f5b36f725a..431e5332da 100644 --- a/packages/react-sdk/test/test-app/app.js +++ b/packages/react-sdk/test/test-app/app.js @@ -10,6 +10,7 @@ import { WebClient, MockWebClient, AccountStorageMode, + AuthScheme, NoteType, } from "@miden-sdk/miden-sdk"; @@ -113,7 +114,7 @@ const TestHarness = () => { const wallet = await readyClient.newWallet( AccountStorageMode.private(), true, - 0 + AuthScheme.AuthRpoFalcon512 ); const faucet = await readyClient.newFaucet( AccountStorageMode.private(), @@ -121,7 +122,7 @@ const TestHarness = () => { "TEST", 8, BigInt(1000000), - 0 + AuthScheme.AuthRpoFalcon512 ); const request = readyClient.newMintTransactionRequest( @@ -143,7 +144,7 @@ const TestHarness = () => { const wallet = await readyClient.newWallet( AccountStorageMode.private(), true, - 0 + AuthScheme.AuthRpoFalcon512 ); const accountFile = await readyClient.exportAccountFile(wallet.id()); const imported = await importAccount({