diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 00000000..a24d9bde --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,63 @@ +{ + "permissions": { + "allow": [ + "Skill(code-review:code-review)", + "WebFetch(domain:github.com)", + "WebFetch(domain:patch-diff.githubusercontent.com)", + "Bash(curl:*)", + "Bash(git show-branch:*)", + "Bash(git log:*)", + "WebFetch(domain:raw.githubusercontent.com)", + "WebFetch(domain:api.github.com)", + "Bash(cargo build:*)", + "Bash(cargo clippy:*)", + "Bash(~/Personal/get-project-identity.sh)", + "Bash(cargo doc:*)", + "Bash(find:*)", + "Bash(make lint:*)", + "Bash(cargo check:*)", + "Bash(make test:*)", + "Bash(cargo test:*)", + "Bash(gh pr list:*)", + "Bash(gh pr view:*)", + "Bash(gh api:*)", + "Bash(/Users/tomas/Lambda/miden-faucet/target/release/miden-faucet:*)", + "Bash(git fetch:*)", + "Bash(git checkout:*)", + "Bash(xargs curl -s)", + "Bash(gh pr checks:*)", + "Bash(cargo tree:*)", + "Bash(/tmp/entrypoint_analysis.txt << 'EOF'\nENTRYPOINT SCRIPT ANALYSIS:\n\nThe script does:\n1. Line 20: WORK_DIR=\"${STORE_DIR}\" - sets work dir based on store path\n2. Line 43: cd \"${WORK_DIR}\" || exit 1 - changes to that directory for init\n3. Line 49: cd \"${WORK_DIR}\" || exit 1 - changes to that directory for the command\n\nKEY ISSUE:\nWhen a user passes relative paths in command arguments \\(like \"$@\" on line 50\\),\nthose relative paths will be interpreted relative to WORK_DIR, NOT the original\nworking directory.\n\nEXAMPLE SCENARIO:\n- Container started from /data directory\n- User runs: docker run ... miden-faucet init --import ./account.mac\n- STORE_DIR becomes /data \\(from MIDEN_FAUCET_STORE env var\\)\n- Script does cd \"${STORE_DIR}\" = cd /data\n- Then runs: miden-faucet init --import ./account.mac\n- Now ./account.mac is interpreted as /data/./account.mac \\(OK if account is there\\)\n- But if account is in /data/../somewhere/account.mac, it will fail\n\nBROADER ISSUE:\nThe script changes working directory before executing user commands.\nThis means user-provided relative paths will be interpreted relative to STORE_DIR,\nnot relative to the original working directory or container entrypoint directory.\n\nThis affects:\n- Line 38: MIDEN_FAUCET_IMPORT_ACCOUNT_PATH \\(passed to init command\\)\n- Line 50: Any argument passed to miden-faucet command \\(the \"$@\"\\)\n\nFor INIT specifically:\n- Line 43: The cd is fine here because --import path needs to be relative\n to where keystore will be created anyway\n\nFor the final command execution:\n- Line 49-50: Any relative paths in \"$@\" will be relative to WORK_DIR\nEOF)", + "Bash(git ls-tree:*)", + "WebFetch(domain:docs.rs)", + "Bash(/tmp/detailed_analysis.txt << 'EOF'\nDETAILED ISSUE ASSESSMENT:\n\nFrom the entrypoint.sh code \\(lines 33-50\\):\n\nLine 33-38: For MIDEN_FAUCET_IMPORT_ACCOUNT_PATH:\n - This env var is only used during auto-init \\(if store file doesn't exist\\)\n - It's passed to \"miden-faucet init --import ${MIDEN_FAUCET_IMPORT_ACCOUNT_PATH}\"\n - The cd happens BEFORE this init command \\(line 43\\)\n - So the relative path interpretation IS affected by the cd\n\nLine 49-50: For the main command execution:\n - exec miden-faucet \"$@\"\n - This happens after cd \"${WORK_DIR}\"\n - So any relative paths in the user's command arguments will be relative to WORK_DIR\n\nREAL-WORLD IMPACT:\n\nCase 1: User passes relative path via env var during init\n- Export: MIDEN_FAUCET_IMPORT_ACCOUNT_PATH=account.mac\n- Script does cd to STORE_DIR\n- Then tries to read account.mac from STORE_DIR directory\n- This would fail if account.mac is not in the STORE_DIR\n\nCase 2: User manually calls init with --import\n- docker run ... miden-faucet init --import ./account.mac\n- Script changes to WORK_DIR\n- Command looks for ./account.mac relative to WORK_DIR, not /\n\nCase 3: Other commands \\(not init\\)\n- The entrypoint defaults to \"start\" \\(line 11\\)\n- The start command doesn't typically take file paths as arguments\n- So this is less likely to cause issues in practice\n\nSEVERITY ASSESSMENT:\n- The issue is REAL but context-dependent\n- It affects --import path handling during init\n- It could affect other subcommands if they take relative file paths\n- The script doesn't document this behavior\n- Users might reasonably expect relative paths to be relative to their working dir\n\nHOWEVER:\n- For the \"start\" command \\(default\\), relative paths aren't typically used\n- For the \"init\" command, the current behavior might be intentional\n \\(to keep keystore and account in same directory\\)\n- The issue would manifest when mounting volumes with relative paths\n or when account files are in different locations than STORE_DIR\nEOF)", + "Bash(/tmp/final_assessment.txt << 'EOF'\nFINAL ASSESSMENT OF THE ISSUE:\n\nThe code comment says: \"Run init from store directory \\(where keystore will be created\\)\"\n\nThis indicates the cd is INTENTIONAL - the design is to:\n1. Change to the store directory\n2. Run init from there \\(so keystore gets created in the right place\\)\n3. Keep the same working directory for the final command execution\n\nPROBLEM IDENTIFICATION:\n\nThe issue raised is valid from one perspective:\n- When users pass relative paths in arguments \\(like --import ./account.mac\\),\n those paths are now interpreted relative to STORE_DIR instead of the \n original container working directory\n\nHowever, this might be intentional design because:\n1. The keystore is created relative to the current working directory\n2. Keeping files in the same directory \\(store + keystore\\) is sensible\n3. The comment explicitly documents this behavior\n\nPRACTICAL IMPACT:\n\nThe real issue surfaces when:\n- A user mounts a volume with account files\n- They pass relative paths expecting them to be relative to the mounted volume root\n- But the script changes to STORE_DIR first\n- So relative paths get interpreted relative to STORE_DIR instead\n\nExample:\n- Volume mounted at /mnt/config\n- MIDEN_FAUCET_STORE=/mnt/config/store.db\n- MIDEN_FAUCET_IMPORT_ACCOUNT_PATH=./account.mac \\(intended to be /mnt/config/account.mac\\)\n- Script does cd /mnt/config \\(STORE_DIR is parent directory of store.db\\)\n- Then runs miden-faucet init --import ./account.mac\n- This looks for /mnt/config/./account.mac \\(which works!\\)\n\nActually, re-reading the code:\n- Line 20: WORK_DIR=\"${STORE_DIR}\" where STORE_DIR=\"$\\(dirname \"${MIDEN_FAUCET_STORE}\"\\)\"\n- So WORK_DIR is the PARENT directory of the store file\n- This means relative paths are relative to the store's parent directory\n\nVERDICT:\n- The issue is VALID but narrow in scope\n- It affects cases where users expect relative paths to be relative to container root\n- But the design \\(running from store directory\\) is documented\n- This is more of a design question than a bug\n- Impact is limited because the default \"start\" command rarely uses file paths\n- For \"init\", the behavior might actually be desired \\(keeping files together\\)\n\nREALISTIC SCENARIOS WHERE THIS BREAKS:\n1. User runs: docker run -v /my/account:/mnt/account miden-faucet init --import /mnt/account/account.mac\n - This works fine \\(absolute path\\)\n2. User runs: docker run -v /my/account:/mnt/account miden-faucet init --import ./account.mac\n - This fails because ./ is relative to STORE_DIR, not /mnt/account\n - User would need to know the relationship between STORE_DIR and mounted volume\n\nThe issue is real but requires specific circumstances to manifest.\nEOF)", + "Bash(ls:*)", + "Bash(test:*)", + "Bash(gh issue view:*)", + "WebSearch", + "Bash(git ls-remote:*)", + "Bash(rm:*)", + "Bash(grep:*)", + "Bash(cargo search:*)", + "Bash(cargo info:*)", + "Bash(for d in /Users/tomas/Lambda/miden-faucet/target/debug/build/miden-client-*/out/)", + "Bash(do echo \"=== $d ===\")", + "Read(//Users/tomas/Lambda/miden-faucet/**)", + "Bash(done)", + "Bash(make check:*)", + "Bash(git:*)", + "Bash(gh pr:*)", + "Bash(2)", + "Read(//Users/tomas/.cargo/git/checkouts/**)", + "Bash(cargo nextest:*)", + "Bash(cargo clean:*)", + "Bash(cargo update:*)", + "Bash(sort -t/ -k3 -V)", + "Bash(gh run:*)", + "Bash(make tests:*)", + "Bash(cargo metadata:*)", + "Bash(python3 -c \" import json, sys meta = json.load\\(sys.stdin\\) for pkg in meta['packages']: if 'miden-node-proto' in pkg['name']: print\\(pkg['name'], pkg['version'], pkg['manifest_path']\\) \")" + ] + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index d808e153..567297c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 0.15.0 (TBD) + +- Reimplemented the transaction script in Rust using the miden-compiler ([#204](https://github.com/0xMiden/faucet/pull/204)). +- Added `note_transport_url` field to the `/get_metadata` endpoint response ([#243](https://github.com/0xMiden/faucet/pull/243)). + +## 0.14.3 (2026-04-29) + +- Updated miden-client dependency to v0.14.5 ([#244](https://github.com/0xMiden/faucet/pull/244)). +- Improved mint failure observability: each step inside `submit_new_transaction` now records its own error, `apply_transaction` is instrumented as a sibling span, and `RpcError` propagations record structured `grpc.endpoint`/`grpc.code`/`grpc.endpoint_error` fields on the parent span ([#245](https://github.com/0xMiden/faucet/pull/245)). + +## 0.14.2 (2026-04-21) + +- Fixed faucet state sync to request storage map details for tracked public accounts ([#241](https://github.com/0xMiden/faucet/pull/241)). + +## 0.14.1 (2026-04-16) + +- Updated miden-client dependency to v0.14.3 ([#239](https://github.com/0xMiden/faucet/pull/239)). + ## 0.14.0 (2026-04-08) - [BREAKING] Removed `--api-key` param from the `start` command, API keys are now persisted in the store and automatically loaded on startup. ([#225](https://github.com/0xMiden/miden-faucet/pull/225)). diff --git a/Cargo.lock b/Cargo.lock index acc16877..c64ecf3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,13 +2,39 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "cpp_demangle", + "fallible-iterator", + "gimli 0.31.1", + "memmap2", + "object 0.36.7", + "rustc-demangle", + "smallvec", + "typed-arena", +] + [[package]] name = "addr2line" version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ - "gimli", + "gimli 0.32.3", ] [[package]] @@ -42,6 +68,12 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "allocator-api2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c880a97d28a3681c0267bd29cff89621202715b065127cd445fa0f0fe0aa2880" + [[package]] name = "alloy-primitives" version = "1.5.7" @@ -126,6 +158,21 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse 0.2.7", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + [[package]] name = "anstream" version = "1.0.0" @@ -133,7 +180,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", - "anstyle-parse", + "anstyle-parse 1.0.0", "anstyle-query", "anstyle-wincon", "colorchoice", @@ -147,6 +194,15 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + [[package]] name = "anstyle-parse" version = "1.0.0" @@ -182,6 +238,12 @@ version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" +[[package]] +name = "anymap2" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c" + [[package]] name = "arrayref" version = "0.3.9" @@ -348,11 +410,11 @@ version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ - "addr2line", + "addr2line 0.25.1", "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.37.3", "rustc-demangle", "windows-link", ] @@ -426,6 +488,27 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "blake3" version = "1.8.4" @@ -440,6 +523,15 @@ dependencies = [ "cpufeatures 0.3.0", ] +[[package]] +name = "blink-alloc" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce4c15bad517bc0fb4a44523adf470e2c3eb3a365769327acdba849948ea3705" +dependencies = [ + "allocator-api2 0.4.0", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -449,6 +541,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bstr" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" +dependencies = [ + "memchr", +] + [[package]] name = "build-rs" version = "0.3.3" @@ -482,6 +583,70 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +[[package]] +name = "camino" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-miden" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30f09004aa4b92f7a56924a76aae792f4adcae3adcac46ac384e73cea3827694" +dependencies = [ + "anyhow", + "cargo_metadata", + "clap", + "liquid", + "log", + "midenc-compile", + "midenc-log", + "midenc-session", + "path-absolutize", + "semver 1.0.28", + "serde", + "serde_json", + "tempfile", + "toml_edit 0.23.10+spec-1.0.0", + "walkdir", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.28", + "serde", + "serde_json", + "thiserror 2.0.18", +] + +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" version = "1.2.59" @@ -576,10 +741,11 @@ version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ - "anstream", + "anstream 1.0.0", "anstyle", "clap_lex", "strsim", + "terminal_size", ] [[package]] @@ -636,6 +802,20 @@ dependencies = [ "unicode-width 0.2.2", ] +[[package]] +name = "compact_str" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb1325a1cece981e8a296ab8f0f9b63ae357bd0784a9faaf548cc7b480707a" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + [[package]] name = "compression-codecs" version = "0.4.37" @@ -732,6 +912,15 @@ dependencies = [ "libm", ] +[[package]] +name = "cpp_demangle" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2bb79cb74d735044c972aae58ed0aaa9a837e85b01106a54c39e42e97f62253" +dependencies = [ + "cfg-if", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -750,6 +939,21 @@ dependencies = [ "libc", ] +[[package]] +name = "cranelift-bitset" +version = "0.120.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db7b2ee9eec6ca8a716d900d5264d678fb2c290c58c46c8da7f94ee268175d17" + +[[package]] +name = "cranelift-entity" +version = "0.120.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75418674520cb400c8772bfd6e11a62736c78fc1b6e418195696841d1bf91f1" +dependencies = [ + "cranelift-bitset", +] + [[package]] name = "crc32fast" version = "1.5.0" @@ -863,6 +1067,40 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.117", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.117", +] + [[package]] name = "dashmap" version = "6.1.0" @@ -1103,7 +1341,7 @@ version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" dependencies = [ - "anstream", + "anstream 1.0.0", "anstyle", "env_filter", "jiff", @@ -1318,6 +1556,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" version = "0.3.32" @@ -1480,6 +1724,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + [[package]] name = "gimli" version = "0.32.3" @@ -1569,6 +1823,8 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ + "allocator-api2 0.2.21", + "equivalent", "foldhash 0.1.5", ] @@ -1578,11 +1834,17 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ - "allocator-api2", + "allocator-api2 0.2.21", "equivalent", "foldhash 0.2.0", ] +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + [[package]] name = "hashlink" version = "0.10.0" @@ -1774,7 +2036,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.3", "tokio", "tower-service", "tracing", @@ -1966,6 +2228,12 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.1.0" @@ -1987,6 +2255,20 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "im-rc" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1955a75fa080c677d3972822ec4bad316169ab1cfc6c257a942c2265dbe5fe" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro 0.6.0", + "sized-chunks", + "typenum", + "version_check", +] + [[package]] name = "indenter" version = "0.3.4" @@ -1995,12 +2277,12 @@ checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" [[package]] name = "indexmap" -version = "2.13.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a8a2b9cb3e0b0c1803dbb0758ffac5de2f425b23c28f518faabd9d805342ff" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.17.0", "serde", "serde_core", ] @@ -2020,6 +2302,24 @@ dependencies = [ "generic-array", ] +[[package]] +name = "intrusive-collections" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "189d0897e4cbe8c75efedf3502c18c887b05046e59d28404d4d8e46cbc4d1e86" +dependencies = [ + "memoffset", +] + +[[package]] +name = "inventory" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4f0c30c76f2f4ccee3fe55a2435f691ca00c0e4bd87abe4f4a851b1d4dac39b" +dependencies = [ + "rustversion", +] + [[package]] name = "ipnet" version = "2.12.0" @@ -2176,6 +2476,16 @@ dependencies = [ "cpufeatures 0.2.17", ] +[[package]] +name = "kstring" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558bf9508a558512042d3095138b1f7b8fe90c5467d94f9f1da28b3731c5dbd1" +dependencies = [ + "serde", + "static_assertions", +] + [[package]] name = "lalrpop" version = "0.22.2" @@ -2203,6 +2513,7 @@ version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5baa5e9ff84f1aefd264e6869907646538a52147a755d494517a8007fb48733" dependencies = [ + "regex-automata", "rustversion", ] @@ -2257,60 +2568,189 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] -name = "litemap" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" - -[[package]] -name = "litemap" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" - -[[package]] -name = "litrs" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" - -[[package]] -name = "lock_api" -version = "0.4.14" +name = "liquid" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +checksum = "2a494c3f9dad3cb7ed16f1c51812cbe4b29493d6c2e5cd1e2b87477263d9534d" dependencies = [ - "scopeguard", + "liquid-core", + "liquid-derive", + "liquid-lib", + "serde", ] [[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "logos" -version = "0.15.1" +name = "liquid-core" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154" +checksum = "fc623edee8a618b4543e8e8505584f4847a4e51b805db1af6d9af0a3395d0d57" dependencies = [ - "logos-derive", + "anymap2", + "itertools", + "kstring", + "liquid-derive", + "pest", + "pest_derive", + "regex", + "serde", + "time", ] [[package]] -name = "logos-codegen" -version = "0.15.1" +name = "liquid-derive" +version = "0.26.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c" +checksum = "de66c928222984aea59fcaed8ba627f388aaac3c1f57dcb05cc25495ef8faefe" dependencies = [ - "beef", - "fnv", - "lazy_static", "proc-macro2", "quote", - "regex-syntax", - "rustc_version 0.4.1", + "syn 2.0.117", +] + +[[package]] +name = "liquid-lib" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9befeedd61f5995bc128c571db65300aeb50d62e4f0542c88282dbcb5f72372a" +dependencies = [ + "itertools", + "liquid-core", + "percent-encoding", + "regex", + "time", + "unicode-segmentation", +] + +[[package]] +name = "litcheck-core" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d04c87eac46e722dea009607dbf01109872ccabdaa9088399f2a21c6b2a71d" +dependencies = [ + "Inflector", + "clap", + "compact_str", + "either", + "glob", + "hashbrown 0.15.5", + "log", + "memchr", + "miette", + "parking_lot", + "paste", + "rustc-hash", + "serde", + "serde_spanned 1.1.1", + "smallvec", + "thiserror 2.0.18", + "toml 0.9.12+spec-1.1.0", + "walkdir", +] + +[[package]] +name = "litcheck-filecheck" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3068bd232903a957c3dd219019857542dcc8e57eee9db2cebd08c916d8d989c" +dependencies = [ + "aho-corasick", + "bitflags", + "bstr", + "clap", + "either", + "im-rc", + "itertools", + "lalrpop", + "lalrpop-util", + "litcheck-core", + "log", + "logos 0.16.1", + "memchr", + "regex", + "regex-automata", + "regex-syntax", + "smallvec", + "thiserror 2.0.18", +] + +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "logos" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154" +dependencies = [ + "logos-derive 0.15.1", +] + +[[package]] +name = "logos" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2c55a318a87600ea870ff8c2012148b44bf18b74fad48d0f835c38c7d07c5f" +dependencies = [ + "logos-derive 0.16.1", +] + +[[package]] +name = "logos-codegen" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c" +dependencies = [ + "beef", + "fnv", + "lazy_static", + "proc-macro2", + "quote", + "regex-syntax", + "rustc_version 0.4.1", + "syn 2.0.117", +] + +[[package]] +name = "logos-codegen" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58b3ffaa284e1350d017a57d04ada118c4583cf260c8fb01e0fe28a2e9cf8970" +dependencies = [ + "fnv", + "proc-macro2", + "quote", + "regex-automata", + "regex-syntax", "syn 2.0.117", ] @@ -2320,7 +2760,16 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470" dependencies = [ - "logos-codegen", + "logos-codegen 0.15.1", +] + +[[package]] +name = "logos-derive" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52d3a9855747c17eaf4383823f135220716ab49bea5fbea7dd42cc9a92f8aa31" +dependencies = [ + "logos-codegen 0.16.1", ] [[package]] @@ -2380,6 +2829,40 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +[[package]] +name = "memmap2" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "miden" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010a8120478c5bbffa3ff1f139a01bac789331fbfef5a30f5ee6fd467225d3a2" +dependencies = [ + "miden-base", + "miden-base-macros", + "miden-base-sys", + "miden-field 0.22.6", + "miden-field-repr", + "miden-sdk-alloc", + "miden-stdlib-sys", + "wit-bindgen 0.46.0", +] + [[package]] name = "miden-agglayer" version = "0.14.3" @@ -2456,6 +2939,43 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "miden-base" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cab3453f9574645a7e0ace17aa87998ebe9efde5ae2291ad9a310d6051aa0e" +dependencies = [ + "miden-base-sys", + "miden-stdlib-sys", +] + +[[package]] +name = "miden-base-macros" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6389b82f5b125fd5c02fbf057e2d801aed3e4b3a22b73ca27601f5546343abe" +dependencies = [ + "heck", + "miden-protocol", + "proc-macro2", + "quote", + "semver 1.0.28", + "syn 2.0.117", + "toml 0.8.23", + "wit-bindgen-core 0.46.0", + "wit-bindgen-rust 0.46.0", +] + +[[package]] +name = "miden-base-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "842a10d5a6f4b4710356c5cd026400eb901f380e4e445e6bfb084985963b0f88" +dependencies = [ + "miden-field-repr", + "miden-stdlib-sys", +] + [[package]] name = "miden-block-prover" version = "0.14.3" @@ -2468,9 +2988,9 @@ dependencies = [ [[package]] name = "miden-client" -version = "0.14.0" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49957f76717961769c911237113bb9c1841c3b13970c15ca09a0ae639c33fc45" +checksum = "15007f2cf4e80316a8141665b43f454e77ce0dfd2ac0307ce6cdf7a5d552d58b" dependencies = [ "anyhow", "async-trait", @@ -2479,6 +2999,7 @@ dependencies = [ "getrandom 0.3.4", "gloo-timers", "hex", + "miden-debug", "miden-node-proto-build", "miden-note-transport-proto-build", "miden-protocol", @@ -2492,6 +3013,7 @@ dependencies = [ "rand 0.9.2", "serde", "serde_json", + "tempfile", "thiserror 2.0.18", "tokio", "tonic", @@ -2506,9 +3028,9 @@ dependencies = [ [[package]] name = "miden-client-cli" -version = "0.14.0" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72eaa5fdd768164a2725e3050e78515d39b13ee82118333f72a8e29612b71331" +checksum = "a576f6921b75d49223b9e759d1115402f0fc8106f1be19b9c17c5b307811ee17" dependencies = [ "clap", "comfy-table", @@ -2516,6 +3038,7 @@ dependencies = [ "figment", "miden-client", "miden-client-sqlite-store", + "miden-debug", "miette", "rand 0.9.2", "serde", @@ -2528,9 +3051,9 @@ dependencies = [ [[package]] name = "miden-client-sqlite-store" -version = "0.14.0" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab146099a4bf8319f5cac47e110eca7d3e3caa9d2fc354693458f905f4750a7" +checksum = "53a6d9c9bf443b9df440c010eeab6916ab6bc529faed5eb19f84ab7bc21aad59" dependencies = [ "anyhow", "async-trait", @@ -2547,9 +3070,9 @@ dependencies = [ [[package]] name = "miden-core" -version = "0.22.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdec54a321cdf3d23e9ef615e91cb858038c6b4d4202507bdec048fc6d7763e4" +checksum = "b66f391ef088343611ad813f6a564a14088d03a17336d350d7f8c60937490f4d" dependencies = [ "derive_more", "itertools", @@ -2600,20 +3123,20 @@ dependencies = [ "hkdf", "k256", "miden-crypto-derive", - "miden-field", - "miden-serde-utils", + "miden-field 0.23.0", + "miden-serde-utils 0.23.0", "num", "num-complex", "p3-blake3", - "p3-challenger", - "p3-dft", - "p3-goldilocks", + "p3-challenger 0.5.2", + "p3-dft 0.5.2", + "p3-goldilocks 0.5.2", "p3-keccak", - "p3-matrix", - "p3-maybe-rayon", + "p3-matrix 0.5.2", + "p3-maybe-rayon 0.5.2", "p3-miden-lifted-stark", - "p3-symmetric", - "p3-util", + "p3-symmetric 0.5.2", + "p3-util 0.5.2", "rand 0.9.2", "rand_chacha", "rand_core 0.9.5", @@ -2637,6 +3160,77 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "miden-debug" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df04a684eeb96efabc63e2800a01945f7f6e19ffd00d3b49064e85f7e1fac444" +dependencies = [ + "clap", + "futures", + "glob", + "log", + "miden-assembly", + "miden-assembly-syntax", + "miden-core", + "miden-crypto", + "miden-debug-dap", + "miden-debug-engine", + "miden-debug-types", + "miden-mast-package", + "miden-processor", + "miden-protocol", + "miden-thiserror", + "miden-tx", + "num-traits", + "rustc-demangle", + "serde", + "serde_json", + "smallvec", + "socket2 0.5.10", + "tokio", + "tokio-util", + "toml 0.8.23", +] + +[[package]] +name = "miden-debug-dap" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38cd41176322df12836bb4deecd4b619f7cf8239ed7b2c4ac1da7b2830e5199c" +dependencies = [ + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "miden-debug-engine" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e03dd00bd4dab99dbfdec9fd07009811a7e3b3a988e74a28c6ccb735ac34e138" +dependencies = [ + "clap", + "glob", + "log", + "miden-assembly", + "miden-assembly-syntax", + "miden-core", + "miden-debug-dap", + "miden-debug-types", + "miden-mast-package", + "miden-processor", + "miden-thiserror", + "miden-tx", + "num-traits", + "rustc-demangle", + "serde", + "serde_json", + "smallvec", + "socket2 0.5.10", + "toml 0.8.23", +] + [[package]] name = "miden-debug-types" version = "0.22.1" @@ -2657,7 +3251,7 @@ dependencies = [ [[package]] name = "miden-faucet" -version = "0.14.0" +version = "0.15.0" dependencies = [ "anyhow", "async-trait", @@ -2699,7 +3293,7 @@ dependencies = [ [[package]] name = "miden-faucet-client" -version = "0.14.0" +version = "0.15.0" dependencies = [ "anyhow", "axum", @@ -2720,11 +3314,13 @@ dependencies = [ [[package]] name = "miden-faucet-lib" -version = "0.14.0" +version = "0.15.0" dependencies = [ "anyhow", + "cargo-miden", "miden-client", "miden-client-sqlite-store", + "miden-standards", "rand 0.9.2", "serde", "thiserror 2.0.18", @@ -2734,17 +3330,41 @@ dependencies = [ "uuid", ] +[[package]] +name = "miden-faucet-mint-tx" +version = "0.15.0" +dependencies = [ + "miden", +] + +[[package]] +name = "miden-field" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "546ac41444d6f1ab015daa0bf420759405d3cf0a5cb2b552140ad60443ddf39c" +dependencies = [ + "miden-serde-utils 0.22.6", + "num-bigint", + "p3-challenger 0.4.2", + "p3-field 0.4.2", + "p3-goldilocks 0.4.2", + "paste", + "rand 0.9.2", + "serde", + "thiserror 2.0.18", +] + [[package]] name = "miden-field" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38011348f4fb4c9e5ce1f471203d024721c00e3b60a91aa91aaefe6738d8b5ea" dependencies = [ - "miden-serde-utils", + "miden-serde-utils 0.23.0", "num-bigint", - "p3-challenger", - "p3-field", - "p3-goldilocks", + "p3-challenger 0.5.2", + "p3-field 0.5.2", + "p3-goldilocks 0.5.2", "paste", "rand 0.10.0", "serde", @@ -2752,6 +3372,28 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "miden-field-repr" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c87de3a3d7535308e525fb8407defd4e7a169c6af575e148538b83800ffc6d2" +dependencies = [ + "miden-core", + "miden-field 0.22.6", + "miden-field-repr-derive", +] + +[[package]] +name = "miden-field-repr-derive" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3f1c00fe41ffa413b0ad36236e1016a64125162703f7be985d79f8dff3f7dba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "miden-formatting" version = "0.1.1" @@ -2813,9 +3455,9 @@ dependencies = [ [[package]] name = "miden-node-grpc-error-macro" -version = "0.14.3" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94eabd5828336f5acc6f987cbfb896a2db4a58e406b6f27e8efa90246ce26c4e" +checksum = "15923381dd3ee06db6524ffe8e020b62a732c639e913da464b02c1ce123b500e" dependencies = [ "quote", "syn 2.0.117", @@ -2823,9 +3465,9 @@ dependencies = [ [[package]] name = "miden-node-proto" -version = "0.14.3" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3816bbed7336cb6a6163f84dad338bc90c8b6837fe1fe8cf24a852507c15fc7" +checksum = "033c53b7b25b9594c933582ecaadfd54c7ff748454b74c1a445949bdda969404" dependencies = [ "anyhow", "build-rs", @@ -2848,9 +3490,9 @@ dependencies = [ [[package]] name = "miden-node-proto-build" -version = "0.14.3" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c78309c58cbffd5fd92c944d6f7f3ed6d59340587c74d4eab4e6edf9e31e8d3" +checksum = "62689db1e47abeb3118b7c253fa3e6a01b74ba51b5cdcb552f9f3750b9919ecb" dependencies = [ "build-rs", "fs-err", @@ -2861,9 +3503,9 @@ dependencies = [ [[package]] name = "miden-node-utils" -version = "0.14.3" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09c2eb76afb33e3448095b293ecbac1528934f6cc5d28e1551ed0a34fa1d28c" +checksum = "6722832579490ed0b88f8182488ad378f7e9679bd2aa0f3f35f1ca2940545cb2" dependencies = [ "anyhow", "bytes", @@ -2921,7 +3563,7 @@ dependencies = [ [[package]] name = "miden-pow-rate-limiter" -version = "0.14.0" +version = "0.15.0" dependencies = [ "serde_json", "sha2", @@ -2985,7 +3627,7 @@ dependencies = [ "miden-verifier", "rand 0.9.2", "rand_chacha", - "rand_xoshiro", + "rand_xoshiro 0.7.0", "regex", "semver 1.0.28", "serde", @@ -3025,9 +3667,9 @@ dependencies = [ [[package]] name = "miden-remote-prover-client" -version = "0.14.3" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd619f60846ce890309d65f9a5c1d8f6fcbe800c9a61f4c822d25145827ae6b3" +checksum = "b640de68276a5680f8c6b1a5e0b920df905a8d6b25759adbe3dd3bf4cd56a1bc" dependencies = [ "build-rs", "fs-err", @@ -3046,140 +3688,430 @@ dependencies = [ ] [[package]] -name = "miden-serde-utils" -version = "0.23.0" +name = "miden-sdk-alloc" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e43d6123657c5ddd606ef3d36bb1bacd345abcfdbc2ca9b0cab8e839e63558f2" + +[[package]] +name = "miden-serde-utils" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bedaf94fb4bb6806e4af99fadce74e4cdd0e8664c571107b255f86b00b3149b" +dependencies = [ + "p3-field 0.4.2", + "p3-goldilocks 0.4.2", +] + +[[package]] +name = "miden-serde-utils" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff78082e9b4ca89863e68da01b35f8a4029ee6fd912e39fa41fde4273a7debab" +dependencies = [ + "p3-field 0.5.2", + "p3-goldilocks 0.5.2", +] + +[[package]] +name = "miden-standards" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f63cd9264dc1f9f124fe644ee631828cc9bfd71022a75cd5bc1678f3ba7b56" +dependencies = [ + "fs-err", + "miden-assembly", + "miden-core", + "miden-core-lib", + "miden-processor", + "miden-protocol", + "rand 0.9.2", + "regex", + "thiserror 2.0.18", + "walkdir", +] + +[[package]] +name = "miden-stdlib-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0fad7b45aa92ca52a7fb15b20cb2be0eec1472bd36a1f20cc10d649507919d" +dependencies = [ + "miden-field 0.22.6", +] + +[[package]] +name = "miden-testing" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2761dd1f8baa744c91d1ff143d954c623d5fb1d2dfec8c8ab1dac2254343d7cd" +dependencies = [ + "anyhow", + "itertools", + "miden-agglayer", + "miden-assembly", + "miden-block-prover", + "miden-core-lib", + "miden-crypto", + "miden-processor", + "miden-protocol", + "miden-standards", + "miden-tx", + "miden-tx-batch-prover", + "rand 0.9.2", + "rand_chacha", + "thiserror 2.0.18", +] + +[[package]] +name = "miden-thiserror" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "183ff8de338956ecfde3a38573241eb7a6f3d44d73866c210e5629c07fa00253" +dependencies = [ + "miden-thiserror-impl", +] + +[[package]] +name = "miden-thiserror-impl" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee4176a0f2e7d29d2a8ee7e60b6deb14ce67a20e94c3e2c7275cdb8804e1862" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "miden-tx" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e894e952e2819545e9351f7427779f82538e51553dfaca3294301ff308086497" +dependencies = [ + "miden-processor", + "miden-protocol", + "miden-prover", + "miden-standards", + "miden-verifier", + "thiserror 2.0.18", +] + +[[package]] +name = "miden-tx-batch-prover" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e7aac0d511aa412138ea7dfa4a6d8c76340c6028fa91313727b7ad3614711b" +dependencies = [ + "miden-protocol", + "miden-tx", +] + +[[package]] +name = "miden-utils-core-derive" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3846c8674ccec0c37005f99c1a599a24790ba2a5e5f4e1c7aec5f456821df835" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "miden-utils-diagnostics" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397f5d1e8679cf17cf7713ffd9654840791a6ed5818b025bbc2fbfdce846579a" +dependencies = [ + "miden-crypto", + "miden-debug-types", + "miden-miette", + "paste", + "tracing", +] + +[[package]] +name = "miden-utils-indexing" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8834e76299686bcce3de1685158aa4cff49b7fa5e0e00a6cc811e8f2cf5775f" +dependencies = [ + "miden-crypto", + "serde", + "thiserror 2.0.18", +] + +[[package]] +name = "miden-utils-sync" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a9e9747e9664c1a0997bb040ae291306ea0a1c74a572141ec66cec855c1b0e8" +dependencies = [ + "lock_api", + "loom", + "once_cell", + "parking_lot", +] + +[[package]] +name = "miden-verifier" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4580df640d889c9f3c349cd2268968e44a99a8cf0df6c36ae5b1fb273712b00" +dependencies = [ + "bincode", + "miden-air", + "miden-core", + "miden-crypto", + "serde", + "thiserror 2.0.18", + "tracing", +] + +[[package]] +name = "midenc-codegen-masm" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ddea2c6050fea142e4f8c526c55bf3656c69c80e66bd099dd79728bdccda12f" +dependencies = [ + "anyhow", + "inventory", + "log", + "miden-assembly", + "miden-assembly-syntax", + "miden-core", + "miden-mast-package", + "miden-processor", + "miden-protocol", + "miden-thiserror", + "midenc-dialect-arith", + "midenc-dialect-cf", + "midenc-dialect-hir", + "midenc-dialect-scf", + "midenc-dialect-ub", + "midenc-dialect-wasm", + "midenc-hir", + "midenc-hir-analysis", + "midenc-session", + "petgraph 0.8.3", + "serde", + "smallvec", +] + +[[package]] +name = "midenc-compile" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927ad8e3f4f47949ae63cad358bcf510634765726e57f677c4d1cddadd8233ee" +dependencies = [ + "anyhow", + "clap", + "inventory", + "log", + "miden-assembly", + "miden-mast-package", + "miden-thiserror", + "midenc-codegen-masm", + "midenc-dialect-hir", + "midenc-dialect-scf", + "midenc-frontend-wasm", + "midenc-hir", + "midenc-hir-transform", + "midenc-session", + "wat", +] + +[[package]] +name = "midenc-dialect-arith" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "015e5132f919666624203c2a7d355a757a1265c419d385acc7ff8478b2a3edfe" +dependencies = [ + "midenc-hir", + "paste", +] + +[[package]] +name = "midenc-dialect-cf" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff78082e9b4ca89863e68da01b35f8a4029ee6fd912e39fa41fde4273a7debab" +checksum = "ddd32b0180d00707f0d2d6050c4cd24f0fa2ef3093a643dbdbf31792ded9cdef" dependencies = [ - "p3-field", - "p3-goldilocks", + "log", + "midenc-dialect-arith", + "midenc-hir", ] [[package]] -name = "miden-standards" -version = "0.14.3" +name = "midenc-dialect-hir" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f63cd9264dc1f9f124fe644ee631828cc9bfd71022a75cd5bc1678f3ba7b56" +checksum = "fb7333ca7996df3809cdbabc66b840e80bff44924570823adf218a1af4364ad0" dependencies = [ - "fs-err", - "miden-assembly", - "miden-core", - "miden-core-lib", - "miden-processor", - "miden-protocol", - "rand 0.9.2", - "regex", - "thiserror 2.0.18", - "walkdir", + "log", + "midenc-dialect-arith", + "midenc-dialect-cf", + "midenc-hir", + "midenc-hir-analysis", + "midenc-hir-transform", ] [[package]] -name = "miden-testing" -version = "0.14.3" +name = "midenc-dialect-scf" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2761dd1f8baa744c91d1ff143d954c623d5fb1d2dfec8c8ab1dac2254343d7cd" +checksum = "32798b83efc34a7301f6fdf77c622ef5217d4dbed1fe68c62e2c7d07686964d0" dependencies = [ - "anyhow", - "itertools", - "miden-agglayer", - "miden-assembly", - "miden-block-prover", - "miden-core-lib", - "miden-crypto", - "miden-processor", - "miden-protocol", - "miden-standards", - "miden-tx", - "miden-tx-batch-prover", - "rand 0.9.2", - "rand_chacha", - "thiserror 2.0.18", + "bitvec", + "log", + "midenc-dialect-arith", + "midenc-dialect-cf", + "midenc-dialect-ub", + "midenc-hir", + "midenc-hir-transform", ] [[package]] -name = "miden-tx" -version = "0.14.3" +name = "midenc-dialect-ub" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e894e952e2819545e9351f7427779f82538e51553dfaca3294301ff308086497" +checksum = "47b3327a327fc4a13a08a2d9791b0cba5ef21e0c4ce2a4e18433d363c8c8dc47" dependencies = [ - "miden-processor", - "miden-protocol", - "miden-prover", - "miden-standards", - "miden-verifier", - "thiserror 2.0.18", + "midenc-hir", ] [[package]] -name = "miden-tx-batch-prover" -version = "0.14.3" +name = "midenc-dialect-wasm" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e7aac0d511aa412138ea7dfa4a6d8c76340c6028fa91313727b7ad3614711b" +checksum = "2c3284470339b901630d30c87c7d5fff962f41dc863c8979867664040ea07552" dependencies = [ - "miden-protocol", - "miden-tx", + "midenc-dialect-arith", + "midenc-dialect-hir", + "midenc-hir", ] [[package]] -name = "miden-utils-core-derive" -version = "0.22.1" +name = "midenc-frontend-wasm" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3846c8674ccec0c37005f99c1a599a24790ba2a5e5f4e1c7aec5f456821df835" +checksum = "cee10db6ca611ca6e829a8625e179135dc729118974ec65006f8d17120a713a1" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "addr2line 0.24.2", + "anyhow", + "cranelift-entity", + "gimli 0.31.1", + "indexmap", + "log", + "miden-core", + "miden-thiserror", + "midenc-dialect-arith", + "midenc-dialect-cf", + "midenc-dialect-hir", + "midenc-dialect-ub", + "midenc-dialect-wasm", + "midenc-frontend-wasm-metadata", + "midenc-hir", + "midenc-hir-symbol", + "midenc-session", + "wasmparser 0.227.1", + "wasmprinter", ] [[package]] -name = "miden-utils-diagnostics" -version = "0.22.1" +name = "midenc-frontend-wasm-metadata" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397f5d1e8679cf17cf7713ffd9654840791a6ed5818b025bbc2fbfdce846579a" +checksum = "a6938fd4efb4a2c8937c77055a3779ddda33572728328cf4391d2f240f78be3a" dependencies = [ - "miden-crypto", - "miden-debug-types", - "miden-miette", + "serde", + "serde_json", +] + +[[package]] +name = "midenc-hir" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51141b60afe741ff47d8d95d8b7f9a8eeb32154257181aa73ef59b7f8cbaf759" +dependencies = [ + "anyhow", + "base64", + "bitflags", + "bitvec", + "blink-alloc", + "compact_str", + "hashbrown 0.15.5", + "intrusive-collections", + "inventory", + "litcheck-core", + "litcheck-filecheck", + "log", + "memchr", + "miden-core", + "miden-thiserror", + "midenc-hir-macros", + "midenc-hir-symbol", + "midenc-hir-type", + "midenc-session", "paste", - "tracing", + "rustc-demangle", + "rustc-hash", + "semver 1.0.28", + "smallvec", ] [[package]] -name = "miden-utils-indexing" -version = "0.22.1" +name = "midenc-hir-analysis" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8834e76299686bcce3de1685158aa4cff49b7fa5e0e00a6cc811e8f2cf5775f" +checksum = "fbc8c3b28addc2560dc4b7cf4b4297ce5119bfaf645542f96e0d9f93bcee20f0" dependencies = [ - "miden-crypto", - "serde", - "thiserror 2.0.18", + "bitvec", + "blink-alloc", + "log", + "midenc-hir", ] [[package]] -name = "miden-utils-sync" -version = "0.22.1" +name = "midenc-hir-macros" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9e9747e9664c1a0997bb040ae291306ea0a1c74a572141ec66cec855c1b0e8" +checksum = "ea4df411507d77af2b7ea70fd8e8a7e67272bbcb4a248386a647673cb9e19d97" +dependencies = [ + "Inflector", + "darling", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "midenc-hir-symbol" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e212c781c59429229ba6a33d75151257175d88f722a60c333a855a790ca61b" dependencies = [ + "Inflector", + "compact_str", + "hashbrown 0.15.5", "lock_api", - "loom", - "once_cell", + "miden-formatting", "parking_lot", + "rustc-hash", + "toml 0.8.23", ] [[package]] -name = "miden-verifier" -version = "0.22.1" +name = "midenc-hir-transform" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4580df640d889c9f3c349cd2268968e44a99a8cf0df6c36ae5b1fb273712b00" +checksum = "1e1483fa0bb318eaf9b112b99280afecf917bf277a026774bf5db7db9c8964d3" dependencies = [ - "bincode", - "miden-air", - "miden-core", - "miden-crypto", - "serde", - "thiserror 2.0.18", - "tracing", + "log", + "midenc-hir", + "midenc-hir-analysis", + "midenc-session", ] [[package]] @@ -3189,13 +4121,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb29d7c049fb69373c7e775e3d4411e63e4ee608bc43826282ba62c6ec9f891" dependencies = [ "miden-formatting", - "miden-serde-utils", + "miden-serde-utils 0.23.0", "serde", "serde_repr", "smallvec", "thiserror 2.0.18", ] +[[package]] +name = "midenc-log" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7463ae49be6e3612436bbe6af937112a23fb27d9c4e4cfb5b49c281b3b9f1b63" +dependencies = [ + "anstream 0.6.21", + "anstyle", + "jiff", + "log", + "regex", +] + +[[package]] +name = "midenc-session" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6895a782776dbba38034f6db4869da700e6b685a147869135c0b0ba86d38bdf" +dependencies = [ + "anyhow", + "clap", + "inventory", + "log", + "miden-assembly", + "miden-assembly-syntax", + "miden-core", + "miden-core-lib", + "miden-debug-types", + "miden-mast-package", + "miden-protocol", + "miden-thiserror", + "midenc-hir-macros", + "midenc-hir-symbol", + "parking_lot", + "smallvec", + "termcolor", +] + [[package]] name = "miette" version = "7.6.0" @@ -3413,6 +4383,17 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "flate2", + "memchr", + "ruzstd", +] + [[package]] name = "object" version = "0.37.3" @@ -3562,8 +4543,8 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f2ec9cbfc642fc5173817287c3f8b789d07743b5f7e812d058b7a03e344f9ab" dependencies = [ - "p3-field", - "p3-matrix", + "p3-field 0.5.2", + "p3-matrix 0.5.2", "tracing", ] @@ -3574,8 +4555,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b667f43b19499dd939c9e2553aa95688936a88360d50117dae3c8848d07dbc70" dependencies = [ "blake3", - "p3-symmetric", - "p3-util", + "p3-symmetric 0.5.2", + "p3-util 0.5.2", +] + +[[package]] +name = "p3-challenger" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20e42ba74a49c08c6e99f74cd9b343bfa31aa5721fea55079b18e3fd65f1dcbc" +dependencies = [ + "p3-field 0.4.2", + "p3-maybe-rayon 0.4.2", + "p3-monty-31 0.4.2", + "p3-symmetric 0.4.2", + "p3-util 0.4.2", + "tracing", ] [[package]] @@ -3584,11 +4579,11 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a0b490c745a7d2adeeafff06411814c8078c432740162332b3cd71be0158a76" dependencies = [ - "p3-field", - "p3-maybe-rayon", - "p3-monty-31", - "p3-symmetric", - "p3-util", + "p3-field 0.5.2", + "p3-maybe-rayon 0.5.2", + "p3-monty-31 0.5.2", + "p3-symmetric 0.5.2", + "p3-util 0.5.2", "tracing", ] @@ -3599,12 +4594,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "916ae7989d5c3b49f887f5c55b2f9826bdbb81aaebf834503c4145d8b267c829" dependencies = [ "itertools", - "p3-field", - "p3-matrix", - "p3-util", + "p3-field 0.5.2", + "p3-matrix 0.5.2", + "p3-util 0.5.2", "serde", ] +[[package]] +name = "p3-dft" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63fa5eb1bd12a240089e72ae3fe10350944d9c166d00a3bfd2a1794db65cf5c" +dependencies = [ + "itertools", + "p3-field 0.4.2", + "p3-matrix 0.4.2", + "p3-maybe-rayon 0.4.2", + "p3-util 0.4.2", + "spin 0.10.0", + "tracing", +] + [[package]] name = "p3-dft" version = "0.5.2" @@ -3612,14 +4622,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55301e91544440254977108b85c32c09d7ea05f2f0dd61092a2825339906a4a7" dependencies = [ "itertools", - "p3-field", - "p3-matrix", - "p3-maybe-rayon", - "p3-util", + "p3-field 0.5.2", + "p3-matrix 0.5.2", + "p3-maybe-rayon 0.5.2", + "p3-util 0.5.2", "spin 0.10.0", "tracing", ] +[[package]] +name = "p3-field" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ebfdb6ef992ae64e9e8f449ac46516ffa584f11afbdf9ee244288c2a633cdf4" +dependencies = [ + "itertools", + "num-bigint", + "p3-maybe-rayon 0.4.2", + "p3-util 0.4.2", + "paste", + "rand 0.9.2", + "serde", + "tracing", +] + [[package]] name = "p3-field" version = "0.5.2" @@ -3628,14 +4654,33 @@ checksum = "85affca7fc983889f260655c4cf74163eebb94605f702e4b6809ead707cba54f" dependencies = [ "itertools", "num-bigint", - "p3-maybe-rayon", - "p3-util", + "p3-maybe-rayon 0.5.2", + "p3-util 0.5.2", "paste", "rand 0.10.0", "serde", "tracing", ] +[[package]] +name = "p3-goldilocks" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64716244b5612622d4e78a4f48b74f6d3bb7b4085b7b6b25364b1dfca7198c66" +dependencies = [ + "num-bigint", + "p3-challenger 0.4.2", + "p3-dft 0.4.2", + "p3-field 0.4.2", + "p3-mds 0.4.2", + "p3-poseidon2 0.4.2", + "p3-symmetric 0.4.2", + "p3-util 0.4.2", + "paste", + "rand 0.9.2", + "serde", +] + [[package]] name = "p3-goldilocks" version = "0.5.2" @@ -3643,14 +4688,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ca1081f5c47b940f2d75a11c04f62ea1cc58a5d480dd465fef3861c045c63cd" dependencies = [ "num-bigint", - "p3-challenger", - "p3-dft", - "p3-field", - "p3-mds", + "p3-challenger 0.5.2", + "p3-dft 0.5.2", + "p3-field 0.5.2", + "p3-mds 0.5.2", "p3-poseidon1", - "p3-poseidon2", - "p3-symmetric", - "p3-util", + "p3-poseidon2 0.5.2", + "p3-symmetric 0.5.2", + "p3-util 0.5.2", "paste", "rand 0.10.0", "serde", @@ -3662,11 +4707,27 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcf27615ece1995e4fcf4c69740f1cf515d1481367a20b4b3ce7f4f1b8d70f7" dependencies = [ - "p3-symmetric", - "p3-util", + "p3-symmetric 0.5.2", + "p3-util 0.5.2", "tiny-keccak", ] +[[package]] +name = "p3-matrix" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5542f96504dae8100c91398fb1e3f5ec669eb9c73d9e0b018a93b5fe32bad230" +dependencies = [ + "itertools", + "p3-field 0.4.2", + "p3-maybe-rayon 0.4.2", + "p3-util 0.4.2", + "rand 0.9.2", + "serde", + "tracing", + "transpose", +] + [[package]] name = "p3-matrix" version = "0.5.2" @@ -3674,14 +4735,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53428126b009071563d1d07305a9de8be0d21de00b57d2475289ee32ffca6577" dependencies = [ "itertools", - "p3-field", - "p3-maybe-rayon", - "p3-util", + "p3-field 0.5.2", + "p3-maybe-rayon 0.5.2", + "p3-util 0.5.2", "rand 0.10.0", "serde", "tracing", ] +[[package]] +name = "p3-maybe-rayon" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e5669ca75645f99cd001e9d0289a4eeff2bc2cd9dc3c6c3aaf22643966e83df" + [[package]] name = "p3-maybe-rayon" version = "0.5.2" @@ -3691,16 +4758,29 @@ dependencies = [ "rayon", ] +[[package]] +name = "p3-mds" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038763af23df9da653065867fd85b38626079031576c86fd537097e5be6a0da0" +dependencies = [ + "p3-dft 0.4.2", + "p3-field 0.4.2", + "p3-symmetric 0.4.2", + "p3-util 0.4.2", + "rand 0.9.2", +] + [[package]] name = "p3-mds" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35209e6214102ea6ec6b8cb1b9c15a9b8e597a39f9173597c957f123bced81b3" dependencies = [ - "p3-dft", - "p3-field", - "p3-symmetric", - "p3-util", + "p3-dft 0.5.2", + "p3-field 0.5.2", + "p3-symmetric 0.5.2", + "p3-util 0.5.2", "rand 0.10.0", ] @@ -3711,9 +4791,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5c31c65fdc88952d7b301546add9670676e5b878aa0066dd929f107c203b006" dependencies = [ "p3-air", - "p3-field", - "p3-matrix", - "p3-util", + "p3-field 0.5.2", + "p3-matrix 0.5.2", + "p3-util 0.5.2", "thiserror 2.0.18", ] @@ -3723,15 +4803,15 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab9932f1b0a16609a45cd4ee10a4d35412728bc4b38837c7979d7c85d8dcc9fc" dependencies = [ - "p3-challenger", + "p3-challenger 0.5.2", "p3-commit", - "p3-dft", - "p3-field", - "p3-matrix", - "p3-maybe-rayon", + "p3-dft 0.5.2", + "p3-field 0.5.2", + "p3-matrix 0.5.2", + "p3-maybe-rayon 0.5.2", "p3-miden-lmcs", "p3-miden-transcript", - "p3-util", + "p3-util 0.5.2", "rand 0.10.0", "thiserror 2.0.18", "tracing", @@ -3743,17 +4823,17 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3956ab7270c3cdd53ca9796d39ae1821984eb977415b0672110f9666bff5d8" dependencies = [ - "p3-challenger", - "p3-dft", - "p3-field", - "p3-matrix", - "p3-maybe-rayon", + "p3-challenger 0.5.2", + "p3-dft 0.5.2", + "p3-field 0.5.2", + "p3-matrix 0.5.2", + "p3-maybe-rayon 0.5.2", "p3-miden-lifted-air", "p3-miden-lifted-fri", "p3-miden-lmcs", "p3-miden-stateful-hasher", "p3-miden-transcript", - "p3-util", + "p3-util 0.5.2", "thiserror 2.0.18", "tracing", ] @@ -3765,13 +4845,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c46791c983e772136db3d48f102431457451447abb9087deb6c8ce3c1efc86" dependencies = [ "p3-commit", - "p3-field", - "p3-matrix", - "p3-maybe-rayon", + "p3-field 0.5.2", + "p3-matrix 0.5.2", + "p3-maybe-rayon 0.5.2", "p3-miden-stateful-hasher", "p3-miden-transcript", - "p3-symmetric", - "p3-util", + "p3-symmetric 0.5.2", + "p3-util 0.5.2", "rand 0.10.0", "serde", "thiserror 2.0.18", @@ -3784,8 +4864,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec47a9d9615eb3d9d2a59b00d19751d9ad85384b55886827913d680d912eac6a" dependencies = [ - "p3-field", - "p3-symmetric", + "p3-field 0.5.2", + "p3-symmetric 0.5.2", ] [[package]] @@ -3794,12 +4874,36 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c565647487e4a949f67e6f115b0391d6cb82ac8e561165789939bab23d0ae7" dependencies = [ - "p3-challenger", - "p3-field", + "p3-challenger 0.5.2", + "p3-field 0.5.2", "serde", "thiserror 2.0.18", ] +[[package]] +name = "p3-monty-31" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a981d60da3d8cbf8561014e2c186068578405fd69098fa75b43d4afb364a47" +dependencies = [ + "itertools", + "num-bigint", + "p3-dft 0.4.2", + "p3-field 0.4.2", + "p3-matrix 0.4.2", + "p3-maybe-rayon 0.4.2", + "p3-mds 0.4.2", + "p3-poseidon2 0.4.2", + "p3-symmetric 0.4.2", + "p3-util 0.4.2", + "paste", + "rand 0.9.2", + "serde", + "spin 0.10.0", + "tracing", + "transpose", +] + [[package]] name = "p3-monty-31" version = "0.5.2" @@ -3808,15 +4912,15 @@ checksum = "ffa8c99ec50c035020bbf5457c6a729ba6a975719c1a8dd3f16421081e4f650c" dependencies = [ "itertools", "num-bigint", - "p3-dft", - "p3-field", - "p3-matrix", - "p3-maybe-rayon", - "p3-mds", + "p3-dft 0.5.2", + "p3-field 0.5.2", + "p3-matrix 0.5.2", + "p3-maybe-rayon 0.5.2", + "p3-mds 0.5.2", "p3-poseidon1", - "p3-poseidon2", - "p3-symmetric", - "p3-util", + "p3-poseidon2 0.5.2", + "p3-symmetric 0.5.2", + "p3-util 0.5.2", "paste", "rand 0.10.0", "serde", @@ -3830,22 +4934,46 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a018b618e3fa0aec8be933b1d8e404edd23f46991f6bf3f5c2f3f95e9413fe9" dependencies = [ - "p3-field", - "p3-symmetric", + "p3-field 0.5.2", + "p3-symmetric 0.5.2", "rand 0.10.0", ] +[[package]] +name = "p3-poseidon2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "903b73e4f9a7781a18561c74dc169cf03333497b57a8dd02aaeb130c0f386599" +dependencies = [ + "p3-field 0.4.2", + "p3-mds 0.4.2", + "p3-symmetric 0.4.2", + "p3-util 0.4.2", + "rand 0.9.2", +] + [[package]] name = "p3-poseidon2" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256a668a9ba916f8767552f13d0ba50d18968bc74a623bfdafa41e2970c944d0" +checksum = "256a668a9ba916f8767552f13d0ba50d18968bc74a623bfdafa41e2970c944d0" +dependencies = [ + "p3-field 0.5.2", + "p3-mds 0.5.2", + "p3-symmetric 0.5.2", + "p3-util 0.5.2", + "rand 0.10.0", +] + +[[package]] +name = "p3-symmetric" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd788f04e86dd5c35dd87cad29eefdb6371d2fd5f7664451382eeacae3c3ed0" dependencies = [ - "p3-field", - "p3-mds", - "p3-symmetric", - "p3-util", - "rand 0.10.0", + "itertools", + "p3-field 0.4.2", + "serde", ] [[package]] @@ -3855,8 +4983,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c60a71a1507c13611b0f2b0b6e83669fd5b76f8e3115bcbced5ccfdf3ca7807" dependencies = [ "itertools", - "p3-field", - "p3-util", + "p3-field 0.5.2", + "p3-util 0.5.2", + "serde", +] + +[[package]] +name = "p3-util" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "663b16021930bc600ecada915c6c3965730a3b9d6a6c23434ccf70bfc29d6881" +dependencies = [ "serde", ] @@ -3900,6 +5037,24 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "path-absolutize" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4af381fe79fa195b4909485d99f73a80792331df0625188e707854f0b3383f5" +dependencies = [ + "path-dedot", +] + +[[package]] +name = "path-dedot" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ba0ad7e047712414213ff67533e6dd477af0a4e1d14fb52343e53d30ea9397" +dependencies = [ + "once_cell", +] + [[package]] name = "pear" version = "0.2.9" @@ -3929,6 +5084,49 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "pest" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" +dependencies = [ + "memchr", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "pest_meta" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" +dependencies = [ + "pest", + "sha2", +] + [[package]] name = "petgraph" version = "0.7.1" @@ -4208,7 +5406,7 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89455ef41ed200cafc47c76c552ee7792370ac420497e551f16123a9135f76e" dependencies = [ - "logos", + "logos 0.15.1", "miette", "prost", "prost-types", @@ -4244,7 +5442,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "072eee358134396a4643dff81cfff1c255c9fbd3fb296be14bdb6a26f9156366" dependencies = [ - "logos", + "logos 0.15.1", "miette", "prost-types", "thiserror 2.0.18", @@ -4312,7 +5510,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2", + "socket2 0.6.3", "thiserror 2.0.18", "tokio", "tracing", @@ -4350,7 +5548,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.6.3", "tracing", "windows-sys 0.60.2", ] @@ -4376,6 +5574,12 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.8.5" @@ -4456,6 +5660,15 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rand_xoshiro" version = "0.7.0" @@ -4776,6 +5989,15 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +[[package]] +name = "ruzstd" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fad02996bfc73da3e301efe90b1837be9ed8f4a462b6ed410aa35d00381de89f" +dependencies = [ + "twox-hash", +] + [[package]] name = "ryu" version = "1.0.23" @@ -5049,6 +6271,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + [[package]] name = "slab" version = "0.4.12" @@ -5070,6 +6302,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.3" @@ -5243,6 +6485,12 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "target-triple" version = "1.0.0" @@ -5435,7 +6683,7 @@ dependencies = [ "mio", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.6.3", "tokio-macros", "windows-sys 0.61.2", ] @@ -5502,10 +6750,11 @@ version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ + "indexmap", "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.11", - "toml_edit", + "toml_edit 0.22.27", ] [[package]] @@ -5579,6 +6828,21 @@ dependencies = [ "winnow 0.7.15", ] +[[package]] +name = "toml_edit" +version = "0.23.10+spec-1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", +] + [[package]] name = "toml_parser" version = "1.1.2+spec-1.1.0" @@ -5620,7 +6884,7 @@ dependencies = [ "percent-encoding", "pin-project", "rustls-native-certs", - "socket2", + "socket2 0.6.3", "sync_wrapper", "tokio", "tokio-rustls", @@ -5921,6 +7185,22 @@ dependencies = [ "toml 1.1.2+spec-1.1.0", ] +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "static_assertions", +] + +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typeid" version = "1.0.3" @@ -5933,6 +7213,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + [[package]] name = "uint" version = "0.10.0" @@ -6122,7 +7408,7 @@ version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.51.0", ] [[package]] @@ -6131,7 +7417,7 @@ version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.51.0", ] [[package]] @@ -6189,6 +7475,16 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.239.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be00faa2b4950c76fe618c409d2c3ea5a3c9422013e079482d78544bb2d184c" +dependencies = [ + "leb128fmt", + "wasmparser 0.239.0", +] + [[package]] name = "wasm-encoder" version = "0.244.0" @@ -6196,7 +7492,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" dependencies = [ "leb128fmt", - "wasmparser", + "wasmparser 0.244.0", +] + +[[package]] +name = "wasm-encoder" +version = "0.249.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69830ccbbf41c55eb585991659fb70867ef628193af3a495f09a6956f7615e59" +dependencies = [ + "leb128fmt", + "wasmparser 0.249.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.239.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20b3ec880a9ac69ccd92fbdbcf46ee833071cf09f82bb005b2327c7ae6025ae2" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder 0.239.0", + "wasmparser 0.239.0", ] [[package]] @@ -6207,8 +7525,8 @@ checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", "indexmap", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.244.0", + "wasmparser 0.244.0", ] [[package]] @@ -6224,6 +7542,29 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmparser" +version = "0.227.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f51cad774fb3c9461ab9bccc9c62dfb7388397b5deda31bf40e8108ccd678b2" +dependencies = [ + "bitflags", + "indexmap", + "semver 1.0.28", +] + +[[package]] +name = "wasmparser" +version = "0.239.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9d90bb93e764f6beabf1d02028c70a2156a6583e63ac4218dd07ef733368b0" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver 1.0.28", +] + [[package]] name = "wasmparser" version = "0.244.0" @@ -6236,6 +7577,50 @@ dependencies = [ "semver 1.0.28", ] +[[package]] +name = "wasmparser" +version = "0.249.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30538cae9a794215f490b532df01c557e2e2bfac92569482554acd0992a102ea" +dependencies = [ + "bitflags", + "indexmap", + "semver 1.0.28", +] + +[[package]] +name = "wasmprinter" +version = "0.227.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32475a0459db5639e989206dd8833fb07110ec092a7cb3468c82341989cac4d3" +dependencies = [ + "anyhow", + "termcolor", + "wasmparser 0.227.1", +] + +[[package]] +name = "wast" +version = "249.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2474a321bf9ae2808e9fa23ac4ec2b27300e70985e30bcb5a38d43b76bfc901a" +dependencies = [ + "bumpalo", + "leb128fmt", + "memchr", + "unicode-width 0.2.2", + "wasm-encoder 0.249.0", +] + +[[package]] +name = "wat" +version = "1.249.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28af699d0a9c7e4e250b7b8e36167ae5215fbb4b7ae526bb4ce7b234ba0afc90" +dependencies = [ + "wast", +] + [[package]] name = "web-sys" version = "0.3.94" @@ -6612,13 +7997,33 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +dependencies = [ + "wit-bindgen-rust-macro 0.46.0", +] + [[package]] name = "wit-bindgen" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" dependencies = [ - "wit-bindgen-rust-macro", + "wit-bindgen-rust-macro 0.51.0", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cabd629f94da277abc739c71353397046401518efb2c707669f805205f0b9890" +dependencies = [ + "anyhow", + "heck", + "wit-parser 0.239.0", ] [[package]] @@ -6629,7 +8034,23 @@ checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" dependencies = [ "anyhow", "heck", - "wit-parser", + "wit-parser 0.244.0", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a4232e841089fa5f3c4fc732a92e1c74e1a3958db3b12f1de5934da2027f1f4" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn 2.0.117", + "wasm-metadata 0.239.0", + "wit-bindgen-core 0.46.0", + "wit-component 0.239.0", ] [[package]] @@ -6643,9 +8064,24 @@ dependencies = [ "indexmap", "prettyplease", "syn 2.0.117", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.244.0", + "wit-bindgen-core 0.51.0", + "wit-component 0.244.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0d4698c2913d8d9c2b220d116409c3f51a7aa8d7765151b886918367179ee9" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", + "wit-bindgen-core 0.46.0", + "wit-bindgen-rust 0.46.0", ] [[package]] @@ -6659,8 +8095,27 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.117", - "wit-bindgen-core", - "wit-bindgen-rust", + "wit-bindgen-core 0.51.0", + "wit-bindgen-rust 0.51.0", +] + +[[package]] +name = "wit-component" +version = "0.239.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a866b19dba2c94d706ec58c92a4c62ab63e482b4c935d2a085ac94caecb136" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.239.0", + "wasm-metadata 0.239.0", + "wasmparser 0.239.0", + "wit-parser 0.239.0", ] [[package]] @@ -6676,10 +8131,28 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.244.0", + "wasm-metadata 0.244.0", + "wasmparser 0.244.0", + "wit-parser 0.244.0", +] + +[[package]] +name = "wit-parser" +version = "0.239.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55c92c939d667b7bf0c6bf2d1f67196529758f99a2a45a3355cc56964fd5315d" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.28", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.239.0", ] [[package]] @@ -6697,7 +8170,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.244.0", ] [[package]] @@ -6712,6 +8185,15 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + [[package]] name = "x25519-dalek" version = "2.0.1" diff --git a/Cargo.toml b/Cargo.toml index e2ae29bd..141ec885 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,12 @@ [workspace] -members = ["bin/faucet", "bin/faucet-client", "crates/faucet"] +default-members = ["bin/faucet", "crates/faucet", "crates/pow"] +members = [ + "bin/faucet", + "bin/faucet-client", + "crates/contracts/mint-tx", + "crates/faucet", + "crates/pow", +] resolver = "2" @@ -12,17 +19,19 @@ license = "MIT" readme = "README.md" repository = "https://github.com/0xMiden/miden-faucet" rust-version = "1.93" -version = "0.14.0" +version = "0.15.0" # Optimize the cryptography for faster tests involving account creation. [profile.test.package.miden-crypto] opt-level = 2 [workspace.dependencies] -miden-faucet-lib = { path = "crates/faucet", version = "0.14.0" } -miden-pow-rate-limiter = { path = "crates/pow", version = "0.14.0" } +miden-faucet-lib = { path = "crates/faucet", version = "0.15.0" } +miden-pow-rate-limiter = { path = "crates/pow", version = "0.15.0" } # Miden dependencies. +cargo-miden = { version = "0.8.1" } +miden = { version = "0.11" } miden-client = { version = "0.14" } miden-client-cli = { version = "0.14" } miden-client-sqlite-store = { version = "0.14" } diff --git a/Makefile b/Makefile index 555351e6..40ab46f0 100644 --- a/Makefile +++ b/Makefile @@ -12,37 +12,32 @@ WARNINGS=RUSTDOCFLAGS="-D warnings" .PHONY: clippy clippy: ## Runs Clippy with configs - cargo clippy --locked --all-targets --all-features --workspace - + cargo clippy --locked --all-targets --all-features .PHONY: fix fix: ## Runs Fix with configs - cargo fix --allow-staged --allow-dirty --all-targets --all-features --workspace + cargo fix --allow-staged --allow-dirty --all-targets --all-features .PHONY: build build: ## By default we should build in release mode - cargo build --release + cargo build --release .PHONY: format format: ## Runs Format using nightly toolchain cargo +nightly fmt --all - .PHONY: format-check format-check: ## Runs Format using nightly toolchain but only in check mode cargo +nightly fmt --all --check - .PHONY: machete machete: ## Runs machete to find unused dependencies cargo machete - .PHONY: toml toml: ## Runs Format for all TOML files taplo fmt - .PHONY: toml-check toml-check: ## Runs Format for all TOML files but only in check mode taplo fmt --check --verbose @@ -67,21 +62,21 @@ book: ## Builds the book & serves documentation site # --- testing ------------------------------------------------------------------------------------- .PHONY: test -test: ## Runs all tests - cargo nextest run --release --all-features --workspace +test: ## Runs all tests + cargo nextest run --release --all-features # --- checking ------------------------------------------------------------------------------------ .PHONY: check check: ## Check all targets and features for errors without code generation - ${BUILD_PROTO} cargo check --all-features --all-targets --locked --workspace + cargo check --all-features --all-targets --locked # --- installing ---------------------------------------------------------------------------------- .PHONY: install-faucet install-faucet: ## Installs faucet - ${BUILD_PROTO} cargo install --path bin/faucet --locked - ${BUILD_PROTO} cargo install --path bin/faucet-client --locked + cargo install --path bin/faucet --locked + cargo install --path bin/faucet-client --locked .PHONY: check-tools check-tools: ## Checks if development tools are installed diff --git a/bin/faucet/frontend/app.js b/bin/faucet/frontend/app.js index be2d683d..4567af02 100644 --- a/bin/faucet/frontend/app.js +++ b/bin/faucet/frontend/app.js @@ -1,6 +1,6 @@ import { MidenWalletAdapter } from "@demox-labs/miden-wallet-adapter-miden"; import { PrivateDataPermission, WalletAdapterNetwork, WalletReadyState } from "@demox-labs/miden-wallet-adapter-base"; -import { Endpoint, NoteId, RpcClient } from "@miden-sdk/miden-sdk"; +import { Endpoint, NoteId, RpcClient, getWasmOrThrow } from "@miden-sdk/miden-sdk"; import { Utils } from './utils.js'; import { UIController } from './ui.js'; import { getConfig, getMetadata, getPowChallenge, getTokens, get_note, send_note } from "./api.js"; @@ -32,7 +32,7 @@ export class MidenFaucetApp { async init() { try { - let config = await getConfig(); + const [config] = await Promise.all([getConfig(), getWasmOrThrow()]); this.apiUrl = config.api_url; this.rpcClient = new RpcClient(new Endpoint(config.node_url)); this.setupEventListeners(); diff --git a/bin/faucet/frontend/package.json b/bin/faucet/frontend/package.json index d98e9916..21400115 100644 --- a/bin/faucet/frontend/package.json +++ b/bin/faucet/frontend/package.json @@ -1,6 +1,6 @@ { "name": "miden-faucet-frontend", - "version": "v.0.12.0", + "version": "v.0.14.1", "description": "Miden Faucet Frontend", "main": "index.js", "scripts": { @@ -15,7 +15,7 @@ "dependencies": { "@demox-labs/miden-wallet-adapter-base": "^0.10.0", "@demox-labs/miden-wallet-adapter-miden": "^0.10.0", - "@miden-sdk/miden-sdk": "^0.14.0" + "@miden-sdk/miden-sdk": "^0.14.3" }, "devDependencies": { "esbuild": "^0.27.0" diff --git a/bin/faucet/src/api/get_metadata.rs b/bin/faucet/src/api/get_metadata.rs index af25fb68..566af7e7 100644 --- a/bin/faucet/src/api/get_metadata.rs +++ b/bin/faucet/src/api/get_metadata.rs @@ -18,6 +18,7 @@ pub struct Metadata { pub decimals: u8, pub explorer_url: Option, pub base_amount: u64, + pub note_transport_url: Option, } // ENDPOINT @@ -34,6 +35,7 @@ pub async fn get_metadata(State(server): State) -> Json, pub pow_load_difficulty: u64, pub base_amount: u64, + pub note_transport_url: Option, } diff --git a/bin/faucet/src/frontend.rs b/bin/faucet/src/frontend.rs index 6c0fb6f9..0e8a2425 100644 --- a/bin/faucet/src/frontend.rs +++ b/bin/faucet/src/frontend.rs @@ -58,7 +58,7 @@ pub async fn get_index_html() -> Html<&'static str> { pub async fn get_miden_client_web_wasm(request: Request) -> Response { const WASM_BYTES: &[u8] = include_bytes!(concat!( env!("OUT_DIR"), - "/frontend/node_modules/@miden-sdk/miden-sdk/dist/assets/miden_client_web.wasm" + "/frontend/node_modules/@miden-sdk/miden-sdk/dist/st/assets/miden_client_web.wasm" )); let etag = compute_etag(WASM_BYTES); diff --git a/bin/faucet/src/main.rs b/bin/faucet/src/main.rs index c1311311..14f14971 100644 --- a/bin/faucet/src/main.rs +++ b/bin/faucet/src/main.rs @@ -440,21 +440,22 @@ async fn run_faucet_command(cli: Cli) -> anyhow::Result<()> { let max_supply = AssetAmount::new(faucet_component.max_supply().as_canonical_u64())?; let decimals = faucet_component.decimals(); + let note_transport_client = note_transport_url.as_ref().map(|url| { + Arc::new(GrpcNoteTransportClient::new( + url.to_string(), + timeout.as_millis().try_into().expect("timeout should fit into u64"), + )) + }); + let metadata = Metadata { id: faucet.faucet_id(), max_supply, decimals, explorer_url, base_amount, + note_transport_url, }; - let note_transport_client = note_transport_url.map(|url| { - Arc::new(GrpcNoteTransportClient::new( - url.to_string(), - timeout.as_millis().try_into().expect("timeout should fit into u64"), - )) - }); - // We keep a channel sender open in the main thread to avoid the faucet closing before // servers can propagate any errors. let tx_mint_requests_clone = tx_mint_requests.clone(); diff --git a/crates/contracts/mint-tx/.cargo/config.toml b/crates/contracts/mint-tx/.cargo/config.toml new file mode 100644 index 00000000..72bc2bef --- /dev/null +++ b/crates/contracts/mint-tx/.cargo/config.toml @@ -0,0 +1,5 @@ +[build] +target = "wasm32-wasip2" + +[target.wasm32-wasip2] +rustflags = ["--cfg", "miden"] diff --git a/crates/contracts/mint-tx/.gitignore b/crates/contracts/mint-tx/.gitignore new file mode 100644 index 00000000..2f7896d1 --- /dev/null +++ b/crates/contracts/mint-tx/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/crates/contracts/mint-tx/Cargo.toml b/crates/contracts/mint-tx/Cargo.toml new file mode 100644 index 00000000..89e20a62 --- /dev/null +++ b/crates/contracts/mint-tx/Cargo.toml @@ -0,0 +1,24 @@ +[package] +authors.workspace = true +description = "Miden faucet's mint transaction script" +edition.workspace = true +homepage.workspace = true +keywords = ["faucet", "miden", "mint"] +license.workspace = true +name = "miden-faucet-mint-tx" +readme = "README.md" +repository.workspace = true +rust-version.workspace = true +version.workspace = true + +[lib] +crate-type = ["cdylib"] + +[dependencies] +miden = { workspace = true } + +[package.metadata.component] +package = "miden:mint-tx" + +[package.metadata.miden] +project-kind = "transaction-script" diff --git a/crates/contracts/mint-tx/README.md b/crates/contracts/mint-tx/README.md new file mode 100644 index 00000000..a58aec48 --- /dev/null +++ b/crates/contracts/mint-tx/README.md @@ -0,0 +1,9 @@ +# mint_tx + +A Miden transaction script project. + +## Build + +```bash +cargo miden build --release +``` diff --git a/crates/contracts/mint-tx/src/lib.rs b/crates/contracts/mint-tx/src/lib.rs new file mode 100644 index 00000000..6b35e22b --- /dev/null +++ b/crates/contracts/mint-tx/src/lib.rs @@ -0,0 +1,78 @@ +//! Faucet mint transaction script. +//! +//! This script mints fungible assets and distributes them to recipients by creating output +//! notes. +//! +//! # Script argument +//! +//! The script receives a single `Word` argument (`arg`) which is the RPO hash commitment +//! of the note data stored in the advice map. +//! +//! # Advice map +//! +//! The advice map must contain an entry keyed by `arg` with the following layout: +//! +//! ```text +//! [RECIPIENT_1, note_type_1, tag_1, amount_1, RECIPIENT_2, note_type_2, tag_2, amount_2, ..., padding] +//! ``` +//! +//! Where for each note: +//! - `RECIPIENT` (4 felts): the note recipient digest +//! - `note_type` (1 felt): the note type (1 = public, 2 = private) +//! - `tag` (1 felt): the note tag +//! - `amount` (1 felt): the amount of tokens to mint +//! +//! The data must be padded with zeros to the next multiple of 4 felts (word-aligned). +//! +//! # Account component +//! +//! The script calls `account.mint()` from the faucet account component, which internally +//! creates a fungible asset, mints it via the kernel, and creates an output note with the asset. + +#![no_std] +#![feature(alloc_error_handler)] + +use miden::intrinsics::advice::adv_push_mapvaln; +use miden::tx::update_expiration_block_delta; +use miden::{Felt, Recipient, Word, faucet, output_note, pipe_words_to_memory, tx_script}; + +/// Number of felts per note in the advice map data. +/// +/// Layout: `[RECIPIENT(4), note_type(1), tag(1), amount(1)]` +const NOTE_ARGS_SIZE: usize = 7; + +/// Transaction expiration delta in blocks. +const EXPIRATION_DELTA: u32 = 10; + +#[tx_script] +fn run(arg: Word) { + update_expiration_block_delta(Felt::from_u32(EXPIRATION_DELTA)); + + // Push note data from the advice map onto the advice stack using the commitment as key. + let num_felts = adv_push_mapvaln(arg); + let num_felts_u64 = num_felts.as_canonical_u64(); + + // Pop the data from the advice stack into memory (requires word-aligned length). + let num_words = Felt::new((num_felts_u64 + 3) / 4); + let (_hash, input) = pipe_words_to_memory(num_words); + + let num_notes = num_felts_u64 as usize / NOTE_ARGS_SIZE; + + for idx in 0..num_notes { + let start = idx * NOTE_ARGS_SIZE; + let recipient = Recipient::from(Word::from([ + input[start], + input[start + 1], + input[start + 2], + input[start + 3], + ])); + let note_type = input[start + 4].into(); + let tag = input[start + 5].into(); + let amount = input[start + 6]; + + let asset = faucet::create_fungible_asset(amount); + faucet::mint(asset); + let note_idx = output_note::create(tag, note_type, recipient); + output_note::add_asset(asset, note_idx); + } +} diff --git a/crates/contracts/mint-tx/wit/miden-faucet-account.wit b/crates/contracts/mint-tx/wit/miden-faucet-account.wit new file mode 100644 index 00000000..c59ba7b2 --- /dev/null +++ b/crates/contracts/mint-tx/wit/miden-faucet-account.wit @@ -0,0 +1,16 @@ +// This file is auto-generated by the `#[component]` macro. +// Do not edit this file manually. + +package miden:faucet-account@0.1.0; + +use miden:base/core-types@1.0.0; + +interface miden-faucet-account { + use core-types.{felt, note-type, recipient, tag}; + + mint-and-send: func(amount: felt, tag: tag, note-type: note-type, recipient: recipient); +} + +world miden-faucet-account-world { + import miden-faucet-account; +} diff --git a/crates/faucet/Cargo.toml b/crates/faucet/Cargo.toml index 2ca38840..d61fcfdf 100644 --- a/crates/faucet/Cargo.toml +++ b/crates/faucet/Cargo.toml @@ -16,8 +16,10 @@ workspace = true [dependencies] # Miden dependencies. +cargo-miden = { workspace = true } miden-client = { features = ["tonic"], workspace = true } miden-client-sqlite-store = { workspace = true } +miden-standards = { version = "0.14" } # External dependencies. anyhow = { workspace = true } @@ -28,9 +30,6 @@ tokio = { features = ["fs"], workspace = true } tracing = { workspace = true } url = { workspace = true } -[build-dependencies] -miden-client = { workspace = true } - [dev-dependencies] miden-client = { features = ["testing", "tonic"], workspace = true } uuid = { workspace = true } diff --git a/crates/faucet/asm/tx_scripts/mint.masm b/crates/faucet/asm/tx_scripts/mint.masm deleted file mode 100644 index 2984b762..00000000 --- a/crates/faucet/asm/tx_scripts/mint.masm +++ /dev/null @@ -1,75 +0,0 @@ -const EXPIRATION_DELTA=10 - -#! Returns a boolean indicating if the notes counter `i` has reached `n` -#! -#! Inputs: [i, n] -#! Outputs: [i != n, i, n] -proc check_continue_neq - # [i, n] - dup.1 - dup.1 - neq - # [i != n , i, n] -end - -#! Distributes freshly minted fungible assets to the `n` provided recipients. -#! -#! Inputs: -#! Operand stack: [COMMITMENT] -#! Advice map: { -#! COMMITMENT: [n, RECIPIENT_1, note_type_1, tag_1, amount_1, RECIPIENT_2, note_type_2, tag_2, amount_2, ...] -#! } -#! Outputs: -#! Operant stack: [] -#! -#! Where: -#! - n is the amount of recipients to receive assets -#! - amount is the amount to be minted and sent. -#! - tag is the tag to be included in the note. -#! - note_type is the type of the note that holds the asset. -#! - RECIPIENT is the recipient of the asset, i.e., -#! hash(hash(hash(serial_num, [0; 4]), script_root), input_commitment). -begin - # Set the transaction expiration delta (10 blocks) - push.EXPIRATION_DELTA - exec.::miden::protocol::tx::update_expiration_block_delta - # OS => [] - - adv.push_mapval dropw - # OS => [] - # AS => [n, RECIPIENT_1, note_type_1, tag_1, amount_1, ...] - - adv_push.1 push.0 - # OS => [0, n] - # AS => [RECIPIENT_1, note_type_1, tag_1, amount_1, ...] - - exec.check_continue_neq - # OS => [0, 0, n] - - while.true - # OS => [i, n] - # AS => [RECIPIENT_i, note_type_i, tag_i, amount_i, ...] - - # set the params for the distribute call by getting values from the advice stack - # We need stack: [amount, tag, note_type, RECIPIENT(4), pad(9), i, n] - push.0.0.0.0.0.0.0.0.0 adv_push.4 adv_push.3 - # OS => [amount_i, tag_i, note_type_i, RECIPIENT_i(4), pad(9), i, n] - # AS => [...] - - call.::miden::standards::faucets::basic_fungible::mint_and_send - # OS => [note_idx, pad(15), i, n] - - dropw dropw dropw dropw - # OS => [i, n] - - add.1 - # OS => [i + 1, n] - - exec.check_continue_neq - # OS => [i + 1 != n, i + 1, n] - end - # OS => [n, n] - - drop drop - # OS => [] -end diff --git a/crates/faucet/build.rs b/crates/faucet/build.rs deleted file mode 100644 index e41d9198..00000000 --- a/crates/faucet/build.rs +++ /dev/null @@ -1,86 +0,0 @@ -use std::env; -use std::fs::{self}; -use std::io::{self}; -use std::path::{Path, PathBuf}; - -use miden_client::assembly::CodeBuilder; -use miden_client::utils::Serializable; - -const ASSETS_DIR: &str = "assets"; -const ASM_DIR: &str = "asm"; -const ASM_TX_SCRIPTS_DIR: &str = "tx_scripts"; - -/// Compile contents of asm directory into .txs files. -fn main() { - // re-build when the MASM code changes - println!("cargo::rerun-if-changed={ASM_DIR}/"); - - let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); - let source_dir = Path::new(&crate_dir).join(ASM_DIR); - - let build_dir = env::var("OUT_DIR").unwrap(); - let target_dir = Path::new(&build_dir).join(ASSETS_DIR); - - compile_transaction_scripts( - &source_dir.join(ASM_TX_SCRIPTS_DIR), - &target_dir.join(ASM_TX_SCRIPTS_DIR), - ); -} - -/// Reads all MASM files from the `source_dir`, compiles each file individually into a TXS -/// file, and stores the compiled files into the `target_dir`. -/// -/// The source files are expected to contain executable programs. -fn compile_transaction_scripts(source_dir: &Path, target_dir: &Path) { - fs::create_dir_all(target_dir).expect("should create target directory"); - - let masm_files = get_masm_files(source_dir).expect("should find MASM files"); - for masm_file_path in masm_files { - let script = CodeBuilder::new() - .compile_tx_script(masm_file_path.clone()) - .expect("program should assemble correctly"); - - let masm_file_name = masm_file_path.file_name().expect("file name should exist"); - let mut txs_file_path = target_dir.join(masm_file_name); - - // write the binary TXS to the output dir - txs_file_path.set_extension("txs"); - fs::write(txs_file_path, script.to_bytes()).expect("should write .txs file"); - } -} - -// HELPER FUNCTIONS -// ================================================================================================ - -/// Returns a vector with paths to all MASM files in the specified directory. -/// -/// All non-MASM files are skipped. -fn get_masm_files(dir_path: &Path) -> io::Result> { - let mut files = Vec::new(); - - let entries = fs::read_dir(dir_path)?; - for entry in entries { - let file_path = entry?.path(); - if is_masm_file(&file_path)? { - files.push(file_path); - } - } - - Ok(files) -} - -/// Returns true if the provided path resolves to a file with `.masm` extension. -/// -/// # Errors -/// Returns an error if the path could not be converted to a UTF-8 string. -fn is_masm_file(path: &Path) -> io::Result { - if let Some(extension) = path.extension() { - let extension = extension - .to_str() - .ok_or_else(|| io::Error::other("invalid UTF-8 filename"))? - .to_lowercase(); - Ok(extension == "masm") - } else { - Ok(false) - } -} diff --git a/crates/faucet/src/lib.rs b/crates/faucet/src/lib.rs index 9c841d02..ac8ba8ee 100644 --- a/crates/faucet/src/lib.rs +++ b/crates/faucet/src/lib.rs @@ -1,5 +1,6 @@ use std::collections::BTreeSet; -use std::path::PathBuf; +use std::iter::repeat; +use std::path::{Path, PathBuf}; use std::sync::Arc; use std::time::Duration; @@ -12,7 +13,7 @@ use miden_client::builder::ClientBuilder; use miden_client::crypto::{RandomCoin, Rpo256}; use miden_client::keystore::{FilesystemKeyStore, Keystore}; use miden_client::note::{Note, NoteAttachment, NoteError, NoteId, P2idNote}; -use miden_client::rpc::{Endpoint, GrpcClient}; +use miden_client::rpc::{Endpoint, GrpcClient, GrpcError, RpcError}; use miden_client::store::{NoteFilter, TransactionFilter}; use miden_client::sync::{StateSync, StateSyncInput, SyncSummary}; use miden_client::transaction::{ @@ -24,7 +25,6 @@ use miden_client::transaction::{ TransactionRequestError, TransactionScript, }; -use miden_client::utils::Deserializable; use miden_client::{Client, ClientError, Felt, RemoteTransactionProver, Word}; use miden_client_sqlite_store::SqliteStore; use rand::{Rng, rng}; @@ -34,18 +34,20 @@ use tracing::{Instrument, error, info, info_span, instrument, warn}; use url::Url; mod note_screener; +mod package; pub mod requests; pub mod types; use crate::note_screener::NoteScreener; +use crate::package::{compile_dir_with_libs, write_faucet_component_masl}; use crate::requests::{MintError, MintRequest, MintResponse, MintResponseSender}; use crate::types::AssetAmount; const COMPONENT: &str = "miden-faucet-client"; -const TX_SCRIPT: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/assets/tx_scripts/mint.txs")); const KEYSTORE_PATH: &str = "keystore"; const DEFAULT_ACCOUNT_ID_SETTING: &str = "faucet_default_account_id"; +const MINT_TX_SCRIPT_SETTING: &str = "mint_tx_script"; // FAUCET CLIENT // ================================================================================================ @@ -125,8 +127,12 @@ impl Faucet { let note_screener = NoteScreener::new(sqlite_store.clone()); let grpc_client = Arc::new(GrpcClient::new(&config.node_endpoint, config.timeout.as_millis() as u64)); - let state_sync_component = - StateSync::new(grpc_client.clone(), Arc::new(note_screener), None); + let state_sync_component = StateSync::new( + grpc_client.clone(), + Some(sqlite_store.clone()), + Arc::new(note_screener), + None, + ); Self::sync_state(account.id(), &mut client, &state_sync_component).await?; let add_result = client.add_account(&account, false).await; @@ -139,6 +145,20 @@ impl Faucet { } client.set_setting(DEFAULT_ACCOUNT_ID_SETTING.to_owned(), account.id()).await?; + // Compile the mint tx script from Rust via cargo-miden, linking the official + // BasicFungibleFaucet account component so that `account.mint_and_send()` resolves + // to the correct procedure digest. + let workspace_root = Path::new(env!("CARGO_MANIFEST_DIR")); + let tmp_dir = std::env::temp_dir().join("miden-faucet-build"); + let faucet_masl = write_faucet_component_masl(&tmp_dir)?; + let package = compile_dir_with_libs( + &workspace_root.join("../contracts/mint-tx"), + true, + &[&faucet_masl], + )?; + let script = TransactionScript::new(package.unwrap_program()); + client.set_setting(MINT_TX_SCRIPT_SETTING.to_string(), script).await?; + if deploy { let mut faucet = Self::load(config).await?; @@ -155,10 +175,11 @@ impl Faucet { #[instrument(target = COMPONENT, name = "faucet.load", fields(account_id), skip_all, err)] pub async fn load(config: &FaucetConfig) -> anyhow::Result { let span = tracing::Span::current(); + let sqlite_store = Arc::new(SqliteStore::new(config.store_path.clone()).await?); let mut client = ClientBuilder::new() .grpc_client(&config.node_endpoint, Some(config.timeout.as_millis() as u64)) .filesystem_keystore(KEYSTORE_PATH)? - .store(Arc::new(SqliteStore::new(config.store_path.clone()).await?)) + .store(sqlite_store.clone()) .build() .await .context("failed to build client")?; @@ -186,13 +207,16 @@ impl Faucet { let issuance_value = Self::read_issuance_from_store(&client, account.id()).await?; let (issuance, _) = watch::channel(issuance_value); - let script = TransactionScript::read_from_bytes(TX_SCRIPT)?; + let script = client + .get_setting(MINT_TX_SCRIPT_SETTING.to_string()) + .await? + .context("client db should contain the mint tx script")?; - let note_screener = - NoteScreener::new(Arc::new(SqliteStore::new(config.store_path.clone()).await?)); + let note_screener = NoteScreener::new(sqlite_store.clone()); let grpc_client = Arc::new(GrpcClient::new(&config.node_endpoint, config.timeout.as_millis() as u64)); - let state_sync_component = StateSync::new(grpc_client, Arc::new(note_screener), None); + let state_sync_component = + StateSync::new(grpc_client, Some(sqlite_store.clone()), Arc::new(note_screener), None); Ok(Self { id, @@ -274,7 +298,8 @@ impl Faucet { Ok(()) => (), Err(error) => { if let Some(ClientError::RpcError(_)) = error.downcast_ref::() { - error!(?error, "RPC error, discarding batch"); + let error_chain = format!("{error:#}"); + error!(error = %error_chain, "RPC error, discarding batch"); } else { anyhow::bail!(error.context("failed to mint batch")); } @@ -390,23 +415,24 @@ impl Faucet { &mut self, notes: &[Note], ) -> Result { - // Build the transaction - let expected_output_recipients: Vec<_> = - notes.iter().map(Note::recipient).cloned().collect(); - let n = notes.len() as u64; - let mut note_data = vec![Felt::new(n)]; + let mut note_data = vec![]; for note in notes { // SAFETY: these are p2id notes with only one fungible asset let amount = note.assets().iter().next().unwrap().unwrap_fungible().amount(); - note_data.extend(note.recipient().digest().iter().rev()); + note_data.extend(note.recipient().digest().iter()); note_data.push(Felt::from(note.metadata().note_type())); note_data.push(Felt::from(note.metadata().tag())); note_data.push(Felt::new(amount)); } + // Pad to word alignment for pipe_words_to_memory + note_data.extend(repeat(Felt::ZERO).take(4 - note_data.len() % 4)); let note_data_commitment = Rpo256::hash_elements(¬e_data); let advice_map = [(note_data_commitment, note_data)]; + let expected_output_recipients: Vec<_> = + notes.iter().map(Note::recipient).cloned().collect(); + TransactionRequestBuilder::new() .custom_script(self.script.clone()) .extend_advice_map(advice_map) @@ -418,44 +444,99 @@ impl Faucet { /// Executes, proves, and then submits a transaction using the local miden-client. /// This results in submitting the transaction to the node and updating the local db to track /// the created notes. - #[instrument(target = COMPONENT, name = "faucet.mint.submit_new_transaction", skip_all, err)] + #[instrument( + target = COMPONENT, + name = "faucet.mint.submit_new_transaction", + skip_all, + err, + fields( + rpc.system = tracing::field::Empty, + rpc.method = tracing::field::Empty, + rpc.grpc.status_code = tracing::field::Empty, + exception.type = tracing::field::Empty, + exception.message = tracing::field::Empty, + ) + )] async fn submit_new_transaction( &mut self, tx_request: TransactionRequest, ) -> Result { // Execute the transaction + let execute_span = info_span!(target: COMPONENT, "faucet.mint.execute", exception.message = tracing::field::Empty); let tx_result = self .client .execute_transaction(self.id.account_id, tx_request) - .instrument(info_span!(target: COMPONENT, "faucet.mint.execute")) - .await?; + .instrument(execute_span.clone()) + .await + .inspect_err(|e| { + execute_span.record("exception.message", tracing::field::display(e)); + record_grpc_error_fields(e); + })?; let tx_id = tx_result.executed_transaction().id(); let proven_transaction = { + let remote_span = info_span!( + target: COMPONENT, + "faucet.mint.prove_remote", + exception.message = tracing::field::Empty, + ); let remote_proven_transaction = self .client .prove_transaction_with(&tx_result, self.tx_prover.clone()) - .instrument(info_span!(target: COMPONENT, "faucet.mint.prove_remote")) - .await; + .instrument(remote_span.clone()) + .await + .inspect_err(|e| { + remote_span.record("exception.message", tracing::field::display(e)); + }); match remote_proven_transaction { Ok(proven_transaction) => proven_transaction, Err(error) => { error!(?error, "Failed to prove transaction with remote prover"); + let local_span = info_span!( + target: COMPONENT, + "faucet.mint.prove_local", + exception.message = tracing::field::Empty, + ); self.client .prove_transaction(&tx_result) - .instrument(info_span!(target: COMPONENT, "faucet.mint.prove_local")) - .await? + .instrument(local_span.clone()) + .await + .inspect_err(|e| { + local_span.record("exception.message", tracing::field::display(e)); + record_grpc_error_fields(e); + })? }, } }; + let submit_span = info_span!( + target: COMPONENT, + "faucet.mint.submit_transaction", + exception.message = tracing::field::Empty, + ); let submission_height = self .client .submit_proven_transaction(proven_transaction, &tx_result) - .instrument(info_span!(target: COMPONENT, "faucet.mint.submit_transaction")) - .await?; - - self.client.apply_transaction(&tx_result, submission_height).await?; + .instrument(submit_span.clone()) + .await + .inspect_err(|e| { + submit_span.record("exception.message", tracing::field::display(e)); + record_grpc_error_fields(e); + })?; + + let apply_span = info_span!( + target: COMPONENT, + "faucet.mint.apply_transaction", + exception.message = tracing::field::Empty, + ); + self.client + .apply_transaction(&tx_result, submission_height) + .instrument(apply_span.clone()) + .await + .inspect_err(|e| { + apply_span.record("exception.message", tracing::field::display(e)); + record_grpc_error_fields(e); + })?; Ok(tx_id) } @@ -507,6 +588,55 @@ impl Faucet { // HELPER FUNCTIONS // ================================================================================================ +/// Records gRPC error details from a [`ClientError`] onto the current tracing span using the +/// OpenTelemetry RPC and exception semantic conventions +/// (). +/// +/// Sub-step errors propagate up to the parent `submit_new_transaction` span via `?`, but the +/// `#[instrument(..., err)]` macro only captures the error's `Display` output. This pulls the +/// structured fields out of [`RpcError::RequestError`] and records them as `rpc.system`, +/// `rpc.method`, `rpc.grpc.status_code`, `exception.type`, and `exception.message`. +fn record_grpc_error_fields(err: &ClientError) { + let span = tracing::Span::current(); + if let ClientError::RpcError(rpc_err) = err { + span.record("exception.message", tracing::field::display(rpc_err)); + if let RpcError::RequestError { endpoint, error_kind, endpoint_error, .. } = rpc_err { + span.record("rpc.system", "grpc"); + span.record("rpc.method", tracing::field::display(endpoint)); + span.record("rpc.grpc.status_code", grpc_status_code(error_kind)); + span.record("exception.type", tracing::field::debug(error_kind)); + if let Some(ee) = endpoint_error { + // Override with the more specific node-side message when available. + span.record("exception.message", tracing::field::display(ee)); + } + } + } +} + +/// Maps a [`GrpcError`] variant to its canonical gRPC numeric status code, as defined by +/// . Used for the +/// `rpc.grpc.status_code` OpenTelemetry attribute. +fn grpc_status_code(kind: &GrpcError) -> i64 { + match kind { + GrpcError::Cancelled => 1, + GrpcError::Unknown(_) => 2, + GrpcError::InvalidArgument => 3, + GrpcError::DeadlineExceeded => 4, + GrpcError::NotFound => 5, + GrpcError::AlreadyExists => 6, + GrpcError::PermissionDenied => 7, + GrpcError::ResourceExhausted => 8, + GrpcError::FailedPrecondition => 9, + GrpcError::Aborted => 10, + GrpcError::OutOfRange => 11, + GrpcError::Unimplemented => 12, + GrpcError::Internal => 13, + GrpcError::Unavailable => 14, + GrpcError::DataLoss => 15, + GrpcError::Unauthenticated => 16, + } +} + /// Builds a collection of `P2ID` notes from a set of mint requests. /// /// # Errors @@ -559,9 +689,33 @@ mod tests { use super::*; use crate::types::NoteType; + #[test] + fn generate_faucet_component_masl() { + let mint_tx_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("../contracts/mint-tx"); + write_faucet_component_masl(&mint_tx_dir).unwrap(); + } + + #[tokio::test] + async fn tx_script_compiles_and_executes() { + let store = SqliteStore::new(temp_dir().join(format!("{}.sqlite3", Uuid::new_v4()))) + .await + .unwrap(); + let mut faucet = build_faucet(Arc::new(store)).await; + + // Execute an empty transaction just to verify the script runs + let empty_tx_request = TransactionRequestBuilder::new() + .custom_script(faucet.script.clone()) + .build() + .unwrap(); + let result = + faucet.client.execute_transaction(faucet.id.account_id, empty_tx_request).await; + + assert!(result.is_ok(), "tx script should execute: {:?}", result.err()); + } + #[tokio::test] async fn batch_requests() { - let batch_size = 32; + let batch_size = 4; let (tx_mint_requests, rx_mint_requests) = mpsc::channel(1000); let mut receivers = vec![]; @@ -603,8 +757,10 @@ mod tests { /// Builds a faucet using a mock client. async fn build_faucet(store: Arc) -> Faucet { let secret = SecretKey::new(); + let symbol = TokenSymbol::new("TEST").unwrap(); let max_supply = Felt::try_from(1_000_000_000_000_u64).unwrap(); + let account = AccountBuilder::new(rand::random()) .account_type(AccountType::FungibleFaucet) .storage_mode(AccountStorageMode::Public) @@ -634,19 +790,29 @@ mod tests { client.ensure_genesis_in_place().await.unwrap(); client.add_account(&account, false).await.unwrap(); + let tmp_dir = temp_dir().join(format!("miden-faucet-build-{}", Uuid::new_v4())); + let faucet_masl = write_faucet_component_masl(&tmp_dir).unwrap(); + let package = + compile_dir_with_libs(Path::new("../contracts/mint-tx"), true, &[&faucet_masl]) + .unwrap(); + let program = package.unwrap_program(); + let script = + TransactionScript::from_parts(program.mast_forest().clone(), program.entrypoint()); + let (issuance, _) = watch::channel(AssetAmount::new(0).unwrap()); Faucet { id: FaucetId::new(account.id(), NetworkId::Testnet), client, state_sync_component: StateSync::new( mock_rpc, + Some(store.clone()), Arc::new(NoteScreener::new(store.clone())), None, ), tx_prover: Arc::new(LocalTransactionProver::default()), issuance, max_supply: AssetAmount::new(1_000_000_000_000).unwrap(), - script: TransactionScript::read_from_bytes(TX_SCRIPT).unwrap(), + script, } } } diff --git a/crates/faucet/src/package.rs b/crates/faucet/src/package.rs new file mode 100644 index 00000000..2fbdffa0 --- /dev/null +++ b/crates/faucet/src/package.rs @@ -0,0 +1,68 @@ +use std::path::Path; + +use anyhow::{Context, bail}; +use cargo_miden::{OutputType, run}; +use miden_client::Deserializable; +use miden_client::utils::Serializable; +use miden_client::vm::Package; +use miden_standards::account::components::basic_fungible_faucet_library; + +/// Compiles a Miden project, optionally linking additional libraries. +pub fn compile_dir_with_libs( + dir: &Path, + release: bool, + link_libraries: &[&Path], +) -> anyhow::Result { + let profile = if release { "--release" } else { "--debug" }; + let manifest_path = dir.join("Cargo.toml"); + let manifest_arg = manifest_path.to_string_lossy(); + + let mut args = vec![ + "cargo".to_string(), + "miden".to_string(), + "build".to_string(), + profile.to_string(), + "--manifest-path".to_string(), + manifest_arg.to_string(), + ]; + for lib_path in link_libraries { + args.push("--link-library".to_string()); + args.push(lib_path.to_string_lossy().to_string()); + } + + let output = run(args.into_iter(), OutputType::Masm) + .context("Failed to compile project")? + .context("Cargo miden build returned None")?; + + let artifact_path = match output { + cargo_miden::CommandOutput::BuildCommandOutput { output } => match output { + cargo_miden::BuildOutput::Masm { artifact_path } => artifact_path, + other @ cargo_miden::BuildOutput::Wasm { .. } => { + bail!("Expected Masm output, got {other:?}") + }, + }, + other @ cargo_miden::CommandOutput::NewCommandOutput { .. } => { + bail!("Expected BuildCommandOutput, got {other:?}") + }, + }; + + let package_bytes = std::fs::read(&artifact_path) + .context(format!("Failed to read compiled package from {}", artifact_path.display()))?; + + Package::read_from_bytes(&package_bytes).context("Failed to deserialize package from bytes") +} + +/// Writes the official `BasicFungibleFaucet` account component as a `.masl` library +/// to the given directory, returning the path to the written file. +/// +/// The Miden compiler (`cargo miden`) accepts `.masl` libraries as link libraries +/// via `--link-library`. +pub fn write_faucet_component_masl(dir: &Path) -> anyhow::Result { + let lib = basic_fungible_faucet_library(); + + std::fs::create_dir_all(dir)?; + let masl_path = dir.join("basic_fungible_faucet.masl"); + std::fs::write(&masl_path, lib.to_bytes()).context("Failed to write faucet .masl")?; + + Ok(masl_path) +} diff --git a/docs/src/rest-api.md b/docs/src/rest-api.md index 8912b775..ab0747ed 100644 --- a/docs/src/rest-api.md +++ b/docs/src/rest-api.md @@ -57,7 +57,7 @@ For detailed information about the token request flow, see the [Architecture](./ ### Get Metadata -**Endpoint**: `GET /metadata` +**Endpoint**: `GET /get_metadata` - **Purpose**: Request the faucet metadata to show on the frontend @@ -67,6 +67,7 @@ For detailed information about the token request flow, see the [Architecture](./ - `max_supply` (number): maximum available supply of the faucet (in base units) - `decimals` (number): number of decimals of the token minted by the faucet. It is needed to convert base units into token amounts. - `explorer_url` (string): URL to view the transaction in the explorer. Only present if available for the current network. + - `note_transport_url` (string): URL of the note transport layer (NTL) endpoint used by the faucet. Only present if the faucet was configured with `--note-transport-url`. ### Get Note diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..9522ff23 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +channel = "nightly-2025-12-10" +components = ["clippy", "llvm-tools", "rust-src", "rustfmt"] +profile = "minimal" +targets = ["wasm32-wasip2"]