From f855071fbff0cc1f1bb109cf39a82d56850e844c Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 17 May 2024 13:18:20 +0100 Subject: [PATCH] Upgrade to wasmer 4.3.1 --- Cargo.lock | 912 +++++++++++------- Cargo.toml | 10 +- crates/benches/Cargo.toml | 1 - crates/benches/wasm_opcodes.rs | 31 +- crates/namada/Cargo.toml | 6 - crates/namada/src/vm/host_env.rs | 21 +- .../src/vm/wasm/compilation_cache/common.rs | 45 +- crates/namada/src/vm/wasm/host_env.rs | 449 +++++++-- crates/namada/src/vm/wasm/memory.rs | 187 ++-- crates/namada/src/vm/wasm/run.rs | 195 ++-- wasm/Cargo.lock | 814 ++++++++++------ wasm/Cargo.toml | 2 +- wasm/tx_bond/Cargo.toml | 2 +- .../tx_change_validator_commission/Cargo.toml | 2 +- wasm/tx_redelegate/Cargo.toml | 2 +- wasm/tx_unbond/Cargo.toml | 2 +- wasm/tx_withdraw/Cargo.toml | 2 +- wasm/vp_implicit/Cargo.toml | 2 +- wasm/vp_user/Cargo.toml | 2 +- wasm_for_tests/Cargo.lock | 800 +++++++++------ wasm_for_tests/Cargo.toml | 2 +- 21 files changed, 2252 insertions(+), 1237 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 49188b72541..9b85f94ea9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,7 +54,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -349,7 +349,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustversion", - "serde 1.0.193", + "serde 1.0.202", "sync_wrapper", "tower", "tower-layer", @@ -384,7 +384,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.1", + "object", "rustc-demangle", ] @@ -433,7 +433,7 @@ dependencies = [ "displaydoc", "ics23", "prost 0.12.3", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha2 0.10.8", "tendermint 0.35.0", @@ -479,7 +479,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -488,7 +488,7 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -552,7 +552,7 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -765,7 +765,7 @@ version = "4.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", "utf8-width", ] @@ -803,7 +803,16 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", +] + +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +dependencies = [ + "serde 1.0.202", ] [[package]] @@ -823,7 +832,7 @@ version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -832,7 +841,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -844,7 +853,7 @@ dependencies = [ "camino", "cargo-platform", "semver 1.0.20", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "thiserror", ] @@ -935,29 +944,29 @@ dependencies = [ [[package]] name = "ciborium" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] name = "ciborium-io" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half", + "half 2.4.1", ] [[package]] @@ -998,6 +1007,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", + "clap_derive", ] [[package]] @@ -1012,6 +1022,18 @@ dependencies = [ "strsim", ] +[[package]] +name = "clap_derive" +version = "4.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "clap_lex" version = "0.6.0" @@ -1034,7 +1056,7 @@ dependencies = [ "digest 0.10.7", "hmac 0.12.1", "k256", - "serde 1.0.193", + "serde 1.0.202", "sha2 0.10.8", "thiserror", ] @@ -1068,7 +1090,7 @@ dependencies = [ "generic-array", "hex", "ripemd", - "serde 1.0.193", + "serde 1.0.202", "serde_derive", "sha2 0.10.8", "sha3", @@ -1127,7 +1149,7 @@ dependencies = [ "lazy_static", "nom 5.1.3", "rust-ini", - "serde 1.0.193", + "serde 1.0.202", "serde-hjson", "serde_json", "toml 0.5.11", @@ -1153,7 +1175,7 @@ dependencies = [ "cpufeatures", "hex", "proptest", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -1245,7 +1267,7 @@ checksum = "7879036156092ad1c22fe0d7316efc5a5eceec2bc3906462a2560215f2a2f929" dependencies = [ "cosmwasm-schema-derive", "schemars", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "thiserror", ] @@ -1276,7 +1298,7 @@ dependencies = [ "forward_ref", "hex", "schemars", - "serde 1.0.193", + "serde 1.0.202", "serde-json-wasm 0.5.2", "sha2 0.10.8", "static_assertions", @@ -1294,56 +1316,74 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" +checksum = "2a2ab4512dfd3a6f4be184403a195f76e81a8a9f9e6c898e19d2dc3ce20e0115" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" +checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc" dependencies = [ + "arrayvec 0.7.4", + "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", + "cranelift-egraph", "cranelift-entity", + "cranelift-isle", "gimli 0.26.2", "log", - "regalloc", + "regalloc2", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" +checksum = "639307b45434ad112a98f8300c0f0ab085cbefcd767efcdef9ef19d4c0756e74" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.3" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" + +[[package]] +name = "cranelift-egraph" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" +checksum = "624b54323b06e675293939311943ba82d323bb340468ce1889be5da7932c8d73" +dependencies = [ + "cranelift-entity", + "fxhash", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "log", + "smallvec", +] [[package]] name = "cranelift-entity" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" +checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" [[package]] name = "cranelift-frontend" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" +checksum = "0d70abacb8cfef3dc8ff7e8836e9c1d70f7967dfdac824a4cd5e30223415aca6" dependencies = [ "cranelift-codegen", "log", @@ -1351,6 +1391,12 @@ dependencies = [ "target-lexicon", ] +[[package]] +name = "cranelift-isle" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" + [[package]] name = "crc32fast" version = "1.3.2" @@ -1379,7 +1425,7 @@ dependencies = [ "plotters", "rayon", "regex", - "serde 1.0.193", + "serde 1.0.202", "serde_derive", "serde_json", "tinytemplate", @@ -1429,6 +1475,15 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.19" @@ -1556,7 +1611,17 @@ checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" dependencies = [ "cosmwasm-std", "schemars", - "serde 1.0.193", + "serde 1.0.202", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", ] [[package]] @@ -1565,8 +1630,22 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", ] [[package]] @@ -1582,17 +1661,41 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core", + "darling_core 0.20.3", "quote", "syn 2.0.52", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.5.0" @@ -1635,6 +1738,37 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -1716,6 +1850,15 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "document-features" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef5282ad69563b5fc40319526ba27e0e7363d552a896f0297d54f767717f9b95" +dependencies = [ + "litrs", +] + [[package]] name = "drain_filter_polyfill" version = "0.1.3" @@ -1742,7 +1885,7 @@ checksum = "7c1a2e028bbf7921549873b291ddc0cfe08b673d9489da81ac28898cd5a0e6e0" dependencies = [ "chrono", "rust_decimal", - "serde 1.0.193", + "serde 1.0.202", "thiserror", "time", "winnow 0.6.8", @@ -1777,7 +1920,7 @@ checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", - "memmap2", + "memmap2 0.5.10", ] [[package]] @@ -1814,7 +1957,7 @@ dependencies = [ "curve25519-dalek-ng", "hex", "rand_core 0.6.4", - "serde 1.0.193", + "serde 1.0.202", "sha2 0.9.9", "thiserror", "zeroize", @@ -1828,7 +1971,7 @@ checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek 4.1.2", "ed25519", - "serde 1.0.193", + "serde 1.0.202", "sha2 0.10.8", "subtle", "zeroize", @@ -1844,7 +1987,7 @@ dependencies = [ "hashbrown 0.12.3", "hex", "rand_core 0.6.4", - "serde 1.0.193", + "serde 1.0.202", "sha2 0.9.9", "zeroize", ] @@ -1897,7 +2040,7 @@ dependencies = [ "log", "rand 0.8.5", "rlp", - "serde 1.0.193", + "serde 1.0.202", "sha3", "zeroize", ] @@ -1937,7 +2080,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ - "darling", + "darling 0.20.3", "proc-macro2", "quote", "syn 2.0.52", @@ -1967,7 +2110,7 @@ checksum = "768064bd3a0e2bedcba91dc87ace90beea91acc41b6a01a3ca8e9aa8827461bf" dependencies = [ "log", "once_cell", - "serde 1.0.193", + "serde 1.0.202", "serde_json", ] @@ -1985,7 +2128,7 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "scrypt", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha2 0.10.8", "sha3", @@ -2003,7 +2146,7 @@ dependencies = [ "hex", "once_cell", "regex", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha3", "thiserror", @@ -2105,7 +2248,7 @@ checksum = "8c405f24ea3a517899ba7985385c43dc4a7eb1209af3b1e0a1a32d7dcc7f8d09" dependencies = [ "ethers-core", "once_cell", - "serde 1.0.193", + "serde 1.0.202", "serde_json", ] @@ -2123,7 +2266,7 @@ dependencies = [ "futures-util", "once_cell", "pin-project", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "thiserror", ] @@ -2143,7 +2286,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "syn 2.0.52", "toml 0.8.2", @@ -2186,7 +2329,7 @@ dependencies = [ "open-fastrlp", "rand 0.8.5", "rlp", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "strum 0.25.0", "syn 2.0.52", @@ -2206,7 +2349,7 @@ dependencies = [ "ethers-core", "reqwest", "semver 1.0.20", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "thiserror", "tracing", @@ -2229,7 +2372,7 @@ dependencies = [ "futures-util", "instant", "reqwest", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "thiserror", "tokio", @@ -2261,7 +2404,7 @@ dependencies = [ "once_cell", "pin-project", "reqwest", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "thiserror", "tokio", @@ -2610,9 +2753,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -2713,7 +2856,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.11", - "indexmap 2.1.0", + "indexmap 2.2.6", "slab", "tokio", "tokio-util 0.7.10", @@ -2727,12 +2870,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] -name = "hashbrown" -version = "0.11.2" +name = "half" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "ahash", + "cfg-if", + "crunchy", ] [[package]] @@ -3031,7 +3175,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "serde-json-wasm 1.0.1", ] @@ -3061,7 +3205,7 @@ dependencies = [ "primitive-types", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "uint", ] @@ -3088,7 +3232,7 @@ dependencies = [ "ibc-client-wasm-types", "ibc-core", "prost 0.12.3", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -3104,7 +3248,7 @@ dependencies = [ "ibc-core-handler-types", "ibc-core-host", "ibc-primitives", - "serde 1.0.193", + "serde 1.0.202", "tendermint 0.36.0", "tendermint-light-client-verifier", ] @@ -3133,7 +3277,7 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", - "serde 1.0.193", + "serde 1.0.202", "tendermint 0.36.0", "tendermint-light-client-verifier", "tendermint-proto 0.36.0", @@ -3152,7 +3296,7 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -3216,7 +3360,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "sha2 0.10.8", "subtle-encoding", "tendermint 0.36.0", @@ -3269,7 +3413,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "subtle-encoding", "tendermint 0.36.0", ] @@ -3289,7 +3433,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "subtle-encoding", ] @@ -3323,7 +3467,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "subtle-encoding", "tendermint 0.36.0", ] @@ -3364,7 +3508,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "subtle-encoding", "tendermint 0.36.0", ] @@ -3406,7 +3550,7 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", - "serde 1.0.193", + "serde 1.0.202", "sha2 0.10.8", "subtle-encoding", "tendermint 0.36.0", @@ -3425,7 +3569,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -3458,7 +3602,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "subtle-encoding", "tendermint 0.36.0", ] @@ -3488,7 +3632,7 @@ dependencies = [ "prost 0.12.3", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "tendermint 0.36.0", "time", ] @@ -3509,7 +3653,7 @@ dependencies = [ "prost 0.12.3", "scale-info", "schemars", - "serde 1.0.193", + "serde 1.0.202", "subtle-encoding", "tendermint-proto 0.36.0", "tonic", @@ -3561,7 +3705,7 @@ dependencies = [ "informalsystems-pbjson 0.6.0", "prost 0.12.3", "ripemd", - "serde 1.0.193", + "serde 1.0.202", "sha2 0.10.8", "sha3", ] @@ -3617,7 +3761,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -3637,7 +3781,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5ad43a3f5795945459d577f6589cf62a476e92c79b75e70cd954364e14ce17b" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -3652,7 +3796,7 @@ version = "0.8.0" source = "git+https://github.com/heliaxdev/index-set?tag=v0.8.1#b0d928f83cf0d465ccda299d131e8df2859b5184" dependencies = [ "borsh 1.2.1", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -3663,28 +3807,29 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +version = "2.2.4" +source = "git+https://github.com/heliaxdev/indexmap?tag=2.2.4-heliax-1#b5b5b547bd6ab04bbb16e060326a50ddaeb6c909" dependencies = [ + "borsh 1.2.1", "equivalent", "hashbrown 0.14.3", + "serde 1.0.202", ] [[package]] name = "indexmap" -version = "2.2.4" -source = "git+https://github.com/heliaxdev/indexmap?tag=2.2.4-heliax-1#b5b5b547bd6ab04bbb16e060326a50ddaeb6c909" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "borsh 1.2.1", "equivalent", "hashbrown 0.14.3", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -3694,7 +3839,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4eecd90f87bea412eac91c6ef94f6b1e390128290898cbe14f2b926787ae1fb" dependencies = [ "base64 0.13.1", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -3704,7 +3849,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aa4a0980c8379295100d70854354e78df2ee1c6ca0f96ffe89afeb3140e3a3d" dependencies = [ "base64 0.21.7", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -3742,13 +3887,13 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix", - "windows-sys 0.48.0", + "libc", + "windows-sys 0.52.0", ] [[package]] @@ -3811,7 +3956,7 @@ dependencies = [ "base64 0.21.7", "pem", "ring 0.16.20", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "simple_asn1", ] @@ -3954,7 +4099,7 @@ checksum = "02036c84eab9c48e85bc568d269221ba4f5e1cfbc785c3c2c2f6bb8c131f9287" dependencies = [ "async-trait", "ledger-transport", - "serde 1.0.193", + "serde 1.0.202", "thiserror", ] @@ -3973,9 +4118,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.150" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libgit2-sys" @@ -4049,7 +4194,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -4078,6 +4223,12 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "lock_api" version = "0.4.11" @@ -4094,27 +4245,6 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "loupe" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" -dependencies = [ - "indexmap 1.9.3", - "loupe-derive", - "rustversion", -] - -[[package]] -name = "loupe-derive" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "mach" version = "0.3.2" @@ -4133,9 +4263,9 @@ dependencies = [ "indexmap 1.9.3", "linked-hash-map", "regex", - "serde 1.0.193", + "serde 1.0.202", "serde_derive", - "serde_yaml", + "serde_yaml 0.7.5", ] [[package]] @@ -4192,7 +4322,7 @@ dependencies = [ "blake2b_simd", "bls12_381", "directories", - "getrandom 0.2.11", + "getrandom 0.2.15", "group", "itertools 0.11.0", "jubjub", @@ -4235,12 +4365,12 @@ dependencies = [ ] [[package]] -name = "memoffset" -version = "0.6.5" +name = "memmap2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" dependencies = [ - "autocfg", + "libc", ] [[package]] @@ -4383,7 +4513,6 @@ dependencies = [ "k256", "konst", "linkme", - "loupe", "masp_primitives", "masp_proofs", "namada_account", @@ -4420,7 +4549,7 @@ dependencies = [ "rayon", "regex", "ripemd", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha2 0.9.9", "slip10_ed25519", @@ -4440,8 +4569,6 @@ dependencies = [ "wasmer", "wasmer-cache", "wasmer-compiler-singlepass", - "wasmer-engine-dylib", - "wasmer-engine-universal", "wasmer-vm", "wasmparser 0.107.0", "wasmtimer", @@ -4460,7 +4587,7 @@ dependencies = [ "namada_migrations", "namada_storage", "proptest", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -4528,7 +4655,7 @@ dependencies = [ "rand_core 0.6.4", "reqwest", "rpassword", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha2 0.9.9", "tar", @@ -4568,7 +4695,6 @@ dependencies = [ "wasm-instrument", "wasmer", "wasmer-compiler-singlepass", - "wasmer-engine-universal", ] [[package]] @@ -4615,7 +4741,7 @@ dependencies = [ "prost-types 0.12.3", "rand 0.8.5", "rand_core 0.6.4", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha2 0.9.9", "smooth-operator", @@ -4669,7 +4795,7 @@ dependencies = [ "namada_tx", "namada_vote_ext", "rand 0.8.5", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "tendermint 0.36.0", "tendermint-proto 0.36.0", @@ -4687,7 +4813,7 @@ dependencies = [ "namada_core", "namada_macros", "namada_migrations", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "thiserror", "tracing", @@ -4725,7 +4851,7 @@ dependencies = [ "namada_macros", "namada_migrations", "proptest", - "serde 1.0.193", + "serde 1.0.202", "thiserror", ] @@ -4745,7 +4871,7 @@ dependencies = [ "namada_storage", "namada_trans_token", "proptest", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "smooth-operator", "thiserror", @@ -4778,7 +4904,7 @@ dependencies = [ "primitive-types", "proptest", "prost 0.12.3", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha2 0.9.9", "thiserror", @@ -4938,7 +5064,7 @@ dependencies = [ "pretty_assertions", "proptest", "proptest-state-machine", - "serde 1.0.193", + "serde 1.0.202", "smooth-operator", "test-log", "thiserror", @@ -5009,7 +5135,7 @@ dependencies = [ "rand_core 0.6.4", "regex", "ripemd", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha2 0.9.9", "slip10_ed25519", @@ -5041,7 +5167,7 @@ dependencies = [ "namada_tx", "proptest", "rayon", - "serde 1.0.193", + "serde 1.0.202", "smooth-operator", "test-log", "tracing", @@ -5092,7 +5218,7 @@ dependencies = [ "namada_migrations", "namada_replay_protection", "regex", - "serde 1.0.193", + "serde 1.0.202", "smooth-operator", "thiserror", "tracing", @@ -5148,7 +5274,7 @@ dependencies = [ "prost 0.12.3", "rand 0.8.5", "regex", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha2 0.9.9", "tar", @@ -5206,7 +5332,7 @@ dependencies = [ "prost 0.12.3", "prost-types 0.12.3", "rand 0.8.5", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sha2 0.9.9", "thiserror", @@ -5265,7 +5391,7 @@ dependencies = [ "namada_macros", "namada_migrations", "namada_tx", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -5514,7 +5640,7 @@ dependencies = [ "num", "num-derive 0.3.3", "num-traits 0.2.17", - "serde 1.0.193", + "serde 1.0.202", "serde_derive", ] @@ -5549,18 +5675,6 @@ dependencies = [ "syn 2.0.52", ] -[[package]] -name = "object" -version = "0.28.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" -dependencies = [ - "crc32fast", - "hashbrown 0.11.2", - "indexmap 1.9.3", - "memchr", -] - [[package]] name = "object" version = "0.32.1" @@ -5664,7 +5778,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6624905ddd92e460ff0685567539ed1ac985b2dee4c92c7edcd64fce905b00c" dependencies = [ "ct-codecs", - "getrandom 0.2.11", + "getrandom 0.2.15", "subtle", "zeroize", ] @@ -5701,7 +5815,7 @@ dependencies = [ "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -5873,7 +5987,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.6", ] [[package]] @@ -5942,9 +6056,9 @@ checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" dependencies = [ "num-traits 0.2.17", "plotters-backend", @@ -5955,15 +6069,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" dependencies = [ "plotters-backend", ] @@ -6344,7 +6458,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", ] [[package]] @@ -6400,7 +6514,7 @@ dependencies = [ "jubjub", "pasta_curves", "rand_core 0.6.4", - "serde 1.0.193", + "serde 1.0.202", "thiserror", "zeroize", ] @@ -6413,7 +6527,7 @@ checksum = "7a60db2c3bc9c6fd1e8631fee75abc008841d27144be744951d6b9b75f9b569c" dependencies = [ "rand_core 0.6.4", "reddsa", - "serde 1.0.193", + "serde 1.0.202", "thiserror", "zeroize", ] @@ -6433,19 +6547,20 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] -name = "regalloc" -version = "0.0.34" +name = "regalloc2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" +checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" dependencies = [ + "fxhash", "log", - "rustc-hash", + "slice-group-by", "smallvec", ] @@ -6542,7 +6657,7 @@ dependencies = [ "rustls", "rustls-native-certs", "rustls-pemfile", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "serde_urlencoded", "system-configuration", @@ -6589,7 +6704,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -6614,6 +6729,7 @@ dependencies = [ "bitvec", "bytecheck", "hashbrown 0.12.3", + "indexmap 1.9.3", "ptr_meta", "rend", "rkyv_derive", @@ -6874,8 +6990,9 @@ checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", - "serde 1.0.193", + "serde 1.0.202", "serde_json", + "url", ] [[package]] @@ -6968,6 +7085,12 @@ dependencies = [ "libc", ] +[[package]] +name = "self_cell" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" + [[package]] name = "semver" version = "0.11.0" @@ -6983,7 +7106,7 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -7015,9 +7138,9 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] @@ -7040,7 +7163,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -7049,7 +7172,18 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b4c031cd0d9014307d82b8abf653c0290fbdaeb4c02d00c63cf52f728628bf" +dependencies = [ + "js-sys", + "serde 1.0.202", + "wasm-bindgen", ] [[package]] @@ -7058,7 +7192,7 @@ version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -7067,15 +7201,15 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ - "half", - "serde 1.0.193", + "half 1.8.2", + "serde 1.0.202", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", @@ -7101,7 +7235,7 @@ checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -7121,7 +7255,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -7133,7 +7267,7 @@ dependencies = [ "form_urlencoded", "itoa", "ryu", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -7144,10 +7278,23 @@ checksum = "ef8099d3df28273c99a1728190c7a9f19d444c941044f64adf986bee7ec53051" dependencies = [ "dtoa", "linked-hash-map", - "serde 1.0.193", + "serde 1.0.202", "yaml-rust", ] +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap 2.2.6", + "itoa", + "ryu", + "serde 1.0.202", + "unsafe-libyaml", +] + [[package]] name = "serdect" version = "0.2.0" @@ -7155,7 +7302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" dependencies = [ "base16ct", - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -7212,6 +7359,16 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shared-buffer" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6c99835bad52957e7aa241d3975ed17c1e5f8c92026377d117a606f36b84b16" +dependencies = [ + "bytes", + "memmap2 0.6.2", +] + [[package]] name = "shlex" version = "1.3.0" @@ -7270,6 +7427,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + [[package]] name = "slip10_ed25519" version = "0.1.3" @@ -7595,7 +7758,7 @@ dependencies = [ "once_cell", "prost 0.12.3", "prost-types 0.12.3", - "serde 1.0.193", + "serde 1.0.202", "serde_bytes", "serde_json", "serde_repr", @@ -7625,7 +7788,7 @@ dependencies = [ "prost 0.12.3", "prost-types 0.12.3", "ripemd", - "serde 1.0.193", + "serde 1.0.202", "serde_bytes", "serde_json", "serde_repr", @@ -7645,7 +7808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e07b383dc8780ebbec04cfb603f3fdaba6ea6663d8dd861425b1ffa7761fe90d" dependencies = [ "flex-error", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "tendermint 0.36.0", "toml 0.8.2", @@ -7664,7 +7827,7 @@ dependencies = [ "flex-error", "futures", "regex", - "serde 1.0.193", + "serde 1.0.202", "serde_cbor", "serde_derive", "serde_json", @@ -7685,7 +7848,7 @@ checksum = "4216e487165e5dbd7af79952eaa0d5f06c5bde861eb76c690acd7f2d2a19395c" dependencies = [ "derive_more", "flex-error", - "serde 1.0.193", + "serde 1.0.202", "tendermint 0.36.0", "time", ] @@ -7702,7 +7865,7 @@ dependencies = [ "num-traits 0.2.17", "prost 0.12.3", "prost-types 0.12.3", - "serde 1.0.193", + "serde 1.0.202", "serde_bytes", "subtle-encoding", "time", @@ -7718,7 +7881,7 @@ dependencies = [ "flex-error", "prost 0.12.3", "prost-types 0.12.3", - "serde 1.0.193", + "serde 1.0.202", "serde_bytes", "subtle-encoding", "time", @@ -7734,13 +7897,13 @@ dependencies = [ "bytes", "flex-error", "futures", - "getrandom 0.2.11", + "getrandom 0.2.15", "peg", "pin-project", "rand 0.8.5", "reqwest", "semver 1.0.20", - "serde 1.0.193", + "serde 1.0.202", "serde_bytes", "serde_json", "subtle", @@ -7765,7 +7928,7 @@ checksum = "b233cec83c56c413ccc346af866cb9206a14d468fcecf0255080107bc9b103c0" dependencies = [ "ed25519-consensus", "gumdrop", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "simple-error", "tempfile", @@ -7882,7 +8045,7 @@ dependencies = [ "deranged", "itoa", "powerfmt", - "serde 1.0.193", + "serde 1.0.202", "time-core", "time-macros", ] @@ -7947,7 +8110,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", "serde_json", ] @@ -8096,7 +8259,19 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", +] + +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde 1.0.202", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", ] [[package]] @@ -8105,7 +8280,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", "serde_spanned", "toml_datetime", "toml_edit 0.20.2", @@ -8117,7 +8292,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", ] [[package]] @@ -8126,7 +8301,9 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", + "serde 1.0.202", + "serde_spanned", "toml_datetime", "winnow 0.5.25", ] @@ -8137,8 +8314,8 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.1.0", - "serde 1.0.193", + "indexmap 2.2.6", + "serde 1.0.202", "serde_spanned", "toml_datetime", "winnow 0.5.25", @@ -8318,7 +8495,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" dependencies = [ - "serde 1.0.193", + "serde 1.0.202", "tracing-core", ] @@ -8332,7 +8509,7 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "sharded-slab", "thread_local", @@ -8490,6 +8667,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.7.1" @@ -8511,6 +8694,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde 1.0.202", ] [[package]] @@ -8537,8 +8721,8 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.11", - "serde 1.0.193", + "getrandom 0.2.15", + "serde 1.0.202", ] [[package]] @@ -8613,7 +8797,7 @@ dependencies = [ "pin-project", "rustls-pemfile", "scoped-tls", - "serde 1.0.193", + "serde 1.0.202", "serde_json", "serde_urlencoded", "tokio", @@ -8722,46 +8906,38 @@ dependencies = [ [[package]] name = "wasmer" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce4a267a570e121c9375136adefa2c48810273907de9c6817bc19db4d6144bc" dependencies = [ + "bytes", "cfg-if", + "derivative", "indexmap 1.9.3", "js-sys", - "loupe", "more-asserts", + "rustc-demangle", + "serde 1.0.202", + "serde-wasm-bindgen", + "shared-buffer", "target-lexicon", "thiserror", + "tracing", "wasm-bindgen", - "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-derive", - "wasmer-engine", - "wasmer-engine-dylib", - "wasmer-engine-universal", "wasmer-types", "wasmer-vm", "wat", "winapi", ] -[[package]] -name = "wasmer-artifact" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "enumset", - "loupe", - "thiserror", - "wasmer-compiler", - "wasmer-types", -] - [[package]] name = "wasmer-cache" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a40804bcc2567f112003182fc5edc29584da5199c4a1f5a8d6a6e4b65feff0" dependencies = [ "blake3", "hex", @@ -8771,31 +8947,42 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9c23098e86ef1038155684fe50f0c1079a0e2a2e70f115b789df17e6ba98d20" dependencies = [ + "backtrace", + "bytes", + "cfg-if", + "enum-iterator", "enumset", - "loupe", + "lazy_static", + "leb128", + "memmap2 0.5.10", + "more-asserts", + "region", "rkyv", - "serde 1.0.193", - "serde_bytes", + "self_cell", + "shared-buffer", "smallvec", - "target-lexicon", "thiserror", "wasmer-types", - "wasmparser 0.83.0", + "wasmer-vm", + "wasmparser 0.121.2", + "winapi", + "xxhash-rust", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95287b79973ad5f485215733ef9f0d4bb951a6b7e655585d2bd3d4a4ba1253c9" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", "gimli 0.26.2", - "loupe", "more-asserts", "rayon", "smallvec", @@ -8803,185 +8990,128 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d78d59be3ce78ad859e176b88f0d5bec0120ece0684922d7c5da1289e251b1" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "enumset", "gimli 0.26.2", "lazy_static", - "loupe", "more-asserts", "rayon", "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] -name = "wasmer-derive" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "wasmer-engine" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "backtrace", - "enumset", - "lazy_static", - "loupe", - "memmap2", - "more-asserts", - "rustc-demangle", - "serde 1.0.193", - "serde_bytes", - "target-lexicon", - "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", - "wasmer-vm", -] - -[[package]] -name = "wasmer-engine-dylib" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "cfg-if", - "enum-iterator", - "enumset", - "leb128", - "libloading", - "loupe", - "object 0.28.4", - "rkyv", - "serde 1.0.193", - "tempfile", - "tracing", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-engine", - "wasmer-object", - "wasmer-types", - "wasmer-vm", - "which", -] - -[[package]] -name = "wasmer-engine-universal" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "cfg-if", - "enumset", - "leb128", - "loupe", - "region", - "rkyv", - "wasmer-compiler", - "wasmer-engine", - "wasmer-engine-universal-artifact", - "wasmer-types", - "wasmer-vm", - "winapi", -] - -[[package]] -name = "wasmer-engine-universal-artifact" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +name = "wasmer-config" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a0f70c177b1c5062cfe0f5308c3317751796fef9403c22a0cd7b4cacd4ccd8" dependencies = [ - "enum-iterator", - "enumset", - "loupe", - "rkyv", + "anyhow", + "bytesize", + "derive_builder", + "hex", + "indexmap 2.2.6", + "schemars", + "semver 1.0.20", + "serde 1.0.202", + "serde_cbor", + "serde_json", + "serde_yaml 0.9.34+deprecated", "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", + "toml 0.8.2", + "url", ] [[package]] -name = "wasmer-object" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +name = "wasmer-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48f36aeeecb655f15fdd358bdf6e4cec27df181468fa4226084157e8462bd5e" dependencies = [ - "object 0.28.4", - "thiserror", - "wasmer-compiler", - "wasmer-types", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "wasmer-types" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83cb97b6b20084757a2a8d548dc0d4179c3fe9e2d711740423a1e6aa3f8b9091" dependencies = [ - "backtrace", + "bytecheck", "enum-iterator", + "enumset", + "getrandom 0.2.15", + "hex", "indexmap 1.9.3", - "loupe", + "more-asserts", "rkyv", - "serde 1.0.193", + "sha2 0.10.8", + "target-lexicon", "thiserror", + "webc", + "xxhash-rust", ] [[package]] name = "wasmer-vm" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc1e19d986844b17b927ec8b0c7f3da6a7a2c2cb3b0f8ca5d4cb1a1f71bfb124" dependencies = [ "backtrace", "cc", "cfg-if", "corosensei", + "crossbeam-queue", + "dashmap", + "derivative", "enum-iterator", + "fnv", "indexmap 1.9.3", "lazy_static", "libc", - "loupe", "mach", - "memoffset 0.6.5", + "memoffset 0.9.0", "more-asserts", "region", - "rkyv", "scopeguard", - "serde 1.0.193", "thiserror", - "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.83.0" +version = "0.107.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" +checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +dependencies = [ + "indexmap 1.9.3", + "semver 1.0.20", +] [[package]] name = "wasmparser" -version = "0.107.0" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "indexmap 1.9.3", + "bitflags 2.5.0", + "indexmap 2.2.6", "semver 1.0.20", ] @@ -9030,6 +9160,36 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webc" +version = "6.0.0-alpha9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b4e8dd987046eede4348d660404ff990412631b7d493f9e547adcf2862cd5" +dependencies = [ + "anyhow", + "base64 0.21.7", + "bytes", + "cfg-if", + "clap", + "document-features", + "flate2", + "indexmap 1.9.3", + "libc", + "once_cell", + "semver 1.0.20", + "serde 1.0.202", + "serde_cbor", + "serde_json", + "sha2 0.10.8", + "shared-buffer", + "tar", + "tempfile", + "thiserror", + "toml 0.7.8", + "url", + "wasmer-config", +] + [[package]] name = "webpki-roots" version = "0.25.3" @@ -9394,6 +9554,12 @@ dependencies = [ "libc", ] +[[package]] +name = "xxhash-rust" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" + [[package]] name = "yaml-rust" version = "0.4.5" diff --git a/Cargo.toml b/Cargo.toml index ffbb08a1866..3e7b8811dbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -189,12 +189,10 @@ tracing-log = "0.2.0" tracing-subscriber = {version = "0.3.7", default-features = false, features = ["env-filter", "fmt"]} wasmparser = "0.107.0" wasm-instrument = {version = "0.4.0", features = ["sign_ext"]} -wasmer = {git = "https://github.com/heliaxdev/wasmer", rev = "255054f7f58b7b4a525f2fee6b9b86422d1ca15b"} -wasmer-cache = { git = "https://github.com/heliaxdev/wasmer", rev = "255054f7f58b7b4a525f2fee6b9b86422d1ca15b" } -wasmer-compiler-singlepass = { git = "https://github.com/heliaxdev/wasmer", rev = "255054f7f58b7b4a525f2fee6b9b86422d1ca15b" } -wasmer-engine-dylib = { git = "https://github.com/heliaxdev/wasmer", rev = "255054f7f58b7b4a525f2fee6b9b86422d1ca15b" } -wasmer-engine-universal = { git = "https://github.com/heliaxdev/wasmer", rev = "255054f7f58b7b4a525f2fee6b9b86422d1ca15b" } -wasmer-vm = { git = "https://github.com/heliaxdev/wasmer", rev = "255054f7f58b7b4a525f2fee6b9b86422d1ca15b" } +wasmer = "4.3.1" +wasmer-cache = "4.3.1" +wasmer-compiler-singlepass = "4.3.1" +wasmer-vm = "4.3.1" winapi = "0.3.9" yansi = "0.5.1" zeroize = { version = "1.5.5", features = ["zeroize_derive"] } diff --git a/crates/benches/Cargo.toml b/crates/benches/Cargo.toml index 965e67b5024..65b4ad101fb 100644 --- a/crates/benches/Cargo.toml +++ b/crates/benches/Cargo.toml @@ -62,5 +62,4 @@ tempfile.workspace = true sha2.workspace = true wasm-instrument.workspace = true wasmer-compiler-singlepass.workspace = true -wasmer-engine-universal.workspace = true wasmer.workspace = true diff --git a/crates/benches/wasm_opcodes.rs b/crates/benches/wasm_opcodes.rs index b9ce3bfdb22..ceae69bc51c 100644 --- a/crates/benches/wasm_opcodes.rs +++ b/crates/benches/wasm_opcodes.rs @@ -410,12 +410,11 @@ impl Display for WatBuilder { // optimizations that would compile out the benchmarks since most of them are // trivial operations fn get_wasm_store() -> Store { - wasmer::Store::new( - &wasmer_engine_universal::Universal::new( - wasmer_compiler_singlepass::Singlepass::default(), - ) - .engine(), - ) + Store::new(::new( + Box::new(wasmer_compiler_singlepass::Singlepass::default()), + wasmer::Target::default(), + wasmer::sys::Features::default(), + )) } // An empty wasm module to serve as the base reference for all the other @@ -428,12 +427,13 @@ fn empty_module(c: &mut Criterion) { ) "#, ); - let module = Module::new(&get_wasm_store(), module_wat).unwrap(); - let instance = Instance::new(&module, &imports! {}).unwrap(); + let mut store = get_wasm_store(); + let module = Module::new(&store, module_wat).unwrap(); + let instance = Instance::new(&mut store, &module, &imports! {}).unwrap(); let function = instance.exports.get_function(ENTRY_POINT).unwrap(); c.bench_function("empty_module", |b| { - b.iter(|| function.call(&[Value::I32(0)]).unwrap()); + b.iter(|| function.call(&mut store, &[Value::I32(0)]).unwrap()); }); } @@ -441,16 +441,19 @@ fn ops(c: &mut Criterion) { let mut group = c.benchmark_group("wasm_opts"); for builder in bench_functions() { - let module = - Module::new(&get_wasm_store(), builder.to_string()).unwrap(); - let instance = Instance::new(&module, &imports! {}).unwrap(); + let mut store = get_wasm_store(); + let module = Module::new(&store, builder.to_string()).unwrap(); + let instance = + Instance::new(&mut store, &module, &imports! {}).unwrap(); let function = instance.exports.get_function(ENTRY_POINT).unwrap(); group.bench_function(format!("{}", builder.instruction), |b| { if let Unreachable = builder.instruction { - b.iter(|| function.call(&[Value::I32(0)]).unwrap_err()); + b.iter(|| { + function.call(&mut store, &[Value::I32(0)]).unwrap_err() + }); } else { - b.iter(|| function.call(&[Value::I32(0)]).unwrap()); + b.iter(|| function.call(&mut store, &[Value::I32(0)]).unwrap()); } }); } diff --git a/crates/namada/Cargo.toml b/crates/namada/Cargo.toml index db2f4e460ca..6e4f940dd4f 100644 --- a/crates/namada/Cargo.toml +++ b/crates/namada/Cargo.toml @@ -19,14 +19,11 @@ default = ["wasm-runtime"] mainnet = ["namada_core/mainnet"] std = ["namada_sdk/std"] wasm-runtime = [ - "loupe", "parity-wasm", "rayon", "wasm-instrument", "wasmer-cache", "wasmer-compiler-singlepass", - "wasmer-engine-dylib", - "wasmer-engine-universal", "wasmer-vm", "wasmer", ] @@ -121,7 +118,6 @@ futures.workspace = true itertools.workspace = true konst.workspace = true linkme = {workspace = true, optional = true} -loupe = { version = "0.1.3", optional = true } masp_primitives.workspace = true masp_proofs.workspace = true num256.workspace = true @@ -154,8 +150,6 @@ wasm-instrument = { workspace = true, optional = true } wasmer = { workspace = true, optional = true } wasmer-cache = { workspace = true, optional = true } wasmer-compiler-singlepass = { workspace = true, optional = true } -wasmer-engine-dylib = { workspace = true, optional = true } -wasmer-engine-universal = { workspace = true, optional = true } wasmer-vm = { workspace = true, optional = true } # Greater versions break in `test_tx_stack_limiter` and `test_vp_stack_limiter` wat = "=1.0.71" diff --git a/crates/namada/src/vm/host_env.rs b/crates/namada/src/vm/host_env.rs index 1c3bf70a872..f07fa9f3abc 100644 --- a/crates/namada/src/vm/host_env.rs +++ b/crates/namada/src/vm/host_env.rs @@ -1,5 +1,6 @@ //! Virtual machine's host environment exposes functions that may be called from //! within a virtual machine. + use std::cell::RefCell; use std::collections::BTreeSet; use std::fmt::Debug; @@ -2454,6 +2455,8 @@ where /// A helper module for testing #[cfg(feature = "testing")] pub mod testing { + use std::rc::Rc; + use super::*; use crate::vm::memory::testing::NativeMemory; use crate::vm::wasm::memory::WasmMemory; @@ -2520,15 +2523,14 @@ pub mod testing { S: State, CA: WasmCacheAccess, { - let store = crate::vm::wasm::compilation_cache::common::store(); - let initial_memory = - crate::vm::wasm::memory::prepare_tx_memory(&store).unwrap(); - let mut wasm_memory = WasmMemory::default(); - wasm_memory.inner.initialize(initial_memory); + let mut store = crate::vm::wasm::compilation_cache::common::store(); + + let wasm_memory = + crate::vm::wasm::memory::prepare_tx_memory(&mut store).unwrap(); let (write_log, in_mem, db) = state.split_borrow(); - TxVmEnv::new( - wasm_memory, + let mut env = TxVmEnv::new( + WasmMemory::new(Rc::new(RefCell::new(store))), write_log, in_mem, db, @@ -2545,7 +2547,10 @@ pub mod testing { vp_wasm_cache, #[cfg(feature = "wasm-runtime")] tx_wasm_cache, - ) + ); + + env.memory.init_from(&wasm_memory); + env } /// Setup a validity predicate environment diff --git a/crates/namada/src/vm/wasm/compilation_cache/common.rs b/crates/namada/src/vm/wasm/compilation_cache/common.rs index b23d79e50ce..146d03df3a1 100644 --- a/crates/namada/src/vm/wasm/compilation_cache/common.rs +++ b/crates/namada/src/vm/wasm/compilation_cache/common.rs @@ -1,8 +1,7 @@ //! WASM compilation cache. +//! //! The cache is backed by in-memory LRU cache with configurable size -//! limit and a file system cache of compiled modules (either to dynamic libs -//! compiled via the `dylib` module, or serialized modules compiled via the -//! `universal` module). +//! limit and a file system cache of serialized modules. use std::collections::hash_map::RandomState; use std::fs; @@ -496,9 +495,6 @@ fn hash_of_code(code: impl AsRef<[u8]>) -> Hash { fn compile( code: impl AsRef<[u8]>, ) -> Result<(Module, Store), wasm::run::Error> { - // There's an issue with dylib compiler on mac in linker and on linux - // with the dylib's store loading the dylib from a file, so we're caching a - // module serialized to bytes instead for now. universal::compile(code).map_err(wasm::run::Error::CompileError) } @@ -581,39 +577,6 @@ mod universal { } } -/// A dynamic library engine compilation. -mod dylib { - use super::*; - - #[allow(dead_code)] - #[cfg(windows)] - pub const FILE_EXT: &str = "dll"; - #[allow(dead_code)] - #[cfg(all(not(unix), target_os = "macos"))] - pub const FILE_EXT: &str = "dylib"; - #[allow(dead_code)] - #[cfg(all(unix, not(target_os = "macos")))] - pub const FILE_EXT: &str = "so"; - - /// Compile wasm to a dynamic library - #[allow(dead_code)] - pub fn compile( - code: impl AsRef<[u8]>, - ) -> Result<(Module, Store), wasmer::CompileError> { - let store = store(); - let module = Module::new(&store, code.as_ref())?; - Ok((module, store)) - } - - /// Dylib WASM store - #[allow(dead_code)] - pub fn store() -> Store { - let compiler = wasmer_compiler_singlepass::Singlepass::default(); - let engine = wasmer_engine_dylib::Dylib::new(compiler).engine(); - Store::new_with_tunables(&engine, memory::vp_limit()) - } -} - /// Testing helpers #[cfg(any(test, feature = "testing"))] pub mod testing { @@ -1063,10 +1026,6 @@ mod test { /// Get the WASM code bytes, its hash and find the compiled module's size fn load_wasm(file: impl AsRef) -> WasmWithMeta { - // When `WeightScale` calls `loupe::size_of_val` in the cache, for some - // reason it returns 8 bytes more than the same call in here. - let _extra_bytes = 8; - let file = file.as_ref(); let code = fs::read(file).unwrap(); let hash = hash_of_code(&code); diff --git a/crates/namada/src/vm/wasm/host_env.rs b/crates/namada/src/vm/wasm/host_env.rs index 6b1fb84f94f..eb4d31c5d3e 100644 --- a/crates/namada/src/vm/wasm/host_env.rs +++ b/crates/namada/src/vm/wasm/host_env.rs @@ -4,87 +4,59 @@ //! imports, so they can be called from inside the wasm. use namada_state::{DBIter, StorageHasher, DB}; -use wasmer::{ - Function, HostEnvInitError, ImportObject, Instance, Store, WasmerEnv, -}; +use wasmer::{Function, FunctionEnv, Imports}; use crate::vm::host_env::{TxVmEnv, VpEvaluator, VpVmEnv}; use crate::vm::wasm::memory::WasmMemory; use crate::vm::{host_env, WasmCacheAccess}; -impl WasmerEnv for TxVmEnv -where - D: DB + for<'iter> DBIter<'iter> + 'static, - H: StorageHasher + 'static, - CA: WasmCacheAccess + 'static, -{ - fn init_with_instance( - &mut self, - instance: &Instance, - ) -> std::result::Result<(), HostEnvInitError> { - self.memory.init_env_memory(&instance.exports) - } -} - -impl WasmerEnv for VpVmEnv -where - D: DB + for<'iter> DBIter<'iter> + 'static, - H: StorageHasher + 'static, - EVAL: VpEvaluator + 'static, - CA: WasmCacheAccess + 'static, -{ - fn init_with_instance( - &mut self, - instance: &Instance, - ) -> std::result::Result<(), HostEnvInitError> { - self.memory.init_env_memory(&instance.exports) - } -} - /// Prepare imports (memory and host functions) exposed to the vm guest running /// transaction code #[allow(clippy::too_many_arguments)] pub fn tx_imports( - wasm_store: &Store, + wasm_store: &mut impl wasmer::AsStoreMut, env: TxVmEnv, -) -> ImportObject +) -> Imports where D: DB + for<'iter> DBIter<'iter> + 'static, H: StorageHasher + 'static, CA: WasmCacheAccess + 'static, { + let env = FunctionEnv::new(wasm_store, env); + wasmer::imports! { - // default namespace + // Default namespace "env" => { - // Wasm middleware gas injection hook - "gas" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_charge_gas), - "namada_tx_read" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_read), - "namada_tx_read_temp" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_read_temp), - "namada_tx_result_buffer" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_result_buffer), - "namada_tx_has_key" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_has_key), - "namada_tx_write" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_write), - "namada_tx_write_temp" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_write_temp), - "namada_tx_delete" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_delete), - "namada_tx_iter_prefix" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_iter_prefix), - "namada_tx_iter_next" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_iter_next), - "namada_tx_insert_verifier" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_insert_verifier), - "namada_tx_update_validity_predicate" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_update_validity_predicate), - "namada_tx_init_account" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_init_account), - "namada_tx_emit_event" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_emit_event), - "namada_tx_get_events" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_get_events), - "namada_tx_get_chain_id" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_get_chain_id), - "namada_tx_get_tx_index" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_get_tx_index), - "namada_tx_get_block_height" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_get_block_height), - "namada_tx_get_block_header" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_get_block_header), - "namada_tx_get_block_epoch" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_get_block_epoch), - "namada_tx_get_pred_epochs" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_get_pred_epochs), - "namada_tx_get_native_token" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_get_native_token), - "namada_tx_log_string" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_log_string), - "namada_tx_ibc_execute" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_ibc_execute), - "namada_tx_set_commitment_sentinel" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_set_commitment_sentinel), - "namada_tx_verify_tx_section_signature" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_verify_tx_section_signature), - "namada_tx_update_masp_note_commitment_tree" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_update_masp_note_commitment_tree), - "namada_tx_yield_value" => Function::new_native_with_env(wasm_store, env.clone(), host_env::tx_yield_value), + // Gas injection hook + "gas" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_1(host_env::tx_charge_gas)), + // Tx Host functions + "namada_tx_delete" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_delete)), + "namada_tx_emit_event" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_emit_event)), + "namada_tx_get_block_epoch" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_0(host_env::tx_get_block_epoch)), + "namada_tx_get_block_header" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_1(host_env::tx_get_block_header)), + "namada_tx_get_block_height" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_0(host_env::tx_get_block_height)), + "namada_tx_get_chain_id" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_1(host_env::tx_get_chain_id)), + "namada_tx_get_events" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_get_events)), + "namada_tx_get_native_token" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_1(host_env::tx_get_native_token)), + "namada_tx_get_pred_epochs" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_0(host_env::tx_get_pred_epochs)), + "namada_tx_get_tx_index" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_0(host_env::tx_get_tx_index)), + "namada_tx_has_key" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_has_key)), + "namada_tx_ibc_execute" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_0(host_env::tx_ibc_execute)), + "namada_tx_init_account" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_7(host_env::tx_init_account)), + "namada_tx_insert_verifier" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_insert_verifier)), + "namada_tx_iter_next" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_1(host_env::tx_iter_next)), + "namada_tx_iter_prefix" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_iter_prefix)), + "namada_tx_log_string" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_log_string)), + "namada_tx_read" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_read)), + "namada_tx_read_temp" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_read_temp)), + "namada_tx_result_buffer" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_1(host_env::tx_result_buffer)), + "namada_tx_set_commitment_sentinel" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_0(host_env::tx_set_commitment_sentinel)), + "namada_tx_update_masp_note_commitment_tree" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_update_masp_note_commitment_tree)), + "namada_tx_update_validity_predicate" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_6(host_env::tx_update_validity_predicate)), + "namada_tx_verify_tx_section_signature" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_7(host_env::tx_verify_tx_section_signature)), + "namada_tx_write" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_4(host_env::tx_write)), + "namada_tx_write_temp" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_4(host_env::tx_write_temp)), + "namada_tx_yield_value" => Function::new_typed_with_env(wasm_store, &env, wrap_tx::_2(host_env::tx_yield_value)), }, } } @@ -92,42 +64,337 @@ where /// Prepare imports (memory and host functions) exposed to the vm guest running /// validity predicate code pub fn vp_imports( - wasm_store: &Store, + wasm_store: &mut impl wasmer::AsStoreMut, env: VpVmEnv, -) -> ImportObject +) -> Imports where D: DB + for<'iter> DBIter<'iter> + 'static, H: StorageHasher + 'static, EVAL: VpEvaluator + 'static, CA: WasmCacheAccess + 'static, { + let env = FunctionEnv::new(wasm_store, env); + wasmer::imports! { - // default namespace + // Default namespace "env" => { - // Wasm middleware gas injection hook - "gas" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_charge_gas), - "namada_vp_read_pre" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_read_pre), - "namada_vp_read_post" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_read_post), - "namada_vp_read_temp" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_read_temp), - "namada_vp_result_buffer" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_result_buffer), - "namada_vp_has_key_pre" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_has_key_pre), - "namada_vp_has_key_post" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_has_key_post), - "namada_vp_iter_prefix_pre" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_iter_prefix_pre), - "namada_vp_iter_prefix_post" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_iter_prefix_pre), - "namada_vp_iter_next" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_iter_next), - "namada_vp_get_chain_id" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_get_chain_id), - "namada_vp_get_tx_index" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_get_tx_index), - "namada_vp_get_block_height" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_get_block_height), - "namada_vp_get_block_header" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_get_block_header), - "namada_vp_get_tx_code_hash" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_get_tx_code_hash), - "namada_vp_get_block_epoch" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_get_block_epoch), - "namada_vp_get_pred_epochs" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_get_pred_epochs), - "namada_vp_get_events" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_get_events), - "namada_vp_yield_value" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_yield_value), - "namada_vp_verify_tx_section_signature" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_verify_tx_section_signature), - "namada_vp_eval" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_eval), - "namada_vp_get_native_token" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_get_native_token), - "namada_vp_log_string" => Function::new_native_with_env(wasm_store, env.clone(), host_env::vp_log_string), + // Gas injection hook + "gas" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_1(host_env::vp_charge_gas)), + // VP Host functions + "namada_vp_eval" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_4(host_env::vp_eval)), + "namada_vp_get_block_header" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_1(host_env::vp_get_block_header)), + "namada_vp_get_block_height" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_0(host_env::vp_get_block_height)), + "namada_vp_get_chain_id" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_1(host_env::vp_get_chain_id)), + "namada_vp_get_events" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_get_events)), + "namada_vp_get_native_token" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_1(host_env::vp_get_native_token)), + "namada_vp_get_pred_epochs" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_0(host_env::vp_get_pred_epochs)), + "namada_vp_get_tx_code_hash" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_1(host_env::vp_get_tx_code_hash)), + "namada_vp_get_tx_index" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_0(host_env::vp_get_tx_index)), + "namada_vp_has_key_post" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_has_key_post)), + "namada_vp_has_key_pre" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_has_key_pre)), + "namada_vp_iter_next" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_1(host_env::vp_iter_next)), + "namada_vp_iter_prefix_post" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_iter_prefix_post)), + "namada_vp_iter_prefix_pre" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_iter_prefix_pre)), + "namada_vp_log_string" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_log_string)), + "namada_vp_read_post" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_read_post)), + "namada_vp_read_pre" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_read_pre)), + "namada_vp_read_temp" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_read_temp)), + "namada_vp_result_buffer" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_1(host_env::vp_result_buffer)), + "namada_vp_verify_tx_section_signature" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_9(host_env::vp_verify_tx_section_signature)), + "namada_vp_yield_value" => Function::new_typed_with_env(wasm_store, &env, wrap_vp::_2(host_env::vp_yield_value)), }, } } + +// TODO: Attempt to reduce the boilerplate of this module with macros, traits +// or something of this sort... +mod wrap_tx { + //! Wrap tx host functions with any number of arguments in a callback + //! that can be passed to [`wasmer`], to be used by the guest wasm code. + + #![allow(missing_docs)] + + use namada_state::{DBIter, StorageHasher, DB}; + use wasmer::FunctionEnvMut; + + use crate::vm::host_env::TxVmEnv; + use crate::vm::wasm::memory::WasmMemory; + use crate::vm::WasmCacheAccess; + + pub(super) fn _0( + f: F, + ) -> impl Fn(FunctionEnvMut<'_, TxVmEnv>) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + F: Fn(&TxVmEnv) -> RET, + { + move |env| f(env.data()) + } + + pub(super) fn _1( + f: F, + ) -> impl Fn(FunctionEnvMut<'_, TxVmEnv>, ARG0) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + F: Fn(&TxVmEnv, ARG0) -> RET, + { + move |env, arg0| f(env.data(), arg0) + } + + pub(super) fn _2( + f: F, + ) -> impl Fn(FunctionEnvMut<'_, TxVmEnv>, ARG0, ARG1) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + F: Fn(&TxVmEnv, ARG0, ARG1) -> RET, + { + move |env, arg0, arg1| f(env.data(), arg0, arg1) + } + + pub(super) fn _4( + f: F, + ) -> impl Fn( + FunctionEnvMut<'_, TxVmEnv>, + ARG0, + ARG1, + ARG2, + ARG3, + ) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + F: Fn(&TxVmEnv, ARG0, ARG1, ARG2, ARG3) -> RET, + { + move |env, arg0, arg1, arg2, arg3| f(env.data(), arg0, arg1, arg2, arg3) + } + + pub(super) fn _6( + f: F, + ) -> impl Fn( + FunctionEnvMut<'_, TxVmEnv>, + ARG0, + ARG1, + ARG2, + ARG3, + ARG4, + ARG5, + ) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + F: Fn( + &TxVmEnv, + ARG0, + ARG1, + ARG2, + ARG3, + ARG4, + ARG5, + ) -> RET, + { + move |env, arg0, arg1, arg2, arg3, arg4, arg5| { + f(env.data(), arg0, arg1, arg2, arg3, arg4, arg5) + } + } + + pub(super) fn _7< + F, + ARG0, + ARG1, + ARG2, + ARG3, + ARG4, + ARG5, + ARG6, + RET, + D, + H, + CA, + >( + f: F, + ) -> impl Fn( + FunctionEnvMut<'_, TxVmEnv>, + ARG0, + ARG1, + ARG2, + ARG3, + ARG4, + ARG5, + ARG6, + ) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + F: Fn( + &TxVmEnv, + ARG0, + ARG1, + ARG2, + ARG3, + ARG4, + ARG5, + ARG6, + ) -> RET, + { + move |env, arg0, arg1, arg2, arg3, arg4, arg5, arg6| { + f(env.data(), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + } + } +} + +// TODO: Attempt to reduce the boilerplate of this module with macros, traits +// or something of this sort... +mod wrap_vp { + //! Wrap vp host functions with any number of arguments in a callback + //! that can be passed to [`wasmer`], to be used by the guest wasm code. + + #![allow(missing_docs)] + + use namada_state::{DBIter, StorageHasher, DB}; + use wasmer::FunctionEnvMut; + + use crate::vm::host_env::{VpEvaluator, VpVmEnv}; + use crate::vm::wasm::memory::WasmMemory; + use crate::vm::WasmCacheAccess; + + pub(super) fn _0( + f: F, + ) -> impl Fn(FunctionEnvMut<'_, VpVmEnv>) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + EVAL: VpEvaluator + 'static, + F: Fn(&VpVmEnv) -> RET, + { + move |env| f(env.data()) + } + + pub(super) fn _1( + f: F, + ) -> impl Fn(FunctionEnvMut<'_, VpVmEnv>, ARG0) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + EVAL: VpEvaluator + 'static, + F: Fn(&VpVmEnv, ARG0) -> RET, + { + move |env, arg0| f(env.data(), arg0) + } + + pub(super) fn _2( + f: F, + ) -> impl Fn( + FunctionEnvMut<'_, VpVmEnv>, + ARG0, + ARG1, + ) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + EVAL: VpEvaluator + 'static, + F: Fn(&VpVmEnv, ARG0, ARG1) -> RET, + { + move |env, arg0, arg1| f(env.data(), arg0, arg1) + } + + pub(super) fn _4( + f: F, + ) -> impl Fn( + FunctionEnvMut<'_, VpVmEnv>, + ARG0, + ARG1, + ARG2, + ARG3, + ) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + EVAL: VpEvaluator + 'static, + F: Fn( + &VpVmEnv, + ARG0, + ARG1, + ARG2, + ARG3, + ) -> RET, + { + move |env, arg0, arg1, arg2, arg3| f(env.data(), arg0, arg1, arg2, arg3) + } + + pub(super) fn _9< + F, + ARG0, + ARG1, + ARG2, + ARG3, + ARG4, + ARG5, + ARG6, + ARG7, + ARG8, + RET, + D, + H, + EVAL, + CA, + >( + f: F, + ) -> impl Fn( + FunctionEnvMut<'_, VpVmEnv>, + ARG0, + ARG1, + ARG2, + ARG3, + ARG4, + ARG5, + ARG6, + ARG7, + ARG8, + ) -> RET + where + D: DB + for<'iter> DBIter<'iter> + 'static, + H: StorageHasher + 'static, + CA: WasmCacheAccess + 'static, + EVAL: VpEvaluator + 'static, + F: Fn( + &VpVmEnv, + ARG0, + ARG1, + ARG2, + ARG3, + ARG4, + ARG5, + ARG6, + ARG7, + ARG8, + ) -> RET, + { + move |env, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8| { + f( + env.data(), + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + arg8, + ) + } + } +} diff --git a/crates/namada/src/vm/wasm/memory.rs b/crates/namada/src/vm/wasm/memory.rs index 451301ec9bf..89ebcd037f7 100644 --- a/crates/namada/src/vm/wasm/memory.rs +++ b/crates/namada/src/vm/wasm/memory.rs @@ -1,18 +1,20 @@ //! Wasm memory is used for bi-directionally passing data between the host and a //! wasm instance. +use std::cell::RefCell; use std::ptr::NonNull; +use std::rc::Rc; use std::str::Utf8Error; -use std::sync::Arc; use borsh_ext::BorshSerializeExt; use namada_gas::MEMORY_ACCESS_GAS_PER_BYTE; use namada_sdk::arith::{self, checked}; use namada_tx::BatchedTxRef; use thiserror::Error; +use wasmer::sys::BaseTunables; use wasmer::{ - vm, BaseTunables, HostEnvInitError, LazyInit, Memory, MemoryError, - MemoryType, Pages, TableType, Target, Tunables, WASM_PAGE_SIZE, + vm, Memory, MemoryError, MemoryType, Pages, Store, TableType, Target, + Tunables, WASM_PAGE_SIZE, }; use wasmer_vm::{ MemoryStyle, TableStyle, VMMemoryDefinition, VMTableDefinition, @@ -28,8 +30,10 @@ pub enum Error { OverflowingOffset(u64, usize), #[error("Failed initializing the memory: {0}")] InitMemoryError(wasmer::MemoryError), - #[error("Memory ouf of bounds: {0}")] - MemoryOutOfBounds(wasmer::MemoryError), + #[error("Failed to grow memory: {0}")] + Grow(wasmer::MemoryError), + #[error("Wasm memory access error: {0}")] + Access(#[from] wasmer::MemoryAccessError), #[error("Encoding error: {0}")] EncodingError(std::io::Error), #[error("Memory is not initialized")] @@ -58,7 +62,9 @@ pub const VP_MEMORY_INIT_PAGES: u32 = 100; // 6.4 MiB pub const VP_MEMORY_MAX_PAGES: u32 = 200; // 12.8 MiB /// Prepare memory for instantiating a transaction module -pub fn prepare_tx_memory(store: &wasmer::Store) -> Result { +pub fn prepare_tx_memory( + store: &mut impl wasmer::AsStoreMut, +) -> Result { let mem_type = wasmer::MemoryType::new( TX_MEMORY_INIT_PAGES, Some(TX_MEMORY_MAX_PAGES), @@ -68,7 +74,9 @@ pub fn prepare_tx_memory(store: &wasmer::Store) -> Result { } /// Prepare memory for instantiating a validity predicate module -pub fn prepare_vp_memory(store: &wasmer::Store) -> Result { +pub fn prepare_vp_memory( + store: &mut impl wasmer::AsStoreMut, +) -> Result { let mem_type = wasmer::MemoryType::new( VP_MEMORY_INIT_PAGES, Some(VP_MEMORY_MAX_PAGES), @@ -89,6 +97,7 @@ pub struct TxCallInput { /// Write transaction inputs into wasm memory pub fn write_tx_inputs( + store: &mut impl wasmer::AsStoreMut, memory: &wasmer::Memory, tx_data: &BatchedTxRef<'_>, ) -> Result { @@ -96,7 +105,7 @@ pub fn write_tx_inputs( let tx_data_bytes = tx_data.serialize_to_vec(); let tx_data_len = tx_data_bytes.len() as _; - write_memory_bytes(memory, tx_data_ptr, tx_data_bytes)?; + write_memory_bytes(store, memory, tx_data_ptr, tx_data_bytes)?; Ok(TxCallInput { tx_data_ptr, @@ -127,6 +136,7 @@ pub struct VpCallInput { /// Write validity predicate inputs into wasm memory pub fn write_vp_inputs( + store: &mut impl wasmer::AsStoreMut, memory: &wasmer::Memory, VpInput { addr, @@ -158,7 +168,7 @@ pub fn write_vp_inputs( &verifiers_bytes[..], ] .concat(); - write_memory_bytes(memory, addr_ptr, bytes)?; + write_memory_bytes(store, memory, addr_ptr, bytes)?; Ok(VpCallInput { addr_ptr, @@ -174,12 +184,22 @@ pub fn write_vp_inputs( /// Check that the given offset and length fits into the memory bounds. If not, /// it will try to grow the memory. -fn check_bounds(memory: &Memory, base_addr: u64, offset: usize) -> Result<()> { +// TODO: avoid growing memory if we're only performing reads; return an Err +// instead +fn check_bounds( + store: &mut impl wasmer::AsStoreMut, + memory: &Memory, + base_addr: u64, + offset: usize, +) -> Result<()> { + let store_mut = store.as_store_mut(); + let memview = memory.view(&store_mut); + tracing::debug!( "check_bounds pages {}, data_size {}, base_addr {base_addr}, offset \ {offset}", - memory.size().0, - memory.data_size(), + memview.size().0, + memview.data_size(), ); let desired_offset = base_addr .checked_add(offset as u64) @@ -193,8 +213,8 @@ fn check_bounds(memory: &Memory, base_addr: u64, offset: usize) -> Result<()> { } }) .ok_or(Error::OverflowingOffset(base_addr, offset))?; - if memory.data_size() < desired_offset { - let cur_pages = memory.size().0 as usize; + if memview.data_size() < desired_offset { + let cur_pages = memview.size().0 as usize; let capacity = checked!(cur_pages * WASM_PAGE_SIZE)?; // usizes should be at least 32 bits wide on most architectures, // so this cast shouldn't cause panics, given the invariant that @@ -209,9 +229,9 @@ fn check_bounds(memory: &Memory, base_addr: u64, offset: usize) -> Result<()> { checked!((missing + WASM_PAGE_SIZE - 1) / WASM_PAGE_SIZE)?; let req_pages: u32 = u32::try_from(req_pages)?; tracing::debug!(req_pages, "Attempting to grow wasm memory"); - memory.grow(req_pages).map_err(Error::MemoryOutOfBounds)?; + memory.grow(store, req_pages).map_err(Error::Grow)?; tracing::debug!( - mem_size = memory.data_size(), + mem_size = memory.view(&store.as_store_mut()).data_size(), "Wasm memory size has been successfully extended" ); } @@ -220,62 +240,69 @@ fn check_bounds(memory: &Memory, base_addr: u64, offset: usize) -> Result<()> { /// Read bytes from memory at the given offset and length fn read_memory_bytes( + store: &mut impl wasmer::AsStoreMut, memory: &Memory, offset: u64, len: usize, ) -> Result> { - check_bounds(memory, offset, len)?; - let offset = usize::try_from(offset)?; - let vec: Vec<_> = memory.view()[offset..checked!(offset + len)?] - .iter() - .map(|cell| cell.get()) - .collect(); - Ok(vec) + check_bounds(store, memory, offset, len)?; + let mut buf = vec![0; len]; + memory.view(&store.as_store_mut()).read(offset, &mut buf)?; + Ok(buf) } /// Write bytes into memory at the given offset fn write_memory_bytes( + store: &mut impl wasmer::AsStoreMut, memory: &Memory, offset: u64, bytes: impl AsRef<[u8]>, ) -> Result<()> { - let slice = bytes.as_ref(); - let len = slice.len(); - check_bounds(memory, offset, len as _)?; - let offset = usize::try_from(offset)?; - memory.view()[offset..checked!(offset + len)?] - .iter() - .zip(slice.iter()) - .for_each(|(cell, v)| cell.set(*v)); + let buf = bytes.as_ref(); + check_bounds(store, memory, offset, buf.len() as _)?; + memory.view(&store.as_store_mut()).write(offset, buf)?; Ok(()) } /// The wasm memory -#[derive(Debug, Clone, Default)] +#[derive(Debug, Clone)] pub struct WasmMemory { - pub(crate) inner: LazyInit, + store: Rc>, + memory: Rc>>, } +// TODO: Wasm memory is neither `Send` nor `Sync`, but we must implement +// it for now for the code to compile. +unsafe impl Send for WasmMemory {} +unsafe impl Sync for WasmMemory {} + impl WasmMemory { - /// Initialize the memory from the given exports, used to implement - /// [`wasmer::WasmerEnv`]. - pub fn init_env_memory( - &mut self, - exports: &wasmer::Exports, - ) -> std::result::Result<(), HostEnvInitError> { - // "`TxEnv` holds a reference to the Wasm `Memory`, which itself - // internally holds a reference to the instance which owns that - // memory. However the instance itself also holds a reference to - // the `TxEnv` when it is instantiated, thus creating a circular - // reference. - // You can work around this by using `get_with_generics_weak` which - // creates a weak reference to the `Instance` internally." - // - let memory = exports.get_with_generics_weak("memory")?; - if !self.inner.initialize(memory) { + /// Build a new wasm memory. + pub fn new(store: Rc>) -> Self { + Self { + store, + memory: Rc::new(RefCell::new(None)), + } + } + + /// Initialize the host memory with a pointer to the given memory. + pub fn init_from(&mut self, memory: &Memory) { + if self.memory.borrow().is_some() { tracing::error!("wasm memory is already initialized"); + return; } - Ok(()) + *self.memory.borrow_mut() = Some(memory.clone()); + } + + /// Access the inner [`Memory`]. + #[inline] + fn access(&self, f: F) -> Result + where + F: FnOnce(&Memory) -> Result, + { + let borrow = self.memory.borrow(); + let memory = borrow.as_ref().ok_or(Error::UninitializedMemory)?; + f(memory) } } @@ -285,23 +312,27 @@ impl VmMemory for WasmMemory { /// Read bytes from memory at the given offset and length, return the bytes /// and the gas cost fn read_bytes(&self, offset: u64, len: usize) -> Result<(Vec, u64)> { - let memory = self.inner.get_ref().ok_or(Error::UninitializedMemory)?; - let bytes = read_memory_bytes(memory, offset, len)?; - let len = bytes.len() as u64; - let gas = checked!(len * MEMORY_ACCESS_GAS_PER_BYTE)?; - Ok((bytes, gas)) + self.access(|memory| { + let mut store = self.store.borrow_mut(); + let bytes = read_memory_bytes(&mut *store, memory, offset, len)?; + let len = bytes.len() as u64; + let gas = checked!(len * MEMORY_ACCESS_GAS_PER_BYTE)?; + Ok((bytes, gas)) + }) } /// Write bytes into memory at the given offset and return the gas cost fn write_bytes(&self, offset: u64, bytes: impl AsRef<[u8]>) -> Result { - // No need for a separate gas multiplier for writes since we are only - // writing to memory and we already charge gas for every memory page - // allocated - let len = bytes.as_ref().len() as u64; - let gas = checked!(len * MEMORY_ACCESS_GAS_PER_BYTE)?; - let memory = self.inner.get_ref().ok_or(Error::UninitializedMemory)?; - write_memory_bytes(memory, offset, bytes)?; - Ok(gas) + self.access(|memory| { + // No need for a separate gas multiplier for writes since we are + // only writing to memory and we already charge gas for + // every memory page allocated + let len = bytes.as_ref().len() as u64; + let gas = checked!(len * MEMORY_ACCESS_GAS_PER_BYTE)?; + let mut store = self.store.borrow_mut(); + write_memory_bytes(&mut *store, memory, offset, bytes)?; + Ok(gas) + }) } /// Read string from memory at the given offset and bytes length, and return @@ -321,7 +352,6 @@ impl VmMemory for WasmMemory { } } -#[derive(loupe::MemoryUsage)] /// A custom [`Tunables`] to set a WASM memory limits. /// /// Adapted from . @@ -341,6 +371,7 @@ pub fn vp_limit() -> Limit { let limit = Pages(VP_MEMORY_MAX_PAGES); Limit { limit, base } } + /// A [`Limit`] with memory limit setup for transaction WASM execution. pub fn tx_limit() -> Limit { let base = BaseTunables::for_target(&Target::default()); @@ -412,7 +443,7 @@ impl Tunables for Limit { &self, ty: &MemoryType, style: &MemoryStyle, - ) -> std::result::Result, MemoryError> { + ) -> std::result::Result { let adjusted = self.adjust_memory(ty); self.validate_memory(&adjusted)?; self.base.create_host_memory(&adjusted, style) @@ -427,7 +458,7 @@ impl Tunables for Limit { ty: &MemoryType, style: &MemoryStyle, vm_definition_location: NonNull, - ) -> std::result::Result, MemoryError> { + ) -> std::result::Result { let adjusted = self.adjust_memory(ty); self.validate_memory(&adjusted)?; self.base @@ -442,7 +473,7 @@ impl Tunables for Limit { &self, ty: &TableType, style: &TableStyle, - ) -> std::result::Result, String> { + ) -> std::result::Result { self.base.create_host_table(ty, style) } @@ -455,14 +486,18 @@ impl Tunables for Limit { ty: &TableType, style: &TableStyle, vm_definition_location: NonNull, - ) -> std::result::Result, String> { + ) -> std::result::Result { self.base.create_vm_table(ty, style, vm_definition_location) } } #[cfg(test)] pub mod tests { - use wasmer::{wat2wasm, Cranelift, Instance, Module, Store}; + use wasmer::sys::Features; + use wasmer::{ + wat2wasm, Cranelift, Engine, Instance, Module, NativeEngineExt, Store, + Target, + }; use super::*; @@ -479,14 +514,19 @@ pub mod tests { // Any compiler and any engine do the job here let compiler = Cranelift::default(); - let engine = wasmer_engine_universal::Universal::new(compiler).engine(); + let mut engine = ::new( + Box::new(compiler), + Target::default(), + Features::default(), + ); let base = BaseTunables::for_target(&Target::default()); let limit = Pages(24); let tunables = Limit { limit, base }; + engine.set_tunables(tunables); // Create a store, that holds the engine and our custom tunables - let store = Store::new_with_tunables(&engine, tunables); + let mut store = Store::new(engine); println!("Compiling module..."); let module = Module::new(&store, wasm_bytes).unwrap(); @@ -495,7 +535,8 @@ pub mod tests { let import_object = wasmer::imports! {}; // Now at this point, our custom tunables are used - let instance = Instance::new(&module, &import_object).unwrap(); + let instance = + Instance::new(&mut store, &module, &import_object).unwrap(); // Check what happened let mut memories: Vec = instance @@ -508,6 +549,6 @@ pub mod tests { let first_memory = memories.pop().unwrap(); println!("Memory of this instance: {:?}", first_memory); - assert_eq!(first_memory.ty().maximum.unwrap(), limit); + assert_eq!(first_memory.ty(&store).maximum.unwrap(), limit); } } diff --git a/crates/namada/src/vm/wasm/run.rs b/crates/namada/src/vm/wasm/run.rs index 30c58c1cd2d..e7387d186b5 100644 --- a/crates/namada/src/vm/wasm/run.rs +++ b/crates/namada/src/vm/wasm/run.rs @@ -6,6 +6,7 @@ use std::error::Error as _; use std::fmt::Debug; use std::marker::PhantomData; use std::num::NonZeroU32; +use std::rc::Rc; use borsh::BorshDeserialize; use namada_core::validity_predicate::VpError; @@ -16,7 +17,8 @@ use namada_tx::{BatchedTxRef, Commitment, Section, Tx, TxCommitments}; use parity_wasm::elements::Instruction::*; use parity_wasm::elements::{self, SignExtInstruction}; use thiserror::Error; -use wasmer::{BaseTunables, Module, Store}; +use wasmer::sys::{BaseTunables, Features}; +use wasmer::{Engine, Module, NativeEngineExt, Store, Target}; use super::memory::{Limit, WasmMemory}; use super::TxCache; @@ -191,6 +193,7 @@ where let (module, store) = fetch_or_compile(tx_wasm_cache, &tx_code.code, state, gas_meter)?; + let store = Rc::new(RefCell::new(store)); let mut iterators: PrefixIterators<'_, ::D> = PrefixIterators::default(); @@ -200,8 +203,8 @@ where let sentinel = RefCell::new(TxSentinel::default()); let (write_log, in_mem, db) = state.split_borrow(); - let env = TxVmEnv::new( - WasmMemory::default(), + let mut env = TxVmEnv::new( + WasmMemory::new(Rc::clone(&store)), write_log, in_mem, db, @@ -218,51 +221,69 @@ where tx_wasm_cache, ); - let imports = tx_imports(&store, env); - // Instantiate the wasm module - let instance = wasmer::Instance::new(&module, &imports) - .map_err(|e| Error::InstantiationError(Box::new(e)))?; + let instance = { + let mut store = store.borrow_mut(); + let imports = tx_imports(&mut *store, env.clone()); + wasmer::Instance::new(&mut *store, &module, &imports) + .map_err(|e| Error::InstantiationError(Box::new(e)))? + }; - // We need to write the inputs in the memory exported from the wasm - // module - let memory = instance + // Fetch guest's main memory + let guest_memory = instance .exports .get_memory("memory") .map_err(Error::MissingModuleMemory)?; + + env.memory.init_from(guest_memory); + + // Write the inputs in the memory exported from the wasm + // module let memory::TxCallInput { tx_data_ptr, tx_data_len, - } = memory::write_tx_inputs(memory, &batched_tx) - .map_err(Error::MemoryError)?; + } = { + let mut store = store.borrow_mut(); + memory::write_tx_inputs(&mut *store, guest_memory, &batched_tx) + .map_err(Error::MemoryError)? + }; + // Get the module's entrypoint to be called - let apply_tx = instance - .exports - .get_function(TX_ENTRYPOINT) - .map_err(Error::MissingModuleEntrypoint)? - .native::<(u64, u64), u64>() - .map_err(|error| Error::UnexpectedModuleEntrypointInterface { - entrypoint: TX_ENTRYPOINT, - error, - })?; - let ok = apply_tx.call(tx_data_ptr, tx_data_len).map_err(|err| { - tracing::debug!("Tx WASM failed with {}", err); - match *sentinel.borrow() { - TxSentinel::None => Error::RuntimeError(err), - TxSentinel::OutOfGas => Error::GasError(err.to_string()), - TxSentinel::InvalidCommitment => { - Error::MissingSection(err.to_string()) + let apply_tx = { + let store = store.borrow(); + instance + .exports + .get_function(TX_ENTRYPOINT) + .map_err(Error::MissingModuleEntrypoint)? + .typed::<(u64, u64), u64>(&*store) + .map_err(|error| Error::UnexpectedModuleEntrypointInterface { + entrypoint: TX_ENTRYPOINT, + error, + })? + }; + let ok = apply_tx + .call( + unsafe { &mut *RefCell::as_ptr(&*store) }, + tx_data_ptr, + tx_data_len, + ) + .map_err(|err| { + tracing::debug!("Tx WASM failed with {}", err); + match *sentinel.borrow() { + TxSentinel::None => Error::RuntimeError(err), + TxSentinel::OutOfGas => Error::GasError(err.to_string()), + TxSentinel::InvalidCommitment => { + Error::MissingSection(err.to_string()) + } } - } - })?; + })?; + + // NB: early drop this data to avoid memory errors + _ = (instance, env); if ok == 1 { Ok(verifiers) } else { - // NB: drop imports so we can safely access the - // `&mut` ptrs we shared with the guest - _ = (instance, imports); - let err = yielded_value.take().map_or_else( || Ok("Execution ended abruptly with an unknown error".to_owned()), |borsh_encoded_err| { @@ -306,6 +327,7 @@ where state, gas_meter, )?; + let store = Rc::new(RefCell::new(store)); let mut iterators: PrefixIterators<'_, ::D> = PrefixIterators::default(); @@ -318,8 +340,8 @@ where cache_access: PhantomData, }; let BatchedTxRef { tx, cmt } = batched_tx; - let env = VpVmEnv::new( - WasmMemory::default(), + let mut env = VpVmEnv::new( + WasmMemory::new(Rc::clone(&store)), address, state.write_log(), state.in_mem(), @@ -338,9 +360,14 @@ where ); let yielded_value_borrow = env.ctx.yielded_value; - let imports = vp_imports(&store, env); + + let imports = { + let mut store = store.borrow_mut(); + vp_imports(&mut *store, env.clone()) + }; run_vp( + store, module, imports, &vp_code_hash, @@ -349,20 +376,26 @@ where keys_changed, verifiers, yielded_value_borrow, + |guest_memory| env.memory.init_from(guest_memory), ) } #[allow(clippy::too_many_arguments)] -fn run_vp( +fn run_vp( + store: Rc>, module: wasmer::Module, - vp_imports: wasmer::ImportObject, + vp_imports: wasmer::Imports, vp_code_hash: &Hash, input_data: &BatchedTxRef<'_>, address: &Address, keys_changed: &BTreeSet, verifiers: &BTreeSet
, yielded_value: HostRef>>, -) -> Result<()> { + mut init_memory_callback: F, +) -> Result<()> +where + F: FnMut(&wasmer::Memory), +{ let input: VpInput<'_> = VpInput { addr: address, data: input_data, @@ -371,15 +404,22 @@ fn run_vp( }; // Instantiate the wasm module - let instance = wasmer::Instance::new(&module, &vp_imports) - .map_err(|e| Error::InstantiationError(Box::new(e)))?; + let instance = { + let mut store = store.borrow_mut(); + wasmer::Instance::new(&mut *store, &module, &vp_imports) + .map_err(|e| Error::InstantiationError(Box::new(e)))? + }; - // We need to write the inputs in the memory exported from the wasm - // module - let memory = instance + // Fetch guest's main memory + let guest_memory = instance .exports .get_memory("memory") .map_err(Error::MissingModuleMemory)?; + + init_memory_callback(guest_memory); + + // Write the inputs in the memory exported from the wasm + // module let memory::VpCallInput { addr_ptr, addr_len, @@ -389,20 +429,28 @@ fn run_vp( keys_changed_len, verifiers_ptr, verifiers_len, - } = memory::write_vp_inputs(memory, input).map_err(Error::MemoryError)?; + } = { + let mut store = store.borrow_mut(); + memory::write_vp_inputs(&mut *store, guest_memory, input) + .map_err(Error::MemoryError)? + }; // Get the module's entrypoint to be called - let validate_tx = instance - .exports - .get_function(VP_ENTRYPOINT) - .map_err(Error::MissingModuleEntrypoint)? - .native::<(u64, u64, u64, u64, u64, u64, u64, u64), u64>() - .map_err(|error| Error::UnexpectedModuleEntrypointInterface { - entrypoint: VP_ENTRYPOINT, - error, - })?; + let validate_tx = { + let store = store.borrow(); + instance + .exports + .get_function(VP_ENTRYPOINT) + .map_err(Error::MissingModuleEntrypoint)? + .typed::<(u64, u64, u64, u64, u64, u64, u64, u64), u64>(&*store) + .map_err(|error| Error::UnexpectedModuleEntrypointInterface { + entrypoint: VP_ENTRYPOINT, + error, + })? + }; let is_valid = validate_tx .call( + unsafe { &mut *RefCell::as_ptr(&*store) }, addr_ptr, addr_len, data_ptr, @@ -438,13 +486,12 @@ fn run_vp( "wasm vp" ); + // NB: early drop this data to avoid memory errors + _ = (instance, vp_imports); + if is_valid == 1 { Ok(()) } else { - // NB: drop imports so we can safely access the - // `&mut` ptrs we shared with the guest - _ = (instance, vp_imports); - unsafe { yielded_value.get_mut() }.take().map_or_else( || Err(Error::VpError(VpError::Unspecified)), |borsh_encoded_err| { @@ -526,15 +573,20 @@ where &ctx.state(), gas_meter, )?; + let store = Rc::new(RefCell::new(store)); - let env = VpVmEnv { - memory: WasmMemory::default(), + let mut env = VpVmEnv { + memory: WasmMemory::new(Rc::clone(&store)), ctx, }; let yielded_value_borrow = env.ctx.yielded_value; - let imports = vp_imports(&store, env); + let imports = { + let mut store = store.borrow_mut(); + vp_imports(&mut *store, env.clone()) + }; run_vp( + store, module, imports, &vp_code_hash, @@ -543,6 +595,7 @@ where keys_changed, verifiers, yielded_value_borrow, + |guest_memory| env.memory.init_from(guest_memory), ) } } @@ -551,10 +604,16 @@ where pub fn untrusted_wasm_store(limit: Limit) -> wasmer::Store { // Use Singlepass compiler with the default settings let compiler = wasmer_compiler_singlepass::Singlepass::default(); - wasmer::Store::new_with_tunables( - &wasmer_engine_universal::Universal::new(compiler).engine(), - limit, - ) + let mut engine = ::new( + Box::new(compiler), + // NB: The default target corresponds to the host's triplet + Target::default(), + // NB: WASM features are validated via `validate_untrusted_wasm`, + // so we can use the default features here + Features::default(), + ); + engine.set_tunables(limit); + wasmer::Store::new(engine) } /// Inject gas counter and stack-height limiter into the given wasm code @@ -1288,7 +1347,7 @@ mod tests { // of memory match result { // Dylib engine error (used anywhere except mac) - Err(Error::MemoryError(memory::Error::MemoryOutOfBounds( + Err(Error::MemoryError(memory::Error::Grow( wasmer::MemoryError::CouldNotGrow { .. }, ))) => {} Err(error) => { @@ -1352,7 +1411,7 @@ mod tests { // of memory match result { // Dylib engine error (used anywhere except mac) - Err(Error::MemoryError(memory::Error::MemoryOutOfBounds( + Err(Error::MemoryError(memory::Error::Grow( wasmer::MemoryError::CouldNotGrow { .. }, ))) => { // as expected diff --git a/wasm/Cargo.lock b/wasm/Cargo.lock index 71e195bbf18..f4c4ffe5fb5 100644 --- a/wasm/Cargo.lock +++ b/wasm/Cargo.lock @@ -54,7 +54,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -83,6 +83,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.75" @@ -304,7 +353,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.32.1", + "object", "rustc-demangle", ] @@ -661,6 +710,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +dependencies = [ + "serde", +] + [[package]] name = "camino" version = "1.1.6" @@ -787,6 +845,46 @@ dependencies = [ "version_check", ] +[[package]] +name = "clap" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "clap_lex" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" + [[package]] name = "clru" version = "0.5.0" @@ -844,6 +942,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + [[package]] name = "concat-idents" version = "1.1.5" @@ -994,56 +1098,74 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" +checksum = "2a2ab4512dfd3a6f4be184403a195f76e81a8a9f9e6c898e19d2dc3ce20e0115" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" +checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc" dependencies = [ + "arrayvec", + "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", + "cranelift-egraph", "cranelift-entity", + "cranelift-isle", "gimli 0.26.2", "log", - "regalloc", + "regalloc2", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" +checksum = "639307b45434ad112a98f8300c0f0ab085cbefcd767efcdef9ef19d4c0756e74" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.3" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" + +[[package]] +name = "cranelift-egraph" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" +checksum = "624b54323b06e675293939311943ba82d323bb340468ce1889be5da7932c8d73" +dependencies = [ + "cranelift-entity", + "fxhash", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "log", + "smallvec", +] [[package]] name = "cranelift-entity" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" +checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" [[package]] name = "cranelift-frontend" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" +checksum = "0d70abacb8cfef3dc8ff7e8836e9c1d70f7967dfdac824a4cd5e30223415aca6" dependencies = [ "cranelift-codegen", "log", @@ -1051,6 +1173,12 @@ dependencies = [ "target-lexicon", ] +[[package]] +name = "cranelift-isle" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" + [[package]] name = "crc32fast" version = "1.3.2" @@ -1080,10 +1208,19 @@ dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", - "memoffset 0.9.0", + "memoffset", "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.19" @@ -1180,14 +1317,38 @@ dependencies = [ "serde", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + [[package]] name = "darling" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", ] [[package]] @@ -1203,17 +1364,41 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core", + "darling_core 0.20.3", "quote", "syn 2.0.52", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if 1.0.0", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.5.0" @@ -1256,6 +1441,37 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -1319,6 +1535,15 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "document-features" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef5282ad69563b5fc40319526ba27e0e7363d552a896f0297d54f767717f9b95" +dependencies = [ + "litrs", +] + [[package]] name = "dunce" version = "1.0.4" @@ -1368,7 +1593,7 @@ checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", - "memmap2", + "memmap2 0.5.10", ] [[package]] @@ -1514,7 +1739,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ - "darling", + "darling 0.20.3", "proc-macro2", "quote", "syn 2.0.52", @@ -2127,9 +2352,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -2211,7 +2436,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.11", - "indexmap 2.1.0", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -2219,13 +2444,10 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.11.2" +name = "half" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "hashbrown" @@ -3087,20 +3309,21 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +version = "2.2.4" +source = "git+https://github.com/heliaxdev/indexmap?tag=2.2.4-heliax-1#b5b5b547bd6ab04bbb16e060326a50ddaeb6c909" dependencies = [ + "borsh 1.4.0", "equivalent", "hashbrown 0.14.3", + "serde", ] [[package]] name = "indexmap" -version = "2.2.4" -source = "git+https://github.com/heliaxdev/indexmap?tag=2.2.4-heliax-1#b5b5b547bd6ab04bbb16e060326a50ddaeb6c909" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "borsh 1.4.0", "equivalent", "hashbrown 0.14.3", "serde", @@ -3159,6 +3382,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.11.0" @@ -3282,16 +3511,6 @@ version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] - [[package]] name = "libm" version = "0.2.8" @@ -3335,6 +3554,12 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "lock_api" version = "0.4.11" @@ -3351,27 +3576,6 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "loupe" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" -dependencies = [ - "indexmap 1.9.3", - "loupe-derive", - "rustversion", -] - -[[package]] -name = "loupe-derive" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "mach" version = "0.3.2" @@ -3435,7 +3639,7 @@ dependencies = [ "blake2b_simd", "bls12_381", "directories", - "getrandom 0.2.11", + "getrandom 0.2.15", "group", "itertools 0.11.0", "jubjub", @@ -3478,12 +3682,12 @@ dependencies = [ ] [[package]] -name = "memoffset" -version = "0.6.5" +name = "memmap2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" dependencies = [ - "autocfg", + "libc", ] [[package]] @@ -3584,7 +3788,6 @@ dependencies = [ "itertools 0.12.1", "konst", "linkme", - "loupe", "masp_primitives", "masp_proofs", "namada_account", @@ -3636,8 +3839,6 @@ dependencies = [ "wasmer", "wasmer-cache", "wasmer-compiler-singlepass", - "wasmer-engine-dylib", - "wasmer-engine-universal", "wasmer-vm", "wasmparser 0.107.0", "wasmtimer", @@ -4384,18 +4585,6 @@ dependencies = [ "syn 2.0.52", ] -[[package]] -name = "object" -version = "0.28.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" -dependencies = [ - "crc32fast", - "hashbrown 0.11.2", - "indexmap 1.9.3", - "memchr", -] - [[package]] name = "object" version = "0.32.1" @@ -4449,7 +4638,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6624905ddd92e460ff0685567539ed1ac985b2dee4c92c7edcd64fce905b00c" dependencies = [ "ct-codecs", - "getrandom 0.2.11", + "getrandom 0.2.15", "subtle", "zeroize", ] @@ -4652,7 +4841,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.6", ] [[package]] @@ -4998,7 +5187,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", ] [[package]] @@ -5087,19 +5276,20 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] -name = "regalloc" -version = "0.0.34" +name = "regalloc2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" +checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" dependencies = [ + "fxhash", "log", - "rustc-hash", + "slice-group-by", "smallvec", ] @@ -5235,7 +5425,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -5260,6 +5450,7 @@ dependencies = [ "bitvec", "bytecheck", "hashbrown 0.12.3", + "indexmap 1.9.3", "ptr_meta", "rend", "rkyv_derive", @@ -5458,6 +5649,7 @@ dependencies = [ "schemars_derive", "serde", "serde_json", + "url", ] [[package]] @@ -5521,6 +5713,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "self_cell" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" + [[package]] name = "semver" version = "0.11.0" @@ -5562,9 +5760,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] @@ -5587,6 +5785,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b4c031cd0d9014307d82b8abf653c0290fbdaeb4c02d00c63cf52f728628bf" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde_bytes" version = "0.11.12" @@ -5596,11 +5805,21 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", @@ -5661,6 +5880,19 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap 2.2.6", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "serdect" version = "0.2.0" @@ -5714,6 +5946,16 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shared-buffer" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6c99835bad52957e7aa241d3975ed17c1e5f8c92026377d117a606f36b84b16" +dependencies = [ + "bytes", + "memmap2 0.6.2", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -5766,6 +6008,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + [[package]] name = "slip10_ed25519" version = "0.1.3" @@ -5865,6 +6113,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "strum" version = "0.24.1" @@ -6155,7 +6409,7 @@ dependencies = [ "async-trait", "bytes", "flex-error", - "getrandom 0.2.11", + "getrandom 0.2.15", "peg", "pin-project", "rand 0.8.5", @@ -6399,6 +6653,18 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + [[package]] name = "toml" version = "0.8.2" @@ -6426,7 +6692,9 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", + "serde", + "serde_spanned", "toml_datetime", "winnow 0.5.25", ] @@ -6437,7 +6705,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -6450,7 +6718,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "toml_datetime", "winnow 0.5.25", ] @@ -6533,7 +6801,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -6594,7 +6861,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" name = "tx_become_validator" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6603,7 +6870,7 @@ dependencies = [ name = "tx_bond" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada", "namada_test_utils", "namada_tests", @@ -6620,7 +6887,7 @@ dependencies = [ name = "tx_bridge_pool" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6629,7 +6896,7 @@ dependencies = [ name = "tx_change_consensus_key" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6638,7 +6905,7 @@ dependencies = [ name = "tx_change_validator_commission" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada", "namada_test_utils", "namada_tests", @@ -6655,7 +6922,7 @@ dependencies = [ name = "tx_change_validator_metadata" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6664,7 +6931,7 @@ dependencies = [ name = "tx_claim_rewards" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6673,7 +6940,7 @@ dependencies = [ name = "tx_deactivate_validator" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6682,7 +6949,7 @@ dependencies = [ name = "tx_ibc" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6691,7 +6958,7 @@ dependencies = [ name = "tx_init_account" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6700,7 +6967,7 @@ dependencies = [ name = "tx_init_proposal" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6709,7 +6976,7 @@ dependencies = [ name = "tx_reactivate_validator" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6718,7 +6985,7 @@ dependencies = [ name = "tx_redelegate" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada", "namada_test_utils", "namada_tests", @@ -6735,7 +7002,7 @@ dependencies = [ name = "tx_resign_steward" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6744,7 +7011,7 @@ dependencies = [ name = "tx_reveal_pk" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6753,7 +7020,7 @@ dependencies = [ name = "tx_transfer" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6762,7 +7029,7 @@ dependencies = [ name = "tx_unbond" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada", "namada_test_utils", "namada_tests", @@ -6779,7 +7046,7 @@ dependencies = [ name = "tx_unjail_validator" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6788,7 +7055,7 @@ dependencies = [ name = "tx_update_account" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6797,7 +7064,7 @@ dependencies = [ name = "tx_update_steward_commission" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6806,7 +7073,7 @@ dependencies = [ name = "tx_vote_proposal" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_tx_prelude", "wee_alloc", ] @@ -6815,7 +7082,7 @@ dependencies = [ name = "tx_withdraw" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada", "namada_test_utils", "namada_tests", @@ -6936,6 +7203,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.7.1" @@ -6957,15 +7230,22 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "serde", ] @@ -6985,7 +7265,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" name = "vp_implicit" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada", "namada_test_utils", "namada_tests", @@ -7002,7 +7282,7 @@ dependencies = [ name = "vp_user" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada", "namada_test_utils", "namada_tests", @@ -7141,46 +7421,38 @@ dependencies = [ [[package]] name = "wasmer" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce4a267a570e121c9375136adefa2c48810273907de9c6817bc19db4d6144bc" dependencies = [ + "bytes", "cfg-if 1.0.0", + "derivative", "indexmap 1.9.3", "js-sys", - "loupe", "more-asserts", + "rustc-demangle", + "serde", + "serde-wasm-bindgen", + "shared-buffer", "target-lexicon", "thiserror", + "tracing", "wasm-bindgen", - "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-derive", - "wasmer-engine", - "wasmer-engine-dylib", - "wasmer-engine-universal", "wasmer-types", "wasmer-vm", "wat", "winapi", ] -[[package]] -name = "wasmer-artifact" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "enumset", - "loupe", - "thiserror", - "wasmer-compiler", - "wasmer-types", -] - [[package]] name = "wasmer-cache" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a40804bcc2567f112003182fc5edc29584da5199c4a1f5a8d6a6e4b65feff0" dependencies = [ "blake3", "hex", @@ -7190,31 +7462,42 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9c23098e86ef1038155684fe50f0c1079a0e2a2e70f115b789df17e6ba98d20" dependencies = [ + "backtrace", + "bytes", + "cfg-if 1.0.0", + "enum-iterator", "enumset", - "loupe", + "lazy_static", + "leb128", + "memmap2 0.5.10", + "more-asserts", + "region", "rkyv", - "serde", - "serde_bytes", + "self_cell", + "shared-buffer", "smallvec", - "target-lexicon", "thiserror", "wasmer-types", - "wasmparser 0.83.0", + "wasmer-vm", + "wasmparser 0.121.2", + "winapi", + "xxhash-rust", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95287b79973ad5f485215733ef9f0d4bb951a6b7e655585d2bd3d4a4ba1253c9" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", "gimli 0.26.2", - "loupe", "more-asserts", "rayon", "smallvec", @@ -7222,185 +7505,128 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d78d59be3ce78ad859e176b88f0d5bec0120ece0684922d7c5da1289e251b1" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "enumset", "gimli 0.26.2", "lazy_static", - "loupe", "more-asserts", "rayon", "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] -name = "wasmer-derive" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "wasmer-engine" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "backtrace", - "enumset", - "lazy_static", - "loupe", - "memmap2", - "more-asserts", - "rustc-demangle", - "serde", - "serde_bytes", - "target-lexicon", - "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", - "wasmer-vm", -] - -[[package]] -name = "wasmer-engine-dylib" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +name = "wasmer-config" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a0f70c177b1c5062cfe0f5308c3317751796fef9403c22a0cd7b4cacd4ccd8" dependencies = [ - "cfg-if 1.0.0", - "enum-iterator", - "enumset", - "leb128", - "libloading", - "loupe", - "object 0.28.4", - "rkyv", + "anyhow", + "bytesize", + "derive_builder", + "hex", + "indexmap 2.2.6", + "schemars", + "semver 1.0.20", "serde", - "tempfile", - "tracing", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-engine", - "wasmer-object", - "wasmer-types", - "wasmer-vm", - "which", -] - -[[package]] -name = "wasmer-engine-universal" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "cfg-if 1.0.0", - "enumset", - "leb128", - "loupe", - "region", - "rkyv", - "wasmer-compiler", - "wasmer-engine", - "wasmer-engine-universal-artifact", - "wasmer-types", - "wasmer-vm", - "winapi", -] - -[[package]] -name = "wasmer-engine-universal-artifact" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "enum-iterator", - "enumset", - "loupe", - "rkyv", + "serde_cbor", + "serde_json", + "serde_yaml", "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", + "toml 0.8.2", + "url", ] [[package]] -name = "wasmer-object" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +name = "wasmer-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48f36aeeecb655f15fdd358bdf6e4cec27df181468fa4226084157e8462bd5e" dependencies = [ - "object 0.28.4", - "thiserror", - "wasmer-compiler", - "wasmer-types", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "wasmer-types" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83cb97b6b20084757a2a8d548dc0d4179c3fe9e2d711740423a1e6aa3f8b9091" dependencies = [ - "backtrace", + "bytecheck", "enum-iterator", + "enumset", + "getrandom 0.2.15", + "hex", "indexmap 1.9.3", - "loupe", + "more-asserts", "rkyv", - "serde", + "sha2 0.10.8", + "target-lexicon", "thiserror", + "webc", + "xxhash-rust", ] [[package]] name = "wasmer-vm" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc1e19d986844b17b927ec8b0c7f3da6a7a2c2cb3b0f8ca5d4cb1a1f71bfb124" dependencies = [ "backtrace", "cc", "cfg-if 1.0.0", "corosensei", + "crossbeam-queue", + "dashmap", + "derivative", "enum-iterator", + "fnv", "indexmap 1.9.3", "lazy_static", "libc", - "loupe", "mach", - "memoffset 0.6.5", + "memoffset", "more-asserts", "region", - "rkyv", "scopeguard", - "serde", "thiserror", - "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.83.0" +version = "0.107.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" +checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +dependencies = [ + "indexmap 1.9.3", + "semver 1.0.20", +] [[package]] name = "wasmparser" -version = "0.107.0" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "indexmap 1.9.3", + "bitflags 2.5.0", + "indexmap 2.2.6", "semver 1.0.20", ] @@ -7449,6 +7675,36 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webc" +version = "6.0.0-alpha9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b4e8dd987046eede4348d660404ff990412631b7d493f9e547adcf2862cd5" +dependencies = [ + "anyhow", + "base64 0.21.7", + "bytes", + "cfg-if 1.0.0", + "clap", + "document-features", + "flate2", + "indexmap 1.9.3", + "libc", + "once_cell", + "semver 1.0.20", + "serde", + "serde_cbor", + "serde_json", + "sha2 0.10.8", + "shared-buffer", + "tar", + "tempfile", + "thiserror", + "toml 0.7.8", + "url", + "wasmer-config", +] + [[package]] name = "webpki-roots" version = "0.25.3" @@ -7761,6 +8017,12 @@ dependencies = [ "rustix", ] +[[package]] +name = "xxhash-rust" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" + [[package]] name = "zcash_encoding" version = "0.2.0" diff --git a/wasm/Cargo.toml b/wasm/Cargo.toml index 16be363e3cb..6ad75ec9947 100644 --- a/wasm/Cargo.toml +++ b/wasm/Cargo.toml @@ -40,7 +40,7 @@ namada_vp_prelude = { path = "../crates/vp_prelude" } once_cell = { version = "1.8.0" } wee_alloc = "0.4.5" -getrandom = { version = "0.2", features = ["custom"] } +getrandom = { version = "0.2.15", features = ["custom"] } [profile.release] # smaller and faster wasm (https://rustwasm.github.io/book/reference/code-size.html#compiling-with-link-time-optimizations-lto) diff --git a/wasm/tx_bond/Cargo.toml b/wasm/tx_bond/Cargo.toml index 7c4a73c733a..df1dd9a5f47 100644 --- a/wasm/tx_bond/Cargo.toml +++ b/wasm/tx_bond/Cargo.toml @@ -14,7 +14,7 @@ wee_alloc.workspace = true getrandom.workspace = true [dev-dependencies] -namada = {path = "../../crates/namada"} +namada = {path = "../../crates/namada", default-features = false} namada_tests = {path = "../../crates/tests"} namada_test_utils = {path = "../../crates/test_utils"} namada_tx_prelude = { workspace = true, features = ["testing"] } diff --git a/wasm/tx_change_validator_commission/Cargo.toml b/wasm/tx_change_validator_commission/Cargo.toml index d2905316ff9..87815504b31 100644 --- a/wasm/tx_change_validator_commission/Cargo.toml +++ b/wasm/tx_change_validator_commission/Cargo.toml @@ -14,7 +14,7 @@ wee_alloc.workspace = true getrandom.workspace = true [dev-dependencies] -namada = {path = "../../crates/namada"} +namada = {path = "../../crates/namada", default-features = false} namada_tests = {path = "../../crates/tests"} namada_test_utils = {path = "../../crates/test_utils"} namada_vp_prelude = {path = "../../crates/vp_prelude"} diff --git a/wasm/tx_redelegate/Cargo.toml b/wasm/tx_redelegate/Cargo.toml index cd3e662f753..1c567420b22 100644 --- a/wasm/tx_redelegate/Cargo.toml +++ b/wasm/tx_redelegate/Cargo.toml @@ -14,7 +14,7 @@ wee_alloc.workspace = true getrandom.workspace = true [dev-dependencies] -namada = {path = "../../crates/namada"} +namada = {path = "../../crates/namada", default-features = false} namada_tests = {path = "../../crates/tests"} namada_test_utils = {path = "../../crates/test_utils"} namada_tx_prelude = { workspace = true, features = ["testing"] } diff --git a/wasm/tx_unbond/Cargo.toml b/wasm/tx_unbond/Cargo.toml index 75cc46c9f8d..a8918cddf21 100644 --- a/wasm/tx_unbond/Cargo.toml +++ b/wasm/tx_unbond/Cargo.toml @@ -14,7 +14,7 @@ wee_alloc.workspace = true getrandom.workspace = true [dev-dependencies] -namada = {path = "../../crates/namada"} +namada = {path = "../../crates/namada", default-features = false} namada_tests = {path = "../../crates/tests"} namada_test_utils = {path = "../../crates/test_utils"} namada_tx_prelude = { workspace = true, features = ["testing"] } diff --git a/wasm/tx_withdraw/Cargo.toml b/wasm/tx_withdraw/Cargo.toml index f447b81cc07..62d5daa30d6 100644 --- a/wasm/tx_withdraw/Cargo.toml +++ b/wasm/tx_withdraw/Cargo.toml @@ -14,7 +14,7 @@ wee_alloc.workspace = true getrandom.workspace = true [dev-dependencies] -namada = {path = "../../crates/namada"} +namada = {path = "../../crates/namada", default-features = false} namada_tests = {path = "../../crates/tests"} namada_test_utils = {path = "../../crates/test_utils"} namada_tx_prelude = { workspace = true, features = ["testing"] } diff --git a/wasm/vp_implicit/Cargo.toml b/wasm/vp_implicit/Cargo.toml index 6a3487b74d1..e237b39337e 100644 --- a/wasm/vp_implicit/Cargo.toml +++ b/wasm/vp_implicit/Cargo.toml @@ -15,7 +15,7 @@ wee_alloc.workspace = true getrandom.workspace = true [dev-dependencies] -namada = {path = "../../crates/namada"} +namada = {path = "../../crates/namada", default-features = false} namada_tests = {path = "../../crates/tests"} namada_test_utils = {path = "../../crates/test_utils"} namada_vp_prelude = {path = "../../crates/vp_prelude"} diff --git a/wasm/vp_user/Cargo.toml b/wasm/vp_user/Cargo.toml index fdcc1006660..e10d44d4c73 100644 --- a/wasm/vp_user/Cargo.toml +++ b/wasm/vp_user/Cargo.toml @@ -15,7 +15,7 @@ wee_alloc.workspace = true getrandom.workspace = true [dev-dependencies] -namada = {path = "../../crates/namada"} +namada = {path = "../../crates/namada", default-features = false} namada_tests = {path = "../../crates/tests"} namada_test_utils = {path = "../../crates/test_utils"} namada_vp_prelude = {path = "../../crates/vp_prelude"} diff --git a/wasm_for_tests/Cargo.lock b/wasm_for_tests/Cargo.lock index aacadf28d1d..2737abf1d8f 100644 --- a/wasm_for_tests/Cargo.lock +++ b/wasm_for_tests/Cargo.lock @@ -54,7 +54,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -83,6 +83,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.75" @@ -304,7 +353,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.32.1", + "object", "rustc-demangle", ] @@ -661,6 +710,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +dependencies = [ + "serde", +] + [[package]] name = "camino" version = "1.1.6" @@ -787,6 +845,46 @@ dependencies = [ "version_check", ] +[[package]] +name = "clap" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "clap_lex" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" + [[package]] name = "clru" version = "0.5.0" @@ -844,6 +942,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + [[package]] name = "concat-idents" version = "1.1.5" @@ -994,56 +1098,74 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" +checksum = "2a2ab4512dfd3a6f4be184403a195f76e81a8a9f9e6c898e19d2dc3ce20e0115" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" +checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc" dependencies = [ + "arrayvec", + "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", + "cranelift-egraph", "cranelift-entity", + "cranelift-isle", "gimli 0.26.2", "log", - "regalloc", + "regalloc2", "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" +checksum = "639307b45434ad112a98f8300c0f0ab085cbefcd767efcdef9ef19d4c0756e74" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.3" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" + +[[package]] +name = "cranelift-egraph" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" +checksum = "624b54323b06e675293939311943ba82d323bb340468ce1889be5da7932c8d73" +dependencies = [ + "cranelift-entity", + "fxhash", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "log", + "smallvec", +] [[package]] name = "cranelift-entity" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" +checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" [[package]] name = "cranelift-frontend" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" +checksum = "0d70abacb8cfef3dc8ff7e8836e9c1d70f7967dfdac824a4cd5e30223415aca6" dependencies = [ "cranelift-codegen", "log", @@ -1051,6 +1173,12 @@ dependencies = [ "target-lexicon", ] +[[package]] +name = "cranelift-isle" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" + [[package]] name = "crc32fast" version = "1.3.2" @@ -1080,10 +1208,19 @@ dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", - "memoffset 0.9.0", + "memoffset", "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.19" @@ -1180,14 +1317,38 @@ dependencies = [ "serde", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + [[package]] name = "darling" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", ] [[package]] @@ -1203,17 +1364,41 @@ dependencies = [ "syn 2.0.65", ] +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core", + "darling_core 0.20.3", "quote", "syn 2.0.65", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if 1.0.0", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.5.0" @@ -1256,6 +1441,37 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -1319,6 +1535,15 @@ dependencies = [ "syn 2.0.65", ] +[[package]] +name = "document-features" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef5282ad69563b5fc40319526ba27e0e7363d552a896f0297d54f767717f9b95" +dependencies = [ + "litrs", +] + [[package]] name = "dunce" version = "1.0.4" @@ -1368,7 +1593,7 @@ checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", - "memmap2", + "memmap2 0.5.10", ] [[package]] @@ -1514,7 +1739,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ - "darling", + "darling 0.20.3", "proc-macro2", "quote", "syn 2.0.65", @@ -2127,9 +2352,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -2211,7 +2436,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.11", - "indexmap 2.1.0", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -2219,13 +2444,10 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.11.2" +name = "half" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "hashbrown" @@ -3087,20 +3309,21 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +version = "2.2.4" +source = "git+https://github.com/heliaxdev/indexmap?tag=2.2.4-heliax-1#b5b5b547bd6ab04bbb16e060326a50ddaeb6c909" dependencies = [ + "borsh 1.2.1", "equivalent", "hashbrown 0.14.3", + "serde", ] [[package]] name = "indexmap" -version = "2.2.4" -source = "git+https://github.com/heliaxdev/indexmap?tag=2.2.4-heliax-1#b5b5b547bd6ab04bbb16e060326a50ddaeb6c909" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "borsh 1.2.1", "equivalent", "hashbrown 0.14.3", "serde", @@ -3159,6 +3382,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.11.0" @@ -3282,16 +3511,6 @@ version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] - [[package]] name = "libm" version = "0.2.8" @@ -3315,6 +3534,12 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "lock_api" version = "0.4.11" @@ -3331,27 +3556,6 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "loupe" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" -dependencies = [ - "indexmap 1.9.3", - "loupe-derive", - "rustversion", -] - -[[package]] -name = "loupe-derive" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "mach" version = "0.3.2" @@ -3415,7 +3619,7 @@ dependencies = [ "blake2b_simd", "bls12_381", "directories", - "getrandom 0.2.11", + "getrandom 0.2.15", "group", "itertools 0.11.0", "jubjub", @@ -3458,12 +3662,12 @@ dependencies = [ ] [[package]] -name = "memoffset" -version = "0.6.5" +name = "memmap2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" dependencies = [ - "autocfg", + "libc", ] [[package]] @@ -3563,7 +3767,6 @@ dependencies = [ "futures", "itertools 0.12.1", "konst", - "loupe", "masp_primitives", "masp_proofs", "namada_account", @@ -3614,8 +3817,6 @@ dependencies = [ "wasmer", "wasmer-cache", "wasmer-compiler-singlepass", - "wasmer-engine-dylib", - "wasmer-engine-universal", "wasmer-vm", "wasmparser 0.107.0", "wasmtimer", @@ -4329,18 +4530,6 @@ dependencies = [ "syn 2.0.65", ] -[[package]] -name = "object" -version = "0.28.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" -dependencies = [ - "crc32fast", - "hashbrown 0.11.2", - "indexmap 1.9.3", - "memchr", -] - [[package]] name = "object" version = "0.32.1" @@ -4394,7 +4583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6624905ddd92e460ff0685567539ed1ac985b2dee4c92c7edcd64fce905b00c" dependencies = [ "ct-codecs", - "getrandom 0.2.11", + "getrandom 0.2.15", "subtle", "zeroize", ] @@ -4597,7 +4786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.6", ] [[package]] @@ -4935,7 +5124,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", ] [[package]] @@ -5024,19 +5213,20 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] -name = "regalloc" -version = "0.0.34" +name = "regalloc2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" +checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" dependencies = [ + "fxhash", "log", - "rustc-hash", + "slice-group-by", "smallvec", ] @@ -5172,7 +5362,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -5197,6 +5387,7 @@ dependencies = [ "bitvec", "bytecheck", "hashbrown 0.12.3", + "indexmap 1.9.3", "ptr_meta", "rend", "rkyv_derive", @@ -5395,6 +5586,7 @@ dependencies = [ "schemars_derive", "serde", "serde_json", + "url", ] [[package]] @@ -5458,6 +5650,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "self_cell" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" + [[package]] name = "semver" version = "0.11.0" @@ -5499,9 +5697,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] @@ -5524,6 +5722,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b4c031cd0d9014307d82b8abf653c0290fbdaeb4c02d00c63cf52f728628bf" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde_bytes" version = "0.11.12" @@ -5533,11 +5742,21 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", @@ -5598,6 +5817,19 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap 2.2.6", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "serdect" version = "0.2.0" @@ -5651,6 +5883,16 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shared-buffer" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6c99835bad52957e7aa241d3975ed17c1e5f8c92026377d117a606f36b84b16" +dependencies = [ + "bytes", + "memmap2 0.6.2", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -5703,6 +5945,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + [[package]] name = "slip10_ed25519" version = "0.1.3" @@ -5802,6 +6050,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "strum" version = "0.24.1" @@ -6092,7 +6346,7 @@ dependencies = [ "async-trait", "bytes", "flex-error", - "getrandom 0.2.11", + "getrandom 0.2.15", "peg", "pin-project", "rand 0.8.5", @@ -6336,6 +6590,18 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + [[package]] name = "toml" version = "0.8.2" @@ -6363,7 +6629,9 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", + "serde", + "serde_spanned", "toml_datetime", "winnow 0.5.25", ] @@ -6374,7 +6642,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -6459,7 +6727,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -6520,7 +6787,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" name = "tx_fail" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6536,7 +6803,7 @@ dependencies = [ name = "tx_infinite_guest_gas" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6552,7 +6819,7 @@ dependencies = [ name = "tx_infinite_host_gas" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6568,7 +6835,7 @@ dependencies = [ name = "tx_invalid_data" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6584,7 +6851,7 @@ dependencies = [ name = "tx_memory_limit" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6600,7 +6867,7 @@ dependencies = [ name = "tx_no_op" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6616,7 +6883,7 @@ dependencies = [ name = "tx_proposal_code" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6632,7 +6899,7 @@ dependencies = [ name = "tx_proposal_ibc_token_inflation" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6648,7 +6915,7 @@ dependencies = [ name = "tx_proposal_masp_reward" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6664,7 +6931,7 @@ dependencies = [ name = "tx_read_storage_key" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6680,7 +6947,7 @@ dependencies = [ name = "tx_write" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6800,6 +7067,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.7.1" @@ -6821,15 +7094,22 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "serde", ] @@ -6849,7 +7129,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" name = "vp_always_false" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6865,7 +7145,7 @@ dependencies = [ name = "vp_always_true" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6881,7 +7161,7 @@ dependencies = [ name = "vp_eval" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6897,7 +7177,7 @@ dependencies = [ name = "vp_infinite_guest_gas" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6913,7 +7193,7 @@ dependencies = [ name = "vp_infinite_host_gas" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6929,7 +7209,7 @@ dependencies = [ name = "vp_memory_limit" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -6945,7 +7225,7 @@ dependencies = [ name = "vp_read_storage_key" version = "0.36.1" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", "namada_test_utils", "namada_tests", "namada_tx_prelude", @@ -7083,46 +7363,38 @@ dependencies = [ [[package]] name = "wasmer" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce4a267a570e121c9375136adefa2c48810273907de9c6817bc19db4d6144bc" dependencies = [ + "bytes", "cfg-if 1.0.0", + "derivative", "indexmap 1.9.3", "js-sys", - "loupe", "more-asserts", + "rustc-demangle", + "serde", + "serde-wasm-bindgen", + "shared-buffer", "target-lexicon", "thiserror", + "tracing", "wasm-bindgen", - "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-derive", - "wasmer-engine", - "wasmer-engine-dylib", - "wasmer-engine-universal", "wasmer-types", "wasmer-vm", "wat", "winapi", ] -[[package]] -name = "wasmer-artifact" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "enumset", - "loupe", - "thiserror", - "wasmer-compiler", - "wasmer-types", -] - [[package]] name = "wasmer-cache" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a40804bcc2567f112003182fc5edc29584da5199c4a1f5a8d6a6e4b65feff0" dependencies = [ "blake3", "hex", @@ -7132,31 +7404,42 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9c23098e86ef1038155684fe50f0c1079a0e2a2e70f115b789df17e6ba98d20" dependencies = [ + "backtrace", + "bytes", + "cfg-if 1.0.0", + "enum-iterator", "enumset", - "loupe", + "lazy_static", + "leb128", + "memmap2 0.5.10", + "more-asserts", + "region", "rkyv", - "serde", - "serde_bytes", + "self_cell", + "shared-buffer", "smallvec", - "target-lexicon", "thiserror", "wasmer-types", - "wasmparser 0.83.0", + "wasmer-vm", + "wasmparser 0.121.2", + "winapi", + "xxhash-rust", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95287b79973ad5f485215733ef9f0d4bb951a6b7e655585d2bd3d4a4ba1253c9" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", "gimli 0.26.2", - "loupe", "more-asserts", "rayon", "smallvec", @@ -7164,185 +7447,128 @@ dependencies = [ "tracing", "wasmer-compiler", "wasmer-types", - "wasmer-vm", ] [[package]] name = "wasmer-compiler-singlepass" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d78d59be3ce78ad859e176b88f0d5bec0120ece0684922d7c5da1289e251b1" dependencies = [ "byteorder", "dynasm", "dynasmrt", + "enumset", "gimli 0.26.2", "lazy_static", - "loupe", "more-asserts", "rayon", "smallvec", "wasmer-compiler", "wasmer-types", - "wasmer-vm", -] - -[[package]] -name = "wasmer-derive" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "wasmer-engine" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "backtrace", - "enumset", - "lazy_static", - "loupe", - "memmap2", - "more-asserts", - "rustc-demangle", - "serde", - "serde_bytes", - "target-lexicon", - "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", - "wasmer-vm", ] [[package]] -name = "wasmer-engine-dylib" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +name = "wasmer-config" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a0f70c177b1c5062cfe0f5308c3317751796fef9403c22a0cd7b4cacd4ccd8" dependencies = [ - "cfg-if 1.0.0", - "enum-iterator", - "enumset", - "leb128", - "libloading", - "loupe", - "object 0.28.4", - "rkyv", + "anyhow", + "bytesize", + "derive_builder", + "hex", + "indexmap 2.2.6", + "schemars", + "semver 1.0.20", "serde", - "tempfile", - "tracing", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-engine", - "wasmer-object", - "wasmer-types", - "wasmer-vm", - "which", -] - -[[package]] -name = "wasmer-engine-universal" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "cfg-if 1.0.0", - "enumset", - "leb128", - "loupe", - "region", - "rkyv", - "wasmer-compiler", - "wasmer-engine", - "wasmer-engine-universal-artifact", - "wasmer-types", - "wasmer-vm", - "winapi", -] - -[[package]] -name = "wasmer-engine-universal-artifact" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" -dependencies = [ - "enum-iterator", - "enumset", - "loupe", - "rkyv", + "serde_cbor", + "serde_json", + "serde_yaml", "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", + "toml 0.8.2", + "url", ] [[package]] -name = "wasmer-object" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +name = "wasmer-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48f36aeeecb655f15fdd358bdf6e4cec27df181468fa4226084157e8462bd5e" dependencies = [ - "object 0.28.4", - "thiserror", - "wasmer-compiler", - "wasmer-types", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "wasmer-types" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83cb97b6b20084757a2a8d548dc0d4179c3fe9e2d711740423a1e6aa3f8b9091" dependencies = [ - "backtrace", + "bytecheck", "enum-iterator", + "enumset", + "getrandom 0.2.15", + "hex", "indexmap 1.9.3", - "loupe", + "more-asserts", "rkyv", - "serde", + "sha2 0.10.8", + "target-lexicon", "thiserror", + "webc", + "xxhash-rust", ] [[package]] name = "wasmer-vm" -version = "2.3.0" -source = "git+https://github.com/heliaxdev/wasmer?rev=255054f7f58b7b4a525f2fee6b9b86422d1ca15b#255054f7f58b7b4a525f2fee6b9b86422d1ca15b" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc1e19d986844b17b927ec8b0c7f3da6a7a2c2cb3b0f8ca5d4cb1a1f71bfb124" dependencies = [ "backtrace", "cc", "cfg-if 1.0.0", "corosensei", + "crossbeam-queue", + "dashmap", + "derivative", "enum-iterator", + "fnv", "indexmap 1.9.3", "lazy_static", "libc", - "loupe", "mach", - "memoffset 0.6.5", + "memoffset", "more-asserts", "region", - "rkyv", "scopeguard", - "serde", "thiserror", - "wasmer-artifact", "wasmer-types", "winapi", ] [[package]] name = "wasmparser" -version = "0.83.0" +version = "0.107.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" +checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +dependencies = [ + "indexmap 1.9.3", + "semver 1.0.20", +] [[package]] name = "wasmparser" -version = "0.107.0" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "indexmap 1.9.3", + "bitflags 2.5.0", + "indexmap 2.2.6", "semver 1.0.20", ] @@ -7391,6 +7617,36 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webc" +version = "6.0.0-alpha9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b4e8dd987046eede4348d660404ff990412631b7d493f9e547adcf2862cd5" +dependencies = [ + "anyhow", + "base64 0.21.7", + "bytes", + "cfg-if 1.0.0", + "clap", + "document-features", + "flate2", + "indexmap 1.9.3", + "libc", + "once_cell", + "semver 1.0.20", + "serde", + "serde_cbor", + "serde_json", + "sha2 0.10.8", + "shared-buffer", + "tar", + "tempfile", + "thiserror", + "toml 0.7.8", + "url", + "wasmer-config", +] + [[package]] name = "webpki-roots" version = "0.25.3" @@ -7703,6 +7959,12 @@ dependencies = [ "rustix", ] +[[package]] +name = "xxhash-rust" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" + [[package]] name = "zcash_encoding" version = "0.2.0" diff --git a/wasm_for_tests/Cargo.toml b/wasm_for_tests/Cargo.toml index 081208f6e65..6c4f5b2b0b5 100644 --- a/wasm_for_tests/Cargo.toml +++ b/wasm_for_tests/Cargo.toml @@ -33,7 +33,7 @@ namada_test_utils = { path = "../crates/test_utils" } namada_tx_prelude = { path = "../crates/tx_prelude" } namada_vp_prelude = { path = "../crates/vp_prelude" } wee_alloc = "0.4.5" -getrandom = { version = "0.2", features = ["custom"] } +getrandom = { version = "0.2.15", features = ["custom"] } [profile.release] # smaller and faster wasm (https://rustwasm.github.io/book/reference/code-size.html#compiling-with-link-time-optimizations-lto)