diff --git a/Cargo.lock b/Cargo.lock index 99791d30a..04cb44446 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", ] @@ -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]] @@ -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" @@ -371,6 +377,141 @@ 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" @@ -383,6 +524,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,10 +650,36 @@ 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-executor" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" +dependencies = [ + "async-lock 2.8.0", + "async-task", + "concurrent-queue", + "fastrand 2.0.1", + "futures-lite 1.13.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]] name = "async-graphql" version = "5.0.10" @@ -600,38 +776,104 @@ 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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" +dependencies = [ + "async-lock 3.0.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.0.1", + "parking", + "polling 3.3.0", + "rustix 0.38.21", + "slab", + "tracing", + "waker-fn", + "windows-sys 0.48.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-recursion" -version = "1.0.5" +name = "async-lock" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "45e900cdcd39bb94a14487d3f7ef92ca222162e6c7c3fe7cb3550ea75fb486ed" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", + "event-listener 3.0.1", + "event-listener-strategy", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "async-net" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" +dependencies = [ + "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.0.1", + "futures-lite 1.13.0", + "rustix 0.38.21", + "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.0", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.21", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] [[package]] @@ -685,7 +927,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -702,7 +944,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -724,6 +966,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 +1073,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 +1133,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 +1160,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 +1190,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 +1211,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 +1229,7 @@ checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -949,7 +1240,7 @@ checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -962,7 +1253,7 @@ dependencies = [ "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -1027,11 +1318,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" dependencies = [ "async-channel", - "async-lock", + "async-lock 2.8.0", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite", + "futures-lite 1.13.0", "piper", "tracing", ] @@ -1149,6 +1440,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" @@ -1249,7 +1550,7 @@ checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" dependencies = [ "aead 0.3.2", "cipher 0.2.5", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -1282,6 +1583,16 @@ 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" @@ -1642,7 +1953,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1698,9 +2009,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", @@ -1752,7 +2063,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sp-std", + "sp-std 11.0.0", "tempfile", "testcontainers", "thiserror", @@ -1872,18 +2183,36 @@ 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" @@ -2144,9 +2473,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" @@ -2229,6 +2558,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,7 +2591,7 @@ checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2264,7 +2603,7 @@ checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2279,6 +2618,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 +2635,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 +2645,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 +2685,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2349,7 +2698,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2366,7 +2715,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2378,11 +2727,24 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] -name = "custom_error" +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]] +name = "custom_error" version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f8a51dd197fa6ba5b4dc98a990a43cc13693c23eb0089ebb0fcc1f04152bca6" @@ -2411,7 +2773,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2428,7 +2790,7 @@ checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2451,6 +2813,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 +2851,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,6 +2887,17 @@ 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" @@ -2690,8 +3087,10 @@ 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", ] @@ -2720,7 +3119,7 @@ dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2740,7 +3139,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 +3175,7 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2838,7 +3237,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2868,7 +3267,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.38", + "syn 2.0.39", "termcolor", "toml 0.7.8", "walkdir", @@ -2886,6 +3285,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 +3320,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" @@ -3009,7 +3414,7 @@ dependencies = [ "rand_core 0.6.4", "sec1 0.3.0", "serdect", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -3028,7 +3433,7 @@ dependencies = [ "pkcs8 0.10.2", "rand_core 0.6.4", "sec1 0.7.3", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -3086,9 +3491,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" dependencies = [ "libc", "windows-sys 0.48.0", @@ -3106,6 +3511,27 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cec0252c2afff729ee6f00e903d479fba81784c8e2bd77447673471fdfaea1" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "event-listener-strategy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +dependencies = [ + "event-listener 3.0.1", + "pin-project-lite 0.2.13", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -3121,11 +3547,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 +3616,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,7 +3626,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3308,9 +3734,9 @@ 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", ] @@ -3342,9 +3768,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", @@ -3361,19 +3787,19 @@ dependencies = [ "sp-io", "sp-runtime", "sp-runtime-interface", - "sp-std", + "sp-std 12.0.0", "sp-storage", "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.1.0", "chrono", "clap 4.4.7", "comfy-table", @@ -3417,9 +3843,9 @@ dependencies = [ [[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", @@ -3430,10 +3856,21 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 12.0.0", "sp-tracing", ] +[[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]] name = "frame-metadata" version = "16.0.0" @@ -3448,14 +3885,13 @@ 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", @@ -3471,15 +3907,15 @@ 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", @@ -3503,7 +3939,7 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 12.0.0", "sp-tracing", "sp-weights", "static_assertions", @@ -3512,9 +3948,9 @@ dependencies = [ [[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 +3962,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-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", @@ -3568,16 +4005,16 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 12.0.0", "sp-version", "sp-weights", ] [[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", @@ -3586,14 +4023,14 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "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,15 +4038,15 @@ 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-std 12.0.0", ] [[package]] @@ -3698,6 +4135,16 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +dependencies = [ + "futures-core", + "pin-project-lite 0.2.13", +] + [[package]] name = "futures-macro" version = "0.3.29" @@ -3706,7 +4153,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3737,6 +4184,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" @@ -3927,6 +4378,51 @@ dependencies = [ "walkdir", ] +[[package]] +name = "gloo-net" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "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" @@ -3947,7 +4443,7 @@ checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3958,7 +4454,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -4038,6 +4534,20 @@ name = "hashbrown" version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +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 = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.2", +] [[package]] name = "hdrhistogram" @@ -4350,7 +4860,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb892e5777fe09e16f3d44de7802f4daa7267ecbe8c466f19d94e25bb0c303e" dependencies = [ - "async-io", + "async-io 1.13.0", "core-foundation", "fnv", "futures", @@ -4441,14 +4951,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", ] +[[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 +5041,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" @@ -4635,9 +5157,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] @@ -4819,25 +5341,43 @@ 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", - "jsonrpsee-types", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", "pin-project", "rustls-native-certs", "soketto", @@ -4849,6 +5389,26 @@ dependencies = [ "webpki-roots 0.25.2", ] +[[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 0.20.3", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", + "url", +] + [[package]] name = "jsonrpsee-core" version = "0.16.3" @@ -4857,7 +5417,7 @@ checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", "arrayvec 0.7.4", - "async-lock", + "async-lock 2.8.0", "async-trait", "beef", "futures-channel", @@ -4865,7 +5425,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 +5435,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 +5469,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 +5479,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" @@ -4919,8 +5522,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 +5548,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 +5580,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]] @@ -5049,6 +5677,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 +5812,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" @@ -5623,6 +6257,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 +6310,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -5749,7 +6394,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] -name = "lock_api" +name = "lioness" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" +dependencies = [ + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", +] + +[[package]] +name = "lock_api" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" @@ -5850,50 +6507,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]] @@ -6030,6 +6687,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 +6747,7 @@ checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -6149,6 +6818,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" @@ -6461,6 +7155,12 @@ 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" @@ -6470,9 +7170,10 @@ dependencies = [ "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", @@ -6505,6 +7206,12 @@ dependencies = [ "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" @@ -6851,9 +7558,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -6872,7 +7579,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -6883,9 +7590,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" dependencies = [ "cc", "libc", @@ -7062,9 +7769,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", @@ -7075,14 +7782,14 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "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", @@ -7090,14 +7797,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "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", @@ -7106,7 +7813,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 12.0.0", ] [[package]] @@ -7125,16 +7832,16 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 12.0.0", "tracing", "uuid 1.5.0", ] [[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", @@ -7151,14 +7858,14 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 12.0.0", ] [[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", @@ -7173,15 +7880,15 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 12.0.0", "sp-trie", ] [[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", @@ -7191,14 +7898,14 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "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", @@ -7210,16 +7917,16 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", + "sp-std 12.0.0", "sp-storage", "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", @@ -7229,16 +7936,16 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "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", @@ -7251,9 +7958,9 @@ dependencies = [ [[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", @@ -7268,7 +7975,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", @@ -7405,6 +8112,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" @@ -7481,7 +8197,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -7502,7 +8218,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 +8276,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -7629,9 +8345,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" @@ -7704,7 +8420,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -7723,6 +8439,20 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite 0.2.13", + "rustix 0.38.21", + "tracing", + "windows-sys 0.48.0", +] + [[package]] name = "poly1305" version = "0.7.2" @@ -7868,7 +8598,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]] @@ -7920,13 +8650,13 @@ 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]] @@ -7972,7 +8702,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -8141,6 +8871,19 @@ dependencies = [ "tempfile", ] +[[package]] +name = "protocol-substrate-chronicle" +version = "0.1.0" +dependencies = [ + "async-trait", + "futures", + "k256 0.11.6", + "serde", + "subxt", + "thiserror", + "tokio", +] + [[package]] name = "psl" version = "2.1.4" @@ -8333,6 +9076,16 @@ dependencies = [ "getrandom 0.2.10", ] +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -8472,12 +9225,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", + "libredox", "thiserror", ] @@ -8498,7 +9251,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -8653,7 +9406,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -8715,6 +9468,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "rpc-chronicle" +version = "1.0.0" +dependencies = [ + "jsonrpsee 0.16.3", + "parity-scale-codec", + "runtime-api-chronicle", + "sp-api", + "sp-blockchain", + "sp-runtime", +] + [[package]] name = "rsb_derive" version = "0.5.1" @@ -8776,6 +9541,13 @@ dependencies = [ "webrtc-util", ] +[[package]] +name = "runtime-api-chronicle" +version = "1.0.0" +dependencies = [ + "sp-api", +] + [[package]] name = "runtime-chronicle" version = "4.0.0" @@ -8796,6 +9568,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", + "runtime-api-chronicle", "scale-info", "sp-api", "sp-block-builder", @@ -8806,7 +9579,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 12.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -9009,6 +9782,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" @@ -9138,9 +9922,9 @@ dependencies = [ [[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", @@ -9150,9 +9934,9 @@ dependencies = [ [[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", @@ -9174,9 +9958,9 @@ dependencies = [ [[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", @@ -9190,9 +9974,9 @@ dependencies = [ [[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", @@ -9210,23 +9994,23 @@ dependencies = [ [[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-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.1.0", "chrono", "clap 4.4.7", "fdlimit", @@ -9241,6 +10025,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", "sc-service", "sc-telemetry", @@ -9262,9 +10047,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", @@ -9290,9 +10075,9 @@ dependencies = [ [[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", @@ -9317,9 +10102,9 @@ dependencies = [ [[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", @@ -9343,9 +10128,9 @@ dependencies = [ [[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", @@ -9373,12 +10158,12 @@ dependencies = [ [[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.1.0", "async-trait", "dyn-clone", "finality-grandpa", @@ -9415,9 +10200,9 @@ dependencies = [ [[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", @@ -9439,9 +10224,9 @@ dependencies = [ [[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", @@ -9462,9 +10247,9 @@ dependencies = [ [[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", @@ -9475,14 +10260,15 @@ dependencies = [ [[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", @@ -9493,9 +10279,9 @@ dependencies = [ [[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", @@ -9510,11 +10296,11 @@ dependencies = [ [[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.1.0", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -9523,13 +10309,42 @@ dependencies = [ "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", + "sp-keystore", + "sp-mixnet", + "sp-runtime", + "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", + "array-bytes 6.1.0", "async-channel", "async-trait", "asynchronous-codec", @@ -9567,9 +10382,9 @@ 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", "cid", @@ -9588,9 +10403,9 @@ dependencies = [ [[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", @@ -9606,9 +10421,9 @@ dependencies = [ [[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", @@ -9625,11 +10440,11 @@ dependencies = [ [[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", + "array-bytes 6.1.0", "async-channel", "futures", "libp2p-identity", @@ -9647,11 +10462,11 @@ dependencies = [ [[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", + "array-bytes 6.1.0", "async-channel", "async-trait", "fork-tree", @@ -9678,15 +10493,16 @@ dependencies = [ "sp-runtime", "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.1.0", "futures", "libp2p", "log", @@ -9701,11 +10517,11 @@ dependencies = [ [[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.1.0", "bytes", "fnv", "futures", @@ -9736,9 +10552,9 @@ dependencies = [ [[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 +10562,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", @@ -9778,13 +10595,14 @@ 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", @@ -9798,12 +10616,12 @@ dependencies = [ [[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 +10632,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.1.0", "futures", "futures-util", "hex", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -9843,16 +10661,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", @@ -9908,9 +10726,9 @@ 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", @@ -9920,9 +10738,9 @@ dependencies = [ [[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", @@ -9940,9 +10758,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", @@ -9955,14 +10773,14 @@ dependencies = [ "serde_json", "sp-core", "sp-io", - "sp-std", + "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 +10798,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", @@ -10010,21 +10828,21 @@ dependencies = [ [[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-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", @@ -10049,9 +10867,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", @@ -10066,9 +10884,9 @@ dependencies = [ [[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", "futures", @@ -10080,6 +10898,73 @@ dependencies = [ "sp-arithmetic", ] +[[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", + "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", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "scale-info" version = "2.10.0" @@ -10106,6 +10991,26 @@ dependencies = [ "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 +11050,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", ] @@ -10208,7 +11129,7 @@ dependencies = [ "generic-array 0.14.7", "pkcs8 0.9.0", "serdect", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -10222,7 +11143,7 @@ dependencies = [ "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -10346,24 +11267,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.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -10436,7 +11363,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", @@ -10637,6 +11564,104 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel", + "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.2", + "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 = "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.2", + "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" version = "1.1.0" @@ -10650,14 +11675,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" dependencies = [ "aes-gcm 0.9.4", - "blake2", + "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.1.1", "rand_core 0.6.4", "ring 0.16.20", "rustc_version", "sha2 0.10.8", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -10699,9 +11724,9 @@ 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", @@ -10713,7 +11738,7 @@ dependencies = [ "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 12.0.0", "sp-trie", "sp-version", "thiserror", @@ -10721,65 +11746,65 @@ dependencies = [ [[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-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "sp-application-crypto" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b74454c936a45ac55c8de95b9fd8b5e38f8b43d97df8f4274dd6777b20d95569" +checksum = "a93da025616ab59639f8e378df579c5aaa2c8b9999f328a0239156a57c991b53" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 12.0.0", ] [[package]] name = "sp-arithmetic" -version = "19.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e41f710a77e9debd1c9b80f862709dce648e50f0904cde4117488e7d11d4796d" +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-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", @@ -10796,9 +11821,9 @@ dependencies = [ [[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", @@ -10812,9 +11837,9 @@ dependencies = [ [[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", @@ -10824,15 +11849,15 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std", + "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", @@ -10844,15 +11869,15 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "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", @@ -10864,31 +11889,31 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std", + "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 = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7921d278ed2aebbb21a644c96e09663dc49a6139d1e2e063c059dc9f866e149b" +checksum = "f9ebb090ead698a6df04347c86a31ba91a387edb8a58534ec70c4f977d1e1e87" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "bitflags 1.3.2", - "blake2", + "blake2 0.10.6", "bounded-collections", "bs58 0.5.0", "dyn-clonable", @@ -10900,7 +11925,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -10908,29 +11933,45 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1 0.24.3", "secrecy", "serde", - "sp-core-hashing", + "sp-core-hashing 13.0.0", "sp-debug-derive", "sp-externalities", "sp-runtime-interface", - "sp-std", + "sp-std 12.0.0", "sp-storage", "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 +11983,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,59 +12004,59 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f7d375610590566e11882bf5b5a4b8d0666a96ba86808b2650bbbd9be50bf8" +checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "sp-externalities" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede074871514ca7c5d2eca9563515d858c6220b47ae815714ed4393a4e99db4a" +checksum = "884d05160bc89d0943d1c9fb8006c3d44b80f37f8af607aeff8d4d9cc82e279a" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", + "sp-std 12.0.0", "sp-storage", ] [[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-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-std 12.0.0", "thiserror", ] [[package]] name = "sp-io" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88fb6e281de5054565f07a9f79504d21133e115db549993c99f1b21236c677a5" +checksum = "0ced350da15e8ba3a106206840acc42a6d3eb0d7e8bf7aa43ab00eac0bdf956f" dependencies = [ "bytes", "ed25519-dalek", @@ -11029,7 +12070,7 @@ dependencies = [ "sp-keystore", "sp-runtime-interface", "sp-state-machine", - "sp-std", + "sp-std 12.0.0", "sp-tracing", "sp-trie", "tracing", @@ -11038,9 +12079,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f09927534d2233e135e4b4a0c758554d0ff66178f6e9cfba2e151dfeac97b3" +checksum = "655ec0b35cb9cb9029fb323aa676b07d58deb872cecc7566e50278409a00ee95" dependencies = [ "lazy_static", "sp-core", @@ -11050,9 +12091,9 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.30.0" +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", @@ -11063,9 +12104,9 @@ dependencies = [ [[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,21 +12114,34 @@ 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 = "7ca9ff0e522a74725ac92f009d38deeb12e880f5296afbd78a6c6b970b773278" +dependencies = [ + "frame-metadata 16.0.0", + "parity-scale-codec", + "scale-info", + "sp-std 12.0.0", +] + +[[package]] +name = "sp-mixnet" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb0dec8af38c68358600da59cf14424e1230fe9ae1d4b4f64a098288145c0775" +checksum = "bdf61f28ca97aab6c21a3c6e0ed496e60d505e5de1f43fd4ba748c9afaa4fc85" dependencies = [ - "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std", + "sp-api", + "sp-application-crypto", + "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", @@ -11096,9 +12150,9 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd099ba2d6c1bfe5d0c79aa56e440fa3c9257eadfc0c782c09cdc2122b1e60ed" +checksum = "b00e40857ed3e0187f145b037c733545c5633859f1bd1d1b09deb52805fa696a" dependencies = [ "backtrace", "lazy_static", @@ -11107,9 +12161,9 @@ 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", @@ -11118,9 +12172,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "27.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c0641e1a9d340960b562bcceea1457680fd0e109fc1040f8f5364fd7bc2506" +checksum = "6d9c40ff7303e62219b55635e5245d963358cb77d6916250991ebcb82c0be2c6" dependencies = [ "either", "hash256-std-hasher", @@ -11135,15 +12189,15 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 12.0.0", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "20.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17a4030ad93f05c93f2cc294c74bc5fea227f90fb3d1426d4a6f165e017fb7ea" +checksum = "4f365332922a8cfa98ab00c6d08b1b0f24e159e730dd554e720d950ff3371b1f" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11151,7 +12205,7 @@ dependencies = [ "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", - "sp-std", + "sp-std 12.0.0", "sp-storage", "sp-tracing", "sp-wasm-interface", @@ -11160,22 +12214,22 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b232943ee7ca83a6d56face33b8af12e9fb470a15a53835f4e12a6e452a41c1c" +checksum = "9b2afcbd1bd18d323371111b66b7ac2870bdc1c86c3d7b0dae67b112ca52b4d8" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "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", @@ -11184,14 +12238,14 @@ dependencies = [ "sp-keystore", "sp-runtime", "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", @@ -11199,14 +12253,14 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 12.0.0", ] [[package]] name = "sp-state-machine" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf4c76bea1a9e4a2e79afe70f42f1d368a8a45308e58f19bfd755c5ddb2b4a3" +checksum = "96e087fa4430befd2047b61d912c9d6fa4eaed408c4b58b46c6e9acd7965f2d3" dependencies = [ "hash-db", "log", @@ -11217,7 +12271,7 @@ dependencies = [ "sp-core", "sp-externalities", "sp-panic-handler", - "sp-std", + "sp-std 12.0.0", "sp-trie", "thiserror", "tracing", @@ -11226,9 +12280,9 @@ dependencies = [ [[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", @@ -11244,53 +12298,65 @@ dependencies = [ "sp-externalities", "sp-runtime", "sp-runtime-interface", - "sp-std", + "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 = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9660ecd48314443e73ad0f44d58b76426666a1343d72f6f65664e174da9244" +checksum = "016f20812cc51bd479cc88d048c35d44cd3adde4accdb159d49d6050f2953595" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", "sp-debug-derive", - "sp-std", + "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-std 12.0.0", "thiserror", ] [[package]] name = "sp-tracing" -version = "13.0.0" +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,9 +12364,9 @@ 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", @@ -11308,9 +12374,9 @@ dependencies = [ [[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", @@ -11318,15 +12384,15 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 12.0.0", "sp-trie", ] [[package]] name = "sp-trie" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb2d292eb90452dcb0909fb44e74bf04395e3ffa37a66c0f1635a00600382a4" +checksum = "1e359b358263cc322c3f678c272a3a519621d9853dcfa1374dfcbdb5f54c6f85" dependencies = [ "ahash 0.8.6", "hash-db", @@ -11336,10 +12402,11 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", + "rand 0.8.5", "scale-info", "schnellru", "sp-core", - "sp-std", + "sp-std 12.0.0", "thiserror", "tracing", "trie-db", @@ -11348,9 +12415,9 @@ dependencies = [ [[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", @@ -11359,42 +12426,42 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std", + "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 = "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", + "sp-std 12.0.0", "wasmtime 8.0.1", ] [[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", @@ -11403,7 +12470,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-debug-derive", - "sp-std", + "sp-std 12.0.0", ] [[package]] @@ -11563,7 +12630,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -11578,7 +12645,7 @@ dependencies = [ "md-5", "rand 0.8.5", "ring 0.16.20", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "url", @@ -11593,26 +12660,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", @@ -11626,9 +12693,9 @@ dependencies = [ [[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,12 +12706,12 @@ 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", @@ -11653,9 +12720,9 @@ dependencies = [ [[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 +12746,119 @@ 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-hashing 9.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 +12872,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", @@ -11829,6 +13003,26 @@ dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "thiserror-impl" version = "1.0.50" @@ -11837,7 +13031,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -12028,7 +13222,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -12143,7 +13337,7 @@ 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", @@ -12248,7 +13442,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -12431,9 +13625,9 @@ 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", @@ -12601,7 +13795,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 +13805,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -12786,6 +13980,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 +14061,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -12853,24 +14071,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" 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.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -12880,9 +14098,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -12890,22 +14108,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" 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.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-instrument" @@ -12918,9 +14136,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 +14152,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 +14164,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 +14189,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 +14241,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 +14624,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -13495,7 +14754,7 @@ dependencies = [ "sha1", "sha2 0.10.8", "signature 1.6.4", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webpki 0.21.4", @@ -13589,7 +14848,7 @@ dependencies = [ "rtcp", "rtp", "sha-1", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webrtc-util", @@ -13828,9 +15087,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[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 +15211,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,22 +15228,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.20" +version = "0.7.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd66a62464e3ffd4e37bd09950c2b9dd6c4f8767380fabba0d523f9a775bc85a" +checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.20" +version = "0.7.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255c4596d41e6916ced49cfafea18727b24d67878fa180ddfd69b9df34fd1726" +checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -13998,7 +15263,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..fb08f6b3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,9 @@ members = [ "crates/pallet-chronicle", "node/runtime-chronicle", "node/node-chronicle", + "crates/runtime-api-chronicle", + "crates/rpc-chronicle", + "crates/protocol-substrate-chronicle", ] [workspace.dependencies] diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index 897936e57..8ee7e8320 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -34,8 +34,8 @@ 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} +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 } @@ -65,7 +65,7 @@ tempfile = { workspace = true } std = ["k256/std","tracing/std","serde/std","serde_json/std","hex/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"] # 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..b237cbc54 100644 --- a/crates/common/src/attributes.rs +++ b/crates/common/src/attributes.rs @@ -6,8 +6,6 @@ use parity_scale_codec::{alloc::collections::BTreeMap, alloc::string::String}; #[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 +25,8 @@ impl core::fmt::Display for SerdeWrapper { } } -impl Encode for SerdeWrapper { +#[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 +34,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 +47,35 @@ 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")), + ) } } -#[derive(Debug, Clone, Encode, Decode, TypeInfo, Serialize, Deserialize, PartialEq, Eq)] +impl From for SerdeWrapper { + fn from(value: Value) -> Self { + SerdeWrapper(value) + } +} + +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) +)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] pub struct Attribute { pub typ: String, pub value: SerdeWrapper, @@ -98,9 +105,11 @@ 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) )] +#[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..8b2e3a275 100644 --- a/crates/common/src/identity.rs +++ b/crates/common/src/identity.rs @@ -10,10 +10,10 @@ 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 +192,21 @@ 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) +)] #[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/ledger.rs b/crates/common/src/ledger.rs index f4edf1fb6..548d017e2 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,26 @@ impl core::fmt::Display for SubmissionError { } } +#[cfg_attr( + feature = "parity-encoding", + derive(scale_info::TypeInfo, parity_scale_codec::Encode, parity_scale_codec::Decode) +)] +#[derive(Debug, Clone, Eq, PartialEq)] +pub struct OperationSubmission { + pub identity: SignedIdentity, + pub operations: Vec, +} + +impl OperationSubmission { + pub fn new(identity: SignedIdentity, operations: Vec) -> Self { + OperationSubmission { identity, operations } + } + + pub fn new_anonymous(operations: Vec) -> Self { + Self::new(SignedIdentity::new_no_identity(), operations) + } +} + pub type SubmitResult = Result; #[derive(Debug, Clone)] @@ -138,16 +158,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 +169,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..28b05fdfb 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,10 @@ 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) )] #[cfg_attr(feature = "diesel-bindings", derive(AsExpression, FromSqlRow))] #[cfg_attr(feature = "diesel-bindings", diesel(sql_type = diesel::sql_types::Text))] @@ -124,19 +113,10 @@ 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) )] #[cfg_attr(feature = "diesel-bindings", derive(AsExpression, FromSqlRow))] #[cfg_attr(feature = "diesel-bindings", diesel(sql_type = diesel::sql_types::Text))] @@ -199,19 +179,10 @@ 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) )] pub enum ChronicleIri { Namespace(NamespaceId), @@ -224,6 +195,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 +315,10 @@ 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) )] pub struct AssociationId { agent: ExternalId, @@ -540,19 +494,10 @@ 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) )] pub struct AttributionId { agent: ExternalId, @@ -631,19 +576,10 @@ 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) )] pub struct DomaintypeId(ExternalId); @@ -707,13 +643,15 @@ impl From for UuidWrapper { } } -impl Encode for UuidWrapper { - fn encode_to(&self, dest: &mut T) { - self.0.as_bytes().encode_to(dest); +#[cfg(feature = "parity-encoding")] +impl parity_scale_codec::Encode for UuidWrapper { + fn using_encoded R>(&self, f: F) -> R { + f(self.0.as_bytes()) } } -impl Decode for UuidWrapper { +#[cfg(feature = "parity-encoding")] +impl parity_scale_codec::Decode for UuidWrapper { fn decode( input: &mut I, ) -> Result { @@ -723,28 +661,23 @@ impl Decode for UuidWrapper { } } -impl TypeInfo for UuidWrapper { +#[cfg(feature = "parity-encoding")] +impl scale_info::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, + fn type_info() -> scale_info::Type { + scale_info::Type::builder() + .path(scale_info::Path::new("UuidWrapper", module_path!())) + .composite( + scale_info::build::Fields::unnamed() + .field(|f| f.ty::<[u8; 16]>().type_name("Uuid")), + ) + } +} + +#[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) )] pub struct NamespaceId { external_id: ExternalId, @@ -812,19 +745,10 @@ impl From<&NamespaceId> 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) )] pub struct EntityId(ExternalId); @@ -897,19 +821,10 @@ 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) )] pub struct AgentId(ExternalId); @@ -980,19 +895,10 @@ 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) )] 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..40ed6d6c8 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::*, @@ -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,7 +142,11 @@ 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, @@ -154,7 +159,11 @@ impl Namespace { } } -#[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, PartialEq, Eq)] pub struct ProvModel { pub namespaces: BTreeMap>, pub agents: BTreeMap>, @@ -484,6 +443,7 @@ pub struct ProvModel { pub usage: BTreeMap>>, } +#[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 { @@ -769,11 +729,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/operations.rs b/crates/common/src/prov/operations.rs index 046973ddf..e66c29aa9 100644 --- a/crates/common/src/prov/operations.rs +++ b/crates/common/src/prov/operations.rs @@ -13,31 +13,17 @@ 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) )] #[cfg_attr(feature = "diesel-bindings", derive(AsExpression, SqlType, QueryId))] #[cfg_attr(feature = "diesel-bindings", diesel(sql_type = Integer))] @@ -112,20 +98,26 @@ 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) +)] +#[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) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct AgentExists { pub namespace: NamespaceId, pub external_id: ExternalId, @@ -137,7 +129,11 @@ 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) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct ActsOnBehalfOf { pub id: DelegationId, pub role: Option, @@ -171,7 +167,11 @@ 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) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct ActivityExists { pub namespace: NamespaceId, pub external_id: ExternalId, @@ -198,7 +198,8 @@ impl From> for TimeWrapper { } } -impl Encode for TimeWrapper { +#[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 +207,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 +223,80 @@ 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) +)] +#[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) +)] +#[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) +)] +#[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) +)] +#[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) +)] +#[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) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct EntityDerive { pub namespace: NamespaceId, pub id: EntityId, @@ -274,7 +305,11 @@ 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) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct WasAssociatedWith { pub id: AssociationId, pub role: Option, @@ -300,7 +335,11 @@ 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) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub struct WasAttributedTo { pub id: AttributionId, pub role: Option, @@ -326,21 +365,33 @@ 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) +)] +#[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) +)] +#[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) +)] +#[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)] pub enum ChronicleOperation { CreateNamespace(CreateNamespace), AgentExists(AgentExists), 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..4e83ad11e 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 Operations: 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,6 @@ 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 } } } @@ -112,20 +124,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::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 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 +150,7 @@ pub mod pallet { let mut model = common::prov::ProvModel::default(); - for op in ops { + for op in sub.operations { 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..221f98c3c 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 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() + 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/protocol-substrate-chronicle/Cargo.toml b/crates/protocol-substrate-chronicle/Cargo.toml new file mode 100644 index 000000000..ffb550767 --- /dev/null +++ b/crates/protocol-substrate-chronicle/Cargo.toml @@ -0,0 +1,15 @@ +[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=["native"]} +async-trait= {workspace=true} +thiserror={workspace=true} +serde={workspace=true} +futures={workspace=true} +tokio={workspace=true} +k256={workspace=true} diff --git a/crates/protocol-substrate-chronicle/runtime_metadata.scale b/crates/protocol-substrate-chronicle/runtime_metadata.scale new file mode 100644 index 000000000..ba64d66b3 Binary files /dev/null and b/crates/protocol-substrate-chronicle/runtime_metadata.scale differ 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..67058746c --- /dev/null +++ b/crates/protocol-substrate-chronicle/src/abstract_ledger.rs @@ -0,0 +1,233 @@ +use std::{convert::Infallible, sync::Arc}; + +use futures::stream::BoxStream; +use k256::ecdsa::VerifyingKey; +use serde::{Deserialize, Serialize}; +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([u8; 64]), +} + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct TransactionId(String); + +impl TransactionId { + pub fn new(tx_id: String) -> Self { + Self(tx_id) + } + + pub fn as_str(&self) -> &str { + &self.0 + } +} + +impl From<&str> for TransactionId { + fn from(s: &str) -> Self { + Self(s.to_string()) + } +} + +impl std::fmt::Display for TransactionId { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.0) + } +} + +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)] +pub struct Position(u64); + +impl From for Position { + fn from(height: u64) -> 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: u64) -> Self { + Position(height) + } + + pub fn map(&self, f: F) -> T + where + F: FnOnce(&u64) -> T, + { + f(&self.0) + } + + pub fn distance(&self, other: &Self) -> u64 { + 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, TransactionId, 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 MessageBuilder: MessageBuilder; + async fn sign(&self, bytes: Arc>) -> Result, Self::Error>; + async fn verifying_key(&self) -> Result; + fn addresses(&self) -> Vec; + async fn as_sawtooth_tx( + &self, + message_builder: &Self::MessageBuilder, + ) -> Result<(Vec, TransactionId), Self::Error>; +} + +#[async_trait::async_trait] +pub trait LedgerWriter { + type Error: std::error::Error; + type Transaction: LedgerTransaction; + type MessageBuilder: MessageBuilder; + + // Submit is used to submit a transaction to the ledger + async fn submit( + &self, + tx: &Self::Transaction, + ) -> Result, Self::Error)>; + + fn message_builder(&self) -> &Self::MessageBuilder; +} + +pub struct BlockingLedgerReader +where + R: LedgerReader + Send, +{ + reader: R, +} + +#[derive(Debug, Clone, Copy)] +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, + event_type: &str, + from_block: FromBlock, + number_of_blocks: Option, + ) -> Result>, R::Error> { + tokio::runtime::Handle::current().block_on(self.reader.state_updates( + event_type, + 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, W::Error)> { + 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 application event type to subscribe to + event_type: &str, + // 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/lib.rs b/crates/protocol-substrate-chronicle/src/lib.rs new file mode 100644 index 000000000..5a64bb9f7 --- /dev/null +++ b/crates/protocol-substrate-chronicle/src/lib.rs @@ -0,0 +1,5 @@ +mod abstract_ledger; +mod send_extrinsic; + +#[subxt::subxt(runtime_metadata_path = "runtime_metadata.scale")] +pub mod chronicle_client {} diff --git a/crates/protocol-substrate-chronicle/src/send_extrinsic.rs b/crates/protocol-substrate-chronicle/src/send_extrinsic.rs new file mode 100644 index 000000000..447861f16 --- /dev/null +++ b/crates/protocol-substrate-chronicle/src/send_extrinsic.rs @@ -0,0 +1,150 @@ +use std::convert::Infallible; + +use futures::stream::{BoxStream, self}; +use subxt::backend::BackendExt; +use subxt::backend::legacy::rpc_methods::{BlockNumber, NumberOrHex}; +use subxt::blocks::Block; +use subxt::book::usage::events; +use subxt::client; +use subxt::config::substrate::H256; +use subxt::dynamic::Value; +use subxt::ext::scale_value::Composite; +use subxt::runtime_api::{RuntimeApiClient, RuntimeApi}; +use subxt::{config::PolkadotConfig, OnlineClient}; +use crate::chronicle_client; + + +use crate::abstract_ledger::{BlockId, FromBlock, LedgerEventContext, LedgerReader, Position, LedgerEvent, Span}; + +pub struct SubmitExtrinsic { + client: OnlineClient, +} + +impl SubmitExtrinsic { + pub fn connect() {} + + pub async fn send_serialized_operations_as_extrinsic(&self, operations: Vec) { + let payload = chronicle_client::tx().chronicle().apply(operations); + + + let progress = self + .client + .tx() + .sign_and_submit_then_watch_default(&payload, &from) + .await + .unwrap(); + + // We can return here, finalisation failures are goign to be rare + unimplemented!() + } +} + +pub struct SubstrateEvent {}; + +#[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!() + } +} + +pub struct BlockSubscription { + client: OnlineClient, + runtime_api: RuntimeApi>, +} + + +impl BlockSubscription { + + async fn get_blockhash(&self, num: Option) -> Result,subxt::Error> where T: subxt::Config { + + let call = subxt::dynamic::runtime_api_call( + "chain", + "getBlockHash", + vec![Value::unnamed_composite(num)], + ); + + let res = self.runtime_api.call(call).await?; + + Ok(res.as_type::>()?) + } + // Return `number_of_blocks` blocks from the client, starting at `from_block` + async fn load_historical_blocks( + &self, + from_block: FromBlock, + number_of_blocks: Option, + ) -> Result<(usize, BoxStream>), subxt::Error> + where + T: subxt::Config, + C: Send + { + self.client.backend().call(method, call_parameters, at) + let block = match from_block { + FromBlock::Head => return Ok((0,Box::pin(stream::empty()))), + FromBlock::First => self.client.backend().block_header(self.client.genesis_hash()).await?, + FromBlock::BlockId(hash) => self.client.backend().block_header(self.client.genesis_hash()).await?, + }.unwrap(); + + + + + unimplemented!() + + } +} + +#[async_trait::async_trait] +impl LedgerReader for BlockSubscription { + type Event = SubstrateEvent; + + type Error = Infallible; + + /// 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> { + unimplemented!() + } + /// 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 application event type to subscribe to + event_type: &str, + // The block to start from + from_block: FromBlock, + // The number of blocks to process before ending the stream + number_of_blocks: mut Option, + ) -> Result>, Self::Error> { + // If fromblock is not head, then load in historical blocks and yield up to number_of_blocks events + let historical_blocks = if from_block != FromBlock::Head { + self.load_historical_blocks(from_block, number_of_blocks).await? + } else { + Box::pin(stream::empty()) + }; + + // if we have not yet yielded up the required number of blocks, or if that is not specified, + // stream newly finalised blocks and yield the events + let finalised_blocks = if let Some(number) = number_of_blocks { + if historical_blocks.size_hint().0 < number as usize { + self.stream_finalised_blocks().await? + } else { + Box::pin(stream::empty()) + } + } else { + self.stream_finalised_blocks().await? + }; + + // Combine these two streams + let combined_stream = Box::pin(historical_blocks.chain(finalised_blocks)); + Ok(combined_stream) + } + +} diff --git a/crates/rpc-chronicle/Cargo.toml b/crates/rpc-chronicle/Cargo.toml new file mode 100644 index 000000000..7e4992fb5 --- /dev/null +++ b/crates/rpc-chronicle/Cargo.toml @@ -0,0 +1,33 @@ +[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 } + +[features] +default = ["std"] +std = [ + "sp-api/std", + "sp-runtime/std", + "runtime-api-chronicle/std" +] diff --git a/crates/rpc-chronicle/src/lib.rs b/crates/rpc-chronicle/src/lib.rs new file mode 100644 index 000000000..607c24a69 --- /dev/null +++ b/crates/rpc-chronicle/src/lib.rs @@ -0,0 +1,57 @@ +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::HeaderBackend; +use sp_runtime::traits::Block as BlockT; +use std::sync::Arc; + +#[rpc(client, server)] +pub trait ChronicleApi { + #[method(name = "template_getValue")] + fn get_value(&self, at: Option) -> 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: BlockT, + C: Send + Sync + 'static + ProvideRuntimeApi + HeaderBackend, + C::Api: ChronicleRuntimeApi, +{ + fn get_value(&self, at: Option<::Hash>) -> RpcResult { + let api = self.client.runtime_api(); + let at = at.unwrap_or_else(|| self.client.info().best_hash); + + api.get_value(at).map_err(runtime_error_into_rpc_err) + } +} + +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..6e3353338 --- /dev/null +++ b/crates/runtime-api-chronicle/Cargo.toml @@ -0,0 +1,16 @@ +[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 } + +[features] +default = ["std"] +std = [ + "sp-api/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..5cd537092 --- /dev/null +++ b/crates/runtime-api-chronicle/src/lib.rs @@ -0,0 +1,9 @@ +#![cfg_attr(not(feature = "std"), no_std)] + +// 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 get_value() -> u32; + } +} diff --git a/node/node-chronicle/Cargo.toml b/node/node-chronicle/Cargo.toml index bb31c7626..6ffe7ee8f 100644 --- a/node/node-chronicle/Cargo.toml +++ b/node/node-chronicle/Cargo.toml @@ -20,52 +20,53 @@ name = "node-chronicle" 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/rpc.rs b/node/node-chronicle/src/rpc.rs index 00a2c4a1a..508eefb48 100644 --- a/node/node-chronicle/src/rpc.rs +++ b/node/node-chronicle/src/rpc.rs @@ -36,17 +36,20 @@ 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, { use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; + use rpc_chronicle::{Chronicle, ChronicleApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; let mut module = RpcModule::new(()); 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())?; + module.merge(Chronicle::new(client).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..93e62b56b 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 Operations = pallet_chronicle::chronicle_core::OperationSubmission; } // Create the runtime by composing the FRAME pallets that were previously configured. @@ -341,6 +341,12 @@ mod benches { } impl_runtime_apis! { + impl runtime_api_chronicle::ChronicleApi for Runtime { + fn get_value() -> u32 { + Chronicle::get_value().unwrap_or(0) + } + } + impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { VERSION