From afc3f04a0764c72b777997933638a31e8bab8a44 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 7 Nov 2023 11:22:14 +0000 Subject: [PATCH] * Introduce RPC and new protocol crate * Fork ledger traits * Subxt based client - connectivity * Development runtime - working, global logger use needs to consider rust::tracing * Signature and address types, substrate crypto used directly for account signatures * Seed mechanism changed in ChronicleSigning to allow us to supply a specific seed --- Cargo.lock | 4041 ++++++++++++----- Cargo.toml | 22 +- crates/api/Cargo.toml | 5 +- crates/chronicle-domain-test/Cargo.toml | 1 - crates/chronicle-protocol/Cargo.toml | 57 - crates/chronicle-protocol/build.rs | 10 - crates/chronicle-protocol/src/address.rs | 47 - crates/chronicle-protocol/src/lib.rs | 28 - crates/chronicle-protocol/src/messages.rs | 135 - crates/chronicle-protocol/src/perf.md | 32 - crates/chronicle-protocol/src/protocol.rs | 308 -- .../chronicle-protocol/src/protos/event.proto | 14 - .../src/protos/submission.proto | 37 - crates/chronicle-protocol/src/settings.rs | 114 - .../src/embedded_secret_manager_source.rs | 22 +- crates/chronicle-signing/src/lib.rs | 48 +- crates/chronicle/Cargo.toml | 2 - crates/common/Cargo.toml | 11 +- crates/common/src/attributes.rs | 92 +- crates/common/src/identity.rs | 27 +- crates/common/src/json_ld.rs | 1 + crates/common/src/ledger.rs | 57 +- crates/common/src/prov/id/mod.rs | 301 +- crates/common/src/prov/model/contradiction.rs | 15 +- .../src/prov/model/json_ld/from_json_ld.rs | 6 +- crates/common/src/prov/model/mod.rs | 226 +- crates/common/src/prov/model/proptest.rs | 1 - crates/common/src/prov/operations.rs | 242 +- crates/common/tree.txt | 465 ++ crates/pallet-chronicle/Cargo.toml | 18 +- crates/pallet-chronicle/src/lib.rs | 35 +- crates/pallet-chronicle/src/mock.rs | 72 +- crates/pallet-chronicle/src/tests.rs | 23 +- crates/pallet-opa/Cargo.toml | 44 + crates/pallet-opa/src/lib.rs | 198 + crates/pallet-opa/src/main.rs | 3 + crates/pallet-opa/src/mock.rs | 56 + crates/pallet-opa/src/tests.rs | 50 + crates/pallet-opa/src/weights.rs | 66 + crates/pallet-opa/tree.txt | 1257 +++++ .../protocol-substrate-chronicle/Cargo.toml | 36 + .../src/abstract_ledger.rs | 194 + .../src/development_runtime.rs | 176 + .../protocol-substrate-chronicle/src/lib.rs | 5 + .../src/subxt_client.rs | 481 ++ crates/rpc-chronicle/Cargo.toml | 36 + crates/rpc-chronicle/src/lib.rs | 78 + crates/runtime-api-chronicle/Cargo.toml | 21 + crates/runtime-api-chronicle/src/lib.rs | 14 + crates/sawtooth-tp/Cargo.toml | 1 - node/node-chronicle/Cargo.toml | 76 +- node/node-chronicle/src/chain_spec.rs | 3 +- node/node-chronicle/src/lib.rs | 3 + node/node-chronicle/src/rpc.rs | 3 +- node/runtime-chronicle/Cargo.toml | 56 +- node/runtime-chronicle/src/lib.rs | 17 +- 56 files changed, 6813 insertions(+), 2576 deletions(-) delete mode 100644 crates/chronicle-protocol/Cargo.toml delete mode 100644 crates/chronicle-protocol/build.rs delete mode 100644 crates/chronicle-protocol/src/address.rs delete mode 100644 crates/chronicle-protocol/src/lib.rs delete mode 100644 crates/chronicle-protocol/src/messages.rs delete mode 100644 crates/chronicle-protocol/src/perf.md delete mode 100644 crates/chronicle-protocol/src/protocol.rs delete mode 100644 crates/chronicle-protocol/src/protos/event.proto delete mode 100644 crates/chronicle-protocol/src/protos/submission.proto delete mode 100644 crates/chronicle-protocol/src/settings.rs create mode 100644 crates/common/src/json_ld.rs create mode 100644 crates/common/tree.txt create mode 100644 crates/pallet-opa/Cargo.toml create mode 100644 crates/pallet-opa/src/lib.rs create mode 100644 crates/pallet-opa/src/main.rs create mode 100644 crates/pallet-opa/src/mock.rs create mode 100644 crates/pallet-opa/src/tests.rs create mode 100644 crates/pallet-opa/src/weights.rs create mode 100644 crates/pallet-opa/tree.txt create mode 100644 crates/protocol-substrate-chronicle/Cargo.toml create mode 100644 crates/protocol-substrate-chronicle/src/abstract_ledger.rs create mode 100644 crates/protocol-substrate-chronicle/src/development_runtime.rs create mode 100644 crates/protocol-substrate-chronicle/src/lib.rs create mode 100644 crates/protocol-substrate-chronicle/src/subxt_client.rs create mode 100644 crates/rpc-chronicle/Cargo.toml create mode 100644 crates/rpc-chronicle/src/lib.rs create mode 100644 crates/runtime-api-chronicle/Cargo.toml create mode 100644 crates/runtime-api-chronicle/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 99791d30a..ef31e9b1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,7 @@ version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "936697e9caf938eb2905036100edf8e1269da8291f8a02f5fe7b37073784eec0" dependencies = [ - "no-std-net", + "no-std-net 0.5.0", "psl", "psl-types", ] @@ -38,7 +38,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.0", + "gimli 0.28.1", ] [[package]] @@ -121,7 +121,7 @@ dependencies = [ "cipher 0.3.0", "ctr 0.8.0", "ghash 0.4.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -135,7 +135,7 @@ dependencies = [ "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -164,7 +164,7 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", "once_cell", "version_check", ] @@ -176,7 +176,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", - "getrandom 0.2.10", + "getrandom 0.2.11", "once_cell", "serde", "version_check", @@ -192,6 +192,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -289,7 +295,6 @@ dependencies = [ "base64 0.21.5", "cached", "cfg-if", - "chronicle-protocol", "chronicle-signing", "chronicle-telemetry", "chrono", @@ -316,12 +321,12 @@ dependencies = [ "portpicker", "prost 0.10.4", "protobuf", + "protocol-substrate-chronicle", "r2d2", "rand 0.8.5", "rand_core 0.6.4", "reqwest", "sawtooth-sdk", - "sawtooth_tp", "serde", "serde_derive", "serde_json", @@ -333,7 +338,7 @@ dependencies = [ "tracing", "url", "user-error", - "uuid 1.5.0", + "uuid 1.6.1", ] [[package]] @@ -371,11 +376,146 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + [[package]] name = "array-bytes" -version = "6.1.0" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" +checksum = "de17a919934ad8c5cc99a1a74de4e2dab95d6121a8f27f94755ff525b630382c" [[package]] name = "arrayref" @@ -383,6 +523,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -500,8 +649,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" +dependencies = [ + "concurrent-queue", + "event-listener 4.0.0", + "event-listener-strategy", "futures-core", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "async-executor" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +dependencies = [ + "async-lock 3.2.0", + "async-task", + "concurrent-queue", + "fastrand 2.0.1", + "futures-lite 2.1.0", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", ] [[package]] @@ -538,7 +726,7 @@ dependencies = [ "static_assertions", "tempfile", "thiserror", - "uuid 1.5.0", + "uuid 1.6.1", ] [[package]] @@ -550,7 +738,7 @@ dependencies = [ "Inflector", "async-graphql-parser", "darling 0.14.4", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -600,38 +788,103 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "cfg-if", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", + "polling 2.8.0", "rustix 0.37.27", "slab", "socket2 0.4.10", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6d3b15875ba253d1110c740755e246537483f152fa334f91abd7fe84c88b3ff" +dependencies = [ + "async-lock 3.2.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.1.0", + "parking", + "polling 3.3.1", + "rustix 0.38.26", + "slab", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "async-lock" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +dependencies = [ + "event-listener 4.0.0", + "event-listener-strategy", + "pin-project-lite 0.2.13", ] [[package]] -name = "async-recursion" -version = "1.0.5" +name = "async-net" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", + "async-io 1.13.0", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.26", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.2.1", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.26", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] [[package]] @@ -662,7 +915,7 @@ dependencies = [ "tokio", "tokio-stream", "tracing", - "uuid 1.5.0", + "uuid 1.6.1", "zmq", ] @@ -685,7 +938,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -702,7 +955,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -724,6 +977,12 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "atomic" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" + [[package]] name = "atomic-waker" version = "1.1.2" @@ -825,6 +1084,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base58" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" + [[package]] name = "base64" version = "0.13.1" @@ -879,7 +1144,16 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.38", + "syn 2.0.39", +] + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", ] [[package]] @@ -897,6 +1171,12 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitflags" version = "1.3.2" @@ -921,6 +1201,18 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" +dependencies = [ + "byte-tools", + "crypto-mac 0.7.0", + "digest 0.8.1", + "opaque-debug 0.2.3", +] + [[package]] name = "blake2" version = "0.10.6" @@ -930,6 +1222,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" version = "1.0.2" @@ -938,7 +1240,7 @@ checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -949,7 +1251,7 @@ checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -962,7 +1264,7 @@ dependencies = [ "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -1022,16 +1324,16 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel", - "async-lock", + "async-channel 2.1.1", + "async-lock 3.2.0", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite", + "futures-lite 2.1.0", "piper", "tracing", ] @@ -1076,9 +1378,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" dependencies = [ "memchr", "serde", @@ -1149,6 +1451,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + [[package]] name = "cached" version = "0.42.0" @@ -1204,9 +1516,9 @@ checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad" [[package]] name = "cargo-platform" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" +checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" dependencies = [ "serde", ] @@ -1249,7 +1561,7 @@ checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" dependencies = [ "aead 0.3.2", "cipher 0.2.5", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -1282,27 +1594,36 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862" +dependencies = [ + "byteorder", + "keystream", +] + [[package]] name = "chacha20" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher 0.4.4", "cpufeatures", - "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.4.3", + "aead 0.5.2", "chacha20", - "cipher 0.3.0", + "cipher 0.4.4", "poly1305", "zeroize", ] @@ -1317,7 +1638,6 @@ dependencies = [ "async-graphql", "async-stl-client", "cfg-if", - "chronicle-protocol", "chronicle-signing", "chronicle-telemetry", "chrono", @@ -1353,10 +1673,10 @@ dependencies = [ "tokio", "toml 0.7.8", "tracing", - "tracing-log", + "tracing-log 0.1.4", "url", "user-error", - "uuid 1.5.0", + "uuid 1.6.1", "valico", ] @@ -1382,7 +1702,6 @@ version = "0.7.5" dependencies = [ "async-stl-client", "chronicle", - "chronicle-protocol", "chronicle-signing", "chronicle-telemetry", "futures", @@ -1391,49 +1710,13 @@ dependencies = [ "opa-tp-protocol", "tempfile", "tracing", - "tracing-log", - "uuid 1.5.0", + "tracing-log 0.1.4", + "uuid 1.6.1", ] [[package]] -name = "chronicle-protocol" -version = "0.7.5" -dependencies = [ - "async-stl-client", - "async-trait", - "bytes", - "chronicle-signing", - "chrono", - "common", - "custom_error", - "derivative", - "futures", - "glob", - "hex", - "k256 0.11.6", - "lazy_static", - "opa-tp-protocol", - "openssl", - "prost 0.10.4", - "prost-build 0.10.4", - "prost-types 0.11.9", - "rand 0.8.5", - "rand_core 0.6.4", - "serde", - "serde_derive", - "serde_json", - "tempfile", - "thiserror", - "tokio", - "tracing", - "url", - "uuid 1.5.0", - "zmq", -] - -[[package]] -name = "chronicle-signing" -version = "0.1.0" +name = "chronicle-signing" +version = "0.1.0" dependencies = [ "async-trait", "k256 0.11.6", @@ -1473,8 +1756,8 @@ dependencies = [ "console-subscriber", "tracing", "tracing-elastic-apm", - "tracing-log", - "tracing-subscriber 0.3.17", + "tracing-log 0.1.4", + "tracing-subscriber 0.3.18", "url", ] @@ -1559,6 +1842,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] @@ -1591,9 +1875,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.7" +version = "4.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" dependencies = [ "clap_builder", "clap_derive 4.4.7", @@ -1601,9 +1885,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" dependencies = [ "anstream", "anstyle", @@ -1642,7 +1926,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1698,9 +1982,9 @@ dependencies = [ [[package]] name = "colored_json" -version = "3.3.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4948aed0a773db233baf8997302da553ad285be28464c36584944a66ab107db2" +checksum = "74cb9ce6b86f6e54bfa9518df2eeeef65d424ec7244d083ed97229185e366a91" dependencies = [ "is-terminal", "serde", @@ -1748,18 +2032,19 @@ dependencies = [ "parity-scale-codec", "proptest", "rdf-types", + "scale-encode", "scale-info", "serde", "serde_derive", "serde_json", - "sp-std", + "sp-std 11.0.0", "tempfile", "testcontainers", "thiserror", "thiserror-no-std", "tokio", "tracing", - "uuid 1.5.0", + "uuid 1.6.1", ] [[package]] @@ -1770,9 +2055,9 @@ checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -1823,7 +2108,7 @@ dependencies = [ "tonic", "tracing", "tracing-core", - "tracing-subscriber 0.3.17", + "tracing-subscriber 0.3.18", ] [[package]] @@ -1847,7 +2132,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", "once_cell", "tiny-keccak", ] @@ -1872,23 +2157,41 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "constant_time_eq" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "contextual" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05ca71f324d19e85a2e976be04b5ecbb193253794a75adfe2e5044c8bef03f6a" +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1896,9 +2199,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core2" @@ -2144,9 +2447,9 @@ dependencies = [ [[package]] name = "crc-catalog" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" @@ -2166,7 +2469,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.4.7", + "clap 4.4.10", "criterion-plot", "futures", "is-terminal", @@ -2229,6 +2532,16 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -2252,19 +2565,19 @@ checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] [[package]] name = "crypto-bigint" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2279,6 +2592,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + [[package]] name = "crypto-mac" version = "0.8.0" @@ -2286,7 +2609,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2296,7 +2619,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2336,7 +2659,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2349,7 +2672,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2366,7 +2689,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2378,7 +2701,20 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", ] [[package]] @@ -2411,7 +2747,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2428,7 +2764,7 @@ checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2451,6 +2787,16 @@ dependencies = [ "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 0.20.3", + "darling_macro 0.20.3", +] + [[package]] name = "darling_core" version = "0.13.4" @@ -2479,6 +2825,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.39", +] + [[package]] name = "darling_macro" version = "0.13.4" @@ -2501,17 +2861,28 @@ dependencies = [ "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 0.20.3", + "quote", + "syn 2.0.39", +] + [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "data-encoding-macro" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -2519,9 +2890,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" dependencies = [ "data-encoding", "syn 1.0.109", @@ -2533,7 +2904,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "uuid 1.5.0", + "uuid 1.6.1", ] [[package]] @@ -2593,9 +2964,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" dependencies = [ "powerfmt", ] @@ -2690,16 +3061,18 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ + "convert_case", "proc-macro2", "quote", + "rustc_version", "syn 1.0.109", ] [[package]] name = "diesel" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2268a214a6f118fce1838edba3d1561cf0e78d8de785475957a580a7f8c69d33" +checksum = "62c6fcf842f17f8c78ecf7c81d75c5ce84436b41ee07e03f490fbb5f5a8731d8" dependencies = [ "bitflags 2.4.1", "byteorder", @@ -2708,7 +3081,7 @@ dependencies = [ "itoa", "pq-sys", "r2d2", - "uuid 1.5.0", + "uuid 1.6.1", ] [[package]] @@ -2720,7 +3093,7 @@ dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2740,7 +3113,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2776,7 +3149,7 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2838,7 +3211,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2849,18 +3222,18 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "docify" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" dependencies = [ "common-path", "derive-syn-parse", @@ -2868,9 +3241,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.38", + "syn 2.0.39", "termcolor", - "toml 0.7.8", + "toml 0.8.8", "walkdir", ] @@ -2886,6 +3259,12 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + [[package]] name = "dtoa" version = "1.0.9" @@ -2915,9 +3294,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" @@ -2934,16 +3313,25 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der 0.7.8", "digest 0.10.7", - "elliptic-curve 0.13.6", + "elliptic-curve 0.13.8", "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", + "signature 2.2.0", + "spki 0.7.3", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature 1.6.4", ] [[package]] @@ -2953,20 +3341,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8 0.10.2", - "signature 2.1.0", + "signature 2.2.0", ] [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519 1.5.3", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek 4.1.1", - "ed25519", + "ed25519 2.2.3", "rand_core 0.6.4", "serde", "sha2 0.10.8", + "subtle 2.4.1", "zeroize", ] @@ -3009,18 +3410,18 @@ dependencies = [ "rand_core 0.6.4", "sec1 0.3.0", "serdect", - "subtle", + "subtle 2.4.1", "zeroize", ] [[package]] name = "elliptic-curve" -version = "0.13.6" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct 0.2.0", - "crypto-bigint 0.5.3", + "crypto-bigint 0.5.5", "digest 0.10.7", "ff 0.13.0", "generic-array 0.14.7", @@ -3028,7 +3429,7 @@ dependencies = [ "pkcs8 0.10.2", "rand_core 0.6.4", "sec1 0.7.3", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -3061,9 +3462,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ "humantime", "is-terminal", @@ -3086,12 +3487,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3106,6 +3507,38 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "event-listener" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.0", + "pin-project-lite 0.2.13", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -3121,11 +3554,11 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ - "blake2", + "blake2 0.10.6", "fs-err", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3190,7 +3623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3200,14 +3633,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] name = "fiat-crypto" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "file-per-thread-logger" @@ -3308,18 +3741,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" -version = "10.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6d54d3a638f0279210c924f4a44e6548bf6345670f5af059a874a5006af4eca" +checksum = "1c2d0a4310dcf0e5cce78e35e60dc2fda80ef61c8f8fc382e685dfc24fcf5db9" dependencies = [ "parity-scale-codec", ] [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -3342,9 +3775,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01af5751a0e4492dc979c57586976403e7ab63641add1a9fd804cad4169f4f6" +checksum = "3dd4946d63eab00d899f08a7e74e965cc6785c2298efaea6a2752905f4810407" dependencies = [ "frame-support", "frame-support-procedural", @@ -3356,26 +3789,26 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-runtime-interface 21.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" -version = "28.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4493341076535acb0bdb591e0e97b32cfacb8515dd74e66156f199d187cec004" +checksum = "67e51c371bff90ba44767a79e72a036d7d648cee621cd2fe9f693e8c1d62941e" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 6.2.0", "chrono", - "clap 4.4.7", + "clap 4.4.10", "comfy-table", "frame-benchmarking", "frame-support", @@ -3400,26 +3833,26 @@ dependencies = [ "serde_json", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 25.0.0", "sp-database", - "sp-externalities", + "sp-externalities 0.23.0", "sp-inherents", - "sp-io", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-trie", - "sp-wasm-interface", + "sp-io 27.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-storage 17.0.0", + "sp-trie 26.0.0", + "sp-wasm-interface 18.0.0", "thiserror", "thousands", ] [[package]] name = "frame-executive" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da12a8c223d6991bd7f9aae542d3d7c9fadde3a81b6f16c2550b808f3b21ecd5" +checksum = "2dda2c20ea3267ee20c9a5482f320236510c4ade6aec1dd930cb57dc5651c64f" dependencies = [ "frame-support", "frame-system", @@ -3427,11 +3860,22 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", +] + +[[package]] +name = "frame-metadata" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", ] [[package]] @@ -3448,21 +3892,20 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b26379217d223364e6715ed12cdfdc9f368c6afcb15fd8771e387ab7b0265f" +checksum = "a30013df51f4d4e58472c4fecdbfeb141234ece5f6355e5b3a3e51d3f87d452d" dependencies = [ - "async-recursion", "futures", "indicatif", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", "spinners", "substrate-rpc-client", "tokio", @@ -3471,18 +3914,18 @@ dependencies = [ [[package]] name = "frame-support" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0dc5640279221fbd316a3a652963c1cb9d51630ea3f62a08a5ad7fa402f23a4" +checksum = "023504bbdd0e8d1ebe3d9d289b009337cdb9a24c5e74615ffd7b188aa1664c2d" dependencies = [ "aquamarine", "bitflags 1.3.2", "docify", "environmental", - "frame-metadata", + "frame-metadata 16.0.0", "frame-support-procedural", "impl-trait-for-tuples", - "k256 0.13.1", + "k256 0.13.2", "log", "macro_magic", "parity-scale-codec", @@ -3492,29 +3935,29 @@ dependencies = [ "serde_json", "smallvec", "sp-api", - "sp-arithmetic", - "sp-core", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", "sp-core-hashing-proc-macro", - "sp-debug-derive", + "sp-debug-derive 12.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io", + "sp-io 27.0.0", "sp-metadata-ir", - "sp-runtime", + "sp-runtime 28.0.0", "sp-staking", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-weights", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", + "sp-weights 24.0.0", "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" -version = "19.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f22719c65353a0010a084cb2040e2e6569aff34562e59119cb66ddd7ecfa588c" +checksum = "1d6bc383298353ff2790ac1a301262c21ac196dbc26ef67a2213c46524a06dd1" dependencies = [ "Inflector", "cfg-expr", @@ -3526,38 +3969,39 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.38", + "sp-core-hashing 13.0.0", + "syn 2.0.39", ] [[package]] name = "frame-support-procedural-tools" -version = "8.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e046ecdc04dd66f17d760525631f553ddcbea6f09423f78fcf52b47c97656cd0" +checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4034ebf9ca7497fa3893191fe3e81adcd3d7cd1c232e60ef41ef58ea0c445ae9" +checksum = "d9c078db2242ea7265faa486004e7fd8daaf1a577cfcac0070ce55d926922883" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "frame-system" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc19d4d4037b695805385d56983da173bbb969f68e0e4e6a1240bb30118e87d7" +checksum = "57e316407c45a5093c833966a906301aa0dcbd05048061cd9cde2548d017bfd9" dependencies = [ "cfg-if", "frame-support", @@ -3565,35 +4009,35 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "sp-version", - "sp-weights", + "sp-weights 24.0.0", ] [[package]] name = "frame-system-benchmarking" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb79e630dc8fbed5601e58c1b8d84ec3900a511f105140b5bbb6c18c476488d2" +checksum = "b5b1388055d29a7a1c4d41b1623d3fcbc9d7f31d17abe04500b270b26901d926" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13ed2be7e4ad2cf140d16b94194595d3b2fea0b60a46832945c497924c2d0d0" +checksum = "17572a34fd866ad6cab6977a2c30b38645e0a499b3486de00ae9103f7002d6d3" dependencies = [ "parity-scale-codec", "sp-api", @@ -3601,22 +4045,25 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9eceb53c4efa82dd7dd08f0770abfaa9587c592a015b21dc29ce4c24422de13" +checksum = "f082e770275f9b46ddf46b09bc7a993f84db691c39d9e4d038ac07443cb17a18" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "fs-err" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] [[package]] name = "fs2" @@ -3698,6 +4145,19 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +dependencies = [ + "fastrand 2.0.1", + "futures-core", + "futures-io", + "parking", + "pin-project-lite 0.2.13", +] + [[package]] name = "futures-macro" version = "0.3.29" @@ -3706,7 +4166,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3737,6 +4197,10 @@ name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper", +] [[package]] name = "futures-util" @@ -3849,9 +4313,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "js-sys", @@ -3893,9 +4357,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -3905,15 +4369,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", "bstr", - "fnv", "log", - "regex", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -3928,26 +4392,71 @@ dependencies = [ ] [[package]] -name = "gq-ws" -version = "0.7.5" +name = "gloo-net" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" dependencies = [ - "anyhow", - "clap 3.2.25", - "http", - "rand 0.8.5", + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "js-sys", + "pin-project", + "serde", "serde_json", - "tungstenite", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] -name = "group" -version = "0.12.1" +name = "gloo-timers" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" dependencies = [ - "ff 0.12.1", + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gq-ws" +version = "0.7.5" +dependencies = [ + "anyhow", + "clap 3.2.25", + "http", + "rand 0.8.5", + "serde_json", + "tungstenite", +] + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3958,14 +4467,14 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] name = "h2" -version = "0.3.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -3973,7 +4482,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -3988,9 +4497,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "handlebars" -version = "4.4.0" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" +checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" dependencies = [ "log", "pest", @@ -4035,17 +4544,31 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.6", + "allocator-api2", + "serde", +] + +[[package]] +name = "hashlink" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.3", +] [[package]] name = "hdrhistogram" -version = "7.5.2" +version = "7.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f19b9f54f7c7f55e31401bb647626ce0cf0f67b0004982ce815b3ee72a02aa8" +checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" dependencies = [ - "base64 0.13.1", + "base64 0.21.5", "byteorder", "flate2", "nom", @@ -4174,9 +4697,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -4252,11 +4775,11 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.8", + "rustls 0.21.9", "rustls-native-certs", "tokio", "tokio-rustls", - "webpki-roots 0.25.2", + "webpki-roots 0.25.3", ] [[package]] @@ -4326,9 +4849,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4336,21 +4859,21 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.7.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "if-watch" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb892e5777fe09e16f3d44de7802f4daa7267ecbe8c466f19d94e25bb0c303e" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io", + "async-io 2.2.1", "core-foundation", "fnv", "futures", @@ -4365,17 +4888,16 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +checksum = "747ad1b4ae841a78e8aba0d63adbfbeaea26b517b63705d47856b73015d27060" dependencies = [ + "crossbeam-deque", "globset", - "lazy_static", "log", "memchr", - "regex", + "regex-automata 0.4.3", "same-file", - "thread_local", "walkdir", "winapi-util", ] @@ -4441,14 +4963,20 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + [[package]] name = "indicatif" version = "0.17.7" @@ -4525,6 +5053,12 @@ dependencies = [ "webrtc-util", ] +[[package]] +name = "intx" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75" + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -4587,7 +5121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.21", + "rustix 0.38.26", "windows-sys 0.48.0", ] @@ -4635,9 +5169,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -4819,25 +5353,63 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ - "jsonrpsee-core", - "jsonrpsee-http-client", + "jsonrpsee-client-transport 0.16.3", + "jsonrpsee-core 0.16.3", + "jsonrpsee-http-client 0.16.3", "jsonrpsee-proc-macros", "jsonrpsee-server", - "jsonrpsee-types", + "jsonrpsee-types 0.16.3", + "jsonrpsee-wasm-client", "jsonrpsee-ws-client", "tracing", ] +[[package]] +name = "jsonrpsee" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" +dependencies = [ + "jsonrpsee-client-transport 0.20.3", + "jsonrpsee-core 0.20.3", + "jsonrpsee-http-client 0.20.3", + "jsonrpsee-types 0.20.3", +] + [[package]] name = "jsonrpsee-client-transport" version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" +dependencies = [ + "anyhow", + "futures-channel", + "futures-timer", + "futures-util", + "gloo-net", + "http", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", + "webpki-roots 0.25.3", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ "futures-util", "http", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.20.3", "pin-project", "rustls-native-certs", "soketto", @@ -4846,7 +5418,7 @@ dependencies = [ "tokio-rustls", "tokio-util", "tracing", - "webpki-roots 0.25.2", + "url", ] [[package]] @@ -4857,7 +5429,7 @@ checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", "arrayvec 0.7.4", - "async-lock", + "async-lock 2.8.0", "async-trait", "beef", "futures-channel", @@ -4865,7 +5437,7 @@ dependencies = [ "futures-util", "globset", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.16.3", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -4875,6 +5447,29 @@ dependencies = [ "thiserror", "tokio", "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" +dependencies = [ + "anyhow", + "async-lock 2.8.0", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types 0.20.3", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", ] [[package]] @@ -4886,8 +5481,8 @@ dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", "rustc-hash", "serde", "serde_json", @@ -4896,6 +5491,26 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-http-client" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core 0.20.3", + "jsonrpsee-types 0.20.3", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", + "url", +] + [[package]] name = "jsonrpsee-proc-macros" version = "0.16.3" @@ -4903,7 +5518,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -4919,8 +5534,8 @@ dependencies = [ "futures-util", "http", "hyper", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", "serde", "serde_json", "soketto", @@ -4945,6 +5560,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-types" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "jsonrpsee-wasm-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5df77c8f625d36e4cfb583c5a674eccebe32403fcfe42f7ceff7fac9324dd" +dependencies = [ + "jsonrpsee-client-transport 0.16.3", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", +] + [[package]] name = "jsonrpsee-ws-client" version = "0.16.3" @@ -4952,9 +5592,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-client-transport 0.16.3", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", ] [[package]] @@ -4967,10 +5607,10 @@ dependencies = [ "anyhow", "base64 0.21.5", "bytecount", - "clap 4.4.7", + "clap 4.4.10", "fancy-regex", "fraction", - "getrandom 0.2.10", + "getrandom 0.2.11", "iso8601", "itoa", "memchr", @@ -4984,7 +5624,7 @@ dependencies = [ "serde_json", "time", "url", - "uuid 1.5.0", + "uuid 1.6.1", ] [[package]] @@ -5025,17 +5665,18 @@ dependencies = [ "elliptic-curve 0.12.3", "serdect", "sha2 0.10.8", + "sha3", ] [[package]] name = "k256" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ "cfg-if", - "ecdsa 0.16.8", - "elliptic-curve 0.13.6", + "ecdsa 0.16.9", + "elliptic-curve 0.13.8", "once_cell", "sha2 0.10.8", ] @@ -5049,6 +5690,12 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "keystream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" + [[package]] name = "kvdb" version = "0.13.0" @@ -5178,9 +5825,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -5207,7 +5854,7 @@ dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.10", + "getrandom 0.2.11", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -5327,7 +5974,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58 0.4.0", - "ed25519-dalek", + "ed25519-dalek 2.1.0", "log", "multiaddr", "multihash", @@ -5623,6 +6270,17 @@ dependencies = [ "yamux", ] +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "librocksdb-sys" version = "0.11.0+8.1.1" @@ -5665,7 +6323,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -5744,9 +6402,21 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + +[[package]] +name = "lioness" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" +dependencies = [ + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", +] [[package]] name = "lock_api" @@ -5850,50 +6520,50 @@ checksum = "f21755d53936fc1663b414dba30636788f2183d3e782bdee4b1e7236637974e7" [[package]] name = "macro_magic" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "macro_magic_core" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", "derive-syn-parse", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "macro_magic_core_macros" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" +checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "macro_magic_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -5970,7 +6640,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.21", + "rustix 0.38.26", ] [[package]] @@ -6030,6 +6700,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "metadeps" version = "1.1.2" @@ -6078,7 +6760,7 @@ checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -6149,6 +6831,31 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mixnet" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bitflags 1.3.2", + "blake2 0.10.6", + "c2-chacha", + "curve25519-dalek 4.1.1", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_distr", + "subtle 2.4.1", + "thiserror", + "zeroize", +] + [[package]] name = "mockall" version = "0.11.4" @@ -6272,7 +6979,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro-error", "proc-macro2", "quote", @@ -6461,18 +7168,25 @@ dependencies = [ "serde", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + [[package]] name = "node-chronicle" version = "4.0.0-dev" dependencies = [ - "clap 4.4.7", + "clap 4.4.10", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", "futures", - "jsonrpsee", + "jsonrpsee 0.16.3", "pallet-transaction-payment", "pallet-transaction-payment-rpc", + "rpc-chronicle", "runtime-chronicle", "sc-basic-authorship", "sc-cli", @@ -6494,17 +7208,23 @@ dependencies = [ "sp-blockchain", "sp-consensus-aura", "sp-consensus-grandpa", - "sp-core", + "sp-core 25.0.0", "sp-inherents", - "sp-io", + "sp-io 27.0.0", "sp-keyring", - "sp-runtime", + "sp-runtime 28.0.0", "sp-timestamp", "substrate-build-script-utils", "substrate-frame-rpc-system", "try-runtime-cli", ] +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -6663,7 +7383,7 @@ checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" dependencies = [ "base64 0.13.1", "chrono", - "getrandom 0.2.10", + "getrandom 0.2.11", "http", "rand 0.8.5", "reqwest", @@ -6744,33 +7464,6 @@ dependencies = [ "which", ] -[[package]] -name = "opa-tp" -version = "0.7.5" -dependencies = [ - "async-stl-client", - "async-trait", - "bytes", - "chronicle-signing", - "chronicle-telemetry", - "clap 3.2.25", - "const_format", - "hex", - "insta", - "k256 0.11.6", - "opa-tp-protocol", - "prost 0.10.4", - "protobuf", - "rand 0.8.5", - "rand_core 0.6.4", - "sawtooth-sdk", - "serde_json", - "thiserror", - "tokio", - "tracing", - "url", -] - [[package]] name = "opa-tp-protocol" version = "0.7.5" @@ -6795,48 +7488,10 @@ dependencies = [ "thiserror", "tokio", "tracing", - "uuid 1.5.0", + "uuid 1.6.1", "zmq", ] -[[package]] -name = "opactl" -version = "0.7.5" -dependencies = [ - "async-stl-client", - "async-trait", - "chronicle-signing", - "chronicle-telemetry", - "clap 4.4.7", - "common", - "const_format", - "futures", - "hex", - "insta", - "k256 0.11.6", - "lazy_static", - "opa-tp", - "opa-tp-protocol", - "portpicker", - "prost 0.10.4", - "protobuf", - "rand 0.8.5", - "rand_core 0.6.4", - "sawtooth-sdk", - "serde", - "serde_derive", - "serde_json", - "tempfile", - "thiserror", - "tmq", - "tokio", - "tokio-stream", - "tracing", - "url", - "user-error", - "uuid 1.5.0", -] - [[package]] name = "opaque-debug" version = "0.2.3" @@ -6851,9 +7506,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -6872,7 +7527,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -6883,9 +7538,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" dependencies = [ "cc", "libc", @@ -6899,39 +7554,45 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f4b8347cc26099d3aeee044065ecc3ae11469796b4d65d065a23a584ed92a6f" dependencies = [ - "opentelemetry_api 0.19.0", - "opentelemetry_sdk 0.19.0", + "opentelemetry_api", + "opentelemetry_sdk", ] [[package]] name = "opentelemetry" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9591d937bc0e6d2feb6f71a559540ab300ea49955229c347a517a28d27784c54" +checksum = "1e32339a5dc40459130b3bd269e9892439f55b33e772d2a9d402a789baaf4e8a" dependencies = [ - "opentelemetry_api 0.20.0", - "opentelemetry_sdk 0.20.0", + "futures-core", + "futures-sink", + "indexmap 2.1.0", + "js-sys", + "once_cell", + "pin-project-lite 0.2.13", + "thiserror", + "urlencoding", ] [[package]] name = "opentelemetry-http" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7594ec0e11d8e33faf03530a4c49af7064ebba81c1480e01be67d90b356508b" +checksum = "7f51189ce8be654f9b5f7e70e49967ed894e84a06fc35c6c042e64ac1fc5399e" dependencies = [ "async-trait", "bytes", "http", - "opentelemetry_api 0.20.0", + "opentelemetry 0.21.0", ] [[package]] name = "opentelemetry-semantic-conventions" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c9f9340ad135068800e7f1b24e9e09ed9e7143f5bf8518ded3d3ec69789269" +checksum = "f5774f1ef1f982ef2a447f6ee04ec383981a3ab99c8e77a1a7b30182e65bbc84" dependencies = [ - "opentelemetry 0.20.0", + "opentelemetry 0.21.0", ] [[package]] @@ -6949,22 +7610,6 @@ dependencies = [ "urlencoding", ] -[[package]] -name = "opentelemetry_api" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a81f725323db1b1206ca3da8bb19874bbd3f57c3bcd59471bfb04525b265b9b" -dependencies = [ - "futures-channel", - "futures-util", - "indexmap 1.9.3", - "js-sys", - "once_cell", - "pin-project-lite 0.2.13", - "thiserror", - "urlencoding", -] - [[package]] name = "opentelemetry_sdk" version = "0.19.0" @@ -6977,7 +7622,7 @@ dependencies = [ "futures-executor", "futures-util", "once_cell", - "opentelemetry_api 0.19.0", + "opentelemetry_api", "percent-encoding", "rand 0.8.5", "thiserror", @@ -6985,41 +7630,12 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "opentelemetry_sdk" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8e705a0612d48139799fcbaba0d4a90f06277153e43dd2bdc16c6f0edd8026" -dependencies = [ - "async-trait", - "crossbeam-channel", - "futures-channel", - "futures-executor", - "futures-util", - "once_cell", - "opentelemetry_api 0.20.0", - "ordered-float", - "percent-encoding", - "rand 0.8.5", - "regex", - "thiserror", -] - [[package]] name = "option-ext" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "ordered-float" -version = "3.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc" -dependencies = [ - "num-traits", -] - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -7062,9 +7678,9 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e2b1cf20dbd9fe630c69b4b0d3bb0d5fa1223ee728b0fc0064ef65698918c2" +checksum = "04fbef67cf62445b7fd8e68241e6b71d9fb8c77abb3d52259eebf525a4cd5586" dependencies = [ "frame-support", "frame-system", @@ -7072,32 +7688,32 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 27.0.0", "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "pallet-authorship" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae682e78744224150298730dfa1e2c39220e600dce17e42d2c77e49af3d9c59f" +checksum = "2d38eab59f7d15fe43c81fc3cd92f4c1f895ca6d0efb74fc2a6d6d7d3d34d413" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "pallet-balances" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c17ec19ad23b26866ad7d60cdf8b613f653db7f44232aa25009811441908e2b" +checksum = "9de2915b425ae77d63ba25c194780599b7be25307454a138cfb316c16d001e68" dependencies = [ "frame-benchmarking", "frame-support", @@ -7105,8 +7721,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] @@ -7122,19 +7738,19 @@ dependencies = [ "newtype-derive-2018", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "tracing", - "uuid 1.5.0", + "uuid 1.6.1", ] [[package]] name = "pallet-grandpa" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977d01d5ce3f06fa17adf2ffa55ebaea765efa23bc11a242773a28955ee1d02b" +checksum = "b87c7f4cd94a526054dfebf7a84fbcaf6385033defa246ad83e321e71f8c5a92" dependencies = [ "frame-benchmarking", "frame-support", @@ -7144,21 +7760,42 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 27.0.0", "sp-consensus-grandpa", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", "sp-session", "sp-staking", - "sp-std", + "sp-std 12.0.0", +] + +[[package]] +name = "pallet-opa" +version = "0.7.5" +dependencies = [ + "chronicle-telemetry", + "common", + "frame-benchmarking", + "frame-support", + "frame-system", + "macro-attr-2018", + "newtype-derive-2018", + "parity-scale-codec", + "scale-info", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "tracing", + "uuid 1.6.1", ] [[package]] name = "pallet-session" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f8482f465a73688a7d58e20dea4b10c9a0425995975b2a43d9ce4fe9a21a491" +checksum = "768a6fb5333efc2bd2a3538c1d6ffa4178398660d4e3be89f2eb82d4e9088ae6" dependencies = [ "frame-support", "frame-system", @@ -7167,21 +7804,21 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", "sp-session", "sp-staking", - "sp-state-machine", - "sp-std", - "sp-trie", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", ] [[package]] name = "pallet-sudo" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "679c265de3a128714d43a7e2edf5ea29f2a39df65e4c44e216c04d6bb5dd5be7" +checksum = "fcec9f73ecb8d0439a13043a253a9fd90aa6bf5aece6470194bbfc7f79256d88" dependencies = [ "docify", "frame-benchmarking", @@ -7189,16 +7826,16 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "pallet-timestamp" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac4e66316d53673471420fb887b6a74e2507df169ced62584507ff0fb065c6b" +checksum = "b25ec8749cf3f481b5e5199be701bac0dea835851b83fc7c455192762711858d" dependencies = [ "docify", "frame-benchmarking", @@ -7208,58 +7845,58 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-storage", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4cbb78b8499af1d338072950e4aef6acf3cc630afdb8e19b00306e5252d0386" +checksum = "87ef7ceaac786e41613731e3bc48284f1aa3ec260934abda2daed949de6e5ada" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a7857973b918e71367acb7c284c829612aa9c91a6ba1fb2985d56fbe224545" +checksum = "99adb3915b29d04362648a4be9114de3bfe37c431f214b1ef96b71f358950d9d" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.3", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 25.0.0", "sp-rpc", - "sp-runtime", - "sp-weights", + "sp-runtime 28.0.0", + "sp-weights 24.0.0", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402155004abb33b7f2eedfa60ba77fb6f898e62db979a796e013714d18a1c9c2" +checksum = "07d87fdc4028155367c6ea98143054a6c00b38bfd77ec08681e289e429e35505" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", - "sp-runtime", - "sp-weights", + "sp-runtime 28.0.0", + "sp-weights 24.0.0", ] [[package]] @@ -7268,7 +7905,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" dependencies = [ - "blake2", + "blake2 0.10.6", "crc32fast", "fs2", "hex", @@ -7284,9 +7921,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -7299,11 +7936,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -7405,6 +8042,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "pct-str" version = "1.2.0" @@ -7440,9 +8086,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "permutohedron" @@ -7481,7 +8127,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -7502,7 +8148,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.2", + "indexmap 2.1.0", ] [[package]] @@ -7560,7 +8206,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -7618,7 +8264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der 0.7.8", - "spki 0.7.2", + "spki 0.7.3", ] [[package]] @@ -7629,9 +8275,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" -version = "3.1.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "plotters" @@ -7663,9 +8309,9 @@ dependencies = [ [[package]] name = "poem" -version = "1.3.58" +version = "1.3.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc7ae19f3e791ae8108b08801abb3708d64d3a16490c720e0b81040cae87b5d" +checksum = "504774c97b0744c1ee108a37e5a65a9745a4725c4c06277521dabc28eb53a904" dependencies = [ "async-trait", "base64 0.21.5", @@ -7675,7 +8321,8 @@ dependencies = [ "http", "hyper", "mime", - "opentelemetry 0.20.0", + "nix 0.27.1", + "opentelemetry 0.21.0", "opentelemetry-http", "opentelemetry-semantic-conventions", "parking_lot 0.12.1", @@ -7693,18 +8340,19 @@ dependencies = [ "tokio-tungstenite", "tokio-util", "tracing", + "wildmatch", ] [[package]] name = "poem-derive" -version = "1.3.58" +version = "1.3.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2550a0bce7273b278894ef3ccc5a6869e7031b6870042f3cc6826ed9faa980a6" +checksum = "42ddcf4680d8d867e1e375116203846acb088483fa2070244f90589f458bbb31" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -7723,15 +8371,29 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite 0.2.13", + "rustix 0.38.26", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "poly1305" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash 0.5.1", ] [[package]] @@ -7868,7 +8530,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -7894,6 +8556,15 @@ dependencies = [ "toml 0.5.11", ] +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -7920,20 +8591,20 @@ dependencies = [ [[package]] name = "proc-macro-warning" -version = "0.4.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -7972,14 +8643,14 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "proptest" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c003ac8c77cb07bb74f5f198bce836a689bcd5a42574612bf14d17bfd08c20e" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", @@ -7989,7 +8660,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", "rusty-fork", "tempfile", "unarray", @@ -8141,11 +8812,35 @@ dependencies = [ "tempfile", ] +[[package]] +name = "protocol-substrate-chronicle" +version = "0.1.0" +dependencies = [ + "async-trait", + "chronicle-signing", + "chronicle-telemetry", + "clap_builder", + "common", + "futures", + "k256 0.11.6", + "node-chronicle", + "pallet-chronicle", + "sc-cli", + "serde", + "sp-io 27.0.0", + "sp-runtime 28.0.0", + "subxt", + "thiserror", + "tokio", + "tracing", + "uuid 1.6.1", +] + [[package]] name = "psl" -version = "2.1.4" +version = "2.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1be0afcd844b15cfce18bf8cccf2dfa887a00a6454a9ea135f122b948cee91" +checksum = "cdc9f7a25d234ba11af714be527b60c8bc7ce1310011ef8dc032bd5ab1a7eadd" dependencies = [ "psl-types", ] @@ -8330,7 +9025,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", +] + +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand 0.8.5", ] [[package]] @@ -8472,12 +9177,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", + "getrandom 0.2.11", + "libredox", "thiserror", ] @@ -8498,7 +9203,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -8564,12 +9269,6 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - [[package]] name = "regex-syntax" version = "0.8.2" @@ -8607,7 +9306,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite 0.2.13", - "rustls 0.21.8", + "rustls 0.21.9", "rustls-pemfile", "serde", "serde_json", @@ -8621,7 +9320,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots 0.25.3", "winreg", ] @@ -8653,7 +9352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -8682,12 +9381,12 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" dependencies = [ "cc", - "getrandom 0.2.10", + "getrandom 0.2.11", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -8706,13 +9405,27 @@ dependencies = [ [[package]] name = "rpassword" -version = "7.2.0" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ "libc", "rtoolbox", - "winapi", + "windows-sys 0.48.0", +] + +[[package]] +name = "rpc-chronicle" +version = "1.0.0" +dependencies = [ + "jsonrpsee 0.16.3", + "pallet-chronicle", + "parity-scale-codec", + "runtime-api-chronicle", + "runtime-chronicle", + "sp-api", + "sp-blockchain", + "sp-runtime 28.0.0", ] [[package]] @@ -8754,12 +9467,12 @@ dependencies = [ [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -8776,6 +9489,15 @@ dependencies = [ "webrtc-util", ] +[[package]] +name = "runtime-api-chronicle" +version = "1.0.0" +dependencies = [ + "common", + "sp-api", + "sp-core 25.0.0", +] + [[package]] name = "runtime-chronicle" version = "4.0.0" @@ -8796,17 +9518,18 @@ dependencies = [ "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", + "runtime-api-chronicle", "scale-info", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-consensus-grandpa", - "sp-core", + "sp-core 25.0.0", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 28.0.0", "sp-session", - "sp-std", + "sp-std 12.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -8912,15 +9635,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "9470c4bf8246c8daf25f9598dca807fb6510347b1e1cfa55749113850c79d88a" dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.10", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.12", + "windows-sys 0.52.0", ] [[package]] @@ -8950,12 +9673,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.8" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.6", "rustls-webpki", "sct 0.7.1", ] @@ -8974,9 +9697,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64 0.21.5", ] @@ -8987,7 +9710,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.6", "untrusted 0.9.0", ] @@ -9009,6 +9732,17 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "ruzstd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +dependencies = [ + "byteorder", + "thiserror-core", + "twox-hash", +] + [[package]] name = "rvs_derive" version = "0.3.2" @@ -9096,63 +9830,23 @@ dependencies = [ "zmq", ] -[[package]] -name = "sawtooth_tp" -version = "0.7.5" -dependencies = [ - "async-stl-client", - "async-trait", - "bytes", - "chronicle-protocol", - "chronicle-signing", - "chronicle-telemetry", - "chrono", - "clap 3.2.25", - "common", - "const_format", - "custom_error", - "derivative", - "futures", - "glob", - "hex", - "insta", - "lazy_static", - "opa-tp-protocol", - "openssl", - "opentelemetry 0.19.0", - "prost 0.10.4", - "protobuf", - "rand 0.8.5", - "rand_core 0.6.4", - "sawtooth-sdk", - "serde", - "serde_derive", - "serde_json", - "tempfile", - "tokio", - "tracing", - "url", - "uuid 1.5.0", - "zmq", -] - [[package]] name = "sc-allocator" -version = "19.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd6e58990dcb1eae76db49c456ded9a7906ee194857cf1dfb00da8bbc8cf73d" +checksum = "66b4c5976a9cff7fcf24c946276a62ea7837862b6f3bf9f8011f08faf4f08474" dependencies = [ "log", - "sp-core", - "sp-wasm-interface", + "sp-core 25.0.0", + "sp-wasm-interface 18.0.0", "thiserror", ] [[package]] name = "sc-basic-authorship" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f802a95cece137daa3a0980f41a8e9265aa65d1b078f8d771f7d2f41e04266" +checksum = "b0aa6c85e3e0b5af9cab7078166d8c4575b7b9edac0ade6be1aadee828420104" dependencies = [ "futures", "futures-timer", @@ -9166,33 +9860,33 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 25.0.0", "sp-inherents", - "sp-runtime", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", ] [[package]] name = "sc-block-builder" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4653cc3665319f76451f651bc5e3eb84965802293daeaf2def5bfe9c1310171b" +checksum = "9d3999b9b758c09a6c1155e481b683ee87712f071cc5a0679f9ee4906a14a404" dependencies = [ "parity-scale-codec", "sc-client-api", "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core", + "sp-core 25.0.0", "sp-inherents", - "sp-runtime", + "sp-runtime 28.0.0", ] [[package]] name = "sc-chain-spec" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5fae1616d342e570fb4770c9f1a73ab8e1aecb9c5b71020404f8e45db458260" +checksum = "ec7e711ea9870d3fb8e2a3ea5b601a9e20c63d0d2f457f40146407721e246a77" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9203,32 +9897,32 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", ] [[package]] name = "sc-chain-spec-derive" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a074891d17c03c58b1314c9add361a5a7fb28d4d3addd7a32dca8b119bd877" +checksum = "1f25158f791eb48715da9322375598b541cadd1f193674e8a4d77c79ffa3d95d" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "sc-cli" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc423e21a22adc4f6056ccb5e19fca9ddc6cce1a49cd9aa44c53d6b2338fbeb3" +checksum = "22c61058223f80c1f961b03f7737529609a3283eef91129e971a1966101c18ea" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "chrono", - "clap 4.4.7", + "clap 4.4.10", "fdlimit", "futures", "libp2p-identity", @@ -9241,6 +9935,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", "sc-service", "sc-telemetry", @@ -9249,11 +9944,11 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core", + "sp-core 25.0.0", "sp-keyring", - "sp-keystore", - "sp-panic-handler", - "sp-runtime", + "sp-keystore 0.31.0", + "sp-panic-handler 12.0.0", + "sp-runtime 28.0.0", "sp-version", "thiserror", "tiny-bip39", @@ -9262,9 +9957,9 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d49efb455b1b276557ba3cac01c2e42811148cc73149858296e4ae96707dc70e" +checksum = "c7d32101f415f4d7ddbe8b5de1c1387a78d6dce070e26407ec605fe9f3fc9e23" dependencies = [ "fnv", "futures", @@ -9277,22 +9972,22 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 25.0.0", "sp-database", - "sp-externalities", - "sp-runtime", - "sp-state-machine", + "sp-externalities 0.23.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", "sp-statement-store", - "sp-storage", - "sp-trie", + "sp-storage 17.0.0", + "sp-trie 26.0.0", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1062af3e43f09e0080714382ee3e7dd850037908938323eefdcd4f4b61bdd6b" +checksum = "d4ced79f609a44782874d856cf39d256838957195ef34f4fb8ced90bf4b725d0" dependencies = [ "hash-db", "kvdb", @@ -9306,20 +10001,20 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic", + "sp-arithmetic 20.0.0", "sp-blockchain", - "sp-core", + "sp-core 25.0.0", "sp-database", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-trie 26.0.0", ] [[package]] name = "sc-consensus" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f8da1ef0f036209b80d8bde5c8990ea1a86241532d84b5fd15f5e721da849c" +checksum = "86e4100cc8fb3876708e1ec5a7c63af3baa75febd5051beb9ddd1e4835fdfc27" dependencies = [ "async-trait", "futures", @@ -9334,18 +10029,18 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-consensus-aura" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbb98be43737b79517f2de34b5185a58238dc8f69e84ddf7e4730bc0e2e2e65" +checksum = "5e3e282836a7deeeb71d965a0942828f81ae2b03fd67515b733d5f33dd5da855" dependencies = [ "async-trait", "futures", @@ -9357,28 +10052,28 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "sp-api", - "sp-application-crypto", + "sp-application-crypto 27.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", "sp-consensus-slots", - "sp-core", + "sp-core 25.0.0", "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-consensus-grandpa" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98285bbed76ba058f3c9f4111471208cd4c246d2ca7b52b7fbea15afdbb40ca5" +checksum = "30cbc5db21ea2c4ba65b23315e73e69e8155630fb47c84b93d40b0e759c9d86d" dependencies = [ "ahash 0.8.6", - "array-bytes", + "array-bytes 6.2.0", "async-trait", "dyn-clone", "finality-grandpa", @@ -9401,23 +10096,23 @@ dependencies = [ "sc-utils", "serde_json", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 27.0.0", + "sp-arithmetic 20.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-consensus-slots" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0a232d18eb53288775eaeb782cad70ca75815cd10e6212352e6e53cc3961931" +checksum = "2059681962e33394682627e7bd7245b5094236594f5c97c4c96988d901bda534" dependencies = [ "async-trait", "futures", @@ -9427,21 +10122,21 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic", + "sp-arithmetic 20.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core", + "sp-core 25.0.0", "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", ] [[package]] name = "sc-executor" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cfeaa8dc2a70ed5820667d3251266ed156f38d8062c2f976aa7c618411f1776" +checksum = "225f2ad733bc7234a6638d5203624194824b2f78ab631bc911223f536a66b9c8" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -9449,53 +10144,54 @@ dependencies = [ "sc-executor-wasmtime", "schnellru", "sp-api", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", - "sp-trie", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-io 27.0.0", + "sp-panic-handler 12.0.0", + "sp-runtime-interface 21.0.0", + "sp-trie 26.0.0", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 18.0.0", "tracing", ] [[package]] name = "sc-executor-common" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d404519f2a636d5977b1ac16c90aeb4129fe4609a5b284960a2dcb005c08da6" +checksum = "169c1cfe81ba0e0d44ab4ada1600e30b6a9de588c792db73e32a854a6e3e1a87" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 18.0.0", "thiserror", "wasm-instrument", ] [[package]] name = "sc-executor-wasmtime" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82515a0cb74a2acb58f6ced20fae56eeb87ba4d813e60e46cf190a53d44c931" +checksum = "f9167d733e928c528273be63b905ec750cfda85d740453071463da69f7d633bc" dependencies = [ "anyhow", "cfg-if", "libc", "log", + "parking_lot 0.12.1", "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 21.0.0", + "sp-wasm-interface 18.0.0", "wasmtime 8.0.1", ] [[package]] name = "sc-informant" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233ece6736217208ffac94f84de2d15465f80f676f881dacd0a9b3411b476951" +checksum = "7189a0b95fe5d79895a107c6c057bc9351cd9c867552200815199cde25bcdb9d" dependencies = [ "ansi_term", "futures", @@ -9505,32 +10201,61 @@ dependencies = [ "sc-network", "sc-network-common", "sp-blockchain", - "sp-runtime", + "sp-runtime 28.0.0", ] [[package]] name = "sc-keystore" -version = "21.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c15cc8b79eb0832cac48fde41e9ecd011df5d57dad7608f2b89fe721e97012c" +checksum = "abecdf9778fccc254c0b5e227ea8b90fd59247044a30ad293a068b180427d244" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "parking_lot 0.12.1", "serde_json", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "thiserror", +] + +[[package]] +name = "sc-mixnet" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53ea71ec60601c18d6adcaf7a62698fc2e886c16dc8fdf8d61b3b76244dea38" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "futures", + "futures-timer", + "libp2p-identity", + "log", + "mixnet", + "multiaddr", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-network", + "sc-transaction-pool-api", + "sp-api", + "sp-consensus", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-mixnet", + "sp-runtime 28.0.0", "thiserror", ] [[package]] name = "sc-network" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3edad0e7930c2572d6920dc257bc03af6f40ba272bc45602edd0a045d94e5e59" +checksum = "01f519592a971199c486d412dbf38ba54096857080bf4b9d29c9ffabcfee3745" dependencies = [ - "array-bytes", - "async-channel", + "array-bytes 6.2.0", + "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", @@ -9554,10 +10279,10 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic", + "sp-arithmetic 20.0.0", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", @@ -9567,11 +10292,11 @@ dependencies = [ [[package]] name = "sc-network-bitswap" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a0d247f576989cb2fe49df0511cbbd826f1e47b444848971e2bddec8f18a65" +checksum = "8fe63a55e03d8bc796ff1e94e7fb62a62acfd7a80a47865a97b55c13371c3e05" dependencies = [ - "async-channel", + "async-channel 1.9.0", "cid", "futures", "libp2p-identity", @@ -9581,16 +10306,16 @@ dependencies = [ "sc-client-api", "sc-network", "sp-blockchain", - "sp-runtime", + "sp-runtime 28.0.0", "thiserror", "unsigned-varint", ] [[package]] name = "sc-network-common" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418c79cea8ab5b43f5bbe7ee95da7d6490bdfedbe92a9b07a714ca4f09a2426" +checksum = "8d236686d15275e4aa49ca929a06fb6fac28aa70e35ee185b981036c149f9e9d" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -9601,14 +10326,14 @@ dependencies = [ "sc-consensus", "sp-consensus", "sp-consensus-grandpa", - "sp-runtime", + "sp-runtime 28.0.0", ] [[package]] name = "sc-network-gossip" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27a9e8b4e16ab5b67b1fe389349855a2946d3c9168df54afcafec5dd67cae4cd" +checksum = "b884a9f7cd348c4c1899c0bbf95237e39dffba4baec48d4b98c1046f6bb04fa5" dependencies = [ "ahash 0.8.6", "futures", @@ -9618,19 +10343,19 @@ dependencies = [ "sc-network", "sc-network-common", "schnellru", - "sp-runtime", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "tracing", ] [[package]] name = "sc-network-light" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36fc98d43aa75eb0d0690af6a8c6a929318f6cb4bf1fc039410ece56c8bb5a9" +checksum = "aac888fd720ef8bb2ff7d2b7f7b2e54d17bb85a417cf1e1b6f0f64f7e644936d" dependencies = [ - "array-bytes", - "async-channel", + "array-bytes 6.2.0", + "async-channel 1.9.0", "futures", "libp2p-identity", "log", @@ -9640,19 +10365,19 @@ dependencies = [ "sc-client-api", "sc-network", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "thiserror", ] [[package]] name = "sc-network-sync" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d049b008a7353fc46cb45a1f6f68e5e5128442b6726cfd82da09cb676443e73" +checksum = "10c697aa8f52cf194b9f00113a7d0d3ce5d1456bedd6169a9caae10737f02907" dependencies = [ - "array-bytes", - "async-channel", + "array-bytes 6.2.0", + "async-channel 1.9.0", "async-trait", "fork-tree", "futures", @@ -9670,23 +10395,24 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic", + "sp-arithmetic 20.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", "thiserror", + "tokio-stream", ] [[package]] name = "sc-network-transactions" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef6606f7705bc9c038c9e11715b7ddbdb2a5b43c12d8e3cc346e0b9927218e4" +checksum = "bb7c9bfc7b58ce229d1512158b8f13dc849ec24857d1c29a41a867fb8afb5c09" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "futures", "libp2p", "log", @@ -9695,17 +10421,17 @@ dependencies = [ "sc-network-common", "sc-utils", "sp-consensus", - "sp-runtime", + "sp-runtime 28.0.0", "substrate-prometheus-endpoint", ] [[package]] name = "sc-offchain" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9d2458e033256bca62b01e89369bb9a7d74a460b74a5e3786afc5db3f55b1c" +checksum = "47950facab8dedf71c39667ccce8834252944e8f091f3a3bcdfc0b4503573da4" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "bytes", "fnv", "futures", @@ -9725,20 +10451,20 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "sp-api", - "sp-core", - "sp-externalities", - "sp-keystore", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-keystore 0.31.0", "sp-offchain", - "sp-runtime", + "sp-runtime 28.0.0", "threadpool", "tracing", ] [[package]] name = "sc-proposer-metrics" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6fc35c74a42a49d4ea4df44f78ebbd5a744f9bdca3f4ea1d3d9e5e02b0e6ee7" +checksum = "221845dce4e7adb57eca5f73318699b377cff29aef92a586e71aa5cef62f879b" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9746,18 +10472,19 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede50e654b3e0c076bb9beb041612af80f07dfb883cc05d8aaae1c7a1bb72761" +checksum = "eb277280b6b3519e4a2e693b75d4ca516ebb4a928162e6a1791b217b2be60c9f" dependencies = [ "futures", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-mixnet", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", @@ -9765,11 +10492,11 @@ dependencies = [ "serde_json", "sp-api", "sp-blockchain", - "sp-core", - "sp-keystore", + "sp-core 25.0.0", + "sp-keystore 0.31.0", "sp-offchain", "sp-rpc", - "sp-runtime", + "sp-runtime 28.0.0", "sp-session", "sp-statement-store", "sp-version", @@ -9778,32 +10505,33 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac4149b7427beed423006c78e0b75c0193ac01d6e66ff0dd8a1909747cf593" +checksum = "def499ac717db8442fe18543e52330d5f105027b666df73c0b38e81e9105078b" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.3", "parity-scale-codec", "sc-chain-spec", + "sc-mixnet", "sc-transaction-pool-api", "scale-info", "serde", "serde_json", - "sp-core", + "sp-core 25.0.0", "sp-rpc", - "sp-runtime", + "sp-runtime 28.0.0", "sp-version", "thiserror", ] [[package]] name = "sc-rpc-server" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a62b9c5bf359cd4923ce10d294532936aa68d0cd59e890a0414f6434397180b" +checksum = "9e8083e1b026dcf397f8c1122b3fba6cc744c6962996df6a30e0fb75223f7637" dependencies = [ "http", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "serde_json", "substrate-prometheus-endpoint", @@ -9814,15 +10542,15 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e770646ab839fb33dfeb7cbde94d98cdaf78526c70b10aa59ec5810953ff2a5" +checksum = "198ea9287111b4060ce1d70dce99804b99d1a92b5fb23a79d94bf0cb460ca3ce" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "futures", "futures-util", "hex", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -9833,8 +10561,8 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "sp-version", "thiserror", "tokio", @@ -9843,16 +10571,16 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9c7fa14eaf48c44edff226ce9b18dc984c122e9deebbf825a8945be7c046ade" +checksum = "3623ae5bd7b089da9796a3f1edd974c94f34dd4b4b527146662ef409ae9cd38c" dependencies = [ "async-trait", "directories", "exit-future", "futures", "futures-timer", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -9886,16 +10614,16 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", "sp-session", - "sp-state-machine", - "sp-storage", + "sp-state-machine 0.32.0", + "sp-storage 17.0.0", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie", + "sp-trie 26.0.0", "sp-version", "static_init", "substrate-prometheus-endpoint", @@ -9908,21 +10636,21 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43bc9266fdec30b59857e794fc329aa600aaa6ed46799f9df859a7e30c0ec34b" +checksum = "3635fe572adfe796886e18910c8b94f7ce67f9ae3e2c161176e122ddf0baa7e4" dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", + "sp-core 25.0.0", ] [[package]] name = "sc-statement-store" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73800507e32d92f804acfa379dc6b6e91e0a2a25ce853b3848eb8aea019ea98" +checksum = "58635973b3a8ca0a40c885b6bc1a61365e5424bf4312ef86963c799f50cfa15b" dependencies = [ "log", "parity-db", @@ -9931,8 +10659,8 @@ dependencies = [ "sc-keystore", "sp-api", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "sp-statement-store", "substrate-prometheus-endpoint", "tokio", @@ -9940,9 +10668,9 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff97437e564c0e7483d7e32384e3f6571f656728ea03a6e1b07a6325e064a76" +checksum = "60967710b85e650652832df73915b64c315f7b437e53c4635bd26106d6d05c21" dependencies = [ "futures", "libc", @@ -9953,16 +10681,16 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core", - "sp-io", - "sp-std", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-std 12.0.0", ] [[package]] name = "sc-telemetry" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b46193a2979c86da75fc43276d222359757ea257b512fe6e4128e7a50b0bb22" +checksum = "28e214e4d46cac02321bc3dc6fd72f019ac10819d1ac8f24f6935a4ae74ef273" dependencies = [ "chrono", "futures", @@ -9980,9 +10708,9 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fcb4398268e83957ebbc84e6290307198e817caa47386135d3de6ba3316203a" +checksum = "83bcd745ea216ba0c0a344cff2c41b12e27846d5fca4b28f56ff77e1d3ff3634" dependencies = [ "ansi_term", "atty", @@ -9998,33 +10726,33 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 25.0.0", "sp-rpc", - "sp-runtime", - "sp-tracing", + "sp-runtime 28.0.0", + "sp-tracing 14.0.0", "thiserror", "tracing", - "tracing-log", + "tracing-log 0.1.4", "tracing-subscriber 0.2.25", ] [[package]] name = "sc-tracing-proc-macro" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71bd05d3f24c0c2489c57b90a76db883c23c25577718ca05c9b0181fd427f501" +checksum = "9c4ae9e4f957d7274ac6b59d667b66262caf6482dbb1b63f1c370528626b1272" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "sc-transaction-pool" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6af477c0e8a2698aabf442a3918313e8f096eb6695ceaaa7e12679c496d2826" +checksum = "6f6db45a057a619670e07deefb4e69aab83386f076363db424907da2b2e82590" dependencies = [ "async-trait", "futures", @@ -10039,9 +10767,9 @@ dependencies = [ "serde", "sp-api", "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-tracing", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-tracing 14.0.0", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -10049,9 +10777,9 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f1b864d0ae8f1891eb310672c12fc160d24e37ef297d5ef0db257558fe13b1" +checksum = "1491607f296bb8cce09a5eb3a03320c60ad52bb8120127b26f69c32bcaccd8f2" dependencies = [ "async-trait", "futures", @@ -10059,25 +10787,92 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "thiserror", ] [[package]] name = "sc-utils" -version = "10.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b01c8eed623f999d402e44679d42ad42586afd4638aaed38708a307b59f4d7" +checksum = "81a4769c82dde62b9243dcc166be52e0c5d2d61cf2599923271118d9c8b997b1" dependencies = [ - "async-channel", + "async-channel 1.9.0", "futures", "futures-timer", "lazy_static", "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic", + "sp-arithmetic 20.0.0", +] + +[[package]] +name = "scale-bits" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "036575c29af9b6e4866ffb7fa055dbf623fe7a9cc159b33786de6013a6969d89" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "scale-decode" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7789f5728e4e954aaa20cadcc370b99096fb8645fca3c9333ace44bb18f30095" +dependencies = [ + "derive_more", + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-decode-derive", + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-decode-derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47" +dependencies = [ + "darling 0.14.4", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scale-encode" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d70cb4b29360105483fac1ed567ff95d65224a14dd275b6303ed0a654c78de5" +dependencies = [ + "derive_more", + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-encode-derive", + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-encode-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25" +dependencies = [ + "darling 0.14.4", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -10100,12 +10895,32 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "scale-value" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6538d1cc1af9c0baf401c57da8a6d4730ef582db0d330d2efa56ec946b5b0283" +dependencies = [ + "base58", + "blake2 0.10.6", + "derive_more", + "either", + "frame-metadata 15.1.0", + "parity-scale-codec", + "scale-bits", + "scale-decode", + "scale-encode", + "scale-info", + "serde", + "yap", +] + [[package]] name = "schannel" version = "0.1.22" @@ -10145,11 +10960,27 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "schnorrkel" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek-ng", + "merlin 3.0.0", + "rand_core 0.6.4", + "sha2 0.9.9", + "subtle-ng", "zeroize", ] @@ -10181,7 +11012,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.6", "untrusted 0.9.0", ] @@ -10208,7 +11039,7 @@ dependencies = [ "generic-array 0.14.7", "pkcs8 0.9.0", "serdect", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -10222,7 +11053,7 @@ dependencies = [ "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -10346,24 +11177,30 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "serde" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -10436,7 +11273,7 @@ version = "0.9.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -10568,9 +11405,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -10633,9 +11470,107 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel 1.9.0", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-net", + "async-process", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "smoldot" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cce5e2881b30bad7ef89f383a816ad0b22c45915911f28499026de4a76d20ee" +dependencies = [ + "arrayvec 0.7.4", + "async-lock 2.8.0", + "atomic", + "base64 0.21.5", + "bip39", + "blake2-rfc", + "bs58 0.5.0", + "crossbeam-queue", + "derive_more", + "ed25519-zebra", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-util", + "hashbrown 0.14.3", + "hex", + "hmac 0.12.1", + "itertools 0.10.5", + "libsecp256k1", + "merlin 3.0.0", + "no-std-net 0.6.0", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2 0.12.2", + "pin-project", + "rand 0.8.5", + "rand_chacha 0.3.1", + "ruzstd", + "schnorrkel 0.10.2", + "serde", + "serde_json", + "sha2 0.10.8", + "siphasher", + "slab", + "smallvec", + "smol", + "snow", + "soketto", + "tiny-keccak", + "twox-hash", + "wasmi", +] + +[[package]] +name = "smoldot-light" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4b2f7b4687b83ff244ef6137735ed5716ad37dcdf3ee16c4eb1a32fb9808fa47" +dependencies = [ + "async-lock 2.8.0", + "blake2-rfc", + "derive_more", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-util", + "hashbrown 0.14.3", + "hex", + "itertools 0.10.5", + "log", + "lru", + "parking_lot 0.12.1", + "rand 0.8.5", + "serde", + "serde_json", + "siphasher", + "slab", + "smol", + "smoldot", +] [[package]] name = "snap" @@ -10645,19 +11580,19 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" +checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ - "aes-gcm 0.9.4", - "blake2", + "aes-gcm 0.10.3", + "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring 0.16.20", + "ring 0.17.6", "rustc_version", "sha2 0.10.8", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -10699,87 +11634,116 @@ dependencies = [ [[package]] name = "sp-api" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc5213210472ba2becdc094fbb9d30c4455753b1a608962797e1e971c3e5ec4" +checksum = "f582f92ce47c86e4ffffe81fdd5120fea7c850dc0800653a7fa203bcc1532335" dependencies = [ "hash-db", "log", "parity-scale-codec", "scale-info", "sp-api-proc-macro", - "sp-core", - "sp-externalities", + "sp-core 25.0.0", + "sp-externalities 0.23.0", "sp-metadata-ir", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", "sp-version", "thiserror", ] [[package]] name = "sp-api-proc-macro" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20e7f093302d30b9d35436db024376459bdc9da7530abcacf5d87c32a67d94fd" +checksum = "a896941b2d27365a6f937ebce11e36d55132dc32104f6a48b4cd765b55efd252" dependencies = [ "Inflector", - "blake2", + "blake2 0.10.6", "expander", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "sp-application-crypto" -version = "26.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b74454c936a45ac55c8de95b9fd8b5e38f8b43d97df8f4274dd6777b20d95569" +checksum = "899492ea547816d5dfe9a5a2ecc32f65a7110805af6da3380aa4902371b31dc2" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-std", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-std 8.0.0", ] [[package]] -name = "sp-arithmetic" -version = "19.0.0" +name = "sp-application-crypto" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e41f710a77e9debd1c9b80f862709dce648e50f0904cde4117488e7d11d4796d" +checksum = "a93da025616ab59639f8e378df579c5aaa2c8b9999f328a0239156a57c991b53" dependencies = [ - "integer-sqrt", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-arithmetic" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6020576e544c6824a51d651bc8df8e6ab67cd59f1c9ac09868bb81a5199ded" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 8.0.0", + "static_assertions", +] + +[[package]] +name = "sp-arithmetic" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f80b5c16afb61dde1037a469d570adcc686440036429e50abe2301ba9d61aad5" +dependencies = [ + "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 12.0.0", "static_assertions", ] [[package]] name = "sp-block-builder" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6a066e310d4c0c240829d7bb5d6bd01dde55d03e15b665f0372b40952f37e6" +checksum = "6cd16df3d1cdad862d3e764f10f7675876b011e032907423fdfa377ae2ec8575" dependencies = [ "sp-api", "sp-inherents", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "sp-blockchain" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f506119858f25a73ed9d61a2ead0d5b97b5141055b3b4a12b9b82e530b06c673" +checksum = "4932b97cde61874f395bab9b02443e3bd2046943abb280b63f83da9d0b623ea7" dependencies = [ "futures", "log", @@ -10789,70 +11753,70 @@ dependencies = [ "sp-api", "sp-consensus", "sp-database", - "sp-runtime", - "sp-state-machine", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", "thiserror", ] [[package]] name = "sp-consensus" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e142e27f140d50701e613d925f61482fafccb7d90933ee30d7bae54d293ea3" +checksum = "2c5d7170fb7cfb18024ef7eeb40d272d22b9c3587d85cde2d091e8463b397f06" dependencies = [ "async-trait", "futures", "log", - "sp-core", + "sp-core 25.0.0", "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", "thiserror", ] [[package]] name = "sp-consensus-aura" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dcc6df7a006a55651d0e7bdf2d8d4583d5b917cb4b7b6a1331398e96307a883" +checksum = "643a7c486a645f398d219d1fbcc8a416cad5018164a212fefde5c2ef00a182e4" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto", + "sp-application-crypto 27.0.0", "sp-consensus-slots", "sp-inherents", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572374a1260687fa18481ccac58c4a64611df379fb1aa65389ce96c6661b3b05" +checksum = "268f9b2e36d4e136c09ad87876cdcfd7ff734cb5917f333fefebff248f95a24f" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "serde", "sp-api", - "sp-application-crypto", + "sp-application-crypto 27.0.0", "sp-consensus-slots", - "sp-core", + "sp-core 25.0.0", "sp-inherents", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-grandpa" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d20516ed05a6a17f712050d6be385ca53c16b2d49938a29ca05e07f7aa5118" +checksum = "28bbee685900110419913f281ce0f29457fbc17418f00d15f0212c8043aba167" dependencies = [ "finality-grandpa", "log", @@ -10860,35 +11824,80 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "sp-consensus-slots" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ebe1c46246a76af1105639c7434c1383d376fd45a8548fc18ed66dbf86f803c" +checksum = "895b0c176d4eead833ddee5251d3cccbaeb0191ca3f33f84b11d347bebc6e21f" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 12.0.0", "sp-timestamp", ] [[package]] name = "sp-core" -version = "24.0.0" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f18d9e2f67d8661f9729f35347069ac29d92758b59135176799db966947a7336" +dependencies = [ + "array-bytes 4.2.0", + "bitflags 1.3.2", + "blake2 0.10.6", + "bounded-collections", + "bs58 0.4.0", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin 2.0.1", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand 0.8.5", + "regex", + "scale-info", + "schnorrkel 0.9.1", + "secp256k1 0.24.3", + "secrecy", + "serde", + "sp-core-hashing 9.0.0", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tiny-bip39", + "zeroize", +] + +[[package]] +name = "sp-core" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7921d278ed2aebbb21a644c96e09663dc49a6139d1e2e063c059dc9f866e149b" +checksum = "f9ebb090ead698a6df04347c86a31ba91a387edb8a58534ec70c4f977d1e1e87" dependencies = [ - "array-bytes", + "array-bytes 6.2.0", "bitflags 1.3.2", - "blake2", + "blake2 0.10.6", "bounded-collections", "bs58 0.5.0", "dyn-clonable", @@ -10900,7 +11909,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -10908,29 +11917,45 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1 0.24.3", "secrecy", "serde", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-core-hashing 13.0.0", + "sp-debug-derive 12.0.0", + "sp-externalities 0.23.0", + "sp-runtime-interface 21.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", "tracing", + "w3f-bls", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "12.0.0" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee599a8399448e65197f9a6cee338ad192e9023e35e31f22382964c3c174c68" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.8", + "sha3", + "sp-std 8.0.0", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cb5c31aa385d6997a5b73fdc9837c1c0145559205198555c3000739a474767" +checksum = "cb8524f01591ee58b46cd83c9dbc0fcffd2fd730dabec4f59326cd58a00f17e2" dependencies = [ "blake2b_simd", "byteorder", @@ -10942,20 +11967,20 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a4327a220777a8d492ed3d0bcd4c769cbb030301e7d4a2d9e09513d690c313b" +checksum = "42ce3e6931303769197da81facefa86159fa1085dcd96ecb7e7407b5b93582a0" dependencies = [ "quote", - "sp-core-hashing", - "syn 2.0.38", + "sp-core-hashing 13.0.0", + "syn 2.0.39", ] [[package]] name = "sp-database" -version = "8.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab25f79468af89010a8eb84e6bf56068b59929a55291c03519f47208360f3ebe" +checksum = "9c6e8c710d6a71512af6f42d9dba9c3d1f6ad793846480babf459bbde3d60a94" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10963,109 +11988,173 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "11.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f7d375610590566e11882bf5b5a4b8d0666a96ba86808b2650bbbd9be50bf8" +checksum = "c7f531814d2f16995144c74428830ccf7d94ff4a7749632b83ad8199b181140c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", +] + +[[package]] +name = "sp-debug-derive" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", ] [[package]] name = "sp-externalities" -version = "0.22.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede074871514ca7c5d2eca9563515d858c6220b47ae815714ed4393a4e99db4a" +checksum = "a0f71c671e01a8ca60da925d43a1b351b69626e268b8837f8371e320cf1dd100" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884d05160bc89d0943d1c9fb8006c3d44b80f37f8af607aeff8d4d9cc82e279a" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 12.0.0", + "sp-storage 17.0.0", ] [[package]] name = "sp-genesis-builder" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b9f0251a09b578393f3297abe54a29abdb7e93c17e89a88dc1cabb8e2d5a2d" +checksum = "a0cb71d40ad47e40bdcce5ae5531c7d7ba579cd495a0e0413642fb063fa66f84" dependencies = [ "serde_json", "sp-api", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "sp-inherents" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439882da80e9bcfd1ba53df7ec5070d4d7f2a9a93f988aa3598f99ee5bfc76eb" +checksum = "604229aa145be0cff853b47ffed8bc2c62eb08ec6974d6307b9a559c378e6dc5" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "thiserror", ] [[package]] name = "sp-io" -version = "26.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88fb6e281de5054565f07a9f79504d21133e115db549993c99f1b21236c677a5" +checksum = "9d597e35a9628fe7454b08965b2442e3ec0f264b0a90d41328e87422cec02e99" dependencies = [ "bytes", - "ed25519-dalek", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", + "futures", "libsecp256k1", "log", "parity-scale-codec", "rustversion", "secp256k1 0.24.3", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-trie", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-keystore 0.27.0", + "sp-runtime-interface 17.0.0", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", + "sp-tracing 10.0.0", + "sp-trie 22.0.0", "tracing", "tracing-core", ] [[package]] -name = "sp-keyring" +name = "sp-io" version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f09927534d2233e135e4b4a0c758554d0ff66178f6e9cfba2e151dfeac97b3" +checksum = "0ced350da15e8ba3a106206840acc42a6d3eb0d7e8bf7aa43ab00eac0bdf956f" +dependencies = [ + "bytes", + "ed25519-dalek 2.1.0", + "libsecp256k1", + "log", + "parity-scale-codec", + "rustversion", + "secp256k1 0.24.3", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-keystore 0.31.0", + "sp-runtime-interface 21.0.0", + "sp-state-machine 0.32.0", + "sp-std 12.0.0", + "sp-tracing 14.0.0", + "sp-trie 26.0.0", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-keyring" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "655ec0b35cb9cb9029fb323aa676b07d58deb872cecc7566e50278409a00ee95" dependencies = [ "lazy_static", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", "strum 0.24.1", ] [[package]] name = "sp-keystore" -version = "0.30.0" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9be3cdd67cc1d9c1db17c5cbc4ec4924054a8437009d167f21f6590797e4aa45" +dependencies = [ + "futures", + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "thiserror", +] + +[[package]] +name = "sp-keystore" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9f19e773319d96223ce8dba960267e6cb977907537a8f738746ceb86592413" +checksum = "8b8ec5ebbba70bee83d79c3fe5e49f12df0a4bb6029858ddf9a15eea7539a592" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core", - "sp-externalities", + "sp-core 25.0.0", + "sp-externalities 0.23.0", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" -version = "8.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377a0e22a104a1a83804562fba6702537af6a36df9ee2049c89c3be9148b42b1" +checksum = "8846768f036429227e49f6ab523fbee4bc6edfee278a361bf27999590fe020d4" dependencies = [ "thiserror", "zstd 0.12.4", @@ -11073,32 +12162,56 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb0dec8af38c68358600da59cf14424e1230fe9ae1d4b4f64a098288145c0775" +checksum = "7ca9ff0e522a74725ac92f009d38deeb12e880f5296afbd78a6c6b970b773278" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-mixnet" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf61f28ca97aab6c21a3c6e0ed496e60d505e5de1f43fd4ba748c9afaa4fc85" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto 27.0.0", + "sp-std 12.0.0", ] [[package]] name = "sp-offchain" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b1501eb4ede6471162ff48c85ccabb21434b698c8b61e2651f85c00bc1656f" +checksum = "9310227f043ed99877b0449a683025a7461431a00995dcd6ef423a273d0fd85d" dependencies = [ "sp-api", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", ] [[package]] name = "sp-panic-handler" -version = "11.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd099ba2d6c1bfe5d0c79aa56e440fa3c9257eadfc0c782c09cdc2122b1e60ed" +checksum = "ebd2de46003fa8212426838ca71cd42ee36a26480ba9ffea983506ce03131033" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + +[[package]] +name = "sp-panic-handler" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00e40857ed3e0187f145b037c733545c5633859f1bd1d1b09deb52805fa696a" dependencies = [ "backtrace", "lazy_static", @@ -11107,20 +12220,43 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8534ae0a6043f70a93054bf0d3da27436637a8134ed44667c360e7a955cb3d" +checksum = "51867fea921f54bbaa2bf505f373559b5f3b80e8d7f38ecb9677f0d3795a3e6a" dependencies = [ "rustc-hash", "serde", - "sp-core", + "sp-core 25.0.0", ] [[package]] name = "sp-runtime" -version = "27.0.0" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21c5bfc764a1a8259d7e8f7cfd22c84006275a512c958d3ff966c92151e134d5" +dependencies = [ + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "sp-application-crypto 23.0.0", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-std 8.0.0", + "sp-weights 20.0.0", +] + +[[package]] +name = "sp-runtime" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c0641e1a9d340960b562bcceea1457680fd0e109fc1040f8f5364fd7bc2506" +checksum = "6d9c40ff7303e62219b55635e5245d963358cb77d6916250991ebcb82c0be2c6" dependencies = [ "either", "hash256-std-hasher", @@ -11131,82 +12267,135 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-std", - "sp-weights", + "sp-application-crypto 27.0.0", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-io 27.0.0", + "sp-std 12.0.0", + "sp-weights 24.0.0", ] [[package]] name = "sp-runtime-interface" -version = "20.0.0" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e676128182f90015e916f806cba635c8141e341e7abbc45d25525472e1bbce8" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.19.0", + "sp-runtime-interface-proc-macro 11.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", + "sp-wasm-interface 14.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17a4030ad93f05c93f2cc294c74bc5fea227f90fb3d1426d4a6f165e017fb7ea" +checksum = "4f365332922a8cfa98ab00c6d08b1b0f24e159e730dd554e720d950ff3371b1f" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.23.0", + "sp-runtime-interface-proc-macro 15.0.0", + "sp-std 12.0.0", + "sp-storage 17.0.0", + "sp-tracing 14.0.0", + "sp-wasm-interface 18.0.0", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "14.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b232943ee7ca83a6d56face33b8af12e9fb470a15a53835f4e12a6e452a41c1c" +checksum = "a5d5bd5566fe5633ec48dfa35ab152fd29f8a577c21971e1c6db9f28afb9bbb9" dependencies = [ "Inflector", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2afcbd1bd18d323371111b66b7ac2870bdc1c86c3d7b0dae67b112ca52b4d8" +dependencies = [ + "Inflector", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 2.0.39", ] [[package]] name = "sp-session" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd062688577cc54493ba6f58383bfed89c66d5ef7b7c3747293b0da06c7f795" +checksum = "248dd8f49aa96b56bf0a7d513691ddb4194f9359fdb93e94397eabdef1036085" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core", - "sp-keystore", - "sp-runtime", + "sp-core 25.0.0", + "sp-keystore 0.31.0", + "sp-runtime 28.0.0", "sp-staking", - "sp-std", + "sp-std 12.0.0", ] [[package]] name = "sp-staking" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3b2a4a7aa67a9adb2a8f49ed516f6694b5fa70792ab9b0125934b1c8cdc2e3" +checksum = "ee0feed0137234598bd1f76d0b468c585ea16619ea9ed1acbba82dd24ac79788" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 25.0.0", + "sp-runtime 28.0.0", + "sp-std 12.0.0", ] [[package]] name = "sp-state-machine" -version = "0.31.0" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef45d31f9e7ac648f8899a0cd038a3608f8499028bff55b6c799702592325b6" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-panic-handler 8.0.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", + "thiserror", + "tracing", +] + +[[package]] +name = "sp-state-machine" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf4c76bea1a9e4a2e79afe70f42f1d368a8a45308e58f19bfd755c5ddb2b4a3" +checksum = "96e087fa4430befd2047b61d912c9d6fa4eaed408c4b58b46c6e9acd7965f2d3" dependencies = [ "hash-db", "log", @@ -11214,83 +12403,122 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "smallvec", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-std", - "sp-trie", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-panic-handler 12.0.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", "thiserror", "tracing", - "trie-db", + "trie-db 0.28.0", ] [[package]] name = "sp-statement-store" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a11bbdc403457dd7a850078936aa7cc753c617b7bbeba5f5766ce5a55b2bf124" +checksum = "4b8654bcd37602b1811414050d34d14f543873bd4e64e50d210a0116b660c600" dependencies = [ "aes-gcm 0.10.3", "curve25519-dalek 4.1.1", - "ed25519-dalek", + "ed25519-dalek 2.1.0", "hkdf", "parity-scale-codec", "rand 0.8.5", "scale-info", "sha2 0.10.8", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-externalities", - "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-application-crypto 27.0.0", + "sp-core 25.0.0", + "sp-externalities 0.23.0", + "sp-runtime 28.0.0", + "sp-runtime-interface 21.0.0", + "sp-std 12.0.0", "thiserror", "x25519-dalek 2.0.0", ] +[[package]] +name = "sp-std" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53458e3c57df53698b3401ec0934bea8e8cfce034816873c0b0abbd83d7bac0d" + [[package]] name = "sp-std" version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c91d32e165d08a14098ce5ec923eaec59d1d0583758a18a770beec1b780b0d0" +[[package]] +name = "sp-std" +version = "12.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" + [[package]] name = "sp-storage" -version = "16.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9660ecd48314443e73ad0f44d58b76426666a1343d72f6f65664e174da9244" +checksum = "94294be83f11d4958cfea89ed5798f0b6605f5defc3a996948848458abbcc18e" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-storage" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016f20812cc51bd479cc88d048c35d44cd3adde4accdb159d49d6050f2953595" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 12.0.0", + "sp-std 12.0.0", ] [[package]] name = "sp-timestamp" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0ab4b6b2d31db93e7da68894ccb7c5a305524cea051109820b958361d162be" +checksum = "004a7f453240db80b2967c0e1c6411836efc7daa7afae98fd16202caa51460e0" dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "thiserror", ] [[package]] name = "sp-tracing" -version = "13.0.0" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357f7591980dd58305956d32f8f6646d0a8ea9ea0e7e868e46f53b68ddf00cec" +dependencies = [ + "parity-scale-codec", + "sp-std 8.0.0", + "tracing", + "tracing-core", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "sp-tracing" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69a61948986d2a9f8d67d60884ff0277d910df09ebe08d0e1f309da777516453" +checksum = "0d727cb5265641ffbb7d4e42c18b63e29f6cfdbd240aae3bcf093c3d6eb29a19" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 12.0.0", "tracing", "tracing-core", "tracing-subscriber 0.2.25", @@ -11298,35 +12526,35 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ea9c85f85f52e0a49c3f2ec6cff952fdc3ffe8392bebe21ed30eddd8d059c5" +checksum = "c7cd2afe89c474339d15d06e73639171ebe4d280be6904d9349072103da21427" dependencies = [ "sp-api", - "sp-runtime", + "sp-runtime 28.0.0", ] [[package]] name = "sp-transaction-storage-proof" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a2d2d676a4c8e9ff18cb43782ed557d00de28ee9fb090842a8510e4a7ce0a7" +checksum = "39ae7c4954431b8479f7b2b6b82f0551cc360a1ee59b6a5276eef86a1099eaed" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core 25.0.0", "sp-inherents", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-runtime 28.0.0", + "sp-std 12.0.0", + "sp-trie 26.0.0", ] [[package]] name = "sp-trie" -version = "25.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb2d292eb90452dcb0909fb44e74bf04395e3ffa37a66c0f1635a00600382a4" +checksum = "48e4eeb7ef23f79eba8609db79ef9cef242f994f1f87a3c0387b4b5f177fda74" dependencies = [ "ahash 0.8.6", "hash-db", @@ -11338,19 +12566,44 @@ dependencies = [ "parking_lot 0.12.1", "scale-info", "schnellru", - "sp-core", - "sp-std", + "sp-core 21.0.0", + "sp-std 8.0.0", "thiserror", "tracing", - "trie-db", + "trie-db 0.27.1", + "trie-root", +] + +[[package]] +name = "sp-trie" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e359b358263cc322c3f678c272a3a519621d9853dcfa1374dfcbdb5f54c6f85" +dependencies = [ + "ahash 0.8.6", + "hash-db", + "hashbrown 0.13.2", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "scale-info", + "schnellru", + "sp-core 25.0.0", + "sp-std 12.0.0", + "thiserror", + "tracing", + "trie-db 0.28.0", "trie-root", ] [[package]] name = "sp-version" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125da59ea46ecb23860e7d895f6f2882f596b71ffca0ae4887558aac541f4342" +checksum = "3e93da332eba3cb59a65f128da5edd5c70e1475692b45470104e7465b1278471" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11358,52 +12611,82 @@ dependencies = [ "scale-info", "serde", "sp-core-hashing-proc-macro", - "sp-runtime", - "sp-std", + "sp-runtime 28.0.0", + "sp-std 12.0.0", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92897ffa04436cbd100c49ea1f8b637cb68e2a9fe144115f4b545b5ace2f47e2" +checksum = "49535d8c7184dab46d15639c68374a30cbb1534e392fa09a1ebb059a993ad436" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "sp-wasm-interface" -version = "17.0.0" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19c122609ca5d8246be6386888596320d03c7bc880959eaa2c36bcd5acd6846" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 8.0.0", + "wasmtime 8.0.1", +] + +[[package]] +name = "sp-wasm-interface" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf43bb0c8eb76dc41057ce0fb6b744b94c9aec28b31dff53a1efc4f04ef25384" +checksum = "d5d85813d46a22484cdf5e5afddbbe85442dd1b4d84d67a8c7792f92f9f93607" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", - "wasmtime 8.0.1", + "sp-std 12.0.0", + "wasmtime 8.0.1", +] + +[[package]] +name = "sp-weights" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45d084c735544f70625b821c3acdbc7a2fc1893ca98b85f1942631284692c75b" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-weights" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1cef0aad13ed8a8522a6e86ace16fb97ab220c16d2357e628352b528582693" +checksum = "751676c1263e7f3600af16bad26a7978a816bc532676fe05eafa23b862c05b9e" dependencies = [ "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-arithmetic 20.0.0", + "sp-core 25.0.0", + "sp-debug-derive 12.0.0", + "sp-std 12.0.0", ] [[package]] @@ -11420,9 +12703,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spinners" -version = "4.1.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" dependencies = [ "lazy_static", "maplit", @@ -11441,9 +12724,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der 0.7.8", @@ -11457,9 +12740,9 @@ checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" [[package]] name = "ss58-registry" -version = "1.43.0" +version = "1.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" +checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" dependencies = [ "Inflector", "num-format", @@ -11563,7 +12846,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -11578,7 +12861,7 @@ dependencies = [ "md-5", "rand 0.8.5", "ring 0.16.20", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "url", @@ -11593,26 +12876,26 @@ checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] [[package]] name = "substrate-build-script-utils" -version = "8.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78127cdb5849eed7399ff9c730faea57c2a4e148e3b46e565abe98248432feb9" +checksum = "8a3b7556a62d77b7b8abc34e425817f6f563c2f2aa7142f1c4e93e6422156cc1" [[package]] name = "substrate-frame-rpc-system" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5978d5bc95506e7770fe7de97610db13ee72dd1e242894d4843587dc5954102" +checksum = "4c241af714c378075b1185e574202cbb9105e849b8c9ea44ef87880bdb3e9a75" dependencies = [ "frame-system-rpc-runtime-api", "futures", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "sc-rpc-api", @@ -11620,15 +12903,15 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 25.0.0", + "sp-runtime 28.0.0", ] [[package]] name = "substrate-prometheus-endpoint" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e99fe4e955b8d7c25bd3a88a6907933867d11ef6194ef935e865a9e87c320ff" +checksum = "ededbe617291db8a47d6e5155486ff1e5425f0bbf5dcb7f752730466a62bd293" dependencies = [ "hyper", "log", @@ -11639,23 +12922,23 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624257055386482adba21684a4af2cebdbaf0a8dd0e1b7cd9eec05b564afa5db" +checksum = "5575c2bef89385e5406565b8fe5620856d414e3846c60927a78f0788cb288c8c" dependencies = [ "async-trait", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "sc-rpc-api", "serde", - "sp-runtime", + "sp-runtime 28.0.0", ] [[package]] name = "substrate-wasm-builder" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a23975404eca6d81818f3f3d4ecde9635dae3e616f366dbc1a0d510c86f02a2" +checksum = "12ab1707dbbd129622b771a9b80b25f0ebf1c04854b907bc44b51ec96fb4005b" dependencies = [ "ansi_term", "build-helper", @@ -11679,12 +12962,121 @@ dependencies = [ "autocfg", ] +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + [[package]] name = "subtle" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "subxt" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "588b8ce92699eeb06290f4fb02dad4f7e426c4e6db4d53889c6bcbc808cf24ac" +dependencies = [ + "async-trait", + "base58", + "blake2 0.10.6", + "derivative", + "either", + "frame-metadata 16.0.0", + "futures", + "hex", + "impl-serde", + "jsonrpsee 0.20.3", + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-decode", + "scale-encode", + "scale-info", + "scale-value", + "serde", + "serde_json", + "sp-core 21.0.0", + "sp-core-hashing 9.0.0", + "sp-runtime 24.0.0", + "subxt-lightclient", + "subxt-macro", + "subxt-metadata", + "thiserror", + "tracing", +] + +[[package]] +name = "subxt-codegen" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98f5a534c8d475919e9c845d51fc2316da4fcadd04fe17552d932d2106de930e" +dependencies = [ + "frame-metadata 16.0.0", + "heck", + "hex", + "jsonrpsee 0.20.3", + "parity-scale-codec", + "proc-macro2", + "quote", + "scale-info", + "subxt-metadata", + "syn 2.0.39", + "thiserror", + "tokio", +] + +[[package]] +name = "subxt-lightclient" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10fd0ac9b091211f962b6ae19e26cd08e0b86efa064dfb7fac69c8f79f122329" +dependencies = [ + "futures", + "futures-util", + "serde", + "serde_json", + "smoldot-light", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "subxt-macro" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12e8be9ab6fe88b8c13edbe15911e148482cfb905a8b8d5b8d766a64c54be0bd" +dependencies = [ + "darling 0.20.3", + "proc-macro-error", + "subxt-codegen", + "syn 2.0.39", +] + +[[package]] +name = "subxt-metadata" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6898275765d36a37e5ef564358e0341cf41b5f3a91683d7d8b859381b65ac8a" +dependencies = [ + "frame-metadata 16.0.0", + "parity-scale-codec", + "scale-info", + "sp-core-hashing 9.0.0", + "thiserror", +] + [[package]] name = "syn" version = "1.0.109" @@ -11698,9 +13090,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -11778,15 +13170,15 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall 0.4.1", - "rustix 0.38.21", + "rustix 0.38.26", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -11829,6 +13221,26 @@ dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "thiserror-impl" version = "1.0.50" @@ -11837,7 +13249,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -11992,9 +13404,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.33.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ "backtrace", "bytes", @@ -12022,13 +13434,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -12058,7 +13470,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.8", + "rustls 0.21.9", "tokio", ] @@ -12125,7 +13537,19 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.21.0", ] [[package]] @@ -12143,7 +13567,31 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -12248,7 +13696,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -12276,7 +13724,7 @@ dependencies = [ "serde_json", "tokio", "tracing", - "tracing-subscriber 0.3.17", + "tracing-subscriber 0.3.18", "version", ] @@ -12301,6 +13749,17 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-serde" version = "0.1.3" @@ -12330,15 +13789,15 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.1.4", "tracing-serde", ] [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers 0.1.0", "nu-ansi-term", @@ -12351,10 +13810,23 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.2.0", "tracing-serde", ] +[[package]] +name = "trie-db" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +dependencies = [ + "hash-db", + "hashbrown 0.13.2", + "log", + "rustc-hex", + "smallvec", +] + [[package]] name = "trie-db" version = "0.28.0" @@ -12431,12 +13903,12 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e30562bc5a4beccd52cc4091607830fa0b77c1ce09d55b47f232c8b3d03e23fa" +checksum = "845090aa8572116b06813914fc1d09448fe895d82982b63d58de4f91b4eb79b6" dependencies = [ "async-trait", - "clap 4.4.7", + "clap 4.4.10", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -12449,19 +13921,19 @@ dependencies = [ "sp-api", "sp-consensus-aura", "sp-consensus-babe", - "sp-core", - "sp-debug-derive", - "sp-externalities", + "sp-core 25.0.0", + "sp-debug-derive 12.0.0", + "sp-externalities 0.23.0", "sp-inherents", - "sp-io", - "sp-keystore", + "sp-io 27.0.0", + "sp-keystore 0.31.0", "sp-rpc", - "sp-runtime", - "sp-state-machine", + "sp-runtime 28.0.0", + "sp-state-machine 0.32.0", "sp-timestamp", "sp-transaction-storage-proof", "sp-version", - "sp-weights", + "sp-weights 24.0.0", "substrate-rpc-client", "zstd 0.12.4", ] @@ -12601,7 +14073,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -12611,7 +14083,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -12655,12 +14127,12 @@ dependencies = [ [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", "serde", ] @@ -12701,16 +14173,16 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", ] [[package]] name = "uuid" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", "serde", ] @@ -12786,6 +14258,30 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "w3f-bls" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "wait-timeout" version = "0.2.0" @@ -12843,9 +14339,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -12853,24 +14349,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if", "js-sys", @@ -12880,9 +14376,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -12890,22 +14386,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "wasm-instrument" @@ -12918,9 +14414,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.114.2" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" +checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", @@ -12934,9 +14430,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.114.2" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -12946,9 +14442,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.114.2" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", @@ -12971,6 +14467,38 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmi" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51fb5c61993e71158abf5bb863df2674ca3ec39ed6471c64f07aeaf751d67b4" +dependencies = [ + "intx", + "smallvec", + "spin 0.9.8", + "wasmi_arena", + "wasmi_core", + "wasmparser-nostd", +] + +[[package]] +name = "wasmi_arena" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" + +[[package]] +name = "wasmi_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624e6333e861ef49095d2d678b76ebf30b06bf37effca845be7e5b87c90071b7" +dependencies = [ + "downcast-rs", + "libm", + "num-traits", + "paste", +] + [[package]] name = "wasmparser" version = "0.102.0" @@ -12991,6 +14519,15 @@ dependencies = [ "semver 1.0.20", ] +[[package]] +name = "wasmparser-nostd" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" version = "8.0.1" @@ -13365,9 +14902,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -13389,7 +14926,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.5", + "ring 0.17.6", "untrusted 0.9.0", ] @@ -13404,9 +14941,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "webrtc" @@ -13495,7 +15032,7 @@ dependencies = [ "sha1", "sha2 0.10.8", "signature 1.6.4", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webpki 0.21.4", @@ -13522,7 +15059,7 @@ dependencies = [ "tokio", "turn", "url", - "uuid 1.5.0", + "uuid 1.6.1", "waitgroup", "webrtc-mdns", "webrtc-util", @@ -13589,7 +15126,7 @@ dependencies = [ "rtcp", "rtp", "sha-1", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webrtc-util", @@ -13625,7 +15162,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.21", + "rustix 0.38.26", ] [[package]] @@ -13644,6 +15181,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +[[package]] +name = "wildmatch" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee583bdc5ff1cf9db20e9db5bb3ff4c3089a8f6b8b31aff265c9aba85812db86" + [[package]] name = "winapi" version = "0.3.9" @@ -13712,6 +15255,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -13742,6 +15294,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -13754,6 +15321,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -13766,6 +15339,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -13778,6 +15357,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -13790,6 +15375,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -13802,6 +15393,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -13814,6 +15411,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -13826,11 +15429,17 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" -version = "0.5.18" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ "memchr", ] @@ -13952,6 +15561,12 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf" + [[package]] name = "yasna" version = "0.5.2" @@ -13963,29 +15578,29 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.20" +version = "0.7.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd66a62464e3ffd4e37bd09950c2b9dd6c4f8767380fabba0d523f9a775bc85a" +checksum = "7d6f15f7ade05d2a4935e34a457b936c23dc70a05cc1d97133dc99e7a3fe0f0e" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.20" +version = "0.7.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255c4596d41e6916ced49cfafea18727b24d67878fa180ddfd69b9df34fd1726" +checksum = "dbbad221e3f78500350ecbd7dfa4e63ef945c05f4c61cb7f4d3f84cd0bba649b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -13998,7 +15613,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3339dacdf..0d78f160e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,19 +8,18 @@ members = [ "crates/chronicle-domain", "crates/chronicle-domain-lint", "crates/chronicle-domain-test", - "crates/chronicle-protocol", "crates/chronicle-synth", "crates/chronicle-signing", "crates/chronicle-telemetry", "crates/gq-subscribe", "crates/id-provider", - "crates/opa-tp", - "crates/opa-tp-protocol", - "crates/opactl", - "crates/sawtooth-tp", "crates/pallet-chronicle", + "crates/pallet-opa", "node/runtime-chronicle", "node/node-chronicle", + "crates/runtime-api-chronicle", + "crates/rpc-chronicle", + "crates/protocol-substrate-chronicle", ] [workspace.dependencies] @@ -36,9 +35,6 @@ backoff = { version = "0.4.0", features = ["futures", "tokio"] } base64 = "0.21" bytes = "1.3.0" cached = "0.42" -frame-support = "24.0.0" -frame-system = "24.0.0" -frame-benchmarking = "24.0.0" cfg-if = "1.0.0" chronicle-signing = { path = "crates/chronicle-signing" } chrono = "0.4.26" @@ -61,6 +57,9 @@ diesel = { version = "2.0.0-rc.0", features = [ ] } diesel_migrations = { version = "2.0.0-rc.0", features = ["postgres"] } dotenvy = "0.15" +frame-benchmarking = "24.0.0" +frame-support = "24.0.0" +frame-system = "24.0.0" futures = "0.3.21" genco = "0.16.1" glob = "0.3.0" @@ -80,6 +79,7 @@ k256 = { version = "0.11.3", features = [ "ecdsa", "pkcs8", "sha256", + "keccak256", "std", "pem", "serde", @@ -87,11 +87,13 @@ k256 = { version = "0.11.3", features = [ lazy_static = "1.4.0" locspan = "0.7" lru = "0.11" +macro-attr-2018 = "3.0.0" maplit = "1.0.2" metrics = "0.21.0" metrics-exporter-prometheus = "0.12.1" mime = "0.3" mockito = "1.1" +newtype-derive-2018 = "0.2.1" oauth2 = "4.4" opa = { git = "https://github.com/tamasfe/opa-rs", rev = "3cf7fea" } openssl = { version = "0.10" } @@ -135,10 +137,9 @@ serde_derive = "1.0.152" serde_json = "1.0.93" serde_yaml = "0.9.14" shellexpand = "3.0.0" -macro-attr-2018 = "3.0.0" -newtype-derive-2018 = "0.2.1" temp-dir = "0.1.11" tempfile = "3.4.0" +testcontainers = "0.14" thiserror = "1.0" tmq = "0.3" tokio = { version = "1.27", features = [ @@ -166,4 +167,3 @@ uuid = "1.2.2" valico = "3.6.0" vaultrs = "*" zmq = { version = "0.9", features = ["vendored"] } -testcontainers = "0.14" diff --git a/crates/api/Cargo.toml b/crates/api/Cargo.toml index c0295433b..065d9e07e 100644 --- a/crates/api/Cargo.toml +++ b/crates/api/Cargo.toml @@ -20,8 +20,8 @@ async-trait = { workspace = true } base64 = { workspace = true } cached = { workspace = true } cfg-if = { workspace = true } -chronicle-protocol = { path = "../chronicle-protocol" } chronicle-signing = { workspace = true } +protocol-substrate-chronicle = { path = "../protocol-substrate-chronicle" } chronicle-telemetry = { path = "../chronicle-telemetry" } chrono = { workspace = true } common = { path = "../common" } @@ -50,7 +50,6 @@ rand = { workspace = true } rand_core = { workspace = true } reqwest = { workspace = true } sawtooth-sdk = { workspace = true } -sawtooth_tp = { path = "../sawtooth-tp" } serde = { workspace = true } serde_derive = { workspace = true } serde_json = { workspace = true } @@ -65,7 +64,7 @@ uuid = { workspace = true } [dev-dependencies] assert_fs = { workspace = true } -chronicle-protocol = { path = "../chronicle-protocol" } +protocol-substrate-chronicle = { path = "../protocol-substrate-chronicle" } insta = { workspace = true, features = ["json", "yaml"] } opa-tp-protocol = { path = "../opa-tp-protocol" } tempfile = { workspace = true } diff --git a/crates/chronicle-domain-test/Cargo.toml b/crates/chronicle-domain-test/Cargo.toml index 4500bf4b4..557e28522 100644 --- a/crates/chronicle-domain-test/Cargo.toml +++ b/crates/chronicle-domain-test/Cargo.toml @@ -29,7 +29,6 @@ inmem = ["chronicle/inmem"] [dev-dependencies] async-stl-client = { workspace = true } -chronicle-protocol = { path = "../chronicle-protocol" } futures = { workspace = true } hex = { workspace = true } insta = { workspace = true, features = ["json"] } diff --git a/crates/chronicle-protocol/Cargo.toml b/crates/chronicle-protocol/Cargo.toml deleted file mode 100644 index 332b23fc5..000000000 --- a/crates/chronicle-protocol/Cargo.toml +++ /dev/null @@ -1,57 +0,0 @@ -[package] -build = "build.rs" -edition = "2021" -name = "chronicle-protocol" -version = "0.7.5" - -[lib] -name = "chronicle_protocol" -path = "src/lib.rs" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -async-stl-client = { workspace = true } -async-trait = { workspace = true } -bytes = { workspace = true } -chronicle-signing = { path = "../chronicle-signing" } -common = { path = "../common" } -custom_error = { workspace = true } -derivative = { workspace = true } -futures = { workspace = true } -glob = { workspace = true } -hex = { workspace = true } -k256 = { workspace = true, features = [ - "default", - "arithmetic", - "ecdsa", - "pkcs8", - "sha256", - "std", - "pem", -] } -lazy_static = { workspace = true } -opa-tp-protocol = { path = "../opa-tp-protocol" } -openssl = { workspace = true } -prost = { workspace = true } -prost-types = { workspace = true } -rand = { workspace = true, features = ["getrandom"] } -rand_core = { workspace = true } -serde = { workspace = true } -serde_derive = { workspace = true } -serde_json = { workspace = true } -tempfile = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["time", "macros", "rt-multi-thread"] } -tracing = { workspace = true } -url = { workspace = true } -uuid = { workspace = true, features = ["serde", "v4"] } -zmq = { workspace = true } - -[build-dependencies] -glob = { workspace = true } -prost-build = { workspace = true } - -[dev-dependencies] -chrono = { workspace = true } -tempfile = { workspace = true } diff --git a/crates/chronicle-protocol/build.rs b/crates/chronicle-protocol/build.rs deleted file mode 100644 index 109764ea7..000000000 --- a/crates/chronicle-protocol/build.rs +++ /dev/null @@ -1,10 +0,0 @@ -use std::io::Result; - -fn main() -> Result<()> { - let protos = glob::glob("./src/protos/*.proto") - .unwrap() - .map(|x| x.unwrap()) - .collect::>(); - prost_build::compile_protos(&protos, &["./src/protos"])?; - Ok(()) -} diff --git a/crates/chronicle-protocol/src/address.rs b/crates/chronicle-protocol/src/address.rs deleted file mode 100644 index 59e43701a..000000000 --- a/crates/chronicle-protocol/src/address.rs +++ /dev/null @@ -1,47 +0,0 @@ -use core::fmt::Display; - -use common::{ - ledger::{LedgerAddress, NameSpacePart, ResourcePart}, - prov::AsCompact, -}; -use lazy_static::lazy_static; -use openssl::sha::Sha256; - -lazy_static! { - pub static ref PREFIX: String = { - let mut sha = Sha256::new(); - sha.update("chronicle".as_bytes()); - hex::encode(sha.finish())[..6].to_string() - }; -} - -pub static VERSION: &str = "1.0"; -pub static FAMILY: &str = "chronicle"; - -#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)] -pub struct SawtoothAddress(String); - -impl SawtoothAddress { - pub fn new(address: String) -> Self { - SawtoothAddress(address) - } -} - -/// Our sawtooth addresses use hash(chronicle)[..6] as the prefix, -/// followed by a 256 bit hash of the resource Iri and namespace Iri. -impl From<&LedgerAddress> for SawtoothAddress { - fn from(addr: &LedgerAddress) -> Self { - let mut sha = Sha256::new(); - if let Some(ns) = addr.namespace_part().as_ref() { - sha.update(ns.compact().as_bytes()) - } - sha.update(addr.resource_part().compact().as_bytes()); - SawtoothAddress(format!("{}{}", &*PREFIX, hex::encode(sha.finish()))) - } -} - -impl Display for SawtoothAddress { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - f.write_str(&self.0) - } -} diff --git a/crates/chronicle-protocol/src/lib.rs b/crates/chronicle-protocol/src/lib.rs deleted file mode 100644 index d3a550778..000000000 --- a/crates/chronicle-protocol/src/lib.rs +++ /dev/null @@ -1,28 +0,0 @@ -use async_stl_client::{ - ledger::SawtoothLedger, - zmq_client::{RetryingRequestResponseChannel, ZmqRequestResponseSawtoothChannel}, -}; -use messages::ChronicleSubmitTransaction; - -pub mod address; -pub mod messages; -pub mod protocol; -pub mod settings; - -pub use async_stl_client; -use protocol::ChronicleOperationEvent; - -static PROTOCOL_VERSION: &str = "2"; -const SUBMISSION_BODY_VERSION: u16 = 1; - -pub type ChronicleLedger = SawtoothLedger< - RetryingRequestResponseChannel, - ChronicleOperationEvent, - ChronicleSubmitTransaction, ->; - -pub mod sawtooth { - #![allow(clippy::derive_partial_eq_without_eq)] - - include!(concat!(env!("OUT_DIR"), "/_.rs")); -} diff --git a/crates/chronicle-protocol/src/messages.rs b/crates/chronicle-protocol/src/messages.rs deleted file mode 100644 index e48ff1aed..000000000 --- a/crates/chronicle-protocol/src/messages.rs +++ /dev/null @@ -1,135 +0,0 @@ -use std::sync::Arc; - -use chronicle_signing::{BatcherKnownKeyNamesSigner, ChronicleSigning, SecretError}; -use common::prov::{to_json_ld::ToJson, ChronicleTransaction}; -use k256::ecdsa::VerifyingKey; -use opa_tp_protocol::state::{policy_address, policy_meta_address}; -use serde_json::json; - -use crate::{ - address::SawtoothAddress, - protocol::ProtocolError, - sawtooth::submission::{BodyVariant, IdentityVariant}, - settings::sawtooth_settings_address, - PROTOCOL_VERSION, SUBMISSION_BODY_VERSION, -}; - -use super::sawtooth::*; -use async_stl_client::{ - ledger::{LedgerTransaction, TransactionId}, - sawtooth::{MessageBuilder, TransactionPayload}, -}; -use prost::Message; - -#[derive(Debug, Clone)] -pub struct ChronicleSubmitTransaction { - pub tx: ChronicleTransaction, - pub signer: ChronicleSigning, - pub policy_name: Option, -} - -#[async_trait::async_trait] -impl TransactionPayload for ChronicleSubmitTransaction { - type Error = ProtocolError; - - /// Envelope a payload of `ChronicleOperations` and `SignedIdentity` in a `Submission` protocol - /// buffer, along with placeholders for protocol version info and a tracing span id. - async fn to_bytes(&self) -> Result, ProtocolError> { - let mut submission = Submission { - version: PROTOCOL_VERSION.to_string(), - span_id: 0u64, - ..Default::default() - }; - - let mut ops = Vec::with_capacity(self.tx.tx.len()); - for op in &self.tx.tx { - let op_json = op.to_json(); - let compact_json = op_json.compact_stable_order().await?; - ops.push(compact_json); - } - - let ops_json = - serde_json::to_string(&json!({"version": SUBMISSION_BODY_VERSION, "ops": ops}))?; - let identity_json = serde_json::to_string(&self.tx.identity)?; - tracing::debug!(ops_json = %ops_json, identity_json = %identity_json); - - submission.body_variant = Some(BodyVariant::Body(BodyMessageV1 { payload: ops_json })); - submission.identity_variant = - Some(IdentityVariant::Identity(IdentityMessageV1 { payload: identity_json })); - Ok(submission.encode_to_vec()) - } -} - -impl ChronicleSubmitTransaction { - pub fn new( - tx: ChronicleTransaction, - signer: ChronicleSigning, - policy_name: Option, - ) -> Self { - Self { tx, signer, policy_name } - } -} - -#[async_trait::async_trait] -impl LedgerTransaction for ChronicleSubmitTransaction { - type Error = SecretError; - - async fn sign(&self, bytes: Arc>) -> Result, SecretError> { - self.signer.batcher_sign(&bytes).await - } - - async fn verifying_key(&self) -> Result { - self.signer.batcher_verifying().await - } - - fn addresses(&self) -> Vec { - self.tx - .tx - .iter() - .flat_map(|op| op.dependencies()) - .map(|dep| SawtoothAddress::from(&dep).to_string()) - .collect::>() - .into_iter() - .collect() - } - - async fn as_sawtooth_tx( - &self, - message_builder: &MessageBuilder, - ) -> Result<(async_stl_client::messages::Transaction, TransactionId), Self::Error> { - //Ensure we append any opa policy binary address and meta address to the - //list of addresses, along with the settings address - let mut addresses: Vec<_> = self - .addresses() - .into_iter() - .chain(vec![ - sawtooth_settings_address("chronicle.opa.policy_name"), - sawtooth_settings_address("chronicle.opa.entrypoint"), - ]) - .collect(); - - if self.policy_name.is_some() { - addresses = addresses - .into_iter() - .chain(vec![ - policy_address(self.policy_name.as_ref().unwrap()), - policy_meta_address(self.policy_name.as_ref().unwrap()), - ]) - .collect(); - } - message_builder - .make_sawtooth_transaction( - addresses.clone(), - addresses, - vec![], - self, - self.signer.batcher_verifying().await?, - |bytes| { - let signer = self.signer.clone(); - let bytes = bytes.to_vec(); - async move { signer.batcher_sign(&bytes).await } - }, - ) - .await - } -} diff --git a/crates/chronicle-protocol/src/perf.md b/crates/chronicle-protocol/src/perf.md deleted file mode 100644 index 73e9f7af6..000000000 --- a/crates/chronicle-protocol/src/perf.md +++ /dev/null @@ -1,32 +0,0 @@ -# Chronicle on sawtooth performance - -## Environment - -4 node sawtooth cluster backed onto a 4x 4X Large AWS node Kubernetes cluster -using our default helm settings. This creates a 4 node sawtooth network with a -validator and transaction processor per AWS node, and a single chronicle service -using persistent Postgres. - -## Testing methodology - -Sequences of 10000 chronicle mutations (the creation of an activity and the -setting of multiple attributes) were sent from a task, through the Chronicle API -at increasing rates of transactions per-second to find the rate where system -performance begins to break down and discover failure modes. - -## Results - -The maximum throughput for the whole system is between 50-60 transactions per -second. This throughput is constrained by Sawtooth consensus, and there are ways -this could be significantly raised if Chronicle can increase batch sizes at high throughput -rates. Failure modes over the saturation points are resumable - Sawtooth will -eventually report its queue to be full to Chronicle, and Chronicle will send -errors to connected clients. - -No data will be lost due to errors running Chronicle beyond its saturation point - -## Future actions - -Chronicle 0.8 has some minor performance improvements that could be back ported -to .7. Batching of transactions at high throughput rates would significantly -improve the total throughput of the network - 2 orders of magnitude is possible. diff --git a/crates/chronicle-protocol/src/protocol.rs b/crates/chronicle-protocol/src/protocol.rs deleted file mode 100644 index 3384ba077..000000000 --- a/crates/chronicle-protocol/src/protocol.rs +++ /dev/null @@ -1,308 +0,0 @@ -use std::io::Cursor; - -use async_stl_client::{ - error::SawtoothCommunicationError, - ledger::{LedgerEvent, Span}, -}; -use common::{ - identity::SignedIdentity, - prov::{ - operations::ChronicleOperation, to_json_ld::ToJson, CompactionError, Contradiction, - PayloadError, ProcessorError, ProvModel, - }, -}; -use prost::Message; -use tracing::span; - -use thiserror::Error; - -use self::messages::event::OptionContradiction; - -#[derive(Debug)] -pub struct ChronicleOperationEvent(pub Result, pub SignedIdentity); - -impl From for Result { - fn from(val: ChronicleOperationEvent) -> Self { - val.0 - } -} - -#[async_trait::async_trait] -impl LedgerEvent for ChronicleOperationEvent { - async fn deserialize( - buf: &[u8], - ) -> Result<(Self, Span), async_stl_client::error::SawtoothCommunicationError> - where - Self: Sized, - { - let event = messages::Event::decode(buf) - .map_err(|e| SawtoothCommunicationError::LedgerEventParse { source: e.into() })?; - // Spans of zero panic, so assign a dummy value until we thread the span correctly - let span_id = { - if event.span_id == 0 { - span::Id::from_u64(0xffffffffffffffff) - } else { - span::Id::from_u64(event.span_id) - } - }; - let model = match (event.delta, event.option_contradiction) { - (_, Some(OptionContradiction::Contradiction(contradiction))) => - Err(serde_json::from_str::(&contradiction).map_err(|e| { - SawtoothCommunicationError::LedgerEventParse { source: e.into() } - })?), - (delta, None) => { - let mut model = ProvModel::default(); - model.apply_json_ld_str(&delta).await.map_err(|e| { - SawtoothCommunicationError::LedgerEventParse { source: e.into() } - })?; - - Ok(model) - }, - }; - - let identity = { - if event.identity.is_empty() { - SignedIdentity::new_no_identity() - } else { - serde_json::from_str(&event.identity).map_err(|e| { - SawtoothCommunicationError::LedgerEventParse { source: e.into() } - })? - } - }; - Ok((Self(model, identity), Span::Span(span_id.into_u64()))) - } -} - -#[derive(Error, Debug)] -pub enum ProtocolError { - #[error("Protobuf deserialization error {source}")] - ProtobufDeserialize { - #[from] - source: prost::DecodeError, - }, - #[error("Protobuf serialization error {source}")] - ProtobufSerialize { - #[from] - source: prost::EncodeError, - }, - #[error("Serde de/serialization error {source}")] - JsonSerialize { - #[from] - source: serde_json::Error, - }, - #[error("Problem applying delta {source}")] - ProcessorError { - #[from] - source: ProcessorError, - }, - #[error("Could not compact json {source}")] - Compaction { - #[from] - source: CompactionError, - }, -} - -static PROTOCOL_VERSION: &str = "2"; - -// Include the `submission` module, which is -// generated from ./protos/submission.proto. -pub mod messages { - #![allow(clippy::derive_partial_eq_without_eq)] - - include!(concat!(env!("OUT_DIR"), "/_.rs")); -} - -pub async fn chronicle_committed( - span: u64, - delta: ProvModel, - identity: &SignedIdentity, -) -> Result { - Ok(messages::Event { - version: PROTOCOL_VERSION.to_owned(), - delta: serde_json::to_string(&delta.to_json().compact_stable_order().await?)?, - span_id: span, - identity: serde_json::to_string(identity)?, - ..Default::default() - }) -} - -pub fn chronicle_contradicted( - span: u64, - contradiction: &Contradiction, - identity: &SignedIdentity, -) -> Result { - Ok(messages::Event { - version: PROTOCOL_VERSION.to_owned(), - span_id: span, - option_contradiction: Some(OptionContradiction::Contradiction(serde_json::to_string( - &contradiction, - )?)), - identity: serde_json::to_string(identity)?, - ..Default::default() - }) -} - -impl messages::Event { - pub async fn get_contradiction(&self) -> Result, ProtocolError> { - Ok(self - .option_contradiction - .as_ref() - .map(|OptionContradiction::Contradiction(s)| serde_json::from_str(s)) - .transpose()?) - } - - pub async fn get_delta(&self) -> Result { - let mut model = ProvModel::default(); - model.apply_json_ld_str(&self.delta).await?; - - Ok(model) - } -} - -pub fn serialize_submission(submission: &messages::Submission) -> Vec { - let mut buf = Vec::with_capacity(submission.encoded_len()); - submission.encode(&mut buf).unwrap(); - buf -} - -/// `Submission` protocol buffer deserializer -pub fn deserialize_submission(buf: &[u8]) -> Result { - messages::Submission::decode(&mut Cursor::new(buf)) -} - -/// Convert a `Submission` payload from a vector of -/// strings to a vector of `ChronicleOperation`s. -/// Operates for version 1 of the protocol. -pub async fn chronicle_operations_from_submission_v1( - submission_body: Vec, -) -> Result, ProcessorError> { - let mut ops = Vec::with_capacity(submission_body.len()); - for op in submission_body.iter() { - let json = serde_json::from_str(op)?; - // The inner json value should be in compacted form, - // wrapping in `ExpandedJson`, as required by `ChronicleOperation::from_json` - let op = ChronicleOperation::from_json(&json).await?; - ops.push(op); - } - Ok(ops) -} - -/// Convert a `Submission` payload from a vector of -/// strings to a vector of `ChronicleOperation`s. -/// Operates for version 2 of the protocol. -pub async fn chronicle_operations_from_submission_v2( - submission_body: String, -) -> Result, ProcessorError> { - use serde_json::{json, Value}; - let json = serde_json::from_str(&submission_body)?; - - if let Value::Object(map) = json { - if let Some(version) = map.get("version") { - if version == &json!(1) { - if let Some(ops_json) = map.get("ops").and_then(|x| x.as_array()) { - let mut ops = Vec::with_capacity(ops_json.len()); - for op in ops_json { - ops.push(ChronicleOperation::from_json(op).await?); - } - Ok(ops) - } else { - Err(PayloadError::OpsNotAList.into()) - } - } else { - Err(PayloadError::VersionUnknown.into()) - } - } else { - Err(PayloadError::VersionMissing.into()) - } - } else { - Err(PayloadError::NotAnObject.into()) - } -} - -/// Convert a `Submission` identity from a String -/// to a `SignedIdentity` -pub async fn chronicle_identity_from_submission( - submission_identity: String, -) -> Result { - Ok(serde_json::from_str(&submission_identity)?) -} - -#[cfg(test)] -mod test { - use crate::protocol::{ - chronicle_operations_from_submission_v1, chronicle_operations_from_submission_v2, - ChronicleOperation, - }; - use chrono::{NaiveDateTime, TimeZone, Utc}; - use common::prov::{ - operations::{EndActivity, StartActivity}, - to_json_ld::ToJson, - ActivityId, NamespaceId, - }; - use serde_json::{json, Value}; - use std::{ - collections::hash_map::DefaultHasher, - hash::{Hash, Hasher}, - }; - use uuid::Uuid; - - fn construct_operations() -> Vec { - let mut hasher = DefaultHasher::new(); - "foo".hash(&mut hasher); - let n1 = hasher.finish(); - "bar".hash(&mut hasher); - let n2 = hasher.finish(); - let uuid = Uuid::from_u64_pair(n1, n2); - - let base_ms = 1234567654321; - let activity_start = - Utc.from_utc_datetime(&NaiveDateTime::from_timestamp_millis(base_ms).unwrap()); - let activity_end = - Utc.from_utc_datetime(&NaiveDateTime::from_timestamp_millis(base_ms + 12345).unwrap()); - - let start = ChronicleOperation::StartActivity(StartActivity { - namespace: NamespaceId::from_external_id("test-namespace", uuid), - id: ActivityId::from_external_id("test-activity"), - time: activity_start, - }); - let end = ChronicleOperation::EndActivity(EndActivity { - namespace: NamespaceId::from_external_id("test-namespace", uuid), - id: ActivityId::from_external_id("test-activity"), - time: activity_end, - }); - - vec![start, end] - } - - #[tokio::test] - async fn deserialize_submission_v1() { - let operations_expected = construct_operations(); - - let submission_body = operations_expected - .iter() - .map(|operation| serde_json::to_string(&operation.to_json().0).unwrap()) - .collect(); - - let operations_actual = - chronicle_operations_from_submission_v1(submission_body).await.unwrap(); - - assert_eq!(operations_expected, operations_actual); - } - - #[tokio::test] - async fn deserialize_submission_v2() { - let operations_expected = construct_operations(); - - let submission_body = - serde_json::to_string(&json!({"version": 1, "ops": operations_expected - .iter() - .map(|operation| operation.to_json().0) - .collect::>()})) - .unwrap(); - - let operations_actual = - chronicle_operations_from_submission_v2(submission_body).await.unwrap(); - - assert_eq!(operations_expected, operations_actual); - } -} diff --git a/crates/chronicle-protocol/src/protos/event.proto b/crates/chronicle-protocol/src/protos/event.proto deleted file mode 100644 index 166bc0ac4..000000000 --- a/crates/chronicle-protocol/src/protos/event.proto +++ /dev/null @@ -1,14 +0,0 @@ - -syntax = "proto3"; - -option java_multiple_files = true; -option java_package = "sawtooth.sdk.protobuf"; -option go_package = "batch_pb2"; - -message Event { - string version = 1; - uint64 span_id = 2; - oneof option_contradiction { string contradiction = 3; } - string delta = 4; - string identity = 5; -} diff --git a/crates/chronicle-protocol/src/protos/submission.proto b/crates/chronicle-protocol/src/protos/submission.proto deleted file mode 100644 index dc3ae4c82..000000000 --- a/crates/chronicle-protocol/src/protos/submission.proto +++ /dev/null @@ -1,37 +0,0 @@ -// a place to keep protocol version information (that’s not the address space) -// and send along an opentelemetry distributed span id -- a leverage point for -// future protocol versioning and a way of sneaking in a OTEL span id -// for distributed tracing as there’s no sawtooth native way of smuggling in -// metadata - -syntax = "proto3"; - -option java_multiple_files = true; -option java_package = "sawtooth.sdk.protobuf"; -option go_package = "batch_pb2"; - -message OpaPolicy { - string id = 1; - string entrypoint = 2; -} - -message Submission { - string version = 1; - uint64 span_id = 2; - repeated string body_old = 3 [ deprecated = true ]; - oneof identity_variant { - string identity_old = 4 [ deprecated = true ]; - IdentityMessageV1 identity = 5; - } - oneof body_variant { - BodyMessageV1 body = 6; - } -} - -message BodyMessageV1 { - string payload = 1; -} - -message IdentityMessageV1 { - string payload = 1; -} diff --git a/crates/chronicle-protocol/src/settings.rs b/crates/chronicle-protocol/src/settings.rs deleted file mode 100644 index ad4071eef..000000000 --- a/crates/chronicle-protocol/src/settings.rs +++ /dev/null @@ -1,114 +0,0 @@ -use std::iter::repeat; - -use async_stl_client::{ - error::SawtoothCommunicationError, ledger::LedgerReader, messages::Setting, -}; -use k256::sha2::{Digest, Sha256}; -use prost::Message; -use tracing::error; - -use crate::ChronicleLedger; - -fn setting_key_to_address(key: &str) -> String { - let mut address = String::new(); - address.push_str("000000"); - address.push_str( - &key.splitn(4, '.') - .chain(repeat("")) - .map(short_hash) - .take(4) - .collect::>() - .join(""), - ); - - address -} - -fn short_hash(s: &str) -> String { - hex::encode(Sha256::digest(s.as_bytes()))[..16].to_string() -} - -/// Generates a Sawtooth address for a given setting key. -/// -/// The address is a hex string that is computed based on the input key, -/// according to the Sawtooth settings addressing algorithm. The key is -/// split into four parts based on the dots in the string. If there are -/// less than four parts, the remaining parts are filled with empty strings. -/// Each of these parts has a short hash computed (the first 16 characters -/// of its SHA256 hash in hex) and is joined into a single address, with the -/// settings namespace (`000000`) added at the beginning. -/// -/// Does not account for settings keys with more than 4 components -/// -/// # Arguments -/// -/// * `s` - A string representing the setting key to generate an address for. -/// -/// # Example -/// -/// ``` -/// use chronicle_protocol::settings::sawtooth_settings_address; -/// -/// let address = sawtooth_settings_address("sawtooth.config.vote.proposals"); -/// assert_eq!(address, "000000a87cb5eafdcca6a8b79606fb3afea5bdab274474a6aa82c1c0cbf0fbcaf64c0b"); -/// ``` -pub fn sawtooth_settings_address(s: &str) -> String { - setting_key_to_address(s) -} - -/// This `SettingsReader` struct is used for extracting particular configuration -/// settings from the Sawtooth settings TP given the key. -pub struct SettingsReader(ChronicleLedger); - -impl SettingsReader { - pub fn new(reader: ChronicleLedger) -> Self { - Self(reader) - } - - /// Async function that returns the value of a specific configuration setting, given its key. - /// - /// # Arguments - /// * `key` - a reference to a string that contains the key for the setting to retrieve. - /// - /// # Errors - /// If the value is not found, returns a `SawtoothCommunicationError`, which indicates that - /// there was an error in communicating with the Sawtooth network. - /// - /// Settings values are not uniform, so we return a `Vec` for further processing - pub async fn read_settings(&self, key: &str) -> Result { - let address = sawtooth_settings_address(key); - loop { - let res = self.0.get_state_entry(&address).await; - - if let Err(e) = res { - error!("Error reading settings: {}", e); - tokio::time::sleep(std::time::Duration::from_secs(2)).await; - continue - } - - return Ok(Setting::decode(&*res.unwrap())?) - } - } -} - -#[derive(Debug, Clone)] -pub struct OpaSettings { - pub policy_name: String, - pub entrypoint: String, -} - -pub async fn read_opa_settings( - settings: &SettingsReader, -) -> Result { - let policy_id = settings.read_settings("chronicle.opa.policy_name").await?; - let entrypoint = settings.read_settings("chronicle.opa.entrypoint").await?; - let policy_id = policy_id - .entries - .first() - .ok_or_else(|| SawtoothCommunicationError::MalformedMessage)?; - let entrypoint = entrypoint - .entries - .first() - .ok_or_else(|| SawtoothCommunicationError::MalformedMessage)?; - Ok(OpaSettings { policy_name: policy_id.value.clone(), entrypoint: entrypoint.value.clone() }) -} diff --git a/crates/chronicle-signing/src/embedded_secret_manager_source.rs b/crates/chronicle-signing/src/embedded_secret_manager_source.rs index 6d4d964ae..a80ac947f 100644 --- a/crates/chronicle-signing/src/embedded_secret_manager_source.rs +++ b/crates/chronicle-signing/src/embedded_secret_manager_source.rs @@ -6,7 +6,10 @@ use k256::{ use rand::{rngs::StdRng, SeedableRng}; use secret_vault::{Secret, SecretMetadata, SecretVaultRef, SecretVaultResult, SecretsSource}; use secret_vault_value::SecretValue; -use std::{collections::HashMap, sync::Arc}; +use std::{ + collections::{BTreeMap, HashMap}, + sync::Arc, +}; use tokio::sync::Mutex; use tracing::debug; @@ -14,22 +17,22 @@ use crate::SecretError; pub struct EmbeddedSecretManagerSource { secrets: Arc>>>, - deterministic: bool, + seeds: BTreeMap, } impl EmbeddedSecretManagerSource { pub fn new() -> Self { - Self { secrets: Arc::new(Mutex::new(HashMap::new())), deterministic: false } + Self { secrets: Arc::new(Mutex::new(HashMap::new())), seeds: BTreeMap::default() } } - pub fn new_deterministic() -> Self { - Self { secrets: Arc::new(Mutex::new(HashMap::new())), deterministic: true } + pub fn new_seeded(seeds: BTreeMap) -> Self { + Self { secrets: Arc::new(Mutex::new(HashMap::new())), seeds } } } -fn new_signing_key(deterministic: bool, index: usize) -> Result, SecretError> { - let secret = if deterministic { - SecretKey::random(StdRng::seed_from_u64(index as _)) +fn new_signing_key(name: &str, seeds: &BTreeMap) -> Result, SecretError> { + let secret = if let Some(seed) = seeds.get(name) { + SecretKey::from_be_bytes(seed).map_err(|_| SecretError::BadSeed)? } else { SecretKey::random(StdRng::from_entropy()) }; @@ -57,7 +60,8 @@ impl SecretsSource for EmbeddedSecretManagerSource { let mut secrets = self.secrets.lock().await; for (index, secret_ref) in references.iter().enumerate() { let secret = secrets.entry(secret_ref.clone()).or_insert_with(|| { - let secret = new_signing_key(self.deterministic, index).unwrap(); + let secret = + new_signing_key(secret_ref.key.secret_name.as_ref(), &self.seeds).unwrap(); secret.to_vec() }); diff --git a/crates/chronicle-signing/src/lib.rs b/crates/chronicle-signing/src/lib.rs index f19657a76..ca9c864dd 100644 --- a/crates/chronicle-signing/src/lib.rs +++ b/crates/chronicle-signing/src/lib.rs @@ -10,6 +10,7 @@ use secret_vault::{ SecretNamespace, SecretVaultBuilder, SecretVaultRef, SecretVaultView, }; use std::{ + collections::BTreeMap, path::{Path, PathBuf}, sync::Arc, }; @@ -42,15 +43,19 @@ pub enum SecretError { #[from] source: SecretVaultError, }, + + #[error("Bad BIP39 seed")] + BadSeed, } pub enum ChronicleSecretsOptions { // Connect to hashicorp vault for secrets Vault(vault_secret_manager_source::VaultSecretManagerSourceOptions), - // Generate secrets in memory on demand + // Generate secrets from entropy in memory on demand Embedded, - //Deterministically generate secrets for testing - Test, + + //Seed secrets with name using a map of secret name to BIP39 seed phrase + Seeded(BTreeMap), //Filesystem based keys Filesystem(PathBuf), } @@ -81,9 +86,9 @@ impl ChronicleSecretsOptions { ChronicleSecretsOptions::Embedded } - // Generate deterministic secrets in memory on demand - pub fn test_keys() -> ChronicleSecretsOptions { - ChronicleSecretsOptions::Test + // Use supplied seeds, or fall back to entropy + pub fn seeded(seeds: BTreeMap) -> ChronicleSecretsOptions { + ChronicleSecretsOptions::Seeded(seeds) } } @@ -121,8 +126,11 @@ impl ChronicleSigning { multi_source = multi_source.add_source(&SecretNamespace::new(namespace), source); }, - (namespace, ChronicleSecretsOptions::Test) => { - let source = embedded_secret_manager_source::EmbeddedSecretManagerSource::new_deterministic(); + (namespace, ChronicleSecretsOptions::Seeded(seeds)) => { + let source = + embedded_secret_manager_source::EmbeddedSecretManagerSource::new_seeded( + seeds, + ); multi_source = multi_source.add_source(&SecretNamespace::new(namespace), source); }, @@ -184,6 +192,30 @@ pub trait WithSecret { ) -> Result; } +#[async_trait::async_trait] +pub trait OwnedSecret { + async fn copy_signing_key( + &self, + secret_namespace: &str, + secret_name: &str, + ) -> Result; +} + +#[async_trait::async_trait] +impl OwnedSecret for T { + async fn copy_signing_key( + &self, + secret_namespace: &str, + secret_name: &str, + ) -> Result { + let secret = + WithSecret::with_signing_key(self, secret_namespace, secret_name, |secret| secret) + .await?; + + Ok(secret) + } +} + #[async_trait::async_trait] impl WithSecret for ChronicleSigning { async fn with_signing_key( diff --git a/crates/chronicle/Cargo.toml b/crates/chronicle/Cargo.toml index 53f5d52ed..7d8de6526 100644 --- a/crates/chronicle/Cargo.toml +++ b/crates/chronicle/Cargo.toml @@ -12,7 +12,6 @@ api = { path = "../api" } async-graphql = { workspace = true } async-stl-client = { workspace = true } cfg-if = { workspace = true } -chronicle-protocol = { path = "../chronicle-protocol" } chronicle-signing = { workspace = true } chronicle-telemetry = { path = "../chronicle-telemetry" } chrono = { workspace = true, features = ["serde"] } @@ -60,7 +59,6 @@ strict = [] [dev-dependencies] assert_fs = { workspace = true } -chronicle-protocol = { path = "../chronicle-protocol" } insta = { workspace = true, features = ["yaml"] } opa-tp-protocol = { path = "../opa-tp-protocol" } sawtooth-sdk = { workspace = true } diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index 897936e57..82aad08ce 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -34,11 +34,12 @@ k256 = { version="0.11.3",default-features=false,features=["ecdsa","pkcs8"] } lazy_static = { version="1.4" } locspan = { version="0.7", optional=true} mime = { version="0.3", optional=true } -scale-info = {version="2.10.0", default-features=false, features=["derive"]} -parity-scale-codec = {version = "3.6.5", default-features=false,features=["derive","max-encoded-len"]} +scale-info = {version="2.10.0", default-features=false, features=["derive"], optional=true} +scale-encode = {version="0.5", default-features=false, features=["derive"], optional=true} +parity-scale-codec = {version = "3.6.5", default-features=false,features=["derive","max-encoded-len"], optional=true} newtype-derive-2018 = {workspace=true} macro-attr-2018 = {workspace=true} -serde = { version="1.0", default-features=false } +serde = { version="1.0", default-features=false,features=["rc"]} serde_derive = { version="1.0",default-features=false } serde_json = { version="1.0", default-features=false } iri-string = {version="0.7",default-features=false, features=["alloc"]} @@ -62,10 +63,10 @@ proptest = { workspace = true } tempfile = { workspace = true } [features] -std = ["k256/std","tracing/std","serde/std","serde_json/std","hex/std","futures/std","iri-string/std","chrono/std","anyhow/std"] +std = ["k256/std","tracing/std","serde/std","serde_json/std","hex/std","scale-encode/std","futures/std","iri-string/std","chrono/std","anyhow/std"] default = ["std","graphql-bindings","diesel-bindings","json-ld"] # Enable parity support, annoyingly lazy_static has a non standard way of enabling non_std -parity = ["lazy_static/spin_no_std"] +parity-encoding = ["lazy_static/spin_no_std","dep:parity-scale-codec","dep:scale-info","dep:scale-encode"] # At this point, LD should be a seperate crate json-ld = ["dep:json-ld","dep:json-syntax","dep:rdf-types","dep:hashbrown","dep:mime","dep:locspan","dep:iref"] graphql-bindings = ["async-graphql"] diff --git a/crates/common/src/attributes.rs b/crates/common/src/attributes.rs index b7e67c892..4c091b7de 100644 --- a/crates/common/src/attributes.rs +++ b/crates/common/src/attributes.rs @@ -1,13 +1,13 @@ #[cfg(feature = "std")] use std::collections::BTreeMap; +use parity_scale_codec::Encode; #[cfg(not(feature = "std"))] use parity_scale_codec::{alloc::collections::BTreeMap, alloc::string::String}; +use scale_encode::error::Kind; #[cfg(not(feature = "std"))] use scale_info::{prelude::borrow::ToOwned, prelude::string::ToString, prelude::*}; -use parity_scale_codec::{Decode, Encode}; -use scale_info::{build::Fields, Path, Type, TypeInfo}; use serde_json::Value; use crate::prov::DomaintypeId; @@ -27,7 +27,31 @@ impl core::fmt::Display for SerdeWrapper { } } -impl Encode for SerdeWrapper { +#[cfg(feature = "parity-encoding")] +impl scale_encode::EncodeAsType for SerdeWrapper { + fn encode_as_type_to( + &self, + type_id: u32, + types: &scale_info::PortableRegistry, + out: &mut scale_encode::Vec, + ) -> Result<(), scale_encode::Error> { + let json_string = match serde_json::to_string(&self.0) { + Ok(json_string) => json_string, + Err(e) => { + tracing::error!("Failed to serialize Value to JSON string: {}", e); + return Err(scale_encode::Error::new(scale_encode::error::ErrorKind::WrongShape { + actual: Kind::Str, + expected: type_id, + })); + }, + }; + json_string.encode_to(out); + Ok(()) + } +} + +#[cfg(feature = "parity-encoding")] +impl parity_scale_codec::Encode for SerdeWrapper { fn encode_to(&self, dest: &mut T) { let json_string = serde_json::to_string(&self.0).expect("Failed to serialize Value to JSON string"); @@ -35,19 +59,8 @@ impl Encode for SerdeWrapper { } } -impl From for SerdeWrapper { - fn from(value: Value) -> Self { - SerdeWrapper(value) - } -} - -impl From for Value { - fn from(wrapper: SerdeWrapper) -> Self { - wrapper.0 - } -} - -impl Decode for SerdeWrapper { +#[cfg(feature = "parity-encoding")] +impl parity_scale_codec::Decode for SerdeWrapper { fn decode( input: &mut I, ) -> Result { @@ -59,16 +72,40 @@ impl Decode for SerdeWrapper { } } -impl TypeInfo for SerdeWrapper { +#[cfg(feature = "parity-encoding")] +impl scale_info::TypeInfo for SerdeWrapper { type Identity = Self; - fn type_info() -> Type { - Type::builder() - .path(Path::new("SerdeWrapper", module_path!())) - .composite(Fields::unnamed().field(|f| f.ty::().type_name("Json"))) + fn type_info() -> scale_info::Type { + scale_info::Type::builder() + .path(scale_info::Path::new("SerdeWrapper", module_path!())) + .composite( + scale_info::build::Fields::unnamed().field(|f| f.ty::().type_name("Json")), + ) + } +} + +impl From for SerdeWrapper { + fn from(value: Value) -> Self { + SerdeWrapper(value) } } -#[derive(Debug, Clone, Encode, Decode, TypeInfo, Serialize, Deserialize, PartialEq, Eq)] +impl From for Value { + fn from(wrapper: SerdeWrapper) -> Self { + wrapper.0 + } +} + +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] pub struct Attribute { pub typ: String, pub value: SerdeWrapper, @@ -98,9 +135,16 @@ impl Attribute { } } -#[derive( - Debug, Clone, Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Default, +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Default)] pub struct Attributes { pub typ: Option, pub attributes: BTreeMap, diff --git a/crates/common/src/identity.rs b/crates/common/src/identity.rs index 9147603fd..677fe3d5f 100644 --- a/crates/common/src/identity.rs +++ b/crates/common/src/identity.rs @@ -1,19 +1,16 @@ use crate::prov::AgentId; -use k256::{ - ecdsa::VerifyingKey, - sha2::{Digest, Sha512}, -}; +use k256::sha2::{Digest, Sha512}; use serde_json::{Map, Value}; use tracing::warn; #[cfg(not(feature = "std"))] use parity_scale_codec::{ alloc::collections::BTreeMap, alloc::collections::BTreeSet, alloc::string::String, - alloc::vec::Vec, + alloc::vec::Vec, Decode, Encode, }; #[cfg(not(feature = "std"))] -use scale_info::{prelude::borrow::ToOwned, prelude::string::ToString, prelude::*}; +use scale_info::{prelude::borrow::ToOwned, prelude::string::ToString, prelude::*, TypeInfo}; #[cfg(feature = "std")] use std::collections::BTreeMap; @@ -192,22 +189,26 @@ impl OpaData { )) } } - /// Signed user identity containing the serialized identity, signature, and /// verifying key. Implements `TryFrom` to deserialize to the user identity object +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] #[derive(Clone, Debug, Eq, PartialEq)] pub struct SignedIdentity { pub identity: String, pub signature: Option>, - pub verifying_key: Option, + pub verifying_key: Option>, } impl SignedIdentity { - fn new( - id: &AuthId, - signature: Vec, - verifying_key: VerifyingKey, - ) -> Result { + fn new(id: &AuthId, signature: Vec, verifying_key: Vec) -> Result { Ok(Self { identity: serde_json::to_string(&id)?, signature: Some(signature), diff --git a/crates/common/src/json_ld.rs b/crates/common/src/json_ld.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/common/src/json_ld.rs @@ -0,0 +1 @@ + diff --git a/crates/common/src/ledger.rs b/crates/common/src/ledger.rs index f4edf1fb6..598113fb4 100644 --- a/crates/common/src/ledger.rs +++ b/crates/common/src/ledger.rs @@ -1,4 +1,3 @@ -use scale_info::TypeInfo; use tracing::instrument; use crate::{ @@ -19,7 +18,8 @@ use core::str::FromStr; #[cfg(not(feature = "std"))] use parity_scale_codec::{ alloc::boxed::Box, alloc::collections::btree_map::Entry, alloc::collections::BTreeMap, - alloc::collections::BTreeSet, alloc::string::String, alloc::sync::Arc, alloc::vec::Vec, + alloc::collections::BTreeSet, alloc::string::String, alloc::sync::Arc, alloc::vec::Vec, Decode, + Encode, }; #[cfg(not(feature = "std"))] use scale_info::prelude::*; @@ -81,6 +81,44 @@ impl core::fmt::Display for SubmissionError { } } +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + scale_encode::EncodeAsType, + parity_scale_codec::Encode, + parity_scale_codec::Decode + ) +)] +#[derive(Debug, Clone, Eq, PartialEq)] +pub struct OperationSubmission { + pub operations: Arc>, + pub identity: Arc, +} + +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + scale_encode::EncodeAsType, + parity_scale_codec::Encode, + parity_scale_codec::Decode + ) +)] +pub struct ApplyArgs { + pub operations: OperationSubmission, +} + +impl OperationSubmission { + pub fn new(identity: SignedIdentity, operations: Vec) -> Self { + OperationSubmission { identity: identity.into(), operations: operations.into() } + } + + pub fn new_anonymous(operations: Vec) -> Self { + Self::new(SignedIdentity::new_no_identity(), operations) + } +} + pub type SubmitResult = Result; #[derive(Debug, Clone)] @@ -138,16 +176,10 @@ impl SubmissionStage { } } -#[derive( - parity_scale_codec::Encode, - parity_scale_codec::Decode, - TypeInfo, - PartialEq, - Eq, - PartialOrd, - Ord, - Debug, - Clone, +#[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) )] pub struct LedgerAddress { // Namespaces do not have a namespace @@ -155,6 +187,7 @@ pub struct LedgerAddress { resource: ChronicleIri, } +#[cfg(feature = "parity-encoding")] impl parity_scale_codec::MaxEncodedLen for LedgerAddress { fn max_encoded_len() -> usize { 2048usize diff --git a/crates/common/src/prov/id/mod.rs b/crates/common/src/prov/id/mod.rs index 8e3492f5a..07dae2cec 100644 --- a/crates/common/src/prov/id/mod.rs +++ b/crates/common/src/prov/id/mod.rs @@ -5,9 +5,7 @@ use async_graphql::OneofObject; #[cfg(feature = "graphql-bindings")] pub use graphlql_scalars::*; -use iri_string::types::{IriAbsoluteString, UriAbsoluteString, UriRelativeStr}; -use parity_scale_codec::{Decode, Encode}; -use scale_info::{build::Fields, Path, Type, TypeInfo}; +use iri_string::types::{IriAbsoluteString, UriAbsoluteString}; use tracing::trace; #[cfg(feature = "diesel-bindings")] @@ -79,19 +77,15 @@ impl core::fmt::Display for ProbableChronicleIri { } } -#[derive( - Debug, - Clone, - PartialEq, - Eq, - PartialOrd, - Ord, - Hash, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] #[cfg_attr(feature = "diesel-bindings", derive(AsExpression, FromSqlRow))] #[cfg_attr(feature = "diesel-bindings", diesel(sql_type = diesel::sql_types::Text))] @@ -124,19 +118,15 @@ impl AsRef for &Role { } } -#[derive( - Debug, - Clone, - PartialEq, - Eq, - PartialOrd, - Ord, - Hash, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] #[cfg_attr(feature = "diesel-bindings", derive(AsExpression, FromSqlRow))] #[cfg_attr(feature = "diesel-bindings", diesel(sql_type = diesel::sql_types::Text))] @@ -174,7 +164,7 @@ pub trait ExternalIdPart { } pub trait UuidPart { - fn uuid_part(&self) -> &Uuid; + fn uuid_part(&self) -> Uuid; } /// Transform a chronicle IRI into its compact representation @@ -199,19 +189,15 @@ impl FromCompact for T { } } -#[derive( - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, - PartialEq, - Eq, - Hash, - Debug, - Clone, - Ord, - PartialOrd, +#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone, Ord, PartialOrd)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] pub enum ChronicleIri { Namespace(NamespaceId), @@ -224,6 +210,7 @@ pub enum ChronicleIri { Delegation(DelegationId), } +#[cfg(feature = "parity-encoding")] impl parity_scale_codec::MaxEncodedLen for ChronicleIri { fn max_encoded_len() -> usize { 2048usize @@ -343,19 +330,15 @@ fn optional_component(external_id: &str, component: &str) -> Result for UriAbsoluteString { } // A composite identifier of agent, activity and role -#[derive( - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, - PartialEq, - Eq, - Hash, - Debug, - Clone, - Ord, - PartialOrd, +#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone, Ord, PartialOrd)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] pub struct AssociationId { agent: ExternalId, @@ -540,19 +519,15 @@ impl From<&AssociationId> for UriAbsoluteString { } // A composite identifier of agent, entity, and role -#[derive( - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, - PartialEq, - Eq, - Hash, - Debug, - Clone, - Ord, - PartialOrd, +#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone, Ord, PartialOrd)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] pub struct AttributionId { agent: ExternalId, @@ -631,19 +606,15 @@ impl From<&AttributionId> for UriAbsoluteString { } } -#[derive( - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, - PartialEq, - Eq, - Hash, - Debug, - Clone, - Ord, - PartialOrd, +#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone, Ord, PartialOrd)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] pub struct DomaintypeId(ExternalId); @@ -698,57 +669,19 @@ impl From<&DomaintypeId> for UriAbsoluteString { } } -#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug, Hash, PartialOrd, Ord)] -pub struct UuidWrapper(Uuid); - -impl From for UuidWrapper { - fn from(uuid: Uuid) -> Self { - Self(uuid) - } -} - -impl Encode for UuidWrapper { - fn encode_to(&self, dest: &mut T) { - self.0.as_bytes().encode_to(dest); - } -} - -impl Decode for UuidWrapper { - fn decode( - input: &mut I, - ) -> Result { - let uuid_bytes = <[u8; 16]>::decode(input)?; - let uuid = Uuid::from_slice(&uuid_bytes).map_err(|_| "Error decoding UUID")?; - Ok(Self(uuid)) - } -} - -impl TypeInfo for UuidWrapper { - type Identity = Self; - fn type_info() -> Type { - Type::builder() - .path(Path::new("UuidWrapper", module_path!())) - .composite(Fields::unnamed().field(|f| f.ty::<[u8; 16]>().type_name("Uuid"))) - } -} - -#[derive( - Serialize, - Deserialize, - Decode, - Encode, - TypeInfo, - PartialEq, - Eq, - Hash, - Debug, - Clone, - Ord, - PartialOrd, +#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone, Ord, PartialOrd)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] pub struct NamespaceId { external_id: ExternalId, - uuid: UuidWrapper, + uuid: [u8; 16], } impl core::fmt::Display for NamespaceId { @@ -759,7 +692,7 @@ impl core::fmt::Display for NamespaceId { impl NamespaceId { pub fn from_external_id(external_id: impl AsRef, uuid: Uuid) -> Self { - Self { external_id: external_id.as_ref().into(), uuid: uuid.into() } + Self { external_id: external_id.as_ref().into(), uuid: uuid.into_bytes() } } } @@ -770,8 +703,8 @@ impl ExternalIdPart for NamespaceId { } impl UuidPart for NamespaceId { - fn uuid_part(&self) -> &Uuid { - &self.uuid.0 + fn uuid_part(&self) -> Uuid { + Uuid::from_bytes(self.uuid) } } @@ -798,7 +731,7 @@ impl TryFrom for NamespaceId { match iri.path_components().collect::>().as_slice() { [_, external_id, uuid] => Ok(Self { external_id: ExternalId::from(external_id), - uuid: Uuid::parse_str(uuid).map_err(ParseIriError::UnparsableUuid)?.into(), + uuid: Uuid::parse_str(uuid).map_err(ParseIriError::UnparsableUuid)?.into_bytes(), }), _ => Err(ParseIriError::UnparsableIri(iri.to_string())), @@ -808,23 +741,19 @@ impl TryFrom for NamespaceId { impl From<&NamespaceId> for UriAbsoluteString { fn from(val: &NamespaceId) -> Self { - Chronicle::namespace(&val.external_id, &val.uuid.0).into() - } -} - -#[derive( - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, - PartialEq, - Eq, - Hash, - Debug, - Clone, - Ord, - PartialOrd, + Chronicle::namespace(&val.external_id, &val.uuid_part()).into() + } +} + +#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone, Ord, PartialOrd)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] pub struct EntityId(ExternalId); @@ -897,19 +826,15 @@ impl From for EntityId { } } -#[derive( - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, - PartialEq, - Eq, - Hash, - Debug, - Clone, - Ord, - PartialOrd, +#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone, Ord, PartialOrd)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] pub struct AgentId(ExternalId); @@ -980,19 +905,15 @@ impl From for AgentId { } } -#[derive( - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, - PartialEq, - Eq, - Hash, - Debug, - Clone, - Ord, - PartialOrd, +#[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Debug, Clone, Ord, PartialOrd)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] pub struct ActivityId(ExternalId); diff --git a/crates/common/src/prov/model/contradiction.rs b/crates/common/src/prov/model/contradiction.rs index 2ef602dfc..d5030a6b0 100644 --- a/crates/common/src/prov/model/contradiction.rs +++ b/crates/common/src/prov/model/contradiction.rs @@ -1,5 +1,4 @@ use chrono::{DateTime, Utc}; -use scale_info::TypeInfo; #[cfg(not(feature = "std"))] use parity_scale_codec::{alloc::string::String, alloc::vec::Vec}; @@ -12,9 +11,11 @@ use crate::{ prov::{operations::TimeWrapper, ChronicleIri, NamespaceId}, }; -use parity_scale_codec::{Decode, Encode}; - -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Encode, Decode, TypeInfo)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) +)] pub struct Contradiction { pub(crate) id: ChronicleIri, pub(crate) namespace: NamespaceId, @@ -113,7 +114,11 @@ impl Contradiction { } } -#[derive(Debug, Clone, Encode, Decode, TypeInfo, Serialize, Deserialize, Eq, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) +)] pub enum ContradictionDetail { AttributeValueChange { name: String, value: Attribute, attempted: Attribute }, StartAlteration { value: TimeWrapper, attempted: TimeWrapper }, diff --git a/crates/common/src/prov/model/json_ld/from_json_ld.rs b/crates/common/src/prov/model/json_ld/from_json_ld.rs index b45f2fb76..7abd325b4 100644 --- a/crates/common/src/prov/model/json_ld/from_json_ld.rs +++ b/crates/common/src/prov/model/json_ld/from_json_ld.rs @@ -678,11 +678,7 @@ impl ChronicleOperation { let namespace = o.namespace(); let external_id = namespace.external_id_part().to_owned(); let uuid = namespace.uuid_part().to_owned(); - Ok(ChronicleOperation::CreateNamespace(CreateNamespace { - id: namespace, - external_id, - uuid: uuid.into(), - })) + Ok(ChronicleOperation::CreateNamespace(CreateNamespace { id: namespace })) } else if o.has_type(&id_from_iri_string(ChronicleOperations::AgentExists)) { let namespace = o.namespace(); let agent = o.agent(); diff --git a/crates/common/src/prov/model/mod.rs b/crates/common/src/prov/model/mod.rs index 9b48f76a5..48e67bbf9 100644 --- a/crates/common/src/prov/model/mod.rs +++ b/crates/common/src/prov/model/mod.rs @@ -4,8 +4,6 @@ pub use contradiction::Contradiction; pub mod json_ld; pub mod transaction; -use parity_scale_codec::{Decode, Encode}; - use core::{convert::Infallible, fmt::Debug}; #[cfg(not(feature = "std"))] use parity_scale_codec::{ @@ -13,7 +11,6 @@ use parity_scale_codec::{ alloc::string::String, alloc::vec::Vec, }; -use scale_info::TypeInfo; #[cfg(not(feature = "std"))] use scale_info::{ prelude::borrow::ToOwned, prelude::string::ToString, prelude::sync::Arc, prelude::*, @@ -48,7 +45,7 @@ use super::{ StartActivity, TimeWrapper, WasAssociatedWith, WasGeneratedBy, WasInformedBy, }, ActivityId, AgentId, AssociationId, AttributionId, ChronicleIri, DelegationId, DomaintypeId, - EntityId, ExternalId, ExternalIdPart, NamespaceId, Role, UuidPart, UuidWrapper, + EntityId, ExternalId, ExternalIdPart, NamespaceId, Role, UuidPart, }; #[derive(Error, Debug)] @@ -115,7 +112,11 @@ pub enum ChronicleTransactionIdError { InvalidTransactionId { id: String }, } -#[derive(Serialize, Deserialize, Encode, Decode, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct ChronicleTransactionId(String); impl core::fmt::Display for ChronicleTransactionId { @@ -141,20 +142,28 @@ impl ChronicleTransactionId { } } -#[derive(Debug, Clone, Encode, Decode, TypeInfo, PartialEq, Eq, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) +)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Namespace { pub id: NamespaceId, - pub uuid: UuidWrapper, + pub uuid: [u8; 16], pub external_id: ExternalId, } impl Namespace { pub fn new(id: NamespaceId, uuid: Uuid, external_id: &ExternalId) -> Self { - Self { id, uuid: uuid.into(), external_id: external_id.to_owned() } + Self { id, uuid: uuid.into_bytes(), external_id: external_id.to_owned() } } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Encode, Decode, TypeInfo)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) +)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Agent { pub id: AgentId, pub namespaceid: NamespaceId, @@ -188,7 +197,11 @@ impl Agent { } } -#[derive(Debug, Clone, Encode, Decode, TypeInfo, PartialEq, Eq, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) +)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Activity { pub id: ActivityId, pub namespaceid: NamespaceId, @@ -227,7 +240,11 @@ impl Activity { } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Encode, Decode, TypeInfo)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) +)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Entity { pub id: EntityId, pub namespaceid: NamespaceId, @@ -259,19 +276,10 @@ impl Entity { } } -#[derive( - Debug, - Clone, - PartialEq, - Eq, - Hash, - Ord, - PartialOrd, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) )] pub struct Derivation { pub generated_id: EntityId, @@ -280,19 +288,10 @@ pub struct Derivation { pub typ: DerivationType, } -#[derive( - Debug, - Clone, - PartialEq, - Eq, - Hash, - Ord, - PartialOrd, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) )] pub struct Delegation { pub namespace_id: NamespaceId, @@ -327,20 +326,12 @@ impl Delegation { } } -#[derive( - Debug, - Clone, - PartialEq, - Eq, - Hash, - Ord, - PartialOrd, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) )] + pub struct Association { pub namespace_id: NamespaceId, pub id: AssociationId, @@ -366,76 +357,40 @@ impl Association { } } -#[derive( - Debug, - Clone, - PartialEq, - Eq, - Hash, - Ord, - PartialOrd, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) )] pub struct Usage { pub activity_id: ActivityId, pub entity_id: EntityId, } -#[derive( - Debug, - Clone, - PartialEq, - Eq, - Hash, - Ord, - PartialOrd, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) )] pub struct Generation { pub activity_id: ActivityId, pub generated_id: EntityId, } -#[derive( - Debug, - Clone, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) )] pub struct GeneratedEntity { pub entity_id: EntityId, pub generated_id: ActivityId, } -#[derive( - Debug, - Clone, - PartialEq, - Eq, - Hash, - Ord, - PartialOrd, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) )] pub struct Attribution { pub namespace_id: NamespaceId, @@ -467,7 +422,11 @@ type NamespacedAgent = NamespacedId; type NamespacedEntity = NamespacedId; type NamespacedActivity = NamespacedId; -#[derive(Debug, Default, Clone, PartialEq, Eq, Encode, Decode, TypeInfo)] +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) +)] +#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq, Eq)] pub struct ProvModel { pub namespaces: BTreeMap>, pub agents: BTreeMap>, @@ -484,6 +443,59 @@ pub struct ProvModel { pub usage: BTreeMap>>, } +#[cfg(feature = "parity-encoding")] +pub mod provmodel_protocol { + use super::*; + #[derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + Debug, + Default, + Clone, + Serialize, + Deserialize, + PartialEq, + Eq, + )] + pub struct ProvModelV1 { + pub namespaces: BTreeMap>, // We need NamespaceIdV1 / NamespaceV1 etc, recursively until there are only primitive types + pub agents: BTreeMap>, + pub acted_on_behalf_of: BTreeMap>>, + pub delegation: BTreeMap>>, + pub entities: BTreeMap>, + pub derivation: BTreeMap>>, + pub generation: BTreeMap>>, + pub attribution: BTreeMap>>, + pub activities: BTreeMap>, + pub was_informed_by: BTreeMap>>, + pub generated: BTreeMap>>, + pub association: BTreeMap>>, + pub usage: BTreeMap>>, + } + + impl From for ProvModel { + fn from(value: ProvModelV1) -> Self { + ProvModel { + namespaces: value.namespaces, + agents: value.agents, + acted_on_behalf_of: value.acted_on_behalf_of, + delegation: value.delegation, + entities: value.entities, + derivation: value.derivation, + generation: value.generation, + attribution: value.attribution, + activities: value.activities, + was_informed_by: value.was_informed_by, + generated: value.generated, + association: value.association, + usage: value.usage, + } + } + } +} + +#[cfg(feature = "parity-encoding")] // TODO: We can make these structures reasonably bounded (and copy ids with interning) - though JSON // attributes may need some handwaving impl parity_scale_codec::MaxEncodedLen for ProvModel { @@ -683,7 +695,7 @@ impl ProvModel { ns.clone(), Namespace { id: ns.clone(), - uuid: uuid.to_owned().into(), + uuid: uuid.into_bytes(), external_id: namespace_name.to_owned(), } .into(), @@ -769,11 +781,7 @@ impl ProvModel { pub fn apply(&mut self, tx: &ChronicleOperation) -> Result<(), Contradiction> { let tx = tx.to_owned(); match tx { - ChronicleOperation::CreateNamespace(CreateNamespace { - id, - external_id: _, - uuid: _, - }) => { + ChronicleOperation::CreateNamespace(CreateNamespace { id }) => { self.namespace_context(&id); Ok(()) }, diff --git a/crates/common/src/prov/model/proptest.rs b/crates/common/src/prov/model/proptest.rs index 7d9d50459..431930677 100644 --- a/crates/common/src/prov/model/proptest.rs +++ b/crates/common/src/prov/model/proptest.rs @@ -599,7 +599,6 @@ proptest! { let serialized_prov = prov_from_json_ld(lhs_json.clone()); - prop_assert_eq!(&prov, &serialized_prov, "Prov reserialisation compact: \n{} expanded \n {}", serde_json::to_string_pretty(&lhs_json).unwrap(), serde_json::to_string_pretty(&lhs_json_expanded).unwrap()); diff --git a/crates/common/src/prov/operations.rs b/crates/common/src/prov/operations.rs index 046973ddf..33b6e3c4d 100644 --- a/crates/common/src/prov/operations.rs +++ b/crates/common/src/prov/operations.rs @@ -13,31 +13,22 @@ use diesel::{ #[cfg(not(feature = "std"))] use parity_scale_codec::alloc::string::String; -use parity_scale_codec::{Decode, Encode, Error, Input}; -use scale_info::{build::Fields, Path, Type, TypeInfo}; -use uuid::Uuid; - use crate::attributes::Attributes; use super::{ ActivityId, AgentId, AssociationId, AttributionId, DelegationId, EntityId, ExternalId, - NamespaceId, Role, UuidWrapper, + NamespaceId, Role, }; -#[derive( - Debug, - Copy, - Clone, - PartialEq, - Ord, - PartialOrd, - Eq, - Hash, - Serialize, - Deserialize, - Encode, - Decode, - TypeInfo, +#[derive(Debug, Copy, Clone, PartialEq, Ord, PartialOrd, Eq, Hash, Serialize, Deserialize)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) )] #[cfg_attr(feature = "diesel-bindings", derive(AsExpression, SqlType, QueryId))] #[cfg_attr(feature = "diesel-bindings", diesel(sql_type = Integer))] @@ -112,20 +103,36 @@ impl DerivationType { } } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct CreateNamespace { pub id: NamespaceId, - pub external_id: ExternalId, - pub uuid: UuidWrapper, } impl CreateNamespace { - pub fn new(id: NamespaceId, external_id: impl AsRef, uuid: Uuid) -> Self { - Self { id, external_id: external_id.as_ref().into(), uuid: uuid.into() } + pub fn new(id: NamespaceId) -> Self { + Self { id } } } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct AgentExists { pub namespace: NamespaceId, pub external_id: ExternalId, @@ -137,7 +144,16 @@ impl AgentExists { } } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct ActsOnBehalfOf { pub id: DelegationId, pub role: Option, @@ -170,8 +186,16 @@ impl ActsOnBehalfOf { } } } - -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct ActivityExists { pub namespace: NamespaceId, pub external_id: ExternalId, @@ -198,7 +222,22 @@ impl From> for TimeWrapper { } } -impl Encode for TimeWrapper { +#[cfg(feature = "parity-encoding")] +impl scale_encode::EncodeAsType for TimeWrapper { + fn encode_as_type_to( + &self, + type_id: u32, + types: &scale_info::PortableRegistry, + out: &mut scale_encode::Vec, + ) -> Result<(), scale_encode::Error> { + let timestamp = self.0.timestamp(); + let subsec_nanos = self.0.timestamp_subsec_nanos(); + (timestamp, subsec_nanos).encode_as_type_to(type_id, types, out) + } +} + +#[cfg(feature = "parity-encoding")] +impl parity_scale_codec::Encode for TimeWrapper { fn encode_to(&self, dest: &mut T) { let timestamp = self.0.timestamp(); let subsec_nanos = self.0.timestamp_subsec_nanos(); @@ -206,8 +245,11 @@ impl Encode for TimeWrapper { } } -impl Decode for TimeWrapper { - fn decode(input: &mut I) -> Result { +#[cfg(feature = "parity-encoding")] +impl parity_scale_codec::Decode for TimeWrapper { + fn decode( + input: &mut I, + ) -> Result { let (timestamp, subsec_nanos) = <(i64, u32)>::decode(input)?; let datetime = Utc.from_utc_datetime( @@ -219,53 +261,110 @@ impl Decode for TimeWrapper { } } -impl TypeInfo for TimeWrapper { +#[cfg(feature = "parity-encoding")] +impl scale_info::TypeInfo for TimeWrapper { type Identity = Self; - fn type_info() -> Type { - Type::builder().path(Path::new("TimeWrapper", module_path!())).composite( - Fields::unnamed() - .field(|f| f.ty::().type_name("Timestamp")) - .field(|f| f.ty::().type_name("SubsecNanos")), - ) + fn type_info() -> scale_info::Type { + scale_info::Type::builder() + .path(scale_info::Path::new("TimeWrapper", module_path!())) + .composite( + scale_info::build::Fields::unnamed() + .field(|f| f.ty::().type_name("Timestamp")) + .field(|f| f.ty::().type_name("SubsecNanos")), + ) } } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct StartActivity { pub namespace: NamespaceId, pub id: ActivityId, pub time: TimeWrapper, } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct EndActivity { pub namespace: NamespaceId, pub id: ActivityId, pub time: TimeWrapper, } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct ActivityUses { pub namespace: NamespaceId, pub id: EntityId, pub activity: ActivityId, } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct EntityExists { pub namespace: NamespaceId, pub external_id: ExternalId, } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct WasGeneratedBy { pub namespace: NamespaceId, pub id: EntityId, pub activity: ActivityId, } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct EntityDerive { pub namespace: NamespaceId, pub id: EntityId, @@ -274,7 +373,16 @@ pub struct EntityDerive { pub typ: DerivationType, } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct WasAssociatedWith { pub id: AssociationId, pub role: Option, @@ -300,7 +408,16 @@ impl WasAssociatedWith { } } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct WasAttributedTo { pub id: AttributionId, pub role: Option, @@ -326,21 +443,48 @@ impl WasAttributedTo { } } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct WasInformedBy { pub namespace: NamespaceId, pub activity: ActivityId, pub informing_activity: ActivityId, } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub enum SetAttributes { Entity { namespace: NamespaceId, id: EntityId, attributes: Attributes }, Agent { namespace: NamespaceId, id: AgentId, attributes: Attributes }, Activity { namespace: NamespaceId, id: ActivityId, attributes: Attributes }, } -#[derive(Serialize, Deserialize, Encode, Decode, TypeInfo, PartialEq, Eq, Debug, Clone)] +#[cfg_attr( + feature = "parity-encoding", + derive( + scale_info::TypeInfo, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + scale_encode::EncodeAsType + ) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub enum ChronicleOperation { CreateNamespace(CreateNamespace), AgentExists(AgentExists), diff --git a/crates/common/tree.txt b/crates/common/tree.txt new file mode 100644 index 000000000..0f048f06f --- /dev/null +++ b/crates/common/tree.txt @@ -0,0 +1,465 @@ +common v0.7.5 (/Users/ryan/code/chronicle/crates/common) +├── anyhow v1.0.75 +├── async-trait v0.1.74 (proc-macro) +│ ├── proc-macro2 v1.0.69 +│ │ └── unicode-ident v1.0.12 +│ ├── quote v1.0.33 +│ │ └── proc-macro2 v1.0.69 (*) +│ └── syn v2.0.38 +│ ├── proc-macro2 v1.0.69 (*) +│ ├── quote v1.0.33 (*) +│ └── unicode-ident v1.0.12 +├── chrono v0.4.31 +│ ├── iana-time-zone v0.1.58 +│ │ └── core-foundation-sys v0.8.4 +│ ├── num-traits v0.2.17 +│ │ └── libm v0.2.8 +│ │ [build-dependencies] +│ │ └── autocfg v1.1.0 +│ └── serde v1.0.190 +│ └── serde_derive v1.0.190 (proc-macro) +│ ├── proc-macro2 v1.0.69 (*) +│ ├── quote v1.0.33 (*) +│ └── syn v2.0.38 (*) +├── futures v0.3.29 +│ ├── futures-channel v0.3.29 +│ │ ├── futures-core v0.3.29 +│ │ └── futures-sink v0.3.29 +│ ├── futures-core v0.3.29 +│ ├── futures-executor v0.3.29 +│ │ ├── futures-core v0.3.29 +│ │ ├── futures-task v0.3.29 +│ │ └── futures-util v0.3.29 +│ │ ├── futures-channel v0.3.29 (*) +│ │ ├── futures-core v0.3.29 +│ │ ├── futures-io v0.3.29 +│ │ ├── futures-macro v0.3.29 (proc-macro) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v2.0.38 (*) +│ │ ├── futures-sink v0.3.29 +│ │ ├── futures-task v0.3.29 +│ │ ├── memchr v2.6.4 +│ │ ├── pin-project-lite v0.2.13 +│ │ ├── pin-utils v0.1.0 +│ │ └── slab v0.4.9 +│ │ [build-dependencies] +│ │ └── autocfg v1.1.0 +│ ├── futures-io v0.3.29 +│ ├── futures-sink v0.3.29 +│ ├── futures-task v0.3.29 +│ └── futures-util v0.3.29 (*) +├── glob v0.3.1 +├── hex v0.4.3 +├── iref v2.2.3 +│ ├── pct-str v1.2.0 +│ │ └── utf8-decode v1.0.1 +│ └── smallvec v1.11.1 +├── iref-enum v2.1.0 (proc-macro) +│ ├── iref v2.2.3 (*) +│ ├── proc-macro2 v1.0.69 (*) +│ ├── quote v1.0.33 (*) +│ └── syn v1.0.109 +│ ├── proc-macro2 v1.0.69 (*) +│ ├── quote v1.0.33 (*) +│ └── unicode-ident v1.0.12 +├── k256 v0.11.6 +│ ├── cfg-if v1.0.0 +│ ├── ecdsa v0.14.8 +│ │ ├── der v0.6.1 +│ │ │ ├── const-oid v0.9.5 +│ │ │ ├── pem-rfc7468 v0.6.0 +│ │ │ │ └── base64ct v1.6.0 +│ │ │ └── zeroize v1.6.0 +│ │ ├── elliptic-curve v0.12.3 +│ │ │ ├── base16ct v0.1.1 +│ │ │ ├── crypto-bigint v0.4.9 +│ │ │ │ ├── generic-array v0.14.7 +│ │ │ │ │ └── typenum v1.17.0 +│ │ │ │ │ [build-dependencies] +│ │ │ │ │ └── version_check v0.9.4 +│ │ │ │ ├── rand_core v0.6.4 +│ │ │ │ │ └── getrandom v0.2.10 +│ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ └── libc v0.2.149 +│ │ │ │ ├── subtle v2.4.1 +│ │ │ │ └── zeroize v1.6.0 +│ │ │ ├── der v0.6.1 (*) +│ │ │ ├── digest v0.10.7 +│ │ │ │ ├── block-buffer v0.10.4 +│ │ │ │ │ └── generic-array v0.14.7 (*) +│ │ │ │ ├── crypto-common v0.1.6 +│ │ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ │ └── typenum v1.17.0 +│ │ │ │ └── subtle v2.4.1 +│ │ │ ├── ff v0.12.1 +│ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ └── subtle v2.4.1 +│ │ │ ├── generic-array v0.14.7 (*) +│ │ │ ├── group v0.12.1 +│ │ │ │ ├── ff v0.12.1 (*) +│ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ └── subtle v2.4.1 +│ │ │ ├── pem-rfc7468 v0.6.0 (*) +│ │ │ ├── pkcs8 v0.9.0 +│ │ │ │ ├── der v0.6.1 (*) +│ │ │ │ └── spki v0.6.0 +│ │ │ │ ├── base64ct v1.6.0 +│ │ │ │ └── der v0.6.1 (*) +│ │ │ ├── rand_core v0.6.4 (*) +│ │ │ ├── sec1 v0.3.0 +│ │ │ │ ├── base16ct v0.1.1 +│ │ │ │ ├── der v0.6.1 (*) +│ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ ├── pkcs8 v0.9.0 (*) +│ │ │ │ ├── serdect v0.1.0 +│ │ │ │ │ ├── base16ct v0.1.1 +│ │ │ │ │ └── serde v1.0.190 (*) +│ │ │ │ ├── subtle v2.4.1 +│ │ │ │ └── zeroize v1.6.0 +│ │ │ ├── serdect v0.1.0 (*) +│ │ │ ├── subtle v2.4.1 +│ │ │ └── zeroize v1.6.0 +│ │ ├── rfc6979 v0.3.1 +│ │ │ ├── crypto-bigint v0.4.9 (*) +│ │ │ ├── hmac v0.12.1 +│ │ │ │ └── digest v0.10.7 (*) +│ │ │ └── zeroize v1.6.0 +│ │ ├── serdect v0.1.0 (*) +│ │ └── signature v1.6.4 +│ │ ├── digest v0.10.7 (*) +│ │ └── rand_core v0.6.4 (*) +│ ├── elliptic-curve v0.12.3 (*) +│ ├── serdect v0.1.0 (*) +│ └── sha2 v0.10.8 +│ ├── cfg-if v1.0.0 +│ ├── cpufeatures v0.2.11 +│ │ └── libc v0.2.149 +│ └── digest v0.10.7 (*) +├── lazy_static v1.4.0 +├── locspan v0.7.16 +├── macro-attr-2018 v3.0.0 +├── mime v0.3.17 +├── newtype-derive-2018 v0.2.1 +│ └── generics v0.5.0 +├── parity-scale-codec v3.6.5 +│ ├── arrayvec v0.7.4 +│ ├── byte-slice-cast v1.2.2 +│ ├── impl-trait-for-tuples v0.2.2 (proc-macro) +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v1.0.109 (*) +│ ├── parity-scale-codec-derive v3.6.5 (proc-macro) +│ │ ├── proc-macro-crate v1.1.3 +│ │ │ ├── thiserror v1.0.50 +│ │ │ │ └── thiserror-impl v1.0.50 (proc-macro) +│ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ └── syn v2.0.38 (*) +│ │ │ └── toml v0.5.11 +│ │ │ └── serde v1.0.190 (*) +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v1.0.109 (*) +│ └── serde v1.0.190 (*) +├── percent-encoding v2.3.0 +├── scale-info v2.10.0 +│ ├── cfg-if v1.0.0 +│ ├── derive_more v0.99.17 (proc-macro) +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v1.0.109 (*) +│ ├── parity-scale-codec v3.6.5 (*) +│ └── scale-info-derive v2.10.0 (proc-macro) +│ ├── proc-macro-crate v1.1.3 (*) +│ ├── proc-macro2 v1.0.69 (*) +│ ├── quote v1.0.33 (*) +│ └── syn v1.0.109 (*) +├── serde v1.0.190 (*) +├── serde_derive v1.0.190 (proc-macro) (*) +├── serde_json v1.0.107 +│ ├── itoa v1.0.9 +│ ├── ryu v1.0.15 +│ └── serde v1.0.190 (*) +├── static-iref v2.0.0 (proc-macro) +│ └── iref v2.2.3 (*) +├── thiserror v1.0.50 (*) +├── thiserror-no-std v2.0.2 +│ └── thiserror-impl-no-std v2.0.2 (proc-macro) +│ ├── proc-macro2 v1.0.69 (*) +│ ├── quote v1.0.33 (*) +│ └── syn v1.0.109 (*) +├── tracing v0.1.40 +│ ├── pin-project-lite v0.2.13 +│ ├── tracing-attributes v0.1.27 (proc-macro) +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v2.0.38 (*) +│ └── tracing-core v0.1.32 +│ └── once_cell v1.18.0 +├── url v2.4.1 +│ ├── form_urlencoded v1.2.0 +│ │ └── percent-encoding v2.3.0 +│ ├── idna v0.4.0 +│ │ ├── unicode-bidi v0.3.13 +│ │ └── unicode-normalization v0.1.22 +│ │ └── tinyvec v1.6.0 +│ │ └── tinyvec_macros v0.1.1 +│ └── percent-encoding v2.3.0 +└── uuid v1.5.0 + └── serde v1.0.190 (*) +[build-dependencies] +├── glob v0.3.1 +├── lazy_static v1.4.0 +└── serde_json v1.0.107 (*) +[dev-dependencies] +├── criterion v0.5.1 +│ ├── anes v0.1.6 +│ ├── cast v0.3.0 +│ ├── ciborium v0.2.1 +│ │ ├── ciborium-io v0.2.1 +│ │ ├── ciborium-ll v0.2.1 +│ │ │ ├── ciborium-io v0.2.1 +│ │ │ └── half v1.8.2 +│ │ └── serde v1.0.190 (*) +│ ├── clap v4.4.7 +│ │ └── clap_builder v4.4.7 +│ │ ├── anstyle v1.0.4 +│ │ └── clap_lex v0.6.0 +│ ├── criterion-plot v0.5.0 +│ │ ├── cast v0.3.0 +│ │ └── itertools v0.10.5 +│ │ └── either v1.9.0 +│ ├── futures v0.3.29 (*) +│ ├── is-terminal v0.4.9 +│ │ └── rustix v0.38.21 +│ │ ├── bitflags v2.4.1 +│ │ ├── errno v0.3.5 +│ │ │ └── libc v0.2.149 +│ │ └── libc v0.2.149 +│ ├── itertools v0.10.5 (*) +│ ├── num-traits v0.2.17 (*) +│ ├── once_cell v1.18.0 +│ ├── oorandom v11.1.3 +│ ├── plotters v0.3.5 +│ │ ├── num-traits v0.2.17 (*) +│ │ ├── plotters-backend v0.3.5 +│ │ └── plotters-svg v0.3.5 +│ │ └── plotters-backend v0.3.5 +│ ├── rayon v1.8.0 +│ │ ├── either v1.9.0 +│ │ └── rayon-core v1.12.0 +│ │ ├── crossbeam-deque v0.8.3 +│ │ │ ├── cfg-if v1.0.0 +│ │ │ ├── crossbeam-epoch v0.9.15 +│ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ ├── crossbeam-utils v0.8.16 +│ │ │ │ │ └── cfg-if v1.0.0 +│ │ │ │ ├── memoffset v0.9.0 +│ │ │ │ │ [build-dependencies] +│ │ │ │ │ └── autocfg v1.1.0 +│ │ │ │ └── scopeguard v1.2.0 +│ │ │ │ [build-dependencies] +│ │ │ │ └── autocfg v1.1.0 +│ │ │ └── crossbeam-utils v0.8.16 (*) +│ │ └── crossbeam-utils v0.8.16 (*) +│ ├── regex v1.10.2 +│ │ ├── aho-corasick v1.1.2 +│ │ │ └── memchr v2.6.4 +│ │ ├── memchr v2.6.4 +│ │ ├── regex-automata v0.4.3 +│ │ │ ├── aho-corasick v1.1.2 (*) +│ │ │ ├── memchr v2.6.4 +│ │ │ └── regex-syntax v0.8.2 +│ │ └── regex-syntax v0.8.2 +│ ├── serde v1.0.190 (*) +│ ├── serde_derive v1.0.190 (proc-macro) (*) +│ ├── serde_json v1.0.107 (*) +│ ├── tinytemplate v1.2.1 +│ │ ├── serde v1.0.190 (*) +│ │ └── serde_json v1.0.107 (*) +│ ├── tokio v1.33.0 +│ │ ├── bytes v1.5.0 +│ │ ├── libc v0.2.149 +│ │ ├── mio v0.8.9 +│ │ │ └── libc v0.2.149 +│ │ ├── num_cpus v1.16.0 +│ │ │ └── libc v0.2.149 +│ │ ├── parking_lot v0.12.1 +│ │ │ ├── lock_api v0.4.11 +│ │ │ │ └── scopeguard v1.2.0 +│ │ │ │ [build-dependencies] +│ │ │ │ └── autocfg v1.1.0 +│ │ │ └── parking_lot_core v0.9.9 +│ │ │ ├── cfg-if v1.0.0 +│ │ │ ├── libc v0.2.149 +│ │ │ └── smallvec v1.11.1 +│ │ ├── pin-project-lite v0.2.13 +│ │ ├── signal-hook-registry v1.4.1 +│ │ │ └── libc v0.2.149 +│ │ ├── socket2 v0.5.5 +│ │ │ └── libc v0.2.149 +│ │ └── tokio-macros v2.1.0 (proc-macro) +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v2.0.38 (*) +│ └── walkdir v2.4.0 +│ └── same-file v1.0.6 +├── insta v1.34.0 +│ ├── console v0.15.7 +│ │ ├── lazy_static v1.4.0 +│ │ └── libc v0.2.149 +│ ├── lazy_static v1.4.0 +│ ├── linked-hash-map v0.5.6 +│ ├── pest v2.7.5 +│ │ ├── memchr v2.6.4 +│ │ ├── thiserror v1.0.50 (*) +│ │ └── ucd-trie v0.1.6 +│ ├── pest_derive v2.7.5 (proc-macro) +│ │ ├── pest v2.7.5 (*) +│ │ └── pest_generator v2.7.5 +│ │ ├── pest v2.7.5 (*) +│ │ ├── pest_meta v2.7.5 +│ │ │ ├── once_cell v1.18.0 +│ │ │ └── pest v2.7.5 (*) +│ │ │ [build-dependencies] +│ │ │ └── sha2 v0.10.8 +│ │ │ ├── cfg-if v1.0.0 +│ │ │ ├── cpufeatures v0.2.11 (*) +│ │ │ └── digest v0.10.7 +│ │ │ ├── block-buffer v0.10.4 (*) +│ │ │ └── crypto-common v0.1.6 +│ │ │ ├── generic-array v0.14.7 (*) +│ │ │ └── typenum v1.17.0 +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v2.0.38 (*) +│ ├── serde v1.0.190 (*) +│ ├── similar v2.3.0 +│ ├── toml v0.5.11 (*) +│ └── yaml-rust v0.4.5 +│ └── linked-hash-map v0.5.6 +├── mockito v1.2.0 +│ ├── assert-json-diff v2.0.2 +│ │ ├── serde v1.0.190 (*) +│ │ └── serde_json v1.0.107 (*) +│ ├── colored v2.0.4 +│ │ ├── is-terminal v0.4.9 (*) +│ │ └── lazy_static v1.4.0 +│ ├── futures v0.3.29 (*) +│ ├── hyper v0.14.27 +│ │ ├── bytes v1.5.0 +│ │ ├── futures-channel v0.3.29 (*) +│ │ ├── futures-core v0.3.29 +│ │ ├── futures-util v0.3.29 (*) +│ │ ├── h2 v0.3.21 +│ │ │ ├── bytes v1.5.0 +│ │ │ ├── fnv v1.0.7 +│ │ │ ├── futures-core v0.3.29 +│ │ │ ├── futures-sink v0.3.29 +│ │ │ ├── futures-util v0.3.29 (*) +│ │ │ ├── http v0.2.9 +│ │ │ │ ├── bytes v1.5.0 +│ │ │ │ ├── fnv v1.0.7 +│ │ │ │ └── itoa v1.0.9 +│ │ │ ├── indexmap v1.9.3 +│ │ │ │ └── hashbrown v0.12.3 +│ │ │ │ [build-dependencies] +│ │ │ │ └── autocfg v1.1.0 +│ │ │ ├── slab v0.4.9 (*) +│ │ │ ├── tokio v1.33.0 (*) +│ │ │ ├── tokio-util v0.7.10 +│ │ │ │ ├── bytes v1.5.0 +│ │ │ │ ├── futures-core v0.3.29 +│ │ │ │ ├── futures-sink v0.3.29 +│ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ ├── tokio v1.33.0 (*) +│ │ │ │ └── tracing v0.1.40 (*) +│ │ │ └── tracing v0.1.40 (*) +│ │ ├── http v0.2.9 (*) +│ │ ├── http-body v0.4.5 +│ │ │ ├── bytes v1.5.0 +│ │ │ ├── http v0.2.9 (*) +│ │ │ └── pin-project-lite v0.2.13 +│ │ ├── httparse v1.8.0 +│ │ ├── httpdate v1.0.3 +│ │ ├── itoa v1.0.9 +│ │ ├── pin-project-lite v0.2.13 +│ │ ├── socket2 v0.4.10 +│ │ │ └── libc v0.2.149 +│ │ ├── tokio v1.33.0 (*) +│ │ ├── tower-service v0.3.2 +│ │ ├── tracing v0.1.40 (*) +│ │ └── want v0.3.1 +│ │ └── try-lock v0.2.4 +│ ├── log v0.4.20 +│ ├── rand v0.8.5 +│ │ ├── libc v0.2.149 +│ │ ├── rand_chacha v0.3.1 +│ │ │ ├── ppv-lite86 v0.2.17 +│ │ │ └── rand_core v0.6.4 (*) +│ │ └── rand_core v0.6.4 (*) +│ ├── regex v1.10.2 (*) +│ ├── serde_json v1.0.107 (*) +│ ├── serde_urlencoded v0.7.1 +│ │ ├── form_urlencoded v1.2.0 (*) +│ │ ├── itoa v1.0.9 +│ │ ├── ryu v1.0.15 +│ │ └── serde v1.0.190 (*) +│ ├── similar v2.3.0 +│ └── tokio v1.33.0 (*) +├── proptest v1.3.1 +│ ├── bit-set v0.5.3 +│ │ └── bit-vec v0.6.3 +│ ├── bit-vec v0.6.3 +│ ├── bitflags v2.4.1 +│ ├── lazy_static v1.4.0 +│ ├── num-traits v0.2.17 (*) +│ ├── rand v0.8.5 (*) +│ ├── rand_chacha v0.3.1 (*) +│ ├── rand_xorshift v0.3.0 +│ │ └── rand_core v0.6.4 (*) +│ ├── regex-syntax v0.7.5 +│ ├── rusty-fork v0.3.0 +│ │ ├── fnv v1.0.7 +│ │ ├── quick-error v1.2.3 +│ │ ├── tempfile v3.8.1 +│ │ │ ├── cfg-if v1.0.0 +│ │ │ ├── fastrand v2.0.1 +│ │ │ └── rustix v0.38.21 (*) +│ │ └── wait-timeout v0.2.0 +│ │ └── libc v0.2.149 +│ ├── tempfile v3.8.1 (*) +│ └── unarray v0.1.4 +├── tempfile v3.8.1 (*) +├── testcontainers v0.14.0 +│ ├── bollard-stubs v1.41.0 +│ │ ├── chrono v0.4.31 (*) +│ │ ├── serde v1.0.190 (*) +│ │ └── serde_with v1.14.0 +│ │ ├── serde v1.0.190 (*) +│ │ └── serde_with_macros v1.5.2 (proc-macro) +│ │ ├── darling v0.13.4 +│ │ │ ├── darling_core v0.13.4 +│ │ │ │ ├── fnv v1.0.7 +│ │ │ │ ├── ident_case v1.0.1 +│ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ ├── strsim v0.10.0 +│ │ │ │ └── syn v1.0.109 (*) +│ │ │ └── darling_macro v0.13.4 (proc-macro) +│ │ │ ├── darling_core v0.13.4 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v1.0.109 (*) +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v1.0.109 (*) +│ ├── futures v0.3.29 (*) +│ ├── hex v0.4.3 +│ ├── hmac v0.12.1 (*) +│ ├── log v0.4.20 +│ ├── rand v0.8.5 (*) +│ ├── serde v1.0.190 (*) +│ ├── serde_json v1.0.107 (*) +│ └── sha2 v0.10.8 (*) +└── tokio v1.33.0 (*) diff --git a/crates/pallet-chronicle/Cargo.toml b/crates/pallet-chronicle/Cargo.toml index 6b28e7212..8c0a9ead9 100644 --- a/crates/pallet-chronicle/Cargo.toml +++ b/crates/pallet-chronicle/Cargo.toml @@ -7,22 +7,24 @@ version = "0.7.5" [dependencies] -common = {path = "../common", default-features=false, features=["parity"]} +common = {path = "../common", default-features=false, features=["parity-encoding"]} parity-scale-codec = { version="3.6.5", default-features = false, features = ["derive"] } uuid = {version="1.5.0", default-features=false} -sp-std = { version="11.0.0", default-features = false} +sp-std = { version="12.0.0", default-features = false} scale-info = { version="2.10.0", default-features = false, features = ["derive"] } -frame-support = { version="24.0.0", default-features=false } -frame-system = { version= "24.0.0",default-features=false } -frame-benchmarking = { version = "24.0.0", default-features = false, optional=true} +frame-support = { version="25.0.0", default-features=false } +sp-core = {version="25.0.0", default-features=false } +frame-system = { version= "25.0.0",default-features=false } +frame-benchmarking = { version = "25.0.0", default-features = false, optional=true} tracing = {version="0.1.40", default-features=false, features=["attributes"]} newtype-derive-2018 = {workspace=true} macro-attr-2018 = {workspace=true} [dev-dependencies] -sp-runtime = { version="27.0.0"} -sp-io = {version="26.0.0" } -sp-core = {version="24.0.0"} +uuid = {version="1.5.0", default-features=true} +sp-runtime = { version="28.0.0"} +sp-io = {version="27.0.0" } +sp-core = {version="25.0.0"} chronicle-telemetry = {path="../chronicle-telemetry"} [features] diff --git a/crates/pallet-chronicle/src/lib.rs b/crates/pallet-chronicle/src/lib.rs index ff00c99ca..00f3ea718 100644 --- a/crates/pallet-chronicle/src/lib.rs +++ b/crates/pallet-chronicle/src/lib.rs @@ -18,12 +18,17 @@ mod tests; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; pub mod weights; -pub use common::prov::*; + +pub mod chronicle_core { + pub use common::ledger::*; + pub use common::prov::*; +} pub use weights::*; #[frame_support::pallet] pub mod pallet { use super::*; + use common::ledger::OperationSubmission; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; use sp_std::collections::btree_set::BTreeSet; @@ -40,9 +45,9 @@ pub mod pallet { /// Type representing the weight of this pallet type WeightInfo: WeightInfo; - type OperationList: Parameter - + Into> - + From> + type OperationSubmission: Parameter + + Into + + From + parity_scale_codec::Codec; } // The pallet's runtime storage items. @@ -53,6 +58,14 @@ pub mod pallet { // https://docs.substrate.io/main-docs/build/runtime-storage/#declaring-storage-items pub type Provenance = StorageMap<_, Twox128, LedgerAddress, common::prov::ProvModel>; + // The pallet's runtime storage items. + // https://docs.substrate.io/main-docs/build/runtime-storage/ + #[pallet::storage] + #[pallet::getter(fn get_value)] + // Learn more about declaring storage items: + // https://docs.substrate.io/main-docs/build/runtime-storage/#declaring-storage-items + pub type Something = StorageValue<_, u32>; + // Pallets use events to inform users when important changes are made. // https://docs.substrate.io/main-docs/build/events-errors/ #[pallet::event] @@ -102,7 +115,7 @@ pub mod pallet { common::prov::ProcessorError::Time(_) => Error::Time, common::prov::ProcessorError::Tokio => Error::Tokio, common::prov::ProcessorError::Utf8(_) => Error::Utf8, - _ => unreachable!(), //TODO: NOT THIS + _ => unreachable!(), //TODO: not this } } } @@ -112,20 +125,20 @@ pub mod pallet { // Dispatchable functions must be annotated with a weight and must return a DispatchResult. #[pallet::call] impl Pallet { - /// An example dispatchable that takes a singles value as a parameter, writes the value to - /// storage and emits an event. This function must be dispatched by a signed extrinsic. + // Apply a vector of chronicle operations, yielding an event that indicates state change or contradiction #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::apply())] - pub fn apply(origin: OriginFor, operations: T::OperationList) -> DispatchResult { + pub fn apply(origin: OriginFor, operations: T::OperationSubmission) -> DispatchResult { // Check that the extrinsic was signed and get the signer. // This function will return an error if the extrinsic is not signed. // https://docs.substrate.io/main-docs/build/origins/ let who = ensure_signed(origin)?; // Get operations and load their dependencies - let ops: Vec = operations.into(); + let sub: OperationSubmission = operations.into(); - let deps = ops.iter().flat_map(|tx| tx.dependencies()).collect::>(); + let deps = + sub.operations.iter().flat_map(|tx| tx.dependencies()).collect::>(); let initial_input_models: Vec<_> = deps .into_iter() @@ -138,7 +151,7 @@ pub mod pallet { let mut model = common::prov::ProvModel::default(); - for op in ops { + for op in sub.operations.iter() { let res = op.process(model, state.input()); match res { // A contradiction raises an event, not an error and shortcuts processing - contradiction attempts are useful provenance diff --git a/crates/pallet-chronicle/src/mock.rs b/crates/pallet-chronicle/src/mock.rs index 4d9424fdc..574578839 100644 --- a/crates/pallet-chronicle/src/mock.rs +++ b/crates/pallet-chronicle/src/mock.rs @@ -1,58 +1,56 @@ use crate as pallet_template; +use common::ledger::OperationSubmission; use frame_support::traits::{ConstU16, ConstU64}; use sp_core::H256; use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test - { - System: frame_system, - ChronicleModule: pallet_template, - } + pub enum Test + { + System: frame_system, + ChronicleModule: pallet_template, + } ); impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = u64; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; - type Block = Block; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = ConstU16<42>; - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Nonce = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Block = Block; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = ConstU16<42>; + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl pallet_template::Config for Test { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); - type OperationList = Vec; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); + type OperationSubmission = OperationSubmission; } // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into() + frame_system::GenesisConfig::::default().build_storage().unwrap().into() } diff --git a/crates/pallet-chronicle/src/tests.rs b/crates/pallet-chronicle/src/tests.rs index 3d9b18b95..f8e9fb8bb 100644 --- a/crates/pallet-chronicle/src/tests.rs +++ b/crates/pallet-chronicle/src/tests.rs @@ -1,7 +1,10 @@ use crate::{mock::*, Event}; -use common::prov::{ - operations::{ChronicleOperation, CreateNamespace}, - ExternalId, NamespaceId, +use common::{ + ledger::OperationSubmission, + prov::{ + operations::{ChronicleOperation, CreateNamespace}, + NamespaceId, + }, }; use frame_support::assert_ok; use uuid::Uuid; @@ -12,7 +15,10 @@ fn it_works_for_default_value() { // Go past genesis block so events get deposited System::set_block_number(1); // Dispatch a signed extrinsic. - assert_ok!(ChronicleModule::apply(RuntimeOrigin::signed(1), vec![])); + assert_ok!(ChronicleModule::apply( + RuntimeOrigin::signed(1), + OperationSubmission::new_anonymous(vec![]) + )); // Assert that the correct event was deposited System::assert_last_event(Event::Applied(common::prov::ProvModel::default()).into()); }); @@ -24,14 +30,15 @@ fn single_operation() { new_test_ext().execute_with(|| { // Go past genesis block so events get deposited System::set_block_number(1); - let uuid = Uuid::new_v4(); + let uuid = Uuid::from_u128(0u128); let op = ChronicleOperation::CreateNamespace(CreateNamespace { id: NamespaceId::from_external_id("test", uuid), - external_id: ExternalId::from("test"), - uuid: uuid.into(), }); // Dispatch our operation - assert_ok!(ChronicleModule::apply(RuntimeOrigin::signed(1), vec![op.clone()])); + assert_ok!(ChronicleModule::apply( + RuntimeOrigin::signed(1), + OperationSubmission::new_anonymous(vec![op.clone()]) + )); // Apply that operation to a new prov model for assertion - // the pallet execution should produce an identical delta diff --git a/crates/pallet-opa/Cargo.toml b/crates/pallet-opa/Cargo.toml new file mode 100644 index 000000000..5144d5c78 --- /dev/null +++ b/crates/pallet-opa/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "pallet-opa" +edition = "2021" +version = "0.7.5" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] + +common = {path = "../common", default-features=false, features=["parity-encoding"]} +parity-scale-codec = { version="3.6.5", default-features = false, features = ["derive"] } +uuid = {version="1.5.0", default-features=false} +sp-std = { version="12.0.0", default-features = false} +scale-info = { version="2.10.0", default-features = false, features = ["derive"] } +frame-support = { version="25.0.0", default-features=false } +sp-core = {version="25.0.0", default-features=false } +frame-system = { version= "25.0.0",default-features=false } +frame-benchmarking = { version = "25.0.0", default-features = false, optional=true} +tracing = {version="0.1.40", default-features=false, features=["attributes"]} +newtype-derive-2018 = {workspace=true} +macro-attr-2018 = {workspace=true} + +[dev-dependencies] +uuid = {version="1.5.0", default-features=true} +sp-runtime = { version="28.0.0"} +sp-io = {version="27.0.0" } +sp-core = {version="25.0.0"} +chronicle-telemetry = {path="../chronicle-telemetry"} + +[features] +default = ["std"] +std = [ + "common/std", + "parity-scale-codec/std", + "uuid/std", + "sp-std/std", + "scale-info/std", + "frame-support/std", + "frame-system/std", + "frame-benchmarking/std", + "tracing/std", +] +runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"] +try-runtime = ["frame-support/try-runtime"] diff --git a/crates/pallet-opa/src/lib.rs b/crates/pallet-opa/src/lib.rs new file mode 100644 index 000000000..8b9c5c20a --- /dev/null +++ b/crates/pallet-opa/src/lib.rs @@ -0,0 +1,198 @@ +#![cfg_attr(not(feature = "std"), no_std)] + +/// Re-export types required for runtime +pub use common::prov::*; + +use common::ledger::LedgerAddress; +/// Edit this file to define custom logic or remove it if it is not needed. +/// Learn more about FRAME and the core library of Substrate FRAME pallets: +/// +pub use pallet::*; + +#[cfg(test)] +mod mock; + +#[cfg(test)] +mod tests; + +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; +pub mod weights; + +pub mod chronicle_core { + pub use common::ledger::*; + pub use common::prov::*; +} +pub use weights::*; + +#[frame_support::pallet] +pub mod pallet { + use super::*; + use common::ledger::OperationSubmission; + use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::*; + use sp_std::collections::btree_set::BTreeSet; + use sp_std::vec::Vec; + + #[pallet::pallet] + pub struct Pallet(_); + + /// Configure the pallet by specifying the parameters and types on which it depends. + #[pallet::config] + pub trait Config: frame_system::Config { + /// Because this pallet emits events, it depends on the runtime's definition of an event. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// Type representing the weight of this pallet + type WeightInfo: WeightInfo; + + type Operations: Parameter + + Into + + From + + parity_scale_codec::Codec; + } + // The pallet's runtime storage items. + // https://docs.substrate.io/main-docs/build/runtime-storage/ + #[pallet::storage] + #[pallet::getter(fn prov)] + // Learn more about declaring storage items: + // https://docs.substrate.io/main-docs/build/runtime-storage/#declaring-storage-items + pub type Provenance = StorageMap<_, Twox128, LedgerAddress, common::prov::ProvModel>; + + // The pallet's runtime storage items. + // https://docs.substrate.io/main-docs/build/runtime-storage/ + #[pallet::storage] + #[pallet::getter(fn get_value)] + // Learn more about declaring storage items: + // https://docs.substrate.io/main-docs/build/runtime-storage/#declaring-storage-items + pub type Something = StorageValue<_, u32>; + + // Pallets use events to inform users when important changes are made. + // https://docs.substrate.io/main-docs/build/events-errors/ + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + Applied(common::prov::ProvModel), + Contradiction(common::prov::Contradiction), + } + + // Errors inform users that something went wrong. + #[pallet::error] + pub enum Error { + Address, + Contradiction, + Compaction, + Expansion, + Identity, + IRef, + NotAChronicleIri, + MissingId, + MissingProperty, + NotANode, + NotAnObject, + OpaExecutor, + SerdeJson, + SubmissionFormat, + Time, + Tokio, + Utf8, + } + + impl From for Error { + fn from(error: common::prov::ProcessorError) -> Self { + match error { + common::prov::ProcessorError::Address => Error::Address, + common::prov::ProcessorError::Contradiction { .. } => Error::Contradiction, + common::prov::ProcessorError::Expansion { .. } => Error::Expansion, + common::prov::ProcessorError::Identity(_) => Error::Identity, + common::prov::ProcessorError::NotAChronicleIri { .. } => Error::NotAChronicleIri, + common::prov::ProcessorError::MissingId { .. } => Error::MissingId, + common::prov::ProcessorError::MissingProperty { .. } => Error::MissingProperty, + common::prov::ProcessorError::NotANode(_) => Error::NotANode, + common::prov::ProcessorError::NotAnObject => Error::NotAnObject, + common::prov::ProcessorError::OpaExecutor(_) => Error::OpaExecutor, + common::prov::ProcessorError::SerdeJson(_) => Error::SerdeJson, + common::prov::ProcessorError::SubmissionFormat(_) => Error::SubmissionFormat, + common::prov::ProcessorError::Time(_) => Error::Time, + common::prov::ProcessorError::Tokio => Error::Tokio, + common::prov::ProcessorError::Utf8(_) => Error::Utf8, + _ => unreachable!(), //TODO: not this + } + } + } + + // Dispatchable functions allows users to interact with the pallet and invoke state changes. + // These functions materialize as "extrinsics", which are often compared to transactions. + // Dispatchable functions must be annotated with a weight and must return a DispatchResult. + #[pallet::call] + impl Pallet { + // Apply a vector of chronicle operations, yielding an event that indicates state change or contradiction + #[pallet::call_index(0)] + #[pallet::weight(T::WeightInfo::apply())] + pub fn apply(origin: OriginFor, operations: T::Operations) -> DispatchResult { + // Check that the extrinsic was signed and get the signer. + // This function will return an error if the extrinsic is not signed. + // https://docs.substrate.io/main-docs/build/origins/ + let who = ensure_signed(origin)?; + + // Get operations and load their dependencies + let sub: OperationSubmission = operations.into(); + + let deps = + sub.operations.iter().flat_map(|tx| tx.dependencies()).collect::>(); + + let initial_input_models: Vec<_> = deps + .into_iter() + .map(|addr| (addr.clone(), Provenance::::get(&addr))) + .collect(); + + let mut state: common::ledger::OperationState = common::ledger::OperationState::new(); + + state.update_state(initial_input_models.into_iter()); + + let mut model = common::prov::ProvModel::default(); + + for op in sub.operations.iter() { + let res = op.process(model, state.input()); + match res { + // A contradiction raises an event, not an error and shortcuts processing - contradiction attempts are useful provenance + // and should not be a purely operational concern + Err(common::prov::ProcessorError::Contradiction(source)) => { + tracing::info!(contradiction = %source); + + Self::deposit_event(Event::::Contradiction(source)); + + return Ok(()); + }, + // Severe errors should be logged + Err(e) => { + tracing::error!(chronicle_prov_failure = %e); + + return Err(Error::::from(e).into()); + }, + Ok((tx_output, updated_model)) => { + state.update_state_from_output(tx_output.into_iter()); + model = updated_model; + }, + } + } + + // Compute delta + let dirty = state.dirty().collect::>(); + + tracing::trace!(dirty = ?dirty); + + let mut delta = common::prov::ProvModel::default(); + for common::ledger::StateOutput { address, data } in dirty { + delta.combine(&data); + + // Update storage. + Provenance::::set(&address, Some(data)); + } + + // Emit an event. + Self::deposit_event(Event::Applied(delta)); + // Return a successful DispatchResultWithPostInfo + Ok(()) + } + } +} diff --git a/crates/pallet-opa/src/main.rs b/crates/pallet-opa/src/main.rs new file mode 100644 index 000000000..a30eb952c --- /dev/null +++ b/crates/pallet-opa/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/pallet-opa/src/mock.rs b/crates/pallet-opa/src/mock.rs new file mode 100644 index 000000000..221f98c3c --- /dev/null +++ b/crates/pallet-opa/src/mock.rs @@ -0,0 +1,56 @@ +use crate as pallet_template; +use common::ledger::OperationSubmission; +use frame_support::traits::{ConstU16, ConstU64}; +use sp_core::H256; +use sp_runtime::{ + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, +}; + +type Block = frame_system::mocking::MockBlock; + +// Configure a mock runtime to test the pallet. +frame_support::construct_runtime!( + pub enum Test + { + System: frame_system, + ChronicleModule: pallet_template, + } +); + +impl frame_system::Config for Test { + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Nonce = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Block = Block; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = ConstU16<42>; + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + +impl pallet_template::Config for Test { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); + type Operations = OperationSubmission; +} + +// Build genesis storage according to the mock runtime. +pub fn new_test_ext() -> sp_io::TestExternalities { + frame_system::GenesisConfig::::default().build_storage().unwrap().into() +} diff --git a/crates/pallet-opa/src/tests.rs b/crates/pallet-opa/src/tests.rs new file mode 100644 index 000000000..f8e9fb8bb --- /dev/null +++ b/crates/pallet-opa/src/tests.rs @@ -0,0 +1,50 @@ +use crate::{mock::*, Event}; +use common::{ + ledger::OperationSubmission, + prov::{ + operations::{ChronicleOperation, CreateNamespace}, + NamespaceId, + }, +}; +use frame_support::assert_ok; +use uuid::Uuid; + +#[test] +fn it_works_for_default_value() { + new_test_ext().execute_with(|| { + // Go past genesis block so events get deposited + System::set_block_number(1); + // Dispatch a signed extrinsic. + assert_ok!(ChronicleModule::apply( + RuntimeOrigin::signed(1), + OperationSubmission::new_anonymous(vec![]) + )); + // Assert that the correct event was deposited + System::assert_last_event(Event::Applied(common::prov::ProvModel::default()).into()); + }); +} + +#[test] +fn single_operation() { + chronicle_telemetry::telemetry(None, chronicle_telemetry::ConsoleLogging::Pretty); + new_test_ext().execute_with(|| { + // Go past genesis block so events get deposited + System::set_block_number(1); + let uuid = Uuid::from_u128(0u128); + let op = ChronicleOperation::CreateNamespace(CreateNamespace { + id: NamespaceId::from_external_id("test", uuid), + }); + // Dispatch our operation + assert_ok!(ChronicleModule::apply( + RuntimeOrigin::signed(1), + OperationSubmission::new_anonymous(vec![op.clone()]) + )); + + // Apply that operation to a new prov model for assertion - + // the pallet execution should produce an identical delta + let mut delta_model = common::prov::ProvModel::default(); + delta_model.apply(&op).unwrap(); + // Assert that the delta is correct + System::assert_last_event(Event::Applied(delta_model).into()); + }); +} diff --git a/crates/pallet-opa/src/weights.rs b/crates/pallet-opa/src/weights.rs new file mode 100644 index 000000000..c2b102ef7 --- /dev/null +++ b/crates/pallet-opa/src/weights.rs @@ -0,0 +1,66 @@ +//! Autogenerated weights for pallet_template +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-04-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Alexs-MacBook-Pro-2.local`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// ../../target/release/node-template +// benchmark +// pallet +// --chain +// dev +// --pallet +// pallet_template +// --extrinsic +// * +// --steps=50 +// --repeat=20 +// --wasm-execution=compiled +// --output +// pallets/template/src/weights.rs +// --template +// ../../.maintain/frame-weight-template.hbs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use core::marker::PhantomData; + +/// Weight functions needed for pallet_template. +pub trait WeightInfo { + fn apply() -> Weight; +} + +/// Weights for pallet_template using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + /// Storage: TemplateModule Something (r:0 w:1) + /// Proof: TemplateModule Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + fn apply() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + /// Storage: TemplateModule Something (r:0 w:1) + /// Proof: TemplateModule Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + fn apply() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } +} diff --git a/crates/pallet-opa/tree.txt b/crates/pallet-opa/tree.txt new file mode 100644 index 000000000..c4b35efba --- /dev/null +++ b/crates/pallet-opa/tree.txt @@ -0,0 +1,1257 @@ +pallet-chronicle v0.7.5 (/Users/ryan/code/chronicle/crates/pallet-chronicle) +├── common v0.7.5 (/Users/ryan/code/chronicle/crates/common) +│ ├── anyhow v1.0.75 +│ ├── async-trait v0.1.74 (proc-macro) +│ │ ├── proc-macro2 v1.0.69 +│ │ │ └── unicode-ident v1.0.12 +│ │ ├── quote v1.0.33 +│ │ │ └── proc-macro2 v1.0.69 (*) +│ │ └── syn v2.0.38 +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── unicode-ident v1.0.12 +│ ├── chrono v0.4.31 +│ │ ├── js-sys v0.3.64 +│ │ │ └── wasm-bindgen v0.2.87 +│ │ │ ├── cfg-if v1.0.0 +│ │ │ └── wasm-bindgen-macro v0.2.87 (proc-macro) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── wasm-bindgen-macro-support v0.2.87 +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ ├── syn v2.0.38 (*) +│ │ │ ├── wasm-bindgen-backend v0.2.87 +│ │ │ │ ├── bumpalo v3.14.0 +│ │ │ │ ├── log v0.4.20 +│ │ │ │ ├── once_cell v1.18.0 +│ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ ├── syn v2.0.38 (*) +│ │ │ │ └── wasm-bindgen-shared v0.2.87 +│ │ │ └── wasm-bindgen-shared v0.2.87 +│ │ ├── num-traits v0.2.17 +│ │ │ [build-dependencies] +│ │ │ └── autocfg v1.1.0 +│ │ ├── serde v1.0.190 +│ │ │ └── serde_derive v1.0.190 (proc-macro) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v2.0.38 (*) +│ │ └── wasm-bindgen v0.2.87 (*) +│ ├── futures v0.3.29 +│ │ ├── futures-channel v0.3.29 +│ │ │ ├── futures-core v0.3.29 +│ │ │ └── futures-sink v0.3.29 +│ │ ├── futures-core v0.3.29 +│ │ ├── futures-executor v0.3.29 +│ │ │ ├── futures-core v0.3.29 +│ │ │ ├── futures-task v0.3.29 +│ │ │ ├── futures-util v0.3.29 +│ │ │ │ ├── futures-channel v0.3.29 (*) +│ │ │ │ ├── futures-core v0.3.29 +│ │ │ │ ├── futures-io v0.3.29 +│ │ │ │ ├── futures-macro v0.3.29 (proc-macro) +│ │ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ │ └── syn v2.0.38 (*) +│ │ │ │ ├── futures-sink v0.3.29 +│ │ │ │ ├── futures-task v0.3.29 +│ │ │ │ ├── memchr v2.6.4 +│ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ ├── pin-utils v0.1.0 +│ │ │ │ └── slab v0.4.9 +│ │ │ │ [build-dependencies] +│ │ │ │ └── autocfg v1.1.0 +│ │ │ └── num_cpus v1.16.0 +│ │ │ └── libc v0.2.149 +│ │ ├── futures-io v0.3.29 +│ │ ├── futures-sink v0.3.29 +│ │ ├── futures-task v0.3.29 +│ │ └── futures-util v0.3.29 (*) +│ ├── glob v0.3.1 +│ ├── hex v0.4.3 +│ ├── iref v2.2.3 +│ │ ├── pct-str v1.2.0 +│ │ │ └── utf8-decode v1.0.1 +│ │ └── smallvec v1.11.1 +│ ├── iref-enum v2.1.0 (proc-macro) +│ │ ├── iref v2.2.3 +│ │ │ ├── pct-str v1.2.0 +│ │ │ │ └── utf8-decode v1.0.1 +│ │ │ └── smallvec v1.11.1 +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v1.0.109 +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── unicode-ident v1.0.12 +│ ├── k256 v0.11.6 +│ │ ├── cfg-if v1.0.0 +│ │ ├── ecdsa v0.14.8 +│ │ │ ├── der v0.6.1 +│ │ │ │ └── const-oid v0.9.5 +│ │ │ ├── elliptic-curve v0.12.3 +│ │ │ │ ├── base16ct v0.1.1 +│ │ │ │ ├── crypto-bigint v0.4.9 +│ │ │ │ │ ├── generic-array v0.14.7 +│ │ │ │ │ │ ├── typenum v1.17.0 +│ │ │ │ │ │ └── zeroize v1.6.0 +│ │ │ │ │ │ └── zeroize_derive v1.4.2 (proc-macro) +│ │ │ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ │ │ └── syn v2.0.38 (*) +│ │ │ │ │ │ [build-dependencies] +│ │ │ │ │ │ └── version_check v0.9.4 +│ │ │ │ │ ├── rand_core v0.6.4 +│ │ │ │ │ │ └── getrandom v0.2.10 +│ │ │ │ │ │ └── cfg-if v1.0.0 +│ │ │ │ │ ├── subtle v2.4.1 +│ │ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ │ ├── der v0.6.1 (*) +│ │ │ │ ├── digest v0.10.7 +│ │ │ │ │ ├── block-buffer v0.10.4 +│ │ │ │ │ │ └── generic-array v0.14.7 (*) +│ │ │ │ │ ├── const-oid v0.9.5 +│ │ │ │ │ ├── crypto-common v0.1.6 +│ │ │ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ │ │ └── typenum v1.17.0 +│ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ ├── ff v0.12.1 +│ │ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ ├── group v0.12.1 +│ │ │ │ │ ├── ff v0.12.1 (*) +│ │ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ ├── pkcs8 v0.9.0 +│ │ │ │ │ ├── der v0.6.1 (*) +│ │ │ │ │ └── spki v0.6.0 +│ │ │ │ │ └── der v0.6.1 (*) +│ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ ├── sec1 v0.3.0 +│ │ │ │ │ ├── base16ct v0.1.1 +│ │ │ │ │ ├── der v0.6.1 (*) +│ │ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ │ ├── subtle v2.4.1 +│ │ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ │ ├── subtle v2.4.1 +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ ├── rfc6979 v0.3.1 +│ │ │ │ ├── crypto-bigint v0.4.9 (*) +│ │ │ │ ├── hmac v0.12.1 +│ │ │ │ │ └── digest v0.10.7 (*) +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ └── signature v1.6.4 +│ │ │ ├── digest v0.10.7 (*) +│ │ │ └── rand_core v0.6.4 (*) +│ │ ├── elliptic-curve v0.12.3 (*) +│ │ └── sha2 v0.10.8 +│ │ ├── cfg-if v1.0.0 +│ │ └── digest v0.10.7 (*) +│ ├── lazy_static v1.4.0 +│ ├── locspan v0.7.16 +│ ├── macro-attr-2018 v3.0.0 +│ ├── mime v0.3.17 +│ ├── newtype-derive-2018 v0.2.1 +│ │ └── generics v0.5.1 +│ ├── parity-scale-codec v3.6.5 +│ │ ├── arrayvec v0.7.4 +│ │ ├── byte-slice-cast v1.2.2 +│ │ ├── bytes v1.5.0 +│ │ ├── impl-trait-for-tuples v0.2.2 (proc-macro) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v1.0.109 (*) +│ │ ├── parity-scale-codec-derive v3.6.5 (proc-macro) +│ │ │ ├── proc-macro-crate v1.1.3 +│ │ │ │ ├── thiserror v1.0.50 +│ │ │ │ │ └── thiserror-impl v1.0.50 (proc-macro) +│ │ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ │ └── syn v2.0.38 (*) +│ │ │ │ └── toml v0.5.11 +│ │ │ │ └── serde v1.0.190 +│ │ │ │ └── serde_derive v1.0.190 (proc-macro) (*) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v1.0.109 (*) +│ │ └── serde v1.0.190 (*) +│ ├── percent-encoding v2.3.0 +│ ├── scale-info v2.10.0 +│ │ ├── cfg-if v1.0.0 +│ │ ├── derive_more v0.99.17 (proc-macro) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v1.0.109 (*) +│ │ ├── parity-scale-codec v3.6.5 (*) +│ │ ├── scale-info-derive v2.10.0 (proc-macro) +│ │ │ ├── proc-macro-crate v1.1.3 (*) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v1.0.109 (*) +│ │ └── serde v1.0.190 (*) +│ ├── serde v1.0.190 (*) +│ ├── serde_derive v1.0.190 (proc-macro) (*) +│ ├── serde_json v1.0.108 +│ │ ├── itoa v1.0.9 +│ │ ├── ryu v1.0.15 +│ │ └── serde v1.0.190 (*) +│ ├── static-iref v2.0.0 (proc-macro) +│ │ └── iref v2.2.3 (*) +│ ├── thiserror v1.0.50 +│ │ └── thiserror-impl v1.0.50 (proc-macro) (*) +│ ├── thiserror-no-std v2.0.2 +│ │ └── thiserror-impl-no-std v2.0.2 (proc-macro) +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v1.0.109 (*) +│ ├── tracing v0.1.40 +│ │ ├── pin-project-lite v0.2.13 +│ │ ├── tracing-attributes v0.1.27 (proc-macro) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v2.0.38 (*) +│ │ └── tracing-core v0.1.32 +│ │ └── once_cell v1.18.0 +│ ├── url v2.4.1 +│ │ ├── form_urlencoded v1.2.0 +│ │ │ └── percent-encoding v2.3.0 +│ │ ├── idna v0.4.0 +│ │ │ ├── unicode-bidi v0.3.13 +│ │ │ └── unicode-normalization v0.1.22 +│ │ │ └── tinyvec v1.6.0 +│ │ │ └── tinyvec_macros v0.1.1 +│ │ ├── percent-encoding v2.3.0 +│ │ └── serde v1.0.190 (*) +│ └── uuid v1.5.0 +│ └── serde v1.0.190 (*) +│ [build-dependencies] +│ ├── glob v0.3.1 +│ ├── lazy_static v1.4.0 +│ └── serde_json v1.0.108 +│ ├── itoa v1.0.9 +│ ├── ryu v1.0.15 +│ └── serde v1.0.190 (*) +├── frame-support v24.0.0 +│ ├── aquamarine v0.3.2 (proc-macro) +│ │ ├── include_dir v0.7.3 +│ │ │ └── include_dir_macros v0.7.3 (proc-macro) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ └── quote v1.0.33 (*) +│ │ ├── itertools v0.10.5 +│ │ │ └── either v1.9.0 +│ │ ├── proc-macro-error v1.0.4 +│ │ │ ├── proc-macro-error-attr v1.0.4 (proc-macro) +│ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ └── quote v1.0.33 (*) +│ │ │ │ [build-dependencies] +│ │ │ │ └── version_check v0.9.4 +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v1.0.109 (*) +│ │ │ [build-dependencies] +│ │ │ └── version_check v0.9.4 +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v1.0.109 (*) +│ ├── bitflags v1.3.2 +│ ├── docify v0.2.6 +│ │ └── docify_macros v0.2.6 (proc-macro) +│ │ ├── common-path v1.0.0 +│ │ ├── derive-syn-parse v0.1.5 (proc-macro) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v1.0.109 (*) +│ │ ├── once_cell v1.18.0 +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ ├── regex v1.10.2 +│ │ │ ├── aho-corasick v1.1.2 +│ │ │ │ └── memchr v2.6.4 +│ │ │ ├── memchr v2.6.4 +│ │ │ ├── regex-automata v0.4.3 +│ │ │ │ ├── aho-corasick v1.1.2 (*) +│ │ │ │ ├── memchr v2.6.4 +│ │ │ │ └── regex-syntax v0.8.2 +│ │ │ └── regex-syntax v0.8.2 +│ │ ├── syn v2.0.38 (*) +│ │ ├── termcolor v1.3.0 +│ │ ├── toml v0.7.8 +│ │ │ ├── serde v1.0.190 (*) +│ │ │ ├── serde_spanned v0.6.4 +│ │ │ │ └── serde v1.0.190 (*) +│ │ │ ├── toml_datetime v0.6.5 +│ │ │ │ └── serde v1.0.190 (*) +│ │ │ └── toml_edit v0.19.15 +│ │ │ ├── indexmap v2.0.2 +│ │ │ │ ├── equivalent v1.0.1 +│ │ │ │ └── hashbrown v0.14.2 +│ │ │ ├── serde v1.0.190 (*) +│ │ │ ├── serde_spanned v0.6.4 (*) +│ │ │ ├── toml_datetime v0.6.5 (*) +│ │ │ └── winnow v0.5.17 +│ │ └── walkdir v2.4.0 +│ │ └── same-file v1.0.6 +│ ├── environmental v1.1.4 +│ ├── frame-metadata v16.0.0 +│ │ ├── cfg-if v1.0.0 +│ │ ├── parity-scale-codec v3.6.5 (*) +│ │ └── scale-info v2.10.0 (*) +│ ├── frame-support-procedural v19.0.0 (proc-macro) +│ │ ├── Inflector v0.11.4 +│ │ │ ├── lazy_static v1.4.0 +│ │ │ └── regex v1.10.2 (*) +│ │ ├── cfg-expr v0.15.5 +│ │ │ └── smallvec v1.11.1 +│ │ ├── derive-syn-parse v0.1.5 (proc-macro) (*) +│ │ ├── expander v2.0.0 +│ │ │ ├── blake2 v0.10.6 +│ │ │ │ └── digest v0.10.7 +│ │ │ │ ├── block-buffer v0.10.4 +│ │ │ │ │ └── generic-array v0.14.7 +│ │ │ │ │ └── typenum v1.17.0 +│ │ │ │ │ [build-dependencies] +│ │ │ │ │ └── version_check v0.9.4 +│ │ │ │ ├── crypto-common v0.1.6 +│ │ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ │ └── typenum v1.17.0 +│ │ │ │ └── subtle v2.4.1 +│ │ │ ├── fs-err v2.9.0 +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v2.0.38 (*) +│ │ ├── frame-support-procedural-tools v8.0.0 +│ │ │ ├── frame-support-procedural-tools-derive v9.0.0 (proc-macro) +│ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ └── syn v2.0.38 (*) +│ │ │ ├── proc-macro-crate v1.1.3 (*) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v2.0.38 (*) +│ │ ├── itertools v0.10.5 (*) +│ │ ├── macro_magic v0.4.2 +│ │ │ ├── macro_magic_core v0.4.2 +│ │ │ │ ├── const-random v0.1.16 +│ │ │ │ │ └── const-random-macro v0.1.16 (proc-macro) +│ │ │ │ │ ├── getrandom v0.2.10 +│ │ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ │ └── libc v0.2.149 +│ │ │ │ │ ├── once_cell v1.18.0 +│ │ │ │ │ └── tiny-keccak v2.0.2 +│ │ │ │ │ └── crunchy v0.2.2 +│ │ │ │ ├── derive-syn-parse v0.1.5 (proc-macro) (*) +│ │ │ │ ├── macro_magic_core_macros v0.4.3 (proc-macro) +│ │ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ │ └── syn v2.0.38 (*) +│ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ └── syn v2.0.38 (*) +│ │ │ ├── macro_magic_macros v0.4.2 (proc-macro) +│ │ │ │ ├── macro_magic_core v0.4.2 (*) +│ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ └── syn v2.0.38 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v2.0.38 (*) +│ │ ├── proc-macro-warning v0.4.2 +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v2.0.38 (*) +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v2.0.38 (*) +│ ├── impl-trait-for-tuples v0.2.2 (proc-macro) (*) +│ ├── k256 v0.13.1 +│ │ ├── cfg-if v1.0.0 +│ │ ├── ecdsa v0.16.8 +│ │ │ ├── der v0.7.8 +│ │ │ │ ├── const-oid v0.9.5 +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ ├── digest v0.10.7 (*) +│ │ │ ├── elliptic-curve v0.13.6 +│ │ │ │ ├── base16ct v0.2.0 +│ │ │ │ ├── crypto-bigint v0.5.3 +│ │ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ │ ├── subtle v2.4.1 +│ │ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ │ ├── digest v0.10.7 (*) +│ │ │ │ ├── ff v0.13.0 +│ │ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ ├── group v0.13.0 +│ │ │ │ │ ├── ff v0.13.0 (*) +│ │ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ ├── sec1 v0.7.3 +│ │ │ │ │ ├── base16ct v0.2.0 +│ │ │ │ │ ├── der v0.7.8 (*) +│ │ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ │ ├── subtle v2.4.1 +│ │ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ │ ├── subtle v2.4.1 +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ ├── rfc6979 v0.4.0 +│ │ │ │ ├── hmac v0.12.1 (*) +│ │ │ │ └── subtle v2.4.1 +│ │ │ └── signature v2.1.0 +│ │ │ ├── digest v0.10.7 (*) +│ │ │ └── rand_core v0.6.4 (*) +│ │ ├── elliptic-curve v0.13.6 (*) +│ │ └── sha2 v0.10.8 (*) +│ ├── log v0.4.20 +│ ├── macro_magic v0.4.2 +│ │ └── macro_magic_macros v0.4.2 (proc-macro) (*) +│ ├── parity-scale-codec v3.6.5 (*) +│ ├── paste v1.0.14 (proc-macro) +│ ├── scale-info v2.10.0 (*) +│ ├── serde v1.0.190 (*) +│ ├── serde_json v1.0.108 (*) +│ ├── smallvec v1.11.1 +│ ├── sp-api v22.0.0 +│ │ ├── log v0.4.20 +│ │ ├── parity-scale-codec v3.6.5 (*) +│ │ ├── scale-info v2.10.0 (*) +│ │ ├── sp-api-proc-macro v11.0.0 (proc-macro) +│ │ │ ├── Inflector v0.11.4 (*) +│ │ │ ├── blake2 v0.10.6 (*) +│ │ │ ├── expander v2.0.0 (*) +│ │ │ ├── proc-macro-crate v1.1.3 (*) +│ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ └── syn v2.0.38 (*) +│ │ ├── sp-core v24.0.0 +│ │ │ ├── array-bytes v6.1.0 +│ │ │ ├── bitflags v1.3.2 +│ │ │ ├── blake2 v0.10.6 +│ │ │ │ └── digest v0.10.7 (*) +│ │ │ ├── bounded-collections v0.1.9 +│ │ │ │ ├── log v0.4.20 +│ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ ├── scale-info v2.10.0 (*) +│ │ │ │ └── serde v1.0.190 (*) +│ │ │ ├── bs58 v0.5.0 +│ │ │ ├── dyn-clonable v0.9.0 +│ │ │ │ ├── dyn-clonable-impl v0.9.0 (proc-macro) +│ │ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ │ └── syn v1.0.109 (*) +│ │ │ │ └── dyn-clone v1.0.14 +│ │ │ ├── ed25519-zebra v3.1.0 +│ │ │ │ ├── curve25519-dalek v3.2.0 +│ │ │ │ │ ├── byteorder v1.5.0 +│ │ │ │ │ ├── digest v0.9.0 +│ │ │ │ │ │ └── generic-array v0.14.7 (*) +│ │ │ │ │ ├── rand_core v0.5.1 +│ │ │ │ │ │ └── getrandom v0.1.16 +│ │ │ │ │ │ └── cfg-if v1.0.0 +│ │ │ │ │ ├── subtle v2.4.1 +│ │ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ │ ├── hashbrown v0.12.3 +│ │ │ │ │ └── ahash v0.7.7 +│ │ │ │ │ └── once_cell v1.18.0 +│ │ │ │ │ [build-dependencies] +│ │ │ │ │ └── version_check v0.9.4 +│ │ │ │ ├── hex v0.4.3 +│ │ │ │ ├── rand_core v0.6.4 (*) +│ │ │ │ ├── sha2 v0.9.9 +│ │ │ │ │ ├── block-buffer v0.9.0 +│ │ │ │ │ │ └── generic-array v0.14.7 (*) +│ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ ├── digest v0.9.0 (*) +│ │ │ │ │ └── opaque-debug v0.3.0 +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ ├── futures v0.3.29 (*) +│ │ │ ├── hash-db v0.16.0 +│ │ │ ├── hash256-std-hasher v0.15.2 +│ │ │ │ └── crunchy v0.2.2 +│ │ │ ├── impl-serde v0.4.0 +│ │ │ │ └── serde v1.0.190 (*) +│ │ │ ├── lazy_static v1.4.0 +│ │ │ ├── libsecp256k1 v0.7.1 +│ │ │ │ ├── arrayref v0.3.7 +│ │ │ │ ├── base64 v0.13.1 +│ │ │ │ ├── digest v0.9.0 (*) +│ │ │ │ ├── hmac-drbg v0.3.0 +│ │ │ │ │ ├── digest v0.9.0 (*) +│ │ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ │ └── hmac v0.8.1 +│ │ │ │ │ ├── crypto-mac v0.8.0 +│ │ │ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ │ └── digest v0.9.0 (*) +│ │ │ │ ├── libsecp256k1-core v0.3.0 +│ │ │ │ │ ├── crunchy v0.2.2 +│ │ │ │ │ ├── digest v0.9.0 (*) +│ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ ├── rand v0.8.5 +│ │ │ │ │ ├── rand_chacha v0.3.1 +│ │ │ │ │ │ ├── ppv-lite86 v0.2.17 +│ │ │ │ │ │ └── rand_core v0.6.4 (*) +│ │ │ │ │ └── rand_core v0.6.4 (*) +│ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ ├── sha2 v0.9.9 (*) +│ │ │ │ └── typenum v1.17.0 +│ │ │ │ [build-dependencies] +│ │ │ │ ├── libsecp256k1-gen-ecmult v0.3.0 +│ │ │ │ │ └── libsecp256k1-core v0.3.0 +│ │ │ │ │ ├── crunchy v0.2.2 +│ │ │ │ │ ├── digest v0.9.0 +│ │ │ │ │ │ └── generic-array v0.14.7 (*) +│ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ └── libsecp256k1-gen-genmult v0.3.0 +│ │ │ │ └── libsecp256k1-core v0.3.0 (*) +│ │ │ ├── log v0.4.20 +│ │ │ ├── merlin v2.0.1 +│ │ │ │ ├── byteorder v1.5.0 +│ │ │ │ ├── keccak v0.1.4 +│ │ │ │ ├── rand_core v0.5.1 (*) +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ ├── parking_lot v0.12.1 +│ │ │ │ ├── lock_api v0.4.11 +│ │ │ │ │ └── scopeguard v1.2.0 +│ │ │ │ │ [build-dependencies] +│ │ │ │ │ └── autocfg v1.1.0 +│ │ │ │ └── parking_lot_core v0.9.9 +│ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ └── smallvec v1.11.1 +│ │ │ ├── paste v1.0.14 (proc-macro) +│ │ │ ├── primitive-types v0.12.2 +│ │ │ │ ├── fixed-hash v0.8.0 +│ │ │ │ │ ├── byteorder v1.5.0 +│ │ │ │ │ ├── rand v0.8.5 (*) +│ │ │ │ │ ├── rustc-hex v2.1.0 +│ │ │ │ │ └── static_assertions v1.1.0 +│ │ │ │ ├── impl-codec v0.6.0 +│ │ │ │ │ └── parity-scale-codec v3.6.5 (*) +│ │ │ │ ├── impl-serde v0.4.0 (*) +│ │ │ │ ├── scale-info v2.10.0 (*) +│ │ │ │ └── uint v0.9.5 +│ │ │ │ ├── byteorder v1.5.0 +│ │ │ │ ├── crunchy v0.2.2 +│ │ │ │ ├── hex v0.4.3 +│ │ │ │ └── static_assertions v1.1.0 +│ │ │ ├── rand v0.8.5 (*) +│ │ │ ├── regex v1.10.2 +│ │ │ │ ├── aho-corasick v1.1.2 +│ │ │ │ │ └── memchr v2.6.4 +│ │ │ │ ├── memchr v2.6.4 +│ │ │ │ ├── regex-automata v0.4.3 +│ │ │ │ │ ├── aho-corasick v1.1.2 (*) +│ │ │ │ │ ├── memchr v2.6.4 +│ │ │ │ │ └── regex-syntax v0.8.2 +│ │ │ │ └── regex-syntax v0.8.2 +│ │ │ ├── scale-info v2.10.0 (*) +│ │ │ ├── schnorrkel v0.9.1 +│ │ │ │ ├── arrayref v0.3.7 +│ │ │ │ ├── arrayvec v0.5.2 +│ │ │ │ ├── curve25519-dalek v2.1.3 +│ │ │ │ │ ├── byteorder v1.5.0 +│ │ │ │ │ ├── digest v0.8.1 +│ │ │ │ │ │ └── generic-array v0.12.4 +│ │ │ │ │ │ └── typenum v1.17.0 +│ │ │ │ │ ├── rand_core v0.5.1 (*) +│ │ │ │ │ ├── subtle v2.4.1 +│ │ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ │ ├── getrandom v0.1.16 (*) +│ │ │ │ ├── merlin v2.0.1 (*) +│ │ │ │ ├── rand v0.7.3 +│ │ │ │ │ ├── getrandom v0.1.16 (*) +│ │ │ │ │ ├── rand_chacha v0.2.2 +│ │ │ │ │ │ ├── ppv-lite86 v0.2.17 +│ │ │ │ │ │ └── rand_core v0.5.1 (*) +│ │ │ │ │ └── rand_core v0.5.1 (*) +│ │ │ │ ├── rand_core v0.5.1 (*) +│ │ │ │ ├── sha2 v0.8.2 +│ │ │ │ │ ├── block-buffer v0.7.3 +│ │ │ │ │ │ ├── block-padding v0.1.5 +│ │ │ │ │ │ │ └── byte-tools v0.3.1 +│ │ │ │ │ │ ├── byte-tools v0.3.1 +│ │ │ │ │ │ ├── byteorder v1.5.0 +│ │ │ │ │ │ └── generic-array v0.12.4 (*) +│ │ │ │ │ ├── digest v0.8.1 (*) +│ │ │ │ │ ├── fake-simd v0.1.2 +│ │ │ │ │ └── opaque-debug v0.2.3 +│ │ │ │ ├── subtle v2.4.1 +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ ├── secp256k1 v0.24.3 +│ │ │ │ └── secp256k1-sys v0.6.1 +│ │ │ │ [build-dependencies] +│ │ │ │ └── cc v1.0.83 +│ │ │ │ └── libc v0.2.149 +│ │ │ ├── secrecy v0.8.0 +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ ├── serde v1.0.190 (*) +│ │ │ ├── sp-core-hashing v12.0.0 +│ │ │ │ ├── blake2b_simd v1.0.2 +│ │ │ │ │ ├── arrayref v0.3.7 +│ │ │ │ │ ├── arrayvec v0.7.4 +│ │ │ │ │ └── constant_time_eq v0.3.0 +│ │ │ │ ├── byteorder v1.5.0 +│ │ │ │ ├── digest v0.10.7 (*) +│ │ │ │ ├── sha2 v0.10.8 (*) +│ │ │ │ ├── sha3 v0.10.8 +│ │ │ │ │ ├── digest v0.10.7 (*) +│ │ │ │ │ └── keccak v0.1.4 +│ │ │ │ └── twox-hash v1.6.3 +│ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ ├── digest v0.10.7 (*) +│ │ │ │ ├── rand v0.8.5 (*) +│ │ │ │ └── static_assertions v1.1.0 +│ │ │ ├── sp-debug-derive v11.0.0 (proc-macro) +│ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ └── syn v2.0.38 (*) +│ │ │ ├── sp-externalities v0.22.0 +│ │ │ │ ├── environmental v1.1.4 +│ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ ├── sp-std v11.0.0 +│ │ │ │ └── sp-storage v16.0.0 +│ │ │ │ ├── impl-serde v0.4.0 (*) +│ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ ├── ref-cast v1.0.20 +│ │ │ │ │ └── ref-cast-impl v1.0.20 (proc-macro) +│ │ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ │ └── syn v2.0.38 (*) +│ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ ├── sp-debug-derive v11.0.0 (proc-macro) (*) +│ │ │ │ └── sp-std v11.0.0 +│ │ │ ├── sp-runtime-interface v20.0.0 +│ │ │ │ ├── bytes v1.5.0 +│ │ │ │ ├── impl-trait-for-tuples v0.2.2 (proc-macro) (*) +│ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ ├── primitive-types v0.12.2 (*) +│ │ │ │ ├── sp-externalities v0.22.0 (*) +│ │ │ │ ├── sp-runtime-interface-proc-macro v14.0.0 (proc-macro) +│ │ │ │ │ ├── Inflector v0.11.4 (*) +│ │ │ │ │ ├── proc-macro-crate v1.1.3 (*) +│ │ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ │ └── syn v2.0.38 (*) +│ │ │ │ ├── sp-std v11.0.0 +│ │ │ │ ├── sp-storage v16.0.0 (*) +│ │ │ │ ├── sp-tracing v13.0.0 +│ │ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ │ ├── sp-std v11.0.0 +│ │ │ │ │ ├── tracing v0.1.40 (*) +│ │ │ │ │ ├── tracing-core v0.1.32 (*) +│ │ │ │ │ └── tracing-subscriber v0.2.25 +│ │ │ │ │ ├── ansi_term v0.12.1 +│ │ │ │ │ ├── chrono v0.4.31 (*) +│ │ │ │ │ ├── lazy_static v1.4.0 +│ │ │ │ │ ├── matchers v0.0.1 +│ │ │ │ │ │ └── regex-automata v0.1.10 +│ │ │ │ │ │ └── regex-syntax v0.6.29 +│ │ │ │ │ ├── regex v1.10.2 (*) +│ │ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ │ ├── serde_json v1.0.108 (*) +│ │ │ │ │ ├── sharded-slab v0.1.7 +│ │ │ │ │ │ └── lazy_static v1.4.0 +│ │ │ │ │ ├── smallvec v1.11.1 +│ │ │ │ │ ├── thread_local v1.1.7 +│ │ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ │ └── once_cell v1.18.0 +│ │ │ │ │ ├── tracing v0.1.40 (*) +│ │ │ │ │ ├── tracing-core v0.1.32 (*) +│ │ │ │ │ ├── tracing-log v0.1.4 +│ │ │ │ │ │ ├── log v0.4.20 +│ │ │ │ │ │ ├── once_cell v1.18.0 +│ │ │ │ │ │ └── tracing-core v0.1.32 (*) +│ │ │ │ │ └── tracing-serde v0.1.3 +│ │ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ │ └── tracing-core v0.1.32 (*) +│ │ │ │ ├── sp-wasm-interface v17.0.0 +│ │ │ │ │ ├── anyhow v1.0.75 +│ │ │ │ │ ├── impl-trait-for-tuples v0.2.2 (proc-macro) (*) +│ │ │ │ │ ├── log v0.4.20 +│ │ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ │ ├── sp-std v11.0.0 +│ │ │ │ │ └── wasmtime v8.0.1 +│ │ │ │ │ ├── anyhow v1.0.75 +│ │ │ │ │ ├── bincode v1.3.3 +│ │ │ │ │ │ └── serde v1.0.190 (*) +│ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ ├── indexmap v1.9.3 +│ │ │ │ │ │ ├── hashbrown v0.12.3 (*) +│ │ │ │ │ │ └── serde v1.0.190 (*) +│ │ │ │ │ │ [build-dependencies] +│ │ │ │ │ │ └── autocfg v1.1.0 +│ │ │ │ │ ├── libc v0.2.149 +│ │ │ │ │ ├── log v0.4.20 +│ │ │ │ │ ├── object v0.30.4 +│ │ │ │ │ │ ├── crc32fast v1.3.2 +│ │ │ │ │ │ │ └── cfg-if v1.0.0 +│ │ │ │ │ │ ├── hashbrown v0.13.2 +│ │ │ │ │ │ │ └── ahash v0.8.6 +│ │ │ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ │ │ ├── getrandom v0.2.10 (*) +│ │ │ │ │ │ │ ├── once_cell v1.18.0 +│ │ │ │ │ │ │ └── zerocopy v0.7.20 +│ │ │ │ │ │ │ [build-dependencies] +│ │ │ │ │ │ │ └── version_check v0.9.4 +│ │ │ │ │ │ ├── indexmap v1.9.3 (*) +│ │ │ │ │ │ └── memchr v2.6.4 +│ │ │ │ │ ├── once_cell v1.18.0 +│ │ │ │ │ ├── paste v1.0.14 (proc-macro) +│ │ │ │ │ ├── psm v0.1.21 +│ │ │ │ │ │ [build-dependencies] +│ │ │ │ │ │ └── cc v1.0.83 (*) +│ │ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ │ ├── target-lexicon v0.12.12 +│ │ │ │ │ ├── wasmparser v0.102.0 +│ │ │ │ │ │ ├── indexmap v1.9.3 (*) +│ │ │ │ │ │ └── url v2.4.1 (*) +│ │ │ │ │ ├── wasmtime-environ v8.0.1 +│ │ │ │ │ │ ├── anyhow v1.0.75 +│ │ │ │ │ │ ├── cranelift-entity v0.95.1 +│ │ │ │ │ │ │ └── serde v1.0.190 (*) +│ │ │ │ │ │ ├── gimli v0.27.3 +│ │ │ │ │ │ │ ├── fallible-iterator v0.2.0 +│ │ │ │ │ │ │ ├── indexmap v1.9.3 (*) +│ │ │ │ │ │ │ └── stable_deref_trait v1.2.0 +│ │ │ │ │ │ ├── indexmap v1.9.3 (*) +│ │ │ │ │ │ ├── log v0.4.20 +│ │ │ │ │ │ ├── object v0.30.4 (*) +│ │ │ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ │ │ ├── target-lexicon v0.12.12 +│ │ │ │ │ │ ├── thiserror v1.0.50 (*) +│ │ │ │ │ │ ├── wasmparser v0.102.0 (*) +│ │ │ │ │ │ └── wasmtime-types v8.0.1 +│ │ │ │ │ │ ├── cranelift-entity v0.95.1 (*) +│ │ │ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ │ │ ├── thiserror v1.0.50 (*) +│ │ │ │ │ │ └── wasmparser v0.102.0 (*) +│ │ │ │ │ ├── wasmtime-jit v8.0.1 +│ │ │ │ │ │ ├── addr2line v0.19.0 +│ │ │ │ │ │ │ └── gimli v0.27.3 (*) +│ │ │ │ │ │ ├── anyhow v1.0.75 +│ │ │ │ │ │ ├── bincode v1.3.3 (*) +│ │ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ │ ├── cpp_demangle v0.3.5 +│ │ │ │ │ │ │ └── cfg-if v1.0.0 +│ │ │ │ │ │ ├── gimli v0.27.3 (*) +│ │ │ │ │ │ ├── log v0.4.20 +│ │ │ │ │ │ ├── object v0.30.4 (*) +│ │ │ │ │ │ ├── rustc-demangle v0.1.23 +│ │ │ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ │ │ ├── target-lexicon v0.12.12 +│ │ │ │ │ │ ├── wasmtime-environ v8.0.1 (*) +│ │ │ │ │ │ ├── wasmtime-jit-icache-coherence v8.0.1 +│ │ │ │ │ │ │ └── cfg-if v1.0.0 +│ │ │ │ │ │ └── wasmtime-runtime v8.0.1 +│ │ │ │ │ │ ├── anyhow v1.0.75 +│ │ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ │ ├── indexmap v1.9.3 (*) +│ │ │ │ │ │ ├── libc v0.2.149 +│ │ │ │ │ │ ├── log v0.4.20 +│ │ │ │ │ │ ├── memfd v0.6.4 +│ │ │ │ │ │ │ └── rustix v0.38.21 +│ │ │ │ │ │ │ ├── bitflags v2.4.1 +│ │ │ │ │ │ │ ├── errno v0.3.5 +│ │ │ │ │ │ │ └── libc v0.2.149 +│ │ │ │ │ │ ├── memoffset v0.8.0 +│ │ │ │ │ │ │ [build-dependencies] +│ │ │ │ │ │ │ └── autocfg v1.1.0 +│ │ │ │ │ │ ├── paste v1.0.14 (proc-macro) +│ │ │ │ │ │ ├── rand v0.8.5 (*) +│ │ │ │ │ │ ├── wasmtime-asm-macros v8.0.1 +│ │ │ │ │ │ │ └── cfg-if v1.0.0 +│ │ │ │ │ │ ├── wasmtime-environ v8.0.1 (*) +│ │ │ │ │ │ └── wasmtime-jit-debug v8.0.1 +│ │ │ │ │ │ └── once_cell v1.18.0 +│ │ │ │ │ │ [build-dependencies] +│ │ │ │ │ │ └── cc v1.0.83 (*) +│ │ │ │ │ └── wasmtime-runtime v8.0.1 (*) +│ │ │ │ └── static_assertions v1.1.0 +│ │ │ ├── sp-std v11.0.0 +│ │ │ ├── sp-storage v16.0.0 (*) +│ │ │ ├── ss58-registry v1.43.0 +│ │ │ │ └── num-format v0.4.4 +│ │ │ │ ├── arrayvec v0.7.4 +│ │ │ │ └── itoa v1.0.9 +│ │ │ │ [build-dependencies] +│ │ │ │ ├── Inflector v0.11.4 (*) +│ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ ├── serde_json v1.0.108 (*) +│ │ │ │ └── unicode-xid v0.2.4 +│ │ │ ├── substrate-bip39 v0.4.5 +│ │ │ │ ├── hmac v0.11.0 +│ │ │ │ │ ├── crypto-mac v0.11.1 +│ │ │ │ │ │ ├── generic-array v0.14.7 (*) +│ │ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ │ └── digest v0.9.0 (*) +│ │ │ │ ├── pbkdf2 v0.8.0 +│ │ │ │ │ └── crypto-mac v0.11.1 (*) +│ │ │ │ ├── schnorrkel v0.9.1 (*) +│ │ │ │ ├── sha2 v0.9.9 (*) +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ ├── thiserror v1.0.50 (*) +│ │ │ ├── tiny-bip39 v1.0.0 +│ │ │ │ ├── anyhow v1.0.75 +│ │ │ │ ├── hmac v0.12.1 (*) +│ │ │ │ ├── once_cell v1.18.0 +│ │ │ │ ├── pbkdf2 v0.11.0 +│ │ │ │ │ └── digest v0.10.7 (*) +│ │ │ │ ├── rand v0.8.5 (*) +│ │ │ │ ├── rustc-hash v1.1.0 +│ │ │ │ ├── sha2 v0.10.8 (*) +│ │ │ │ ├── thiserror v1.0.50 (*) +│ │ │ │ ├── unicode-normalization v0.1.22 (*) +│ │ │ │ ├── wasm-bindgen v0.2.87 (*) +│ │ │ │ └── zeroize v1.6.0 (*) +│ │ │ ├── tracing v0.1.40 (*) +│ │ │ └── zeroize v1.6.0 (*) +│ │ ├── sp-metadata-ir v0.3.0 +│ │ │ ├── frame-metadata v16.0.0 (*) +│ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ ├── scale-info v2.10.0 (*) +│ │ │ └── sp-std v11.0.0 +│ │ ├── sp-runtime v27.0.0 +│ │ │ ├── either v1.9.0 +│ │ │ ├── hash256-std-hasher v0.15.2 (*) +│ │ │ ├── impl-trait-for-tuples v0.2.2 (proc-macro) (*) +│ │ │ ├── log v0.4.20 +│ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ ├── paste v1.0.14 (proc-macro) +│ │ │ ├── rand v0.8.5 (*) +│ │ │ ├── scale-info v2.10.0 (*) +│ │ │ ├── serde v1.0.190 (*) +│ │ │ ├── sp-application-crypto v26.0.0 +│ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ ├── scale-info v2.10.0 (*) +│ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ ├── sp-core v24.0.0 (*) +│ │ │ │ ├── sp-io v26.0.0 +│ │ │ │ │ ├── bytes v1.5.0 +│ │ │ │ │ ├── ed25519-dalek v2.0.0 +│ │ │ │ │ │ ├── curve25519-dalek v4.1.1 +│ │ │ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ │ │ ├── digest v0.10.7 (*) +│ │ │ │ │ │ │ └── subtle v2.4.1 +│ │ │ │ │ │ │ [build-dependencies] +│ │ │ │ │ │ │ ├── platforms v3.1.2 +│ │ │ │ │ │ │ └── rustc_version v0.4.0 +│ │ │ │ │ │ │ └── semver v1.0.20 +│ │ │ │ │ │ ├── ed25519 v2.2.3 +│ │ │ │ │ │ │ └── signature v2.1.0 (*) +│ │ │ │ │ │ └── sha2 v0.10.8 (*) +│ │ │ │ │ ├── libsecp256k1 v0.7.1 (*) +│ │ │ │ │ ├── log v0.4.20 +│ │ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ │ ├── secp256k1 v0.24.3 (*) +│ │ │ │ │ ├── sp-core v24.0.0 (*) +│ │ │ │ │ ├── sp-externalities v0.22.0 (*) +│ │ │ │ │ ├── sp-keystore v0.30.0 +│ │ │ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ │ │ ├── parking_lot v0.12.1 (*) +│ │ │ │ │ │ ├── sp-core v24.0.0 (*) +│ │ │ │ │ │ ├── sp-externalities v0.22.0 (*) +│ │ │ │ │ │ └── thiserror v1.0.50 (*) +│ │ │ │ │ ├── sp-runtime-interface v20.0.0 (*) +│ │ │ │ │ ├── sp-state-machine v0.31.0 +│ │ │ │ │ │ ├── hash-db v0.16.0 +│ │ │ │ │ │ ├── log v0.4.20 +│ │ │ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ │ │ ├── parking_lot v0.12.1 (*) +│ │ │ │ │ │ ├── rand v0.8.5 (*) +│ │ │ │ │ │ ├── smallvec v1.11.1 +│ │ │ │ │ │ ├── sp-core v24.0.0 (*) +│ │ │ │ │ │ ├── sp-externalities v0.22.0 (*) +│ │ │ │ │ │ ├── sp-panic-handler v11.0.0 +│ │ │ │ │ │ │ ├── backtrace v0.3.69 +│ │ │ │ │ │ │ │ ├── addr2line v0.21.0 +│ │ │ │ │ │ │ │ │ └── gimli v0.28.0 +│ │ │ │ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ │ │ │ ├── libc v0.2.149 +│ │ │ │ │ │ │ │ ├── miniz_oxide v0.7.1 +│ │ │ │ │ │ │ │ │ └── adler v1.0.2 +│ │ │ │ │ │ │ │ ├── object v0.32.1 +│ │ │ │ │ │ │ │ │ └── memchr v2.6.4 +│ │ │ │ │ │ │ │ └── rustc-demangle v0.1.23 +│ │ │ │ │ │ │ │ [build-dependencies] +│ │ │ │ │ │ │ │ └── cc v1.0.83 (*) +│ │ │ │ │ │ │ ├── lazy_static v1.4.0 +│ │ │ │ │ │ │ └── regex v1.10.2 (*) +│ │ │ │ │ │ ├── sp-std v11.0.0 +│ │ │ │ │ │ ├── sp-trie v25.0.0 +│ │ │ │ │ │ │ ├── ahash v0.8.6 (*) +│ │ │ │ │ │ │ ├── hash-db v0.16.0 +│ │ │ │ │ │ │ ├── hashbrown v0.13.2 (*) +│ │ │ │ │ │ │ ├── lazy_static v1.4.0 +│ │ │ │ │ │ │ ├── memory-db v0.32.0 +│ │ │ │ │ │ │ │ └── hash-db v0.16.0 +│ │ │ │ │ │ │ ├── nohash-hasher v0.2.0 +│ │ │ │ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ │ │ │ ├── parking_lot v0.12.1 (*) +│ │ │ │ │ │ │ ├── scale-info v2.10.0 (*) +│ │ │ │ │ │ │ ├── schnellru v0.2.1 +│ │ │ │ │ │ │ │ ├── ahash v0.8.6 (*) +│ │ │ │ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ │ │ │ └── hashbrown v0.13.2 (*) +│ │ │ │ │ │ │ ├── sp-core v24.0.0 (*) +│ │ │ │ │ │ │ ├── sp-std v11.0.0 +│ │ │ │ │ │ │ ├── thiserror v1.0.50 (*) +│ │ │ │ │ │ │ ├── tracing v0.1.40 (*) +│ │ │ │ │ │ │ ├── trie-db v0.28.0 +│ │ │ │ │ │ │ │ ├── hash-db v0.16.0 +│ │ │ │ │ │ │ │ ├── hashbrown v0.13.2 (*) +│ │ │ │ │ │ │ │ ├── log v0.4.20 +│ │ │ │ │ │ │ │ ├── rustc-hex v2.1.0 +│ │ │ │ │ │ │ │ └── smallvec v1.11.1 +│ │ │ │ │ │ │ └── trie-root v0.18.0 +│ │ │ │ │ │ │ └── hash-db v0.16.0 +│ │ │ │ │ │ ├── thiserror v1.0.50 (*) +│ │ │ │ │ │ ├── tracing v0.1.40 (*) +│ │ │ │ │ │ └── trie-db v0.28.0 (*) +│ │ │ │ │ ├── sp-std v11.0.0 +│ │ │ │ │ ├── sp-tracing v13.0.0 (*) +│ │ │ │ │ ├── sp-trie v25.0.0 (*) +│ │ │ │ │ ├── tracing v0.1.40 (*) +│ │ │ │ │ └── tracing-core v0.1.32 (*) +│ │ │ │ │ [build-dependencies] +│ │ │ │ │ └── rustversion v1.0.14 (proc-macro) +│ │ │ │ └── sp-std v11.0.0 +│ │ │ ├── sp-arithmetic v19.0.0 +│ │ │ │ ├── integer-sqrt v0.1.5 +│ │ │ │ │ └── num-traits v0.2.17 (*) +│ │ │ │ ├── num-traits v0.2.17 (*) +│ │ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ │ ├── scale-info v2.10.0 (*) +│ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ ├── sp-std v11.0.0 +│ │ │ │ └── static_assertions v1.1.0 +│ │ │ ├── sp-core v24.0.0 (*) +│ │ │ ├── sp-io v26.0.0 (*) +│ │ │ ├── sp-std v11.0.0 +│ │ │ └── sp-weights v23.0.0 +│ │ │ ├── parity-scale-codec v3.6.5 (*) +│ │ │ ├── scale-info v2.10.0 (*) +│ │ │ ├── serde v1.0.190 (*) +│ │ │ ├── smallvec v1.11.1 +│ │ │ ├── sp-arithmetic v19.0.0 (*) +│ │ │ ├── sp-core v24.0.0 (*) +│ │ │ ├── sp-debug-derive v11.0.0 (proc-macro) (*) +│ │ │ └── sp-std v11.0.0 +│ │ ├── sp-std v11.0.0 +│ │ └── sp-version v25.0.0 +│ │ ├── impl-serde v0.4.0 (*) +│ │ ├── parity-scale-codec v3.6.5 (*) +│ │ ├── scale-info v2.10.0 (*) +│ │ ├── serde v1.0.190 (*) +│ │ ├── sp-core-hashing-proc-macro v12.0.0 (proc-macro) +│ │ │ ├── quote v1.0.33 (*) +│ │ │ ├── sp-core-hashing v12.0.0 +│ │ │ │ ├── blake2b_simd v1.0.2 +│ │ │ │ │ ├── arrayref v0.3.7 +│ │ │ │ │ ├── arrayvec v0.7.4 +│ │ │ │ │ └── constant_time_eq v0.3.0 +│ │ │ │ ├── byteorder v1.5.0 +│ │ │ │ ├── digest v0.10.7 (*) +│ │ │ │ ├── sha2 v0.10.8 +│ │ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ │ ├── cpufeatures v0.2.11 +│ │ │ │ │ │ └── libc v0.2.149 +│ │ │ │ │ └── digest v0.10.7 (*) +│ │ │ │ ├── sha3 v0.10.8 +│ │ │ │ │ ├── digest v0.10.7 (*) +│ │ │ │ │ └── keccak v0.1.4 +│ │ │ │ │ └── cpufeatures v0.2.11 (*) +│ │ │ │ └── twox-hash v1.6.3 +│ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ ├── digest v0.10.7 (*) +│ │ │ │ └── static_assertions v1.1.0 +│ │ │ └── syn v2.0.38 (*) +│ │ ├── sp-runtime v27.0.0 (*) +│ │ ├── sp-std v11.0.0 +│ │ └── sp-version-proc-macro v11.0.0 (proc-macro) +│ │ ├── parity-scale-codec v3.6.5 +│ │ │ ├── arrayvec v0.7.4 +│ │ │ ├── byte-slice-cast v1.2.2 +│ │ │ ├── impl-trait-for-tuples v0.2.2 (proc-macro) (*) +│ │ │ ├── parity-scale-codec-derive v3.6.5 (proc-macro) (*) +│ │ │ └── serde v1.0.190 (*) +│ │ ├── proc-macro2 v1.0.69 (*) +│ │ ├── quote v1.0.33 (*) +│ │ └── syn v2.0.38 (*) +│ ├── sp-arithmetic v19.0.0 (*) +│ ├── sp-core v24.0.0 (*) +│ ├── sp-core-hashing-proc-macro v12.0.0 (proc-macro) (*) +│ ├── sp-debug-derive v11.0.0 (proc-macro) (*) +│ ├── sp-genesis-builder v0.3.0 +│ │ ├── serde_json v1.0.108 (*) +│ │ ├── sp-api v22.0.0 (*) +│ │ ├── sp-runtime v27.0.0 (*) +│ │ └── sp-std v11.0.0 +│ ├── sp-inherents v22.0.0 +│ │ ├── impl-trait-for-tuples v0.2.2 (proc-macro) (*) +│ │ ├── parity-scale-codec v3.6.5 (*) +│ │ ├── scale-info v2.10.0 (*) +│ │ └── sp-std v11.0.0 +│ ├── sp-io v26.0.0 (*) +│ ├── sp-metadata-ir v0.3.0 (*) +│ ├── sp-runtime v27.0.0 (*) +│ ├── sp-staking v22.0.0 +│ │ ├── impl-trait-for-tuples v0.2.2 (proc-macro) (*) +│ │ ├── parity-scale-codec v3.6.5 (*) +│ │ ├── scale-info v2.10.0 (*) +│ │ ├── sp-core v24.0.0 (*) +│ │ ├── sp-runtime v27.0.0 (*) +│ │ └── sp-std v11.0.0 +│ ├── sp-std v11.0.0 +│ ├── sp-tracing v13.0.0 (*) +│ ├── sp-weights v23.0.0 (*) +│ ├── static_assertions v1.1.0 +│ └── tt-call v1.0.9 +├── frame-system v24.0.0 +│ ├── cfg-if v1.0.0 +│ ├── frame-support v24.0.0 (*) +│ ├── log v0.4.20 +│ ├── parity-scale-codec v3.6.5 (*) +│ ├── scale-info v2.10.0 (*) +│ ├── serde v1.0.190 (*) +│ ├── sp-core v24.0.0 (*) +│ ├── sp-io v26.0.0 (*) +│ ├── sp-runtime v27.0.0 (*) +│ ├── sp-std v11.0.0 +│ ├── sp-version v25.0.0 (*) +│ └── sp-weights v23.0.0 (*) +├── macro-attr-2018 v3.0.0 +├── newtype-derive-2018 v0.2.1 (*) +├── parity-scale-codec v3.6.5 (*) +├── scale-info v2.10.0 (*) +├── sp-std v11.0.0 +├── tracing v0.1.40 (*) +└── uuid v1.5.0 (*) +[dev-dependencies] +├── chronicle-telemetry v0.7.5 (/Users/ryan/code/chronicle/crates/chronicle-telemetry) +│ ├── cfg-if v1.0.0 +│ ├── console-subscriber v0.1.10 +│ │ ├── console-api v0.5.0 +│ │ │ ├── prost v0.11.9 +│ │ │ │ ├── bytes v1.5.0 +│ │ │ │ └── prost-derive v0.11.9 (proc-macro) +│ │ │ │ ├── anyhow v1.0.75 +│ │ │ │ ├── itertools v0.10.5 (*) +│ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ └── syn v1.0.109 (*) +│ │ │ ├── prost-types v0.11.9 +│ │ │ │ └── prost v0.11.9 (*) +│ │ │ ├── tonic v0.9.2 +│ │ │ │ ├── async-trait v0.1.74 (proc-macro) (*) +│ │ │ │ ├── axum v0.6.20 +│ │ │ │ │ ├── async-trait v0.1.74 (proc-macro) (*) +│ │ │ │ │ ├── axum-core v0.3.4 +│ │ │ │ │ │ ├── async-trait v0.1.74 (proc-macro) (*) +│ │ │ │ │ │ ├── bytes v1.5.0 +│ │ │ │ │ │ ├── futures-util v0.3.29 (*) +│ │ │ │ │ │ ├── http v0.2.9 +│ │ │ │ │ │ │ ├── bytes v1.5.0 +│ │ │ │ │ │ │ ├── fnv v1.0.7 +│ │ │ │ │ │ │ └── itoa v1.0.9 +│ │ │ │ │ │ ├── http-body v0.4.5 +│ │ │ │ │ │ │ ├── bytes v1.5.0 +│ │ │ │ │ │ │ ├── http v0.2.9 (*) +│ │ │ │ │ │ │ └── pin-project-lite v0.2.13 +│ │ │ │ │ │ ├── mime v0.3.17 +│ │ │ │ │ │ ├── tower-layer v0.3.2 +│ │ │ │ │ │ └── tower-service v0.3.2 +│ │ │ │ │ │ [build-dependencies] +│ │ │ │ │ │ └── rustversion v1.0.14 (proc-macro) +│ │ │ │ │ ├── bitflags v1.3.2 +│ │ │ │ │ ├── bytes v1.5.0 +│ │ │ │ │ ├── futures-util v0.3.29 (*) +│ │ │ │ │ ├── http v0.2.9 (*) +│ │ │ │ │ ├── http-body v0.4.5 (*) +│ │ │ │ │ ├── hyper v0.14.27 +│ │ │ │ │ │ ├── bytes v1.5.0 +│ │ │ │ │ │ ├── futures-channel v0.3.29 (*) +│ │ │ │ │ │ ├── futures-core v0.3.29 +│ │ │ │ │ │ ├── futures-util v0.3.29 (*) +│ │ │ │ │ │ ├── h2 v0.3.21 +│ │ │ │ │ │ │ ├── bytes v1.5.0 +│ │ │ │ │ │ │ ├── fnv v1.0.7 +│ │ │ │ │ │ │ ├── futures-core v0.3.29 +│ │ │ │ │ │ │ ├── futures-sink v0.3.29 +│ │ │ │ │ │ │ ├── futures-util v0.3.29 (*) +│ │ │ │ │ │ │ ├── http v0.2.9 (*) +│ │ │ │ │ │ │ ├── indexmap v1.9.3 (*) +│ │ │ │ │ │ │ ├── slab v0.4.9 (*) +│ │ │ │ │ │ │ ├── tokio v1.33.0 +│ │ │ │ │ │ │ │ ├── bytes v1.5.0 +│ │ │ │ │ │ │ │ ├── mio v0.8.9 +│ │ │ │ │ │ │ │ ├── num_cpus v1.16.0 (*) +│ │ │ │ │ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ │ │ │ │ └── tokio-macros v2.1.0 (proc-macro) +│ │ │ │ │ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ │ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ │ │ │ │ └── syn v2.0.38 (*) +│ │ │ │ │ │ │ ├── tokio-util v0.7.10 +│ │ │ │ │ │ │ │ ├── bytes v1.5.0 +│ │ │ │ │ │ │ │ ├── futures-core v0.3.29 +│ │ │ │ │ │ │ │ ├── futures-sink v0.3.29 +│ │ │ │ │ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ │ │ │ │ ├── tokio v1.33.0 (*) +│ │ │ │ │ │ │ │ └── tracing v0.1.40 (*) +│ │ │ │ │ │ │ └── tracing v0.1.40 (*) +│ │ │ │ │ │ ├── http v0.2.9 (*) +│ │ │ │ │ │ ├── http-body v0.4.5 (*) +│ │ │ │ │ │ ├── httparse v1.8.0 +│ │ │ │ │ │ ├── httpdate v1.0.3 +│ │ │ │ │ │ ├── itoa v1.0.9 +│ │ │ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ │ │ ├── socket2 v0.4.10 +│ │ │ │ │ │ ├── tokio v1.33.0 (*) +│ │ │ │ │ │ ├── tower-service v0.3.2 +│ │ │ │ │ │ ├── tracing v0.1.40 (*) +│ │ │ │ │ │ └── want v0.3.1 +│ │ │ │ │ │ └── try-lock v0.2.4 +│ │ │ │ │ ├── itoa v1.0.9 +│ │ │ │ │ ├── matchit v0.7.3 +│ │ │ │ │ ├── memchr v2.6.4 +│ │ │ │ │ ├── mime v0.3.17 +│ │ │ │ │ ├── percent-encoding v2.3.0 +│ │ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ │ ├── serde v1.0.190 (*) +│ │ │ │ │ ├── sync_wrapper v0.1.2 +│ │ │ │ │ ├── tower v0.4.13 +│ │ │ │ │ │ ├── futures-core v0.3.29 +│ │ │ │ │ │ ├── futures-util v0.3.29 (*) +│ │ │ │ │ │ ├── indexmap v1.9.3 (*) +│ │ │ │ │ │ ├── pin-project v1.1.3 +│ │ │ │ │ │ │ └── pin-project-internal v1.1.3 (proc-macro) +│ │ │ │ │ │ │ ├── proc-macro2 v1.0.69 (*) +│ │ │ │ │ │ │ ├── quote v1.0.33 (*) +│ │ │ │ │ │ │ └── syn v2.0.38 (*) +│ │ │ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ │ │ ├── rand v0.8.5 (*) +│ │ │ │ │ │ ├── slab v0.4.9 (*) +│ │ │ │ │ │ ├── tokio v1.33.0 (*) +│ │ │ │ │ │ ├── tokio-util v0.7.10 (*) +│ │ │ │ │ │ ├── tower-layer v0.3.2 +│ │ │ │ │ │ ├── tower-service v0.3.2 +│ │ │ │ │ │ └── tracing v0.1.40 (*) +│ │ │ │ │ ├── tower-layer v0.3.2 +│ │ │ │ │ └── tower-service v0.3.2 +│ │ │ │ │ [build-dependencies] +│ │ │ │ │ └── rustversion v1.0.14 (proc-macro) +│ │ │ │ ├── base64 v0.21.5 +│ │ │ │ ├── bytes v1.5.0 +│ │ │ │ ├── futures-core v0.3.29 +│ │ │ │ ├── futures-util v0.3.29 (*) +│ │ │ │ ├── h2 v0.3.21 (*) +│ │ │ │ ├── http v0.2.9 (*) +│ │ │ │ ├── http-body v0.4.5 (*) +│ │ │ │ ├── hyper v0.14.27 (*) +│ │ │ │ ├── hyper-timeout v0.4.1 +│ │ │ │ │ ├── hyper v0.14.27 (*) +│ │ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ │ ├── tokio v1.33.0 (*) +│ │ │ │ │ └── tokio-io-timeout v1.2.0 +│ │ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ │ └── tokio v1.33.0 (*) +│ │ │ │ ├── percent-encoding v2.3.0 +│ │ │ │ ├── pin-project v1.1.3 (*) +│ │ │ │ ├── prost v0.11.9 (*) +│ │ │ │ ├── tokio v1.33.0 (*) +│ │ │ │ ├── tokio-stream v0.1.14 +│ │ │ │ │ ├── futures-core v0.3.29 +│ │ │ │ │ ├── pin-project-lite v0.2.13 +│ │ │ │ │ └── tokio v1.33.0 (*) +│ │ │ │ ├── tower v0.4.13 (*) +│ │ │ │ ├── tower-layer v0.3.2 +│ │ │ │ ├── tower-service v0.3.2 +│ │ │ │ └── tracing v0.1.40 (*) +│ │ │ └── tracing-core v0.1.32 (*) +│ │ ├── crossbeam-channel v0.5.8 +│ │ │ ├── cfg-if v1.0.0 +│ │ │ └── crossbeam-utils v0.8.16 +│ │ │ └── cfg-if v1.0.0 +│ │ ├── crossbeam-utils v0.8.16 (*) +│ │ ├── futures v0.3.29 (*) +│ │ ├── hdrhistogram v7.5.2 +│ │ │ ├── base64 v0.13.1 +│ │ │ ├── byteorder v1.5.0 +│ │ │ ├── flate2 v1.0.28 +│ │ │ │ ├── crc32fast v1.3.2 (*) +│ │ │ │ └── miniz_oxide v0.7.1 (*) +│ │ │ ├── nom v7.1.3 +│ │ │ │ ├── memchr v2.6.4 +│ │ │ │ └── minimal-lexical v0.2.1 +│ │ │ └── num-traits v0.2.17 (*) +│ │ ├── humantime v2.1.0 +│ │ ├── prost-types v0.11.9 (*) +│ │ ├── serde v1.0.190 (*) +│ │ ├── serde_json v1.0.108 (*) +│ │ ├── thread_local v1.1.7 (*) +│ │ ├── tokio v1.33.0 (*) +│ │ ├── tokio-stream v0.1.14 (*) +│ │ ├── tonic v0.9.2 (*) +│ │ ├── tracing v0.1.40 (*) +│ │ ├── tracing-core v0.1.32 (*) +│ │ └── tracing-subscriber v0.3.17 +│ │ ├── matchers v0.1.0 +│ │ │ └── regex-automata v0.1.10 (*) +│ │ ├── nu-ansi-term v0.46.0 +│ │ │ └── overload v0.1.1 +│ │ ├── once_cell v1.18.0 +│ │ ├── regex v1.10.2 (*) +│ │ ├── serde v1.0.190 (*) +│ │ ├── serde_json v1.0.108 (*) +│ │ ├── sharded-slab v0.1.7 (*) +│ │ ├── smallvec v1.11.1 +│ │ ├── thread_local v1.1.7 (*) +│ │ ├── tracing v0.1.40 (*) +│ │ ├── tracing-core v0.1.32 (*) +│ │ ├── tracing-log v0.1.4 (*) +│ │ └── tracing-serde v0.1.3 (*) +│ ├── tracing v0.1.40 (*) +│ ├── tracing-elastic-apm v3.2.3 +│ │ ├── anyhow v1.0.75 +│ │ ├── base64 v0.13.1 +│ │ ├── fxhash v0.2.1 +│ │ │ └── byteorder v1.5.0 +│ │ ├── rand v0.8.5 (*) +│ │ ├── reqwest v0.11.22 +│ │ │ ├── base64 v0.21.5 +│ │ │ ├── bytes v1.5.0 +│ │ │ ├── futures-core v0.3.29 +│ │ │ ├── futures-util v0.3.29 (*) +│ │ │ ├── http v0.2.9 (*) +│ │ │ ├── js-sys v0.3.64 (*) +│ │ │ ├── serde v1.0.190 (*) +│ │ │ ├── serde_json v1.0.108 (*) +│ │ │ ├── serde_urlencoded v0.7.1 +│ │ │ │ ├── form_urlencoded v1.2.0 (*) +│ │ │ │ ├── itoa v1.0.9 +│ │ │ │ ├── ryu v1.0.15 +│ │ │ │ └── serde v1.0.190 (*) +│ │ │ ├── tower-service v0.3.2 +│ │ │ ├── url v2.4.1 (*) +│ │ │ ├── wasm-bindgen v0.2.87 (*) +│ │ │ ├── wasm-bindgen-futures v0.4.37 +│ │ │ │ ├── cfg-if v1.0.0 +│ │ │ │ ├── js-sys v0.3.64 (*) +│ │ │ │ └── wasm-bindgen v0.2.87 (*) +│ │ │ └── web-sys v0.3.64 +│ │ │ ├── js-sys v0.3.64 (*) +│ │ │ └── wasm-bindgen v0.2.87 (*) +│ │ ├── serde v1.0.190 (*) +│ │ ├── serde_json v1.0.108 (*) +│ │ ├── tokio v1.33.0 (*) +│ │ ├── tracing v0.1.40 (*) +│ │ ├── tracing-subscriber v0.3.17 (*) +│ │ └── version v3.0.0 +│ ├── tracing-log v0.1.4 (*) +│ ├── tracing-subscriber v0.3.17 (*) +│ └── url v2.4.1 (*) +├── sp-core v24.0.0 (*) +└── sp-runtime v27.0.0 (*) diff --git a/crates/protocol-substrate-chronicle/Cargo.toml b/crates/protocol-substrate-chronicle/Cargo.toml new file mode 100644 index 000000000..42cefff4c --- /dev/null +++ b/crates/protocol-substrate-chronicle/Cargo.toml @@ -0,0 +1,36 @@ +[package] +name = "protocol-substrate-chronicle" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +subxt = {version="0.32",features=["substrate-compat"]} +async-trait= {workspace=true} +thiserror={workspace=true} +serde={workspace=true} +futures={workspace=true} +tokio={workspace=true, optional=true} +k256={workspace=true} +tracing={workspace=true} +clap_builder = {version="*"} + +#local dependencies +pallet-chronicle = {path="../pallet-chronicle"} +node-chronicle = {path="../../node/node-chronicle", optional=true} +common = {path="../common", features=["parity-encoding"]} +chronicle-signing = {path="../chronicle-signing"} + +#optional +sp-runtime = { version="28.0.0", optional=true} +sp-io = {version="27.0.0" , optional=true} +sc-cli = { version = "0.33.0",optional=true} + +[dev-dependencies] +chronicle-telemetry = {path="../chronicle-telemetry"} +uuid = {workspace=true} + +[features] +default = ["development-runtime"] +development-runtime = ["dep:node-chronicle","dep:tokio","dep:sp-runtime","dep:sp-io","dep:sc-cli"] diff --git a/crates/protocol-substrate-chronicle/src/abstract_ledger.rs b/crates/protocol-substrate-chronicle/src/abstract_ledger.rs new file mode 100644 index 000000000..024674020 --- /dev/null +++ b/crates/protocol-substrate-chronicle/src/abstract_ledger.rs @@ -0,0 +1,194 @@ +use std::{convert::Infallible, sync::Arc}; + +use futures::stream::BoxStream; +use pallet_chronicle::ChronicleTransactionId; +use serde::{Deserialize, Serialize}; +use subxt::utils::H256; +use thiserror::Error; + +#[derive(Debug, Error)] +pub enum BlockIdError { + #[error("Not 32 bytes")] + Size(#[from] std::array::TryFromSliceError), +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub enum BlockId { + Unknown, //Block ids can be null, empty string etc + Block(H256), //ToDo - trait +} + +impl From for BlockId { + fn from(hash: H256) -> Self { + BlockId::Block(hash) + } +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)] +pub struct Position(u32); + +impl From for Position { + fn from(height: u32) -> Self { + Position(height) + } +} + +impl PartialOrd for Position { + fn partial_cmp(&self, other: &Self) -> Option { + let (Position(x), Position(y)) = (self, other); + x.partial_cmp(y) + } +} + +impl Position { + pub fn new(height: u32) -> Self { + Position(height) + } + + pub fn map(&self, f: F) -> T + where + F: FnOnce(&u32) -> T, + { + f(&self.0) + } + + pub fn distance(&self, other: &Self) -> u32 { + let (Position(x), Position(y)) = (self, other); + x.saturating_sub(*y) + } +} + +impl std::fmt::Display for Position { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Position(x) => f.write_str(&format!("{}", x)), + } + } +} + +// Type that can contain a distributed tracing span for transaction processors +// that support it +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)] +pub enum Span { + Span(u64), + NotTraced, +} + +// An application specific ledger event with its corresponding transaction id, +// block height and trace span +pub type LedgerEventContext = (Event, ChronicleTransactionId, BlockId, Position, Span); + +#[async_trait::async_trait] +pub trait LedgerEvent { + type Error: std::error::Error; + async fn deserialize(buf: &[u8]) -> Result<(Self, Span), Self::Error> + where + Self: Sized; +} + +#[async_trait::async_trait] +impl LedgerEvent for () { + type Error = Infallible; + async fn deserialize(_buf: &[u8]) -> Result<(Self, Span), Self::Error> { + Ok(((), Span::NotTraced)) + } +} + +pub trait MessageBuilder {} + +#[async_trait::async_trait] +pub trait LedgerTransaction { + type Error: std::error::Error + Send + Sync + 'static; + type Payload: Sized + Send + Sync; + async fn as_payload(&self) -> Result; +} + +#[async_trait::async_trait] +pub trait LedgerWriter { + type Error: std::error::Error; + type Transaction: LedgerTransaction; + + // Submit is used to submit a transaction to the ledger + async fn submit(&self, tx: &Self::Transaction) -> Result; +} + +pub struct BlockingLedgerReader +where + R: LedgerReader + Send, +{ + reader: R, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum FromBlock { + // Do not attempt to catch up, start from the current head + Head, + // Discover the first useful block and start from there + First, + // Start from the given block + BlockId(BlockId), +} + +impl BlockingLedgerReader +where + R: LedgerReader + Send, +{ + pub fn new(reader: R) -> Self { + Self { reader } + } + + pub fn get_state_entry(&self, address: &str) -> Result, R::Error> { + tokio::runtime::Handle::current().block_on(self.reader.get_state_entry(address)) + } + + pub fn block_height(&self) -> Result<(Position, BlockId), R::Error> { + tokio::runtime::Handle::current().block_on(self.reader.block_height()) + } + + pub fn state_updates( + &self, + from_block: FromBlock, + number_of_blocks: Option, + ) -> Result>, R::Error> { + tokio::runtime::Handle::current() + .block_on(self.reader.state_updates(from_block, number_of_blocks)) + } +} + +pub struct BlockingLedgerWriter +where + W: LedgerWriter + Send, +{ + writer: W, +} + +impl BlockingLedgerWriter +where + W: LedgerWriter + Send, +{ + pub fn new(writer: W) -> Self { + Self { writer } + } + + pub fn submit(&self, tx: &W::Transaction) -> Result { + tokio::runtime::Handle::current().block_on(self.writer.submit(tx)) + } +} + +#[async_trait::async_trait] +pub trait LedgerReader { + type Event: LedgerEvent; + type Error: std::error::Error; + /// Get the state entry at `address` + async fn get_state_entry(&self, address: &str) -> Result, Self::Error>; + // Get the block height of the ledger, and the id of the highest block + async fn block_height(&self) -> Result<(Position, BlockId), Self::Error>; + /// Subscribe to state updates from this ledger, starting at `offset`, and + /// ending the stream after `number_of_blocks` blocks have been processed. + async fn state_updates( + &self, + // The block to start from + from_block: FromBlock, + // The number of blocks to process before ending the stream + number_of_blocks: Option, + ) -> Result>, Self::Error>; +} diff --git a/crates/protocol-substrate-chronicle/src/development_runtime.rs b/crates/protocol-substrate-chronicle/src/development_runtime.rs new file mode 100644 index 000000000..e66df7997 --- /dev/null +++ b/crates/protocol-substrate-chronicle/src/development_runtime.rs @@ -0,0 +1,176 @@ +use std::time::Duration; + +use node_chronicle::cli::Cli; +use node_chronicle::service; +use sc_cli::{print_node_infos, CliConfiguration, Signals, SubstrateCli}; +use subxt::config::ExtrinsicParams; +use subxt::utils::{AccountId32, MultiAddress, MultiSignature}; +use tokio::sync::oneshot::{channel, Sender}; + +use crate::subxt_client::{SubstrateClient, SubxtClientError}; + +pub struct EmbeddedSubstrate { + shutdown: Option>, + rpc_port: u16, +} + +impl EmbeddedSubstrate { + pub async fn connect(&self) -> Result, SubxtClientError> + where + T: subxt::Config, + T: subxt::Config, + T: subxt::Config
>, + T: subxt::Config, + T: subxt::Config, + >::OtherParams: Default, + { + SubstrateClient::connect(format!("ws://127.0.0.1:{}", self.rpc_port)).await + } +} + +impl Drop for EmbeddedSubstrate { + fn drop(&mut self) { + let _ = self.shutdown.take().unwrap().send(()); + } +} + +// Utilise the CLI run command to bring up a substrate-chronicle dev mode node with a new runtime thread. +// Execute node until receipt of a drop channel message or signal +pub async fn embedded_dev_node_rpc_on_port(port: u16) -> Result { + let mut cli = Cli::try_from_iter(["--dev"]).unwrap(); + + let (live_tx, live_rx) = channel::<()>(); + let (tx, rx) = channel(); + + std::thread::spawn(move || { + let tokio_runtime = + tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap(); + + let signals = tokio_runtime + .block_on(async { Signals::capture() }) + .map_err(|e| tracing::error!("{}", e)) + .unwrap(); + + cli.run.rpc_port = Some(port); + + let config = cli + .create_configuration(&cli.run, tokio_runtime.handle().clone()) + .map_err(|e| tracing::error!("{}", e)) + .unwrap(); + + print_node_infos::(&config); + + cli.run + .init(&"https://chronicle.works".to_owned(), &"2.0.dev".to_owned(), |_, _| {}, &config) + .unwrap(); + + let task_manager = tokio_runtime + .block_on(async move { service::new_full(config).map_err(sc_cli::Error::Service) }) + .map_err(|e| tracing::error!("{}", e)) + .unwrap(); + + let _ = live_tx.send(()); + + tokio_runtime.block_on(async move { + let _ = rx.await; + + tracing::info!("Shutdown message"); + }); + + tokio_runtime.shutdown_timeout(Duration::from_secs(30)); + }); + + let _ = live_rx.await; + + Ok(EmbeddedSubstrate { shutdown: tx.into(), rpc_port: port }) +} + +#[cfg(test)] +pub mod test_runtime { + use chronicle_signing::{ + chronicle_secret_names, ChronicleSecretsOptions, ChronicleSigning, BATCHER_NAMESPACE, + CHRONICLE_NAMESPACE, + }; + use common::identity::SignedIdentity; + use pallet_chronicle::{ + operations::{ChronicleOperation, CreateNamespace}, + ExternalId, NamespaceId, + }; + use subxt::{ + ext::sp_core::{Pair, Public}, + PolkadotConfig, + }; + use uuid::Uuid; + + use crate::subxt_client::SubstrateTransaction; + + use super::*; + + fn get_from_seed(seed: &str) -> [u8; 32] { + let k = TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed"); + let mut buf = [0; 32]; + buf.copy_from_slice(&k.to_raw_vec()); + + buf + } + + #[tokio::test] + pub async fn connect() { + use crate::abstract_ledger::{LedgerReader, LedgerWriter}; + //chronicle_telemetry::telemetry(None, chronicle_telemetry::ConsoleLogging::Pretty); + let handle = embedded_dev_node_rpc_on_port(2003).await.unwrap(); + + let client = handle.connect::().await.unwrap(); + + let events = client + .state_updates(crate::abstract_ledger::FromBlock::First, None) + .await + .unwrap(); + + let signing = ChronicleSigning::new( + chronicle_secret_names(), + vec![ + ( + CHRONICLE_NAMESPACE.to_string(), + ChronicleSecretsOptions::seeded( + vec![( + "chronicle-pk".to_string(), + get_from_seed::("Chronicle"), + )] + .into_iter() + .collect(), + ), + ), + ( + BATCHER_NAMESPACE.to_string(), + ChronicleSecretsOptions::seeded( + vec![( + "batcher-pk".to_string(), + get_from_seed::("Chronicle"), + )] + .into_iter() + .collect(), + ), + ), + ], + ) + .await + .unwrap(); + + client + .submit( + &SubstrateTransaction::new( + &signing, + SignedIdentity::new_no_identity(), + vec![ChronicleOperation::CreateNamespace(CreateNamespace::new( + NamespaceId::from_external_id(&ExternalId::from("test"), Uuid::default()), + ))], + ) + .await + .unwrap(), + ) + .await + .unwrap(); + } +} diff --git a/crates/protocol-substrate-chronicle/src/lib.rs b/crates/protocol-substrate-chronicle/src/lib.rs new file mode 100644 index 000000000..fe5067760 --- /dev/null +++ b/crates/protocol-substrate-chronicle/src/lib.rs @@ -0,0 +1,5 @@ +mod abstract_ledger; +mod subxt_client; + +#[cfg(feature = "development-runtime")] +mod development_runtime; diff --git a/crates/protocol-substrate-chronicle/src/subxt_client.rs b/crates/protocol-substrate-chronicle/src/subxt_client.rs new file mode 100644 index 000000000..3a0e01ce7 --- /dev/null +++ b/crates/protocol-substrate-chronicle/src/subxt_client.rs @@ -0,0 +1,481 @@ +use std::convert::Infallible; +use std::default; +use std::marker::PhantomData; +use std::sync::Arc; + +use chronicle_signing::{ + ChronicleKnownKeyNamesSigner, ChronicleSigner, ChronicleSigning, OwnedSecret, SecretError, + BATCHER_NAMESPACE, BATCHER_PK, +}; +use common::identity::{self, SignedIdentity}; +use common::ledger::OperationSubmission; +use futures::stream::{self, BoxStream}; +use futures::{StreamExt, TryFutureExt, TryStreamExt}; +use k256::ecdsa::{self, SigningKey}; +use pallet_chronicle::operations::{self, ChronicleOperation}; +use pallet_chronicle::ChronicleTransactionId; +use sp_runtime::testing::H256; +use subxt::backend::legacy::rpc_methods::{BlockNumber, NumberOrHex}; +use subxt::backend::BackendExt; +use subxt::config::{ExtrinsicParams, Hasher}; +use subxt::dynamic::Value; +use subxt::ext::codec::{Decode, Encode, Error}; +use subxt::ext::sp_core::{blake2_256, Pair}; + +use subxt::tx::{Payload, Signer}; +use subxt::utils::{AccountId32, MultiAddress, MultiSignature}; +use subxt::{custom_values, OnlineClient}; + +use crate::abstract_ledger::{ + BlockId, FromBlock, LedgerEvent, LedgerEventContext, LedgerReader, LedgerTransaction, + LedgerWriter, MessageBuilder, Position, Span, +}; + +#[derive(Clone)] +pub struct SubstrateClient { + client: OnlineClient, +} + +impl SubstrateClient +where + C: subxt::Config, + C: subxt::Config
>, + C: subxt::Config, + >::OtherParams: Default, +{ + pub async fn connect(url: impl AsRef) -> Result { + Ok(Self { client: OnlineClient::from_url(url).await? }) + } + + pub async fn send_operations_as_extrinsic + Send>( + &self, + signer: &S, + operations: OperationSubmission, + ) -> Result { + let payload = Payload::new("Chronicle", "apply", common::ledger::ApplyArgs { operations }); + + let progress = + self.client.tx().sign_and_submit_then_watch_default(&payload, signer).await?; + + let in_block = progress.wait_for_in_block().await?; + + Ok(ChronicleTransactionId::from(&*in_block.extrinsic_hash().to_string())) + } +} + +pub struct SubstrateTransaction { + key: subxt::ext::sp_core::ecdsa::Pair, //We need the batcher key to sign transactions + identity: Arc, + operations: Arc>, +} + +impl SubstrateTransaction { + pub async fn new( + signer: &ChronicleSigning, + identity: SignedIdentity, + operations: impl IntoIterator, + ) -> Result { + Ok(Self { + key: subxt::ext::sp_core::ecdsa::Pair::from_seed_slice( + &signer.copy_signing_key(BATCHER_NAMESPACE, BATCHER_PK).await?.to_bytes(), + ) + .unwrap(), + identity: identity.into(), + operations: Arc::new(operations.into_iter().collect::>()), + }) + } +} + +pub struct SubstrateMessageBuilder; + +#[async_trait::async_trait] +impl LedgerTransaction for SubstrateTransaction { + type Error = Infallible; + type Payload = OperationSubmission; + + async fn as_payload(&self) -> Result { + Ok(OperationSubmission { + identity: self.identity.clone(), + operations: self.operations.clone(), + }) + } +} + +///Subxt signer needs to be infallible, so we need to keep a copy of key material here +impl Signer for SubstrateTransaction +where + T: subxt::Config, + T: subxt::Config, + T: subxt::Config
::AccountId, ()>>, + T: subxt::Config, +{ + fn account_id(&self) -> AccountId32 { + blake2_256(&self.key.public().0).into() + } + + fn address(&self) -> MultiAddress<::AccountId, ()> { + let account = >::account_id(self); + MultiAddress::Id(account) + } + + fn sign(&self, signer_payload: &[u8]) -> MultiSignature { + self.key.sign(signer_payload).into() + } +} + +pub enum SubstrateEvent { + Committed { + diff: common::prov::ProvModel, + //identity: common::identity::SignedIdentity + }, + Contradicted(common::prov::Contradiction), +} + +impl SubstrateEvent { + pub fn new_committed(diff: common::prov::ProvModel) -> Self { + SubstrateEvent::Committed { diff } + } + + pub fn new_contradicted(contradiction: common::prov::Contradiction) -> Self { + SubstrateEvent::Contradicted(contradiction) + } +} + +#[async_trait::async_trait] +impl LedgerEvent for SubstrateEvent { + type Error = Infallible; + + async fn deserialize(buf: &[u8]) -> Result<(Self, Span), Self::Error> + where + Self: Sized, + { + unimplemented!() + } +} + +#[derive(Debug, thiserror::Error)] +pub enum SubxtClientError { + #[error("Subxt error: {0}")] + SubxtError(#[from] subxt::Error), + + #[error("Invalid block")] + InvalidBlock, + + #[error("Codec: {0}")] + Codec(#[from] subxt::ext::codec::Error), +} + +impl From for SubxtClientError { + fn from(_value: Infallible) -> Self { + unreachable!() + } +} + +impl SubstrateClient +where + C: subxt::Config, + C: subxt::Config
, + H: subxt::config::Header + Send + Sync, + H: Decode, + H: Encode, + H: subxt::config::Header, +{ + // Return child blocks of from_block, limiting to num_blocks if not none + async fn block_hashes_from( + &self, + from_block: C::Hash, + num_blocks: Option, + ) -> Result>, SubxtClientError> { + // Get the block at hash + let block = self.client.blocks().at(from_block).await?; + + let from_block_num = block.number(); + + let hashes = stream::unfold( + (self.client.clone(), from_block_num), + move |(client, block_num)| async move { + if let Some(num_blocks) = num_blocks { + if num_blocks == block_num { + return None; + } + } + + let block_hash: Result = client + .backend() + .call_decoding( + "chain_getBlockHash", + Some(&vec![block_num].encode()), + subxt::utils::H256::zero(), + ) + .await + .map_err(SubxtClientError::from); + + Some((block_hash, (client, block_num + 1))) + }, + ); + + Ok(Box::pin(hashes)) + } + // Return events from `number_of_blocks` blocks from the client, starting at `from_block` + async fn events_for_block( + &self, + from_block: C::Hash, + ) -> Result>, SubxtClientError> { + let header = self.client.backend().block_header(from_block).await?; + let block_num = match header { + Some(header) => Ok(header.number()), + None => { + tracing::error!("Block header is None"); + Err(SubxtClientError::InvalidBlock) + }, + }?; + + let events_for_block = match self.client.events().at(from_block).await { + Ok(events) => Ok(events), + Err(e) => { + tracing::error!("Failed to get events for block: {}", e); + Err(SubxtClientError::InvalidBlock) + }, + }?; + + let events_for_block = + stream::unfold(events_for_block.iter(), |mut events_for_block| async move { + match events_for_block.next() { + Some(Ok(event)) => match Self::extract_event(event) { + Ok(Some(event)) => Some((event, events_for_block)), + _ => None, + }, + Some(Err(e)) => { + tracing::error!("Cannot fetch event {}", e); + None + }, + _ => None, + } + }); + + let event_stream = events_for_block.map(move |event| { + ( + event, + ChronicleTransactionId::from(&*from_block.to_string()), + BlockId::Block(from_block), + Position::from(block_num), + Span::NotTraced, + ) + }); + + Ok(event_stream.boxed()) + } + + async fn stream_finalised_events( + &self, + ) -> Result>, SubxtClientError> { + let blocks = self.client.blocks().subscribe_finalized().await?; + + let parsed_events = blocks + .map_err(SubxtClientError::from) + .and_then(|block| async move { + let block_num = block.number(); + let block_hash = block.hash(); + + let events = block.events().await.map_err(SubxtClientError::from); + + match events { + Err(e) => Err(e), + Ok(events) => { + let events = events + .iter() + .filter_map(|event| { + event + .map_err(SubxtClientError::from) + .and_then(Self::extract_event) + .transpose() + .map(|event| { + event.map(|event| { + ( + event, + ChronicleTransactionId::from( + &*block_hash.to_string(), + ), + BlockId::Block(block_hash), + Position::from(block_num), + Span::NotTraced, + ) + }) + }) + }) + .collect::>(); + Ok(stream::iter(events)) + }, + } + }) + .boxed(); + + //Unfold and terminate stream on error + let flattened_stream = stream::unfold(parsed_events, |mut parsed_events| async move { + match parsed_events.next().await { + Some(Ok(events)) => Some((events, parsed_events)), + Some(Err(e)) => { + tracing::error!("Subscription error {}", e); + None + }, + _ => None, + } + }) + .flatten() + .boxed(); + + // Terminate on parse error in flattened stream, + let flattened_stream = + stream::unfold(flattened_stream, |mut flattened_stream| async move { + match flattened_stream.next().await { + Some(Err(e)) => { + tracing::error!("Event parse error {}", e); + None + }, + Some(Ok(event)) => Some((event, flattened_stream)), + None => None, + } + }) + .boxed(); + + Ok(flattened_stream) + } + + async fn historical_events( + &self, + from_block: C::Hash, + num_blocks: Option, + ) -> Result>, SubxtClientError> { + let from_block_clone = self; + let block_hashes = from_block_clone.block_hashes_from(from_block, num_blocks).await?; + + let events = stream::unfold( + (block_hashes, self), + move |(mut block_hashes, self_clone)| async move { + let next_block_hash = block_hashes.next().await; + match next_block_hash { + Some(Ok(block_hash)) => { + let events = self_clone.events_for_block(block_hash).await; + match events { + Ok(events) => Some((events, (block_hashes, self_clone))), + Err(e) => { + tracing::error!("Subscription error {}", e); + None + }, + } + }, + Some(Err(e)) => { + tracing::error!("Subscription error {}", e); + None + }, + _ => None, + } + }, + ) + .flatten() + .boxed(); + + Ok(events) + } + + fn extract_event( + event: subxt::events::EventDetails, + ) -> Result, SubxtClientError> { + match (event.pallet_name(), event.variant_name(), event.field_bytes()) { + ("chronicle", "Applied", mut event_bytes) => { + match common::prov::ProvModel::decode(&mut event_bytes) { + Ok(prov_model) => Ok(SubstrateEvent::new_committed(prov_model).into()), + Err(e) => { + tracing::error!("Failed to decode ProvModel: {}", e); + Err(e.into()) + }, + } + }, + ("chronicle", "Contradicted", mut event_bytes) => { + match common::prov::Contradiction::decode(&mut event_bytes) { + Ok(contradiction) => Ok(SubstrateEvent::new_contradicted(contradiction).into()), + Err(e) => { + tracing::error!("Failed to decode Contradiction: {}", e); + Err(e.into()) + }, + } + }, + (pallet, event, _) => Ok(None), + } + } +} + +#[async_trait::async_trait] +impl LedgerWriter for SubstrateClient +where + C: subxt::Config
>, + C: subxt::Config, + C: subxt::Config, + C: subxt::Config, + >::OtherParams: Default, + >::OtherParams: Send, +{ + type Error = SubxtClientError; + type Transaction = SubstrateTransaction; + + async fn submit(&self, tx: &Self::Transaction) -> Result { + Ok(self.send_operations_as_extrinsic(tx, tx.as_payload().await?).await?) + } +} + +#[async_trait::async_trait] +impl LedgerReader for SubstrateClient +where + C: subxt::Config, + C: subxt::Config
, + H: subxt::config::Header + Send + Sync, + H: Decode, + H: Encode, + H: subxt::config::Header, +{ + type Event = SubstrateEvent; + + type Error = SubxtClientError; + + /// Get the state entry at `address` + async fn get_state_entry(&self, address: &str) -> Result, Self::Error> { + unimplemented!() + } + // Get the block height of the ledger, and the id of the highest block + async fn block_height(&self) -> Result<(Position, BlockId), Self::Error> { + let block = self.client.blocks().at_latest().await?; + + Ok((Position::from(block.number()), BlockId::from(block.hash()))) + } + /// Subscribe to state updates from this ledger, starting at `offset`, and + /// ending the stream after `number_of_blocks` blocks have been processed. + async fn state_updates( + &self, + // The block to start from + from_block: FromBlock, + // The number of blocks to process before ending the stream + number_of_blocks: Option, + ) -> Result>, Self::Error> { + // If fromblock is not head, then load in historical blocks and yield up to number_of_blocks events + let historical = match from_block { + FromBlock::Head => stream::empty().boxed(), + FromBlock::First => self + .historical_events(self.client.backend().genesis_hash().await?, number_of_blocks) + .await? + .boxed(), + FromBlock::BlockId(BlockId::Block(hash)) => { + self.historical_events(hash, number_of_blocks).await?.boxed() + }, + FromBlock::BlockId(BlockId::Unknown) => self + .historical_events(self.client.backend().genesis_hash().await?, number_of_blocks) + .await? + .boxed(), + }; + + let all = historical.chain(self.stream_finalised_events().await?); + + //TODO: only take number_of_blocks worth of events before closing the stream + + Ok(all.boxed()) + } +} diff --git a/crates/rpc-chronicle/Cargo.toml b/crates/rpc-chronicle/Cargo.toml new file mode 100644 index 000000000..bd47c486b --- /dev/null +++ b/crates/rpc-chronicle/Cargo.toml @@ -0,0 +1,36 @@ +[package] +name = "rpc-chronicle" +version = "1.0.0" +edition = "2021" +description = 'Chronicle / substrate RPC methods' + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +codec = { package = "parity-scale-codec", version = "3", default-features = false, features = [ + "derive", +] } + +jsonrpsee = { version = "0.16", features = ["server","client","macros"] } + + +# Substrate packages + +sp-api = { default-features = false, version = "23.0.0" } +sp-blockchain = { default-features = false, version = "25.0.0"} +sp-runtime = { default-features = false, version = "28.0.0"} + +# local packages +runtime-api-chronicle = { path = "../runtime-api-chronicle", default-features = false } +runtime-chronicle = { path = "../../node/runtime-chronicle", default-features = false } +pallet-chronicle = {path="../pallet-chronicle", default-features=false} +[features] +default = ["std"] +std = [ + "sp-api/std", + "sp-runtime/std", + "runtime-api-chronicle/std", + "runtime-chronicle/std", + "pallet-chronicle/std" +] diff --git a/crates/rpc-chronicle/src/lib.rs b/crates/rpc-chronicle/src/lib.rs new file mode 100644 index 000000000..bf4ff0b14 --- /dev/null +++ b/crates/rpc-chronicle/src/lib.rs @@ -0,0 +1,78 @@ +use jsonrpsee::{ + core::{Error as JsonRpseeError, RpcResult}, + proc_macros::rpc, + types::error::{CallError, ErrorObject}, +}; +pub use runtime_api_chronicle::ChronicleApi as ChronicleRuntimeApi; +use sp_api::ProvideRuntimeApi; +use sp_blockchain::{Backend, HeaderBackend}; +use std::sync::Arc; + +#[rpc(client, server)] +pub trait ChronicleApi { + #[method(name = "chronicle_catchUp")] + fn catch_up( + &self, + at: Option, + page_size: u32, + page_num: u32, + ) -> RpcResult>; +} + +/// A struct that implements the `TemplateApi`. +pub struct Chronicle { + // If you have more generics, no need to TemplatePallet + // just use a tuple like TemplatePallet + client: Arc, + _marker: std::marker::PhantomData

, +} + +impl Chronicle { + /// Create new `TemplatePallet` instance with the given reference to the client. + pub fn new(client: Arc) -> Self { + Self { client, _marker: Default::default() } + } +} + +impl ChronicleApiServer<::Hash> for Chronicle +where + Block: sp_runtime::traits::Block, + C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend + Backend, + C::Api: ChronicleRuntimeApi, +{ + fn catch_up( + &self, + at: Option<::Hash>, + page_size: u32, + page_num: u32, + ) -> RpcResult> { + // Get child hashes + let all_children = self.client.children(at.unwrap()).unwrap(); + let mut ret = vec![]; + for (i, hash) in all_children.into_iter().enumerate() { + let events = self.client.body(hash).unwrap().unwrap(); + for event in events { + if let runtime_chronicle::RuntimeEvent::Chronicle( + pallet_chronicle::Event::Applied(model), + ) = event + { + ret.push(model); + } + } + } + + RpcResult::Ok(vec![]) + } +} + +const RUNTIME_ERROR: i32 = 1; + +/// Converts a runtime trap into an RPC error. +fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -> JsonRpseeError { + CallError::Custom(ErrorObject::owned( + RUNTIME_ERROR, + "Runtime error", + Some(format!("{:?}", err)), + )) + .into() +} diff --git a/crates/runtime-api-chronicle/Cargo.toml b/crates/runtime-api-chronicle/Cargo.toml new file mode 100644 index 000000000..cef0b2de0 --- /dev/null +++ b/crates/runtime-api-chronicle/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "runtime-api-chronicle" +version = "1.0.0" +edition = "2021" + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +sp-api = { version = "23.0.0", default-features = false } +sp-core = { version = "25.0.0", default-features = false } + +#Local dependencies +common = {path="../common", default-features=false, features=["parity-encoding"]} + +[features] +default = ["std"] +std = [ + "sp-api/std", + "common/std" +] diff --git a/crates/runtime-api-chronicle/src/lib.rs b/crates/runtime-api-chronicle/src/lib.rs new file mode 100644 index 000000000..cdcb71087 --- /dev/null +++ b/crates/runtime-api-chronicle/src/lib.rs @@ -0,0 +1,14 @@ +#![cfg_attr(not(feature = "std"), no_std)] +pub type Hash = sp_core::H256; + +pub mod chronicle_core { + pub use common::*; +} + +// Here we declare the runtime API. It is implemented it the `impl` block in +// runtime file (the `runtime/src/lib.rs`) +sp_api::decl_runtime_apis! { + pub trait ChronicleApi { + fn placeholder() -> u32; + } +} diff --git a/crates/sawtooth-tp/Cargo.toml b/crates/sawtooth-tp/Cargo.toml index 4d844c826..bbe3b119b 100644 --- a/crates/sawtooth-tp/Cargo.toml +++ b/crates/sawtooth-tp/Cargo.toml @@ -18,7 +18,6 @@ version = "0.7.5" async-stl-client = { workspace = true } async-trait = { workspace = true } bytes = { workspace = true } -chronicle-protocol = { path = "../chronicle-protocol" } chronicle-signing = { workspace = true } chronicle-telemetry = { path = "../chronicle-telemetry" } clap = { workspace = true } diff --git a/node/node-chronicle/Cargo.toml b/node/node-chronicle/Cargo.toml index bb31c7626..e28c5ab67 100644 --- a/node/node-chronicle/Cargo.toml +++ b/node/node-chronicle/Cargo.toml @@ -15,57 +15,63 @@ targets = ["x86_64-unknown-linux-gnu"] [[bin]] name = "node-chronicle" +path = "src/main.rs" + +[lib] +name = "node_chronicle" +path = "src/lib.rs" [dependencies] clap = { version = "4.4.2", features = ["derive"] } futures = { version = "0.3.21", features = ["thread-pool"]} -sc-cli = { version = "0.32.0" } -sp-core = { version= "24.0.0" } -sc-executor = { version = "0.28.0" } -sc-network = { version = "0.30.0" } -sc-service = { version = "0.31.0" } -sc-telemetry = { version = "11.0.0" } -sc-transaction-pool = { version = "24.0.0" } -sc-transaction-pool-api = { version = "24.0.0" } -sc-offchain = { version = "25.0.0" } -sc-statement-store = { version = "6.0.0" } -sc-consensus-aura = { version = "0.30.0" } -sp-consensus-aura = { version = "0.28.0" } -sc-consensus = { version = "0.29.0" } -sc-consensus-grandpa = { version = "0.15.0" } -sp-consensus-grandpa = { version = "9.0.0" } -sc-client-api = { version = "24.0.0" } -sp-runtime = { version = "27.0.0" } -sp-io = { version = "26.0.0" } -sp-timestamp = { version = "22.0.0" } -sp-inherents = { version = "22.0.0" } -sp-keyring = { version = "27.0.0" } -frame-system = { version = "24.0.0" } -pallet-transaction-payment = { version = "24.0.0", default-features = false } +sc-cli = { version = "0.33.0" } +sp-core = { version= "25.0.0" } +sc-executor = { version = "0.29.0" } +sc-network = { version = "0.31.0" } +sc-service = { version = "0.32.0" } +sc-telemetry = { version = "12.0.0" } +sc-transaction-pool = { version = "25.0.0" } +sc-transaction-pool-api = { version = "25.0.0" } +sc-offchain = { version = "26.0.0" } +sc-statement-store = { version = "7.0.0" } +sc-consensus-aura = { version = "0.31.0" } +sp-consensus-aura = { version = "0.29.0" } +sc-consensus = { version = "0.30.0" } +sc-consensus-grandpa = { version = "0.16.0" } +sp-consensus-grandpa = { version = "10.0.0" } +sc-client-api = { version = "25.0.0" } +sp-runtime = { version = "28.0.0" } +sp-io = { version = "27.0.0" } +sp-timestamp = { version = "23.0.0" } +sp-inherents = { version = "23.0.0" } +sp-keyring = { version = "28.0.0" } +frame-system = { version = "25.0.0" } +pallet-transaction-payment = { version = "25.0.0", default-features = false } # These dependencies are used for the node template's RPCs -jsonrpsee = { version = "0.16.3", features = ["server"] } -sp-api = { version = "22.0.0" } -sc-rpc-api = { version = "0.29.0" } -sp-blockchain = { version = "24.0.0" } -sp-block-builder = { version = "22.0.0" } -sc-basic-authorship = { version = "0.30.0" } -substrate-frame-rpc-system = { version = "24.0.0" } -pallet-transaction-payment-rpc = { version = "26.0.0" } +jsonrpsee = { version = "0.16", features = ["server"] } +sp-api = { version = "23.0.0" } +sc-rpc-api = { version = "0.30.0" } +sp-blockchain = { version = "25.0.0" } +sp-block-builder = { version = "23.0.0" } +sc-basic-authorship = { version = "0.31.0" } +substrate-frame-rpc-system = { version = "25.0.0" } +pallet-transaction-payment-rpc = { version = "27.0.0" } # These dependencies are used for runtime benchmarking -frame-benchmarking = { version = "24.0.0" } -frame-benchmarking-cli = { version = "28.0.0" } +frame-benchmarking = { version = "25.0.0" } +frame-benchmarking-cli = { version = "29.0.0" } # Local Dependencies runtime-chronicle = { path = "../runtime-chronicle" } +rpc-chronicle = { path = "../../crates/rpc-chronicle" } # CLI-specific dependencies -try-runtime-cli = { version = "0.34.0", optional = true } +try-runtime-cli = { version = "0.35.0", optional = true } [build-dependencies] -substrate-build-script-utils = { version = "8.0.0" } +substrate-build-script-utils = { version = "9.0.0" } [features] default = [] diff --git a/node/node-chronicle/src/chain_spec.rs b/node/node-chronicle/src/chain_spec.rs index 608eefdfb..6627294e1 100644 --- a/node/node-chronicle/src/chain_spec.rs +++ b/node/node-chronicle/src/chain_spec.rs @@ -5,7 +5,7 @@ use runtime_chronicle::{ use sc_service::ChainType; use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_consensus_grandpa::AuthorityId as GrandpaId; -use sp_core::{sr25519, Pair, Public}; +use sp_core::{ecdsa, sr25519, Pair, Public}; use sp_runtime::traits::{IdentifyAccount, Verify}; // The URL for the telemetry server. @@ -55,6 +55,7 @@ pub fn development_config() -> Result { // Pre-funded accounts vec![ get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Chronicle"), get_account_id_from_seed::("Bob"), get_account_id_from_seed::("Alice//stash"), get_account_id_from_seed::("Bob//stash"), diff --git a/node/node-chronicle/src/lib.rs b/node/node-chronicle/src/lib.rs index f117b8aae..98fb4a23e 100644 --- a/node/node-chronicle/src/lib.rs +++ b/node/node-chronicle/src/lib.rs @@ -1,3 +1,6 @@ +pub mod benchmarking; pub mod chain_spec; +pub mod cli; +pub mod command; pub mod rpc; pub mod service; diff --git a/node/node-chronicle/src/rpc.rs b/node/node-chronicle/src/rpc.rs index 00a2c4a1a..1eb4e0dfa 100644 --- a/node/node-chronicle/src/rpc.rs +++ b/node/node-chronicle/src/rpc.rs @@ -36,6 +36,7 @@ where C: Send + Sync + 'static, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, + C::Api: rpc_chronicle::ChronicleRuntimeApi, C::Api: BlockBuilder, P: TransactionPool + 'static, { @@ -46,7 +47,7 @@ where let FullDeps { client, pool, deny_unsafe } = deps; module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; - module.merge(TransactionPayment::new(client).into_rpc())?; + module.merge(TransactionPayment::new(client.clone()).into_rpc())?; // Extend this RPC with a custom API by using the following syntax. // `YourRpcStruct` should have a reference to a client, which is needed diff --git a/node/runtime-chronicle/Cargo.toml b/node/runtime-chronicle/Cargo.toml index 60dd683db..74620dc3b 100644 --- a/node/runtime-chronicle/Cargo.toml +++ b/node/runtime-chronicle/Cargo.toml @@ -14,47 +14,49 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] parity-scale-codec = { version="3.6.5", default-features = false, features = ["derive"] } scale-info = { version="2.10.0", default-features = false, features = ["derive"] } -pallet-aura = { version = "23.0.0", default-features=false } -pallet-balances = { version = "24.0.0", default-features = false } -frame-support = { version="24.0.0" , default-features=false } -pallet-grandpa = { version = "24.0.0", default-features = false } -pallet-sudo = { version = "24.0.0", default-features = false } -frame-system = { version= "24.0.0", default-features=false } -frame-try-runtime = { version= "0.30.0", default-features = false, optional=true} -pallet-timestamp = { version = "23.0.0", default-features=false } -pallet-transaction-payment = { version ="24.0.0",default-features=false} -frame-executive = { version = "24.0.0", default-features = false } -sp-api = { version = "22.0.0", default-features = false } -sp-block-builder = { version = "22.0.0", default-features = false } -sp-consensus-aura = { version = "0.28.0", default-features = false } -sp-consensus-grandpa = { version = "9.0.0", default-features = false} -sp-core = { version="24.0.0" ,default-features=false } -sp-inherents = { version = "22.0.0", default-features = false } -sp-offchain = { version = "22.0.0", default-features = false } -sp-runtime = { version="27.0.0", default-features = false} -sp-session = { version = "23.0.0", default-features = false} -sp-std = { version="11.0.0", default-features = false} -sp-transaction-pool = { version = "22.0.0", default-features = false} -sp-version = { version = "25.0.0", default-features = false} +pallet-aura = { version = "24.0.0", default-features=false } +pallet-balances = { version = "25.0.0", default-features = false } +frame-support = { version="25.0.0" , default-features=false } +pallet-grandpa = { version = "25.0.0", default-features = false } +pallet-sudo = { version = "25.0.0", default-features = false } +frame-system = { version= "25.0.0", default-features=false } +frame-try-runtime = { version= "0.31.0", default-features = false, optional=true} +pallet-timestamp = { version = "24.0.0", default-features=false } +pallet-transaction-payment = { version ="25.0",default-features=false} +frame-executive = { version = "25.0.0", default-features = false } +sp-api = { version = "23.0.0", default-features = false } +sp-block-builder = { version = "23.0.0", default-features = false } +sp-consensus-aura = { version = "0.29.0", default-features = false } +sp-consensus-grandpa = { version = "10.0.0", default-features = false} +sp-core = { version="25.0.0" ,default-features=false } +sp-inherents = { version = "23.0.0", default-features = false } +sp-offchain = { version = "23.0.0", default-features = false } +sp-runtime = { version="28.0.0", default-features = false} +sp-session = { version = "24.0.0", default-features = false} +sp-std = { version="12.0.0", default-features = false} +sp-transaction-pool = { version = "23.0.0", default-features = false} +sp-version = { version = "26.0.0", default-features = false} # Used for the node template's RPCs -frame-system-rpc-runtime-api = { version = "22.0.0", default-features = false} -pallet-transaction-payment-rpc-runtime-api = { version = "24.0.0", default-features = false} +frame-system-rpc-runtime-api = { version = "23.0.0", default-features = false} +pallet-transaction-payment-rpc-runtime-api = { version = "25.0.0", default-features = false} # Used for runtime benchmarking -frame-benchmarking = { version = "24.0.0", default-features = false, optional=true} -frame-system-benchmarking = { version = "24.0.0", default-features = false, optional=true} +frame-benchmarking = { version = "25.0.0", default-features = false, optional=true} +frame-system-benchmarking = { version = "25.0.0", default-features = false, optional=true} # Local Dependencies pallet-chronicle = { default-features = false, path = "../../crates/pallet-chronicle"} +runtime-api-chronicle = { default-features = false, path = "../../crates/runtime-api-chronicle"} [build-dependencies] -substrate-wasm-builder = { version = "13.0.0", optional = true } +substrate-wasm-builder = { version = "14.0.0", optional = true } [features] default = ["std"] std = [ "pallet-chronicle/std", + "runtime-api-chronicle/std", "frame-try-runtime?/std", "frame-system-benchmarking?/std", "frame-benchmarking?/std", diff --git a/node/runtime-chronicle/src/lib.rs b/node/runtime-chronicle/src/lib.rs index 1d43cbba4..702903b92 100644 --- a/node/runtime-chronicle/src/lib.rs +++ b/node/runtime-chronicle/src/lib.rs @@ -6,7 +6,6 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -use pallet_chronicle::operations; use pallet_grandpa::AuthorityId as GrandpaId; use sp_api::impl_runtime_apis; use sp_consensus_aura::sr25519::AuthorityId as AuraId; @@ -97,8 +96,8 @@ pub mod opaque { // https://docs.substrate.io/main-docs/build/upgrade#runtime-versioning #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("node-template"), - impl_name: create_runtime_str!("node-template"), + spec_name: create_runtime_str!("runtime-chronicle"), + impl_name: create_runtime_str!("runtime-chronicle"), authoring_version: 1, // The version of the runtime specification. A full node will not attempt to use its native // runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, @@ -241,6 +240,7 @@ impl pallet_balances::Config for Runtime { type Balance = Balance; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; + type RuntimeFreezeReason = RuntimeFreezeReason; type DustRemoval = (); type ExistentialDeposit = ConstU128; type AccountStore = System; @@ -274,7 +274,7 @@ impl pallet_sudo::Config for Runtime { impl pallet_chronicle::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = pallet_chronicle::weights::SubstrateWeight; - type OperationList = Vec; + type OperationSubmission = pallet_chronicle::chronicle_core::OperationSubmission; } // Create the runtime by composing the FRAME pallets that were previously configured. @@ -287,7 +287,6 @@ construct_runtime!( Balances: pallet_balances, TransactionPayment: pallet_transaction_payment, Sudo: pallet_sudo, - // Include the custom logic from the pallet-template in the runtime. Chronicle: pallet_chronicle, } ); @@ -298,6 +297,7 @@ pub type Address = sp_runtime::MultiAddress; pub type Header = generic::Header; /// Block type as expected by this runtime. pub type Block = generic::Block; + /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( frame_system::CheckNonZeroSender, @@ -341,6 +341,13 @@ mod benches { } impl_runtime_apis! { + impl runtime_api_chronicle::ChronicleApi for Runtime { + // Purely to keep runtime api dependencies in place + fn placeholder() -> u32 { + 0 + } + } + impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { VERSION