From 1f3fc68756aa91128a51303a2a3b70ac9c027d43 Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Wed, 20 Sep 2023 15:22:47 -0500 Subject: [PATCH 01/12] Implement avail adapter --- Cargo.lock | 2248 ++++++++++++++++++++++-- Cargo.toml | 1 + adapters/avail/Cargo.toml | 40 + adapters/avail/README.md | 8 + adapters/avail/src/avail.rs | 15 + adapters/avail/src/lib.rs | 10 + adapters/avail/src/service.rs | 216 +++ adapters/avail/src/spec/address.rs | 48 + adapters/avail/src/spec/block.rs | 40 + adapters/avail/src/spec/hash.rs | 26 + adapters/avail/src/spec/header.rs | 65 + adapters/avail/src/spec/mod.rs | 29 + adapters/avail/src/spec/transaction.rs | 77 + adapters/avail/src/verifier.rs | 82 + 14 files changed, 2710 insertions(+), 195 deletions(-) create mode 100644 adapters/avail/Cargo.toml create mode 100644 adapters/avail/README.md create mode 100644 adapters/avail/src/avail.rs create mode 100644 adapters/avail/src/lib.rs create mode 100644 adapters/avail/src/service.rs create mode 100644 adapters/avail/src/spec/address.rs create mode 100644 adapters/avail/src/spec/block.rs create mode 100644 adapters/avail/src/spec/hash.rs create mode 100644 adapters/avail/src/spec/header.rs create mode 100644 adapters/avail/src/spec/mod.rs create mode 100644 adapters/avail/src/spec/transaction.rs create mode 100644 adapters/avail/src/verifier.rs diff --git a/Cargo.lock b/Cargo.lock index edd481ecf..32a40c3a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,19 +23,28 @@ dependencies = [ "num-traits", ] +[[package]] +name = "addr2line" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +dependencies = [ + "gimli 0.26.2", +] + [[package]] name = "addr2line" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ - "cpp_demangle", + "cpp_demangle 0.4.3", "fallible-iterator", "gimli 0.27.3", "memmap2", "object 0.31.1", "rustc-demangle", - "smallvec", + "smallvec 1.11.0", ] [[package]] @@ -82,6 +91,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", + "getrandom 0.2.10", "once_cell", "version_check", ] @@ -107,7 +117,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f938f00332d63a5b0ac687bd6f46d03884638948921d9f8b50c59563d421ae25" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "bytes", "smol_str", ] @@ -133,6 +143,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anstream" version = "0.5.0" @@ -168,7 +187,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -178,7 +197,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -326,6 +345,33 @@ dependencies = [ "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-init" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23589ecb866b460d3a0f1278834750268c607e8e28a1b982c907219f3178cd72" +dependencies = [ + "nodrop", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + [[package]] name = "arrayvec" version = "0.7.4" @@ -411,6 +457,17 @@ dependencies = [ "critical-section", ] +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + [[package]] name = "auto_impl" version = "1.1.0" @@ -438,6 +495,29 @@ dependencies = [ "cc", ] +[[package]] +name = "avail-subxt" +version = "0.2.1" +source = "git+https://github.com/availproject/avail.git?tag=v1.6.0#99b85257d6b5bb3fa3051b1c05d30d42f7471a7e" +dependencies = [ + "anyhow", + "curve25519-dalek 2.1.3", + "derive_more", + "futures", + "hex", + "jsonrpsee 0.16.3", + "num_enum 0.5.11", + "parity-scale-codec", + "scale-info", + "schnorrkel", + "serde", + "serde-hex", + "sp-core", + "structopt", + "subxt", + "tokio", +] + [[package]] name = "backtrace" version = "0.3.69" @@ -459,6 +539,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" @@ -481,7 +567,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" name = "bashtestmd" version = "0.2.0" dependencies = [ - "clap", + "clap 4.4.4", "markdown", "shell-escape", ] @@ -608,13 +694,36 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding 0.1.5", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + [[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -623,7 +732,16 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array", + "generic-array 0.14.7", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", ] [[package]] @@ -632,7 +750,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -818,6 +936,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bounded-collections" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "bs58" version = "0.5.0" @@ -850,6 +980,12 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + [[package]] name = "bytemuck" version = "1.14.0" @@ -995,7 +1131,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -1046,6 +1182,21 @@ dependencies = [ "libloading", ] +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags 1.3.2", + "strsim 0.8.0", + "textwrap", + "unicode-width", + "vec_map", +] + [[package]] name = "clap" version = "4.4.4" @@ -1065,7 +1216,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.10.0", ] [[package]] @@ -1074,7 +1225,7 @@ version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2 1.0.67", "quote 1.0.33", "syn 2.0.37", @@ -1114,7 +1265,7 @@ dependencies = [ "bs58", "coins-core", "digest 0.10.7", - "hmac", + "hmac 0.12.1", "k256", "serde", "sha2 0.10.7", @@ -1129,7 +1280,7 @@ checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" dependencies = [ "bitvec", "coins-bip32", - "hmac", + "hmac 0.12.1", "once_cell", "pbkdf2 0.12.2", "rand 0.8.5", @@ -1147,7 +1298,7 @@ dependencies = [ "bech32", "bs58", "digest 0.10.7", - "generic-array", + "generic-array 0.14.7", "hex", "ripemd", "serde", @@ -1188,6 +1339,12 @@ 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 = "convert_case" version = "0.4.0" @@ -1219,6 +1376,15 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +[[package]] +name = "cpp_demangle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" +dependencies = [ + "cfg-if", +] + [[package]] name = "cpp_demangle" version = "0.4.3" @@ -1237,6 +1403,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cranelift-entity" +version = "0.92.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9e39cfc857e7e539aa623e03bb6bec11f54aef3dfdef41adcfa7b594af3b54" +dependencies = [ + "serde", +] + [[package]] name = "crc" version = "3.0.1" @@ -1270,7 +1445,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap", + "clap 4.4.4", "criterion-plot", "is-terminal", "itertools 0.10.5", @@ -1333,7 +1508,7 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset", + "memoffset 0.9.0", "scopeguard", ] @@ -1358,7 +1533,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ - "generic-array", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1370,10 +1545,30 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array", + "generic-array 0.14.7", "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + [[package]] name = "csv" version = "1.2.2" @@ -1404,6 +1599,32 @@ dependencies = [ "cipher", ] +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + [[package]] name = "curve25519-dalek" version = "4.1.0" @@ -1445,14 +1666,38 @@ dependencies = [ "zeroize", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + [[package]] name = "darling" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.67", + "quote 1.0.33", + "strsim 0.10.0", + "syn 1.0.109", ] [[package]] @@ -1465,17 +1710,28 @@ dependencies = [ "ident_case", "proc-macro2 1.0.67", "quote 1.0.33", - "strsim", + "strsim 0.10.0", "syn 2.0.37", ] +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core", + "darling_core 0.20.3", "quote 1.0.33", "syn 2.0.37", ] @@ -1525,7 +1781,7 @@ dependencies = [ "anyhow", "borsh", "demo-nft-module", - "jsonrpsee", + "jsonrpsee 0.18.2", "serde", "sov-modules-api", "sov-rollup-interface", @@ -1550,10 +1806,10 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", + "clap 4.4.4", "demo-stf", "hex", - "jsonrpsee", + "jsonrpsee 0.18.2", "rand 0.8.5", "reth-primitives", "serde", @@ -1645,13 +1901,22 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -1694,7 +1959,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1731,6 +1996,27 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "dyn-clone" version = "1.0.14" @@ -1747,10 +2033,19 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature", + "signature 2.1.0", "spki", ] +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature 1.6.4", +] + [[package]] name = "ed25519" version = "2.2.2" @@ -1759,7 +2054,7 @@ checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ "pkcs8", "serde", - "signature", + "signature 2.1.0", ] [[package]] @@ -1775,20 +2070,46 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519 1.5.3", + "sha2 0.9.9", + "zeroize", +] + [[package]] name = "ed25519-dalek" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ - "curve25519-dalek", - "ed25519", + "curve25519-dalek 4.1.0", + "ed25519 2.2.2", "rand_core 0.6.4", "serde", "sha2 0.10.7", "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +dependencies = [ + "curve25519-dalek 3.2.0", + "hashbrown 0.12.3", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", +] + [[package]] name = "educe" version = "0.4.23" @@ -1823,7 +2144,7 @@ dependencies = [ "crypto-bigint", "digest 0.10.7", "ff", - "generic-array", + "generic-array 0.14.7", "group", "pkcs8", "rand_core 0.6.4", @@ -1911,6 +2232,12 @@ dependencies = [ "termcolor", ] +[[package]] +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + [[package]] name = "equivalent" version = "1.0.1" @@ -1934,7 +2261,7 @@ checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1957,7 +2284,7 @@ dependencies = [ "ctr", "digest 0.10.7", "hex", - "hmac", + "hmac 0.12.1", "pbkdf2 0.11.0", "rand 0.8.5", "scrypt", @@ -2111,13 +2438,13 @@ version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60ca2514feb98918a0a31de7e1983c29f2267ebf61b2dc5d4294f91e5b866623" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "bytes", "cargo_metadata 0.15.4", "chrono", "elliptic-curve", "ethabi", - "generic-array", + "generic-array 0.14.7", "hex", "k256", "num_enum 0.6.1", @@ -2127,7 +2454,7 @@ dependencies = [ "rlp", "serde", "serde_json", - "strum", + "strum 0.25.0", "syn 2.0.37", "tempfile", "thiserror", @@ -2280,6 +2607,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + [[package]] name = "fallible-iterator" version = "0.2.0" @@ -2313,7 +2646,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "auto_impl", "bytes", ] @@ -2421,6 +2754,18 @@ dependencies = [ "percent-encoding", ] +[[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", + "serde", +] + [[package]] name = "fs2" version = "0.4.3" @@ -2477,6 +2822,7 @@ dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] @@ -2570,6 +2916,15 @@ dependencies = [ "byteorder", ] +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2599,15 +2954,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.27.3" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "stable_deref_trait", @@ -2615,7 +2972,17 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + +[[package]] +name = "gimli" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" @@ -2725,6 +3092,15 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + [[package]] name = "hash32" version = "0.2.1" @@ -2739,6 +3115,9 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.6", +] [[package]] name = "hashbrown" @@ -2783,12 +3162,30 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hermit-abi" version = "0.3.3" @@ -2816,6 +3213,26 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac 0.11.1", + "digest 0.9.0", +] + [[package]] name = "hmac" version = "0.12.1" @@ -2825,13 +3242,24 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array 0.14.7", + "hmac 0.8.1", +] + [[package]] name = "home" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2933,6 +3361,7 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls", + "webpki-roots 0.23.1", ] [[package]] @@ -3022,7 +3451,7 @@ dependencies = [ "icu_collections", "icu_properties", "icu_provider", - "smallvec", + "smallvec 1.11.0", "utf16_iter", "utf8_iter", "write16", @@ -3173,8 +3602,8 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "block-padding", - "generic-array", + "block-padding 0.3.3", + "generic-array 0.14.7", ] [[package]] @@ -3186,6 +3615,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", +] + [[package]] name = "integration-tests" version = "0.2.0" @@ -3209,6 +3647,17 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1be380c410bf0595e94992a648ea89db4dd3f3354ba54af206fd2a68cf5ac8e" +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.3", + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "ipnet" version = "2.8.0" @@ -3221,9 +3670,9 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi", - "rustix", - "windows-sys", + "hermit-abi 0.3.3", + "rustix 0.38.13", + "windows-sys 0.48.0", ] [[package]] @@ -3290,21 +3739,62 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonrpsee" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" +dependencies = [ + "jsonrpsee-client-transport 0.16.3", + "jsonrpsee-core 0.16.3", + "jsonrpsee-http-client 0.16.3", + "jsonrpsee-proc-macros 0.16.3", + "jsonrpsee-types 0.16.3", + "jsonrpsee-wasm-client 0.16.3", + "jsonrpsee-ws-client 0.16.3", + "tracing", +] + [[package]] name = "jsonrpsee" version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1822d18e4384a5e79d94dc9e4d1239cfa9fad24e55b44d2efeff5b394c9fece4" dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-http-client", - "jsonrpsee-proc-macros", + "jsonrpsee-client-transport 0.18.2", + "jsonrpsee-core 0.18.2", + "jsonrpsee-http-client 0.18.2", + "jsonrpsee-proc-macros 0.18.2", "jsonrpsee-server", - "jsonrpsee-types", - "jsonrpsee-wasm-client", - "jsonrpsee-ws-client", + "jsonrpsee-types 0.18.2", + "jsonrpsee-wasm-client 0.18.2", + "jsonrpsee-ws-client 0.18.2", + "tracing", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" +dependencies = [ + "anyhow", + "futures-channel", + "futures-timer", + "futures-util", + "gloo-net", + "http", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", "tracing", + "webpki-roots 0.25.2", ] [[package]] @@ -3317,7 +3807,7 @@ dependencies = [ "futures-util", "gloo-net", "http", - "jsonrpsee-core", + "jsonrpsee-core 0.18.2", "pin-project", "rustls-native-certs", "soketto", @@ -3329,6 +3819,30 @@ dependencies = [ "webpki-roots 0.23.1", ] +[[package]] +name = "jsonrpsee-core" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" +dependencies = [ + "anyhow", + "async-lock", + "async-trait", + "beef", + "futures-channel", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types 0.16.3", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "wasm-bindgen-futures", +] + [[package]] name = "jsonrpsee-core" version = "0.18.2" @@ -3343,7 +3857,7 @@ dependencies = [ "futures-util", "globset", "hyper", - "jsonrpsee-types", + "jsonrpsee-types 0.18.2", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -3357,6 +3871,25 @@ dependencies = [ "wasm-bindgen-futures", ] +[[package]] +name = "jsonrpsee-http-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "jsonrpsee-http-client" version = "0.18.2" @@ -3366,8 +3899,8 @@ dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.18.2", + "jsonrpsee-types 0.18.2", "serde", "serde_json", "thiserror", @@ -3376,13 +3909,26 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "jsonrpsee-proc-macros" version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6027ac0b197ce9543097d02a290f550ce1d9432bf301524b013053c0b75cc94" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-crate 1.3.1", "proc-macro2 1.0.67", "quote 1.0.33", @@ -3397,8 +3943,8 @@ checksum = "4f06661d1a6b6e5b85469dc9c29acfbb9b3bb613797a6fd10a3ebb8a70754057" dependencies = [ "futures-util", "hyper", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.18.2", + "jsonrpsee-types 0.18.2", "serde", "serde_json", "soketto", @@ -3409,6 +3955,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-types" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + [[package]] name = "jsonrpsee-types" version = "0.18.2" @@ -3423,15 +3983,38 @@ dependencies = [ "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-wasm-client" version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34e6ea7c6d862e60f8baebd946c037b70c6808a4e4e31e792a4029184e3ce13a" dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-client-transport 0.18.2", + "jsonrpsee-core 0.18.2", + "jsonrpsee-types 0.18.2", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" +dependencies = [ + "http", + "jsonrpsee-client-transport 0.16.3", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", ] [[package]] @@ -3441,9 +4024,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a64b2589680ba1ad7863f279cd2d5083c1dc0a7c0ea959d22924553050f8ab9f" dependencies = [ "http", - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-client-transport 0.18.2", + "jsonrpsee-core 0.18.2", + "jsonrpsee-types 0.18.2", ] [[package]] @@ -3457,7 +4040,7 @@ dependencies = [ "elliptic-curve", "once_cell", "sha2 0.10.7", - "signature", + "signature 2.1.0", ] [[package]] @@ -3573,6 +4156,54 @@ dependencies = [ "zstd-sys", ] +[[package]] +name = "libsecp256k1" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +dependencies = [ + "arrayref", + "base64 0.13.1", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + [[package]] name = "libz-sys" version = "1.1.12" @@ -3590,6 +4221,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + [[package]] name = "linux-raw-sys" version = "0.4.7" @@ -3663,6 +4300,15 @@ dependencies = [ "libc", ] +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + [[package]] name = "markdown" version = "1.0.0-alpha.13" @@ -3672,6 +4318,15 @@ dependencies = [ "unicode-id", ] +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matchers" version = "0.1.0" @@ -3691,6 +4346,12 @@ dependencies = [ "rawpointer", ] +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + [[package]] name = "md-5" version = "0.10.5" @@ -3706,6 +4367,15 @@ version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +[[package]] +name = "memfd" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" +dependencies = [ + "rustix 0.38.13", +] + [[package]] name = "memmap2" version = "0.5.10" @@ -3717,36 +4387,73 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.9.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] [[package]] -name = "methods" -version = "0.2.0" +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ - "risc0-build", + "autocfg", ] [[package]] -name = "metrics" -version = "0.20.1" +name = "memory-db" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b9b8653cec6897f73b519a43fba5ee3d50f62fe9af80b428accdcc093b4a849" +checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" dependencies = [ - "ahash 0.7.6", - "metrics-macros", - "portable-atomic 0.3.20", + "hash-db", + "hashbrown 0.12.3", ] [[package]] -name = "metrics-macros" -version = "0.6.0" +name = "memory_units" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731f8ecebd9f3a4aa847dfe75455e4757a45da40a7793d2f0b1f9b6ed18b23f3" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + +[[package]] +name = "merlin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "methods" +version = "0.2.0" +dependencies = [ + "risc0-build", +] + +[[package]] +name = "metrics" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b9b8653cec6897f73b519a43fba5ee3d50f62fe9af80b428accdcc093b4a849" +dependencies = [ + "ahash 0.7.6", + "metrics-macros", + "portable-atomic 0.3.20", +] + +[[package]] +name = "metrics-macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731f8ecebd9f3a4aa847dfe75455e4757a45da40a7793d2f0b1f9b6ed18b23f3" dependencies = [ "proc-macro2 1.0.67", "quote 1.0.33", @@ -3782,7 +4489,7 @@ checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3885,6 +4592,18 @@ dependencies = [ "sha2 0.10.7", ] +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + [[package]] name = "nom" version = "7.1.3" @@ -3973,6 +4692,16 @@ dependencies = [ "syn 2.0.37", ] +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec 0.7.4", + "itoa", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -4022,10 +4751,19 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.3", "libc", ] +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive 0.5.11", +] + [[package]] name = "num_enum" version = "0.6.1" @@ -4044,6 +4782,18 @@ dependencies = [ "num_enum_derive 0.7.0", ] +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "num_enum_derive" version = "0.6.1" @@ -4077,6 +4827,18 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +dependencies = [ + "crc32fast", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "memchr", +] + [[package]] name = "object" version = "0.31.1" @@ -4113,6 +4875,12 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + [[package]] name = "opaque-debug" version = "0.3.0" @@ -4125,7 +4893,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "auto_impl", "bytes", "ethereum-types", @@ -4225,7 +4993,7 @@ version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "bitvec", "byte-slice-cast", "bytes", @@ -4246,6 +5014,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + [[package]] name = "parking" version = "2.1.0" @@ -4283,7 +5057,7 @@ dependencies = [ "instant", "libc", "redox_syscall 0.2.16", - "smallvec", + "smallvec 1.11.0", "winapi", ] @@ -4296,8 +5070,8 @@ dependencies = [ "cfg-if", "libc", "redox_syscall 0.3.5", - "smallvec", - "windows-targets", + "smallvec 1.11.0", + "windows-targets 0.48.5", ] [[package]] @@ -4323,6 +5097,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" +[[package]] +name = "pbkdf2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +dependencies = [ + "crypto-mac 0.11.1", +] + [[package]] name = "pbkdf2" version = "0.11.0" @@ -4330,7 +5113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ "digest 0.10.7", - "hmac", + "hmac 0.12.1", "password-hash", "sha2 0.10.7", ] @@ -4342,7 +5125,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", - "hmac", + "hmac 0.12.1", ] [[package]] @@ -4770,7 +5553,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.10.5", "lazy_static", "log", @@ -4792,7 +5575,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bdf592881d821b83d471f8af290226c8d51402259e9bb5be7f9f8bdebbb11ac" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.11.0", "log", "multimap", @@ -4866,6 +5649,15 @@ dependencies = [ "autotools", ] +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -5033,6 +5825,26 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ref-cast" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 2.0.37", +] + [[package]] name = "regex" version = "1.9.5" @@ -5188,21 +6000,21 @@ version = "0.1.0-alpha.4" source = "git+https://github.com/paradigmxyz/reth?rev=4ab924c5d361bbfdcdad9f997d16d67b4a1730b7#4ab924c5d361bbfdcdad9f997d16d67b4a1730b7" dependencies = [ "aes", - "block-padding", + "block-padding 0.3.3", "byteorder", "cipher", "ctr", "digest 0.10.7", "educe", "futures", - "generic-array", - "hmac", + "generic-array 0.14.7", + "hmac 0.12.1", "pin-project", "rand 0.8.5", "reth-net-common", "reth-primitives", "reth-rlp", - "secp256k1", + "secp256k1 0.27.0", "sha2 0.10.7", "sha3", "thiserror", @@ -5356,11 +6168,11 @@ dependencies = [ "reth-rlp-derive", "revm-primitives", "ruint", - "secp256k1", + "secp256k1 0.27.0", "serde", "serde_json", "serde_with", - "strum", + "strum 0.25.0", "sucds", "thiserror", "tiny-keccak", @@ -5438,7 +6250,7 @@ name = "reth-rlp" version = "0.1.0-alpha.4" source = "git+https://github.com/paradigmxyz/reth?rev=4ab924c5d361bbfdcdad9f997d16d67b4a1730b7#4ab924c5d361bbfdcdad9f997d16d67b4a1730b7" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "auto_impl", "bytes", "ethereum-types", @@ -5462,7 +6274,7 @@ name = "reth-rpc-types" version = "0.1.0-alpha.4" source = "git+https://github.com/paradigmxyz/reth?rev=4ab924c5d361bbfdcdad9f997d16d67b4a1730b7#4ab924c5d361bbfdcdad9f997d16d67b4a1730b7" dependencies = [ - "jsonrpsee-types", + "jsonrpsee-types 0.18.2", "reth-primitives", "reth-rlp", "serde", @@ -5517,7 +6329,7 @@ dependencies = [ "once_cell", "revm-primitives", "ripemd", - "secp256k1", + "secp256k1 0.27.0", "sha2 0.10.7", "sha3", "substrate-bn", @@ -5550,7 +6362,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "hmac", + "hmac 0.12.1", "subtle", ] @@ -5713,7 +6525,7 @@ dependencies = [ "bytes", "cfg-if", "crypto-bigint", - "generic-array", + "generic-array 0.14.7", "getrandom 0.2.10", "hex", "lazy-regex", @@ -5853,6 +6665,20 @@ dependencies = [ "semver 1.0.18", ] +[[package]] +name = "rustix" +version = "0.36.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", +] + [[package]] name = "rustix" version = "0.38.13" @@ -5862,8 +6688,8 @@ dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys", - "windows-sys", + "linux-raw-sys 0.4.7", + "windows-sys 0.48.0", ] [[package]] @@ -5978,16 +6804,41 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scale-bits" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "scale-decode" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d823d4be477fc33321f93d08fb6c2698273d044f01362dc27573a750deb7c233" +dependencies = [ + "parity-scale-codec", + "scale-bits", + "scale-info", + "thiserror", +] + [[package]] name = "scale-info" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" dependencies = [ + "bitvec", "cfg-if", "derive_more", "parity-scale-codec", "scale-info-derive", + "serde", ] [[package]] @@ -6002,13 +6853,30 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "scale-value" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a5e7810815bd295da73e4216d1dfbced3c7c7c7054d70fa5f6e4c58123fff4" +dependencies = [ + "either", + "frame-metadata", + "parity-scale-codec", + "scale-bits", + "scale-decode", + "scale-info", + "serde", + "thiserror", + "yap", +] + [[package]] name = "schannel" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -6035,6 +6903,35 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "schnellru" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +dependencies = [ + "ahash 0.8.3", + "cfg-if", + "hashbrown 0.13.2", +] + +[[package]] +name = "schnorrkel" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "curve25519-dalek 2.1.3", + "getrandom 0.1.16", + "merlin", + "rand 0.7.3", + "rand_core 0.5.1", + "sha2 0.8.2", + "subtle", + "zeroize", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -6047,7 +6944,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" dependencies = [ - "hmac", + "hmac 0.12.1", "pbkdf2 0.11.0", "salsa20", "sha2 0.10.7", @@ -6071,12 +6968,21 @@ checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", - "generic-array", + "generic-array 0.14.7", "pkcs8", "subtle", "zeroize", ] +[[package]] +name = "secp256k1" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +dependencies = [ + "secp256k1-sys 0.6.1", +] + [[package]] name = "secp256k1" version = "0.27.0" @@ -6084,7 +6990,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ "rand 0.8.5", - "secp256k1-sys", + "secp256k1-sys 0.8.1", +] + +[[package]] +name = "secp256k1-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +dependencies = [ + "cc", ] [[package]] @@ -6096,6 +7011,15 @@ dependencies = [ "cc", ] +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + [[package]] name = "security-framework" version = "2.9.2" @@ -6167,6 +7091,17 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-hex" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca37e3e4d1b39afd7ff11ee4e947efae85adfddf4841787bfa47c470e96dc26d" +dependencies = [ + "array-init", + "serde", + "smallvec 0.6.14", +] + [[package]] name = "serde-value" version = "0.7.0" @@ -6284,7 +7219,7 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling", + "darling 0.20.3", "proc-macro2 1.0.67", "quote 1.0.33", "syn 2.0.37", @@ -6312,7 +7247,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug", + "opaque-debug 0.3.0", ] [[package]] @@ -6326,6 +7261,18 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + [[package]] name = "sha2" version = "0.9.9" @@ -6336,7 +7283,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug", + "opaque-debug 0.3.0", ] [[package]] @@ -6390,6 +7337,12 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + [[package]] name = "signature" version = "2.1.0" @@ -6415,6 +7368,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "smallvec" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" +dependencies = [ + "maybe-uninit", +] + [[package]] name = "smallvec" version = "1.11.0" @@ -6453,7 +7415,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -6491,7 +7453,7 @@ name = "sov-accessory-state" version = "0.2.0" dependencies = [ "borsh", - "jsonrpsee", + "jsonrpsee 0.18.2", "serde", "sov-modules-api", "sov-state", @@ -6505,8 +7467,8 @@ dependencies = [ "anyhow", "arbitrary", "borsh", - "clap", - "jsonrpsee", + "clap 4.4.4", + "jsonrpsee 0.18.2", "schemars", "serde", "serde_json", @@ -6536,14 +7498,39 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sov-avail-adapter" +version = "0.2.0" +dependencies = [ + "anyhow", + "async-trait", + "avail-subxt", + "borsh", + "bytes", + "parity-scale-codec", + "primitive-types", + "reqwest", + "serde", + "serde_json", + "sov-rollup-interface", + "sp-core", + "sp-core-hashing 10.0.0", + "sp-keyring", + "subxt", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber 0.3.17", +] + [[package]] name = "sov-bank" version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", - "jsonrpsee", + "clap 4.4.4", + "jsonrpsee 0.18.2", "schemars", "serde", "serde_json", @@ -6561,9 +7548,9 @@ dependencies = [ "anyhow", "bincode", "borsh", - "clap", + "clap 4.4.4", "hex", - "jsonrpsee", + "jsonrpsee 0.18.2", "schemars", "serde", "serde_json", @@ -6589,7 +7576,7 @@ dependencies = [ "borsh", "hex", "hex-literal 0.4.1", - "jsonrpsee", + "jsonrpsee 0.18.2", "nmt-rs", "postcard", "proptest", @@ -6617,7 +7604,7 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "jsonrpsee", + "jsonrpsee 0.18.2", "serde", "serde_json", "sov-chain-state", @@ -6637,7 +7624,7 @@ dependencies = [ "demo-stf", "directories", "hex", - "jsonrpsee", + "jsonrpsee 0.18.2", "serde", "serde_json", "sov-accounts", @@ -6692,7 +7679,7 @@ dependencies = [ "demo-stf", "env_logger", "hex", - "jsonrpsee", + "jsonrpsee 0.18.2", "log", "log4rs", "methods", @@ -6715,7 +7702,7 @@ dependencies = [ "tempfile", "tokio", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.17", ] [[package]] @@ -6726,7 +7713,7 @@ dependencies = [ "async-trait", "borsh", "bytes", - "clap", + "clap 4.4.4", "const-rollup-config", "criterion", "demo-stf", @@ -6740,14 +7727,14 @@ dependencies = [ "futures", "hex", "jmt", - "jsonrpsee", + "jsonrpsee 0.18.2", "prettytable-rs", "prometheus 0.11.0", "proptest", "reqwest", "reth-primitives", "revm", - "secp256k1", + "secp256k1 0.27.0", "serde", "serde_json", "sha2 0.10.7", @@ -6768,7 +7755,7 @@ dependencies = [ "tendermint", "tokio", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.17", ] [[package]] @@ -6779,7 +7766,7 @@ dependencies = [ "borsh", "demo-stf", "ethers", - "jsonrpsee", + "jsonrpsee 0.18.2", "reth-primitives", "reth-rpc-types", "serde_json", @@ -6796,7 +7783,7 @@ dependencies = [ "anyhow", "borsh", "bytes", - "clap", + "clap 4.4.4", "derive_more", "ethereum-types", "ethers", @@ -6805,14 +7792,14 @@ dependencies = [ "ethers-middleware", "ethers-signers", "hex", - "jsonrpsee", + "jsonrpsee 0.18.2", "lazy_static", "reth-primitives", "reth-revm", "reth-rpc-types", "revm", "schemars", - "secp256k1", + "secp256k1 0.27.0", "serde", "serde_json", "sov-evm", @@ -6855,12 +7842,12 @@ dependencies = [ "bech32", "bincode", "borsh", - "clap", + "clap 4.4.4", "derive_more", - "ed25519-dalek", + "ed25519-dalek 2.0.0", "hex", "jmt", - "jsonrpsee", + "jsonrpsee 0.18.2", "rand 0.8.5", "risc0-zkvm", "risc0-zkvm-platform", @@ -6886,8 +7873,8 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", - "jsonrpsee", + "clap 4.4.4", + "jsonrpsee 0.18.2", "proc-macro2 1.0.67", "quote 1.0.33", "schemars", @@ -7001,7 +7988,7 @@ dependencies = [ "async-trait", "borsh", "hex", - "jsonrpsee", + "jsonrpsee 0.18.2", "serde", "sov-rollup-interface", "tokio", @@ -7014,8 +8001,8 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", - "jsonrpsee", + "clap 4.4.4", + "jsonrpsee 0.18.2", "risc0-zkvm", "risc0-zkvm-platform", "schemars", @@ -7063,7 +8050,7 @@ dependencies = [ "borsh", "futures", "hex", - "jsonrpsee", + "jsonrpsee 0.18.2", "rand 0.8.5", "serde", "serde_json", @@ -7081,7 +8068,7 @@ dependencies = [ "tokio", "toml 0.8.0", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.17", ] [[package]] @@ -7090,8 +8077,8 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", - "jsonrpsee", + "clap 4.4.4", + "jsonrpsee 0.18.2", "schemars", "serde", "serde_json", @@ -7108,8 +8095,8 @@ version = "0.2.0" dependencies = [ "anyhow", "borsh", - "clap", - "jsonrpsee", + "clap 4.4.4", + "jsonrpsee 0.18.2", "schemars", "serde", "serde_json", @@ -7145,28 +8132,383 @@ dependencies = [ ] [[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" +name = "sp-application-crypto" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "2f08604ba4bd856311946722958711a08bded5c929e1227f7a697c58deb09468" dependencies = [ - "lock_api", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-std", ] [[package]] -name = "spki" -version = "0.7.2" +name = "sp-arithmetic" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "7796939f2e3b68a3b9410ea17a2063b78038cd366f57fa772dd3be0798bd3412" dependencies = [ - "base64ct", - "der", + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std", + "static_assertions", +] + +[[package]] +name = "sp-core" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c96dc3debbe5c22ebf18f99e6a53199efe748e6e584a1902adb88cbad66ae7c" +dependencies = [ + "array-bytes", + "base58", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin", + "parity-scale-codec", + "parking_lot 0.12.1", + "primitive-types", + "rand 0.8.5", + "regex", + "scale-info", + "schnorrkel", + "secp256k1 0.24.3", + "secrecy", + "serde", + "sp-core-hashing 6.0.0", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tiny-bip39", + "zeroize", +] + +[[package]] +name = "sp-core-hashing" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbc2d1947252b7a4e403b0a260f596920443742791765ec111daa2bbf98eff25" +dependencies = [ + "blake2", + "byteorder", + "digest 0.10.7", + "sha2 0.10.7", + "sha3", + "sp-std", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e360755a2706a76886d58776665cad0db793dece3c7d390455b28e8a1efd6285" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.7", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-debug-derive" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66fb9dc63d54de7d7bed62a505b6e0bd66c122525ea1abb348f6564717c3df2d" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "sp-externalities" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57052935c9c9b070ea6b339ef0da3bf241b7e065fc37f9c551669ee83ecfc3c1" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + +[[package]] +name = "sp-io" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578959f9a7e44fd2dd96e8b8bc893cea04fcd7c00a4ffbb0b91c5013899dd02b" +dependencies = [ + "bytes", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", + "futures", + "libsecp256k1", + "log", + "parity-scale-codec", + "secp256k1 0.24.3", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-keyring" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc13a168cdc15e185db5cbe8644e3eaafa534e229593768b3044b60bea00fc8c" +dependencies = [ + "lazy_static", + "sp-core", + "sp-runtime", + "strum 0.24.1", +] + +[[package]] +name = "sp-keystore" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "480dbd54b281c638209fbcfce69902b82a0a1af0e22219d46825eadced3136b6" +dependencies = [ + "async-trait", + "futures", + "merlin", + "parity-scale-codec", + "parking_lot 0.12.1", + "schnorrkel", + "sp-core", + "sp-externalities", + "thiserror", +] + +[[package]] +name = "sp-panic-handler" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4abed79c3d5b3622f65ab065676addd9923b9b122cd257df23e2757ce487c6d2" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + +[[package]] +name = "sp-runtime" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8ab2fd44668d3e8674e2253a43852857a47d49be7db737e98bf157e4bcebefd" +dependencies = [ + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-weights", +] + +[[package]] +name = "sp-runtime-interface" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb7707246cee4967a8cc71e3ef0e82f562e8b1020606447a6a12b99c7c1b443" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2773c90e5765847c5e8b4a24b553d38a9ca52ded47c142cfcfb7948f42827af9" +dependencies = [ + "Inflector", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "sp-state-machine" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c957b8b4c252507c12674948db427c5e34fd1760ce256922f1ec5f89f781a4f" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec 1.11.0", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std", + "sp-trie", + "thiserror", + "tracing", +] + +[[package]] +name = "sp-std" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af0ee286f98455272f64ac5bb1384ff21ac029fbb669afbaf48477faff12760e" + +[[package]] +name = "sp-storage" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c20cb0c562d1a159ecb2c7ca786828c81e432c535474967d2df3a484977cea4" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-tracing" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e46bd547da89a9cda69b4ce4c91a5b7e1f86915190d83cd407b715d0c6bac042" +dependencies = [ + "parity-scale-codec", + "sp-std", + "tracing", + "tracing-core", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "sp-trie" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8efbe5b6d29a18fea7c2f52e0098135f2f864b31d335d5105b40a349866ba874" +dependencies = [ + "ahash 0.8.3", + "hash-db", + "hashbrown 0.12.3", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "scale-info", + "schnellru", + "sp-core", + "sp-std", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-wasm-interface" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbc05650b6338808892a7b04f0c56bb1f7f928bfa9ac58e0af2c1e5bef33229" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std", + "wasmi", + "wasmtime", +] + +[[package]] +name = "sp-weights" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ebab7696f915aa548494aef3ca8d15217baf10458fe6edb87e60587a47de358" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "smallvec 1.11.0", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der", ] [[package]] @@ -7175,6 +8517,21 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" +[[package]] +name = "ss58-registry" +version = "1.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2 1.0.67", + "quote 1.0.33", + "serde", + "serde_json", + "unicode-xid 0.2.4", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -7200,19 +8557,71 @@ dependencies = [ "precomputed-hash", ] +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "structopt" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" +dependencies = [ + "clap 2.34.0", + "lazy_static", + "structopt-derive", +] + +[[package]] +name = "structopt-derive" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" +dependencies = [ + "heck 0.3.3", + "proc-macro-error", + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros 0.24.3", +] + [[package]] name = "strum" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" dependencies = [ - "strum_macros", + "strum_macros 0.25.2", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2 1.0.67", + "quote 1.0.33", + "rustversion", + "syn 1.0.109", ] [[package]] @@ -7221,13 +8630,26 @@ version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2 1.0.67", "quote 1.0.33", "rustversion", "syn 2.0.37", ] +[[package]] +name = "substrate-bip39" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +dependencies = [ + "hmac 0.11.0", + "pbkdf2 0.8.0", + "schnorrkel", + "sha2 0.9.9", + "zeroize", +] + [[package]] name = "substrate-bn" version = "0.6.0" @@ -7243,24 +8665,102 @@ dependencies = [ [[package]] name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "subtle-ng" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "subxt" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54639dba6a113584083968b6a8f457dedae612abe1bd214762101ca29f12e332" +dependencies = [ + "base58", + "blake2", + "derivative", + "frame-metadata", + "futures", + "getrandom 0.2.10", + "hex", + "impl-serde", + "jsonrpsee 0.16.3", + "parity-scale-codec", + "parking_lot 0.12.1", + "primitive-types", + "scale-bits", + "scale-decode", + "scale-info", + "scale-value", + "serde", + "serde_json", + "sp-core", + "sp-core-hashing 6.0.0", + "sp-runtime", + "subxt-macro", + "subxt-metadata", + "thiserror", + "tracing", +] + +[[package]] +name = "subxt-codegen" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e86cb719003f1cedf2710a6e55ca4c37aba4c989bbd3b81dd1c52af9e4827e" +dependencies = [ + "darling 0.14.4", + "frame-metadata", + "heck 0.4.1", + "hex", + "jsonrpsee 0.16.3", + "parity-scale-codec", + "proc-macro-error", + "proc-macro2 1.0.67", + "quote 1.0.33", + "scale-info", + "subxt-metadata", + "syn 1.0.109", + "tokio", +] [[package]] -name = "subtle-encoding" -version = "0.5.1" +name = "subxt-macro" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +checksum = "74c08de402a78c4c06c3ee3702c80e519efdcb65911348e018b6998d04404916" dependencies = [ - "zeroize", + "darling 0.14.4", + "proc-macro-error", + "subxt-codegen", + "syn 1.0.109", ] [[package]] -name = "subtle-ng" -version = "2.5.0" +name = "subxt-metadata" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" +checksum = "2593ab5f53435e6352675af4f9851342607f37785d84c7a3fb3139550d3c35f0" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-core-hashing 6.0.0", +] [[package]] name = "sucds" @@ -7354,6 +8854,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "target-lexicon" +version = "0.12.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" + [[package]] name = "tempfile" version = "3.8.0" @@ -7363,8 +8869,8 @@ dependencies = [ "cfg-if", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix", - "windows-sys", + "rustix 0.38.13", + "windows-sys 0.48.0", ] [[package]] @@ -7375,7 +8881,7 @@ checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0" dependencies = [ "bytes", "digest 0.10.7", - "ed25519", + "ed25519 2.2.2", "ed25519-consensus", "flex-error", "futures", @@ -7388,7 +8894,7 @@ dependencies = [ "serde_json", "serde_repr", "sha2 0.10.7", - "signature", + "signature 2.1.0", "subtle", "subtle-encoding", "tendermint-proto", @@ -7434,6 +8940,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + [[package]] name = "thin-vec" version = "0.2.12" @@ -7511,6 +9026,25 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-bip39" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" +dependencies = [ + "anyhow", + "hmac 0.12.1", + "once_cell", + "pbkdf2 0.11.0", + "rand 0.8.5", + "rustc-hash", + "sha2 0.10.7", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -7571,7 +9105,7 @@ dependencies = [ "signal-hook-registry", "socket2 0.5.4", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -7797,24 +9331,78 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +dependencies = [ + "ansi_term", + "chrono", + "lazy_static", + "matchers 0.0.1", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec 1.11.0", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + [[package]] name = "tracing-subscriber" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ - "matchers", + "matchers 0.1.0", "nu-ansi-term", "once_cell", "regex", "sharded-slab", - "smallvec", + "smallvec 1.11.0", "thread_local", "tracing", "tracing-core", "tracing-log", ] +[[package]] +name = "trie-db" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" +dependencies = [ + "hash-db", + "hashbrown 0.12.3", + "log", + "rustc-hex", + "smallvec 1.11.0", +] + +[[package]] +name = "trie-root" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +dependencies = [ + "hash-db", +] + [[package]] name = "triehash" version = "0.8.4" @@ -7874,6 +9462,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", + "digest 0.10.7", + "rand 0.8.5", "static_assertions", ] @@ -8064,6 +9654,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + [[package]] name = "vergen" version = "8.2.5" @@ -8193,6 +9789,181 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +[[package]] +name = "wasmi" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" +dependencies = [ + "parity-wasm", + "wasmi-validation", + "wasmi_core", +] + +[[package]] +name = "wasmi-validation" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" +dependencies = [ + "parity-wasm", +] + +[[package]] +name = "wasmi_core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +dependencies = [ + "downcast-rs", + "libm", + "memory_units", + "num-rational", + "num-traits", +] + +[[package]] +name = "wasmparser" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adde01ade41ab9a5d10ec8ed0bb954238cf8625b5cd5a13093d6de2ad9c2be1a" +dependencies = [ + "indexmap 1.9.3", + "url", +] + +[[package]] +name = "wasmtime" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49ffcc607adc9da024e87ca814592d4bc67f5c5b58e488f5608d5734a1ebc23e" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "object 0.29.0", + "once_cell", + "paste", + "psm", + "serde", + "target-lexicon", + "wasmparser", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-runtime", + "windows-sys 0.42.0", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cb5dc4d79cd7b2453c395f64e9013d2ad90bd083be556d5565cb224ebe8d57" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "wasmtime-environ" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9350c919553cddf14f78f9452119c8004d7ef6bfebb79a41a21819ed0c5604d8" +dependencies = [ + "anyhow", + "cranelift-entity", + "gimli 0.26.2", + "indexmap 1.9.3", + "log", + "object 0.29.0", + "serde", + "target-lexicon", + "thiserror", + "wasmparser", + "wasmtime-types", +] + +[[package]] +name = "wasmtime-jit" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ba5779ea786386432b94c9fc9ad5597346c319e8239db0d98d5be5cc109a7e" +dependencies = [ + "addr2line 0.17.0", + "anyhow", + "bincode", + "cfg-if", + "cpp_demangle 0.3.5", + "gimli 0.26.2", + "log", + "object 0.29.0", + "rustc-demangle", + "serde", + "target-lexicon", + "wasmtime-environ", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", + "windows-sys 0.42.0", +] + +[[package]] +name = "wasmtime-jit-debug" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9841a44c82c74101c10ad4f215392761a2523b3c6c838597962bdb6de75fdb3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd4356c2493002da3b111d470c2ecea65a3017009afce8adc46eaa5758739891" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.42.0", +] + +[[package]] +name = "wasmtime-runtime" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd26efea7a790fcf430e663ba2519f0ab6eb8980adf8b0c58c62b727da77c2ec" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "mach", + "memfd", + "memoffset 0.6.5", + "paste", + "rand 0.8.5", + "rustix 0.36.15", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-jit-debug", + "windows-sys 0.42.0", +] + +[[package]] +name = "wasmtime-types" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86e1e4f66a2b9a114f9def450ab9971828c968db6ea6fccd613724b771fa4913" +dependencies = [ + "cranelift-entity", + "serde", + "thiserror", + "wasmparser", +] + [[package]] name = "web-sys" version = "0.3.64" @@ -8237,7 +10008,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix", + "rustix 0.38.13", ] [[package]] @@ -8277,7 +10048,31 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", ] [[package]] @@ -8286,7 +10081,22 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -8295,51 +10105,93 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -8362,7 +10214,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -8442,6 +10294,12 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yap" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc77f52dc9e9b10d55d3f4462c3b7fc393c4f17975d641542833ab2d3bc26ef" + [[package]] name = "yoke" version = "0.7.1" @@ -8539,11 +10397,11 @@ dependencies = [ "aes", "byteorder", "bzip2", - "constant_time_eq", + "constant_time_eq 0.1.5", "crc32fast", "crossbeam-utils", "flate2", - "hmac", + "hmac 0.12.1", "pbkdf2 0.11.0", "sha1", "time", diff --git a/Cargo.toml b/Cargo.toml index 7dc9094c7..37ee9f6ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ resolver = "2" members = [ "rollup-interface", + "adapters/avail", "adapters/risc0", "adapters/celestia", "examples/const-rollup-config", diff --git a/adapters/avail/Cargo.toml b/adapters/avail/Cargo.toml new file mode 100644 index 000000000..a84095812 --- /dev/null +++ b/adapters/avail/Cargo.toml @@ -0,0 +1,40 @@ +[package] +name = "sov-avail-adapter" +version.workspace = true +edition.workspace = true +license.workspace = true +authors.workspace = true +homepage.workspace = true +publish.workspace = true +repository.workspace = true +rust-version.workspace = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +borsh = { workspace = true, features = ["bytes"] } +sov-rollup-interface = { path = "../../rollup-interface" } +bytes = { version = "1.2.1", features = ["serde"]} +primitive-types = { version = "0.12.1", features = ["serde"]} +sp-core-hashing = "10.0.0" +subxt = { version = "0.27.1", optional = true } +avail-subxt = { git = "https://github.com/availproject/avail.git", tag = "v1.6.0", features = ["std"], optional = true } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"], optional = true } + +#Convenience +tokio = { workspace = true, optional = true } +tracing = { workspace = true } +tracing-subscriber = { version = "0.3.17", features = ["fmt"] } +async-trait = { workspace = true } +anyhow = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +reqwest = { version = "0.11", features = ["json"], optional = true } +thiserror = { workspace = true } +sp-keyring = { version = "18.0.0", optional = true } +sp-core = { version = "16.0.0", optional = true } + +[features] +default = ["native"] +native = ["dep:tokio", "dep:codec", "dep:reqwest", "dep:avail-subxt", "dep:subxt", "dep:sp-keyring", "dep:sp-core", "sov-rollup-interface/native"] +verifier = [] diff --git a/adapters/avail/README.md b/adapters/avail/README.md new file mode 100644 index 000000000..4df321049 --- /dev/null +++ b/adapters/avail/README.md @@ -0,0 +1,8 @@ +# Avail Sovereign DA adapter (presence) + +This is a _research-only_ adapter making Avail compatible with the Sovereign SDK. + +> **_NOTE:_** None of its code is suitable for production use. + +This adapter was originally written by Vibhu Rhajeev and the Avail team, but is +provided as part of the Sovereign SDK under the Apache 2.0 and MIT licenses. diff --git a/adapters/avail/src/avail.rs b/adapters/avail/src/avail.rs new file mode 100644 index 000000000..05351659e --- /dev/null +++ b/adapters/avail/src/avail.rs @@ -0,0 +1,15 @@ +use avail_subxt::primitives::AppUncheckedExtrinsic; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct Confidence { + pub block: u32, + pub confidence: f64, + pub serialised_confidence: Option, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct ExtrinsicsData { + pub block: u32, + pub extrinsics: Vec, +} diff --git a/adapters/avail/src/lib.rs b/adapters/avail/src/lib.rs new file mode 100644 index 000000000..10b076213 --- /dev/null +++ b/adapters/avail/src/lib.rs @@ -0,0 +1,10 @@ +#[cfg(feature = "native")] +mod avail; +#[cfg(feature = "native")] +pub mod service; +pub mod spec; +pub mod verifier; + +// NOTE: Remove once dependency to the node is removed +#[cfg(feature = "native")] +pub use avail_subxt::build_client; diff --git a/adapters/avail/src/service.rs b/adapters/avail/src/service.rs new file mode 100644 index 000000000..3706fc74b --- /dev/null +++ b/adapters/avail/src/service.rs @@ -0,0 +1,216 @@ +use core::time::Duration; + +use anyhow::anyhow; +use async_trait::async_trait; +use avail_subxt::api; +use avail_subxt::api::runtime_types::sp_core::bounded::bounded_vec::BoundedVec; +use avail_subxt::primitives::AvailExtrinsicParams; +use avail_subxt::AvailConfig; +use reqwest::StatusCode; + +use sov_rollup_interface::da::DaSpec; +use sov_rollup_interface::services::da::DaService; +use sp_core::crypto::Pair as PairTrait; +use sp_keyring::sr25519::sr25519::Pair; +use subxt::tx::PairSigner; +use subxt::OnlineClient; +use tracing::info; + +use crate::avail::{Confidence, ExtrinsicsData}; +use crate::spec::block::AvailBlock; +use crate::spec::header::AvailHeader; +use crate::spec::transaction::AvailBlobTransaction; +use crate::spec::DaLayerSpec; +use crate::verifier::Verifier; + +/// Runtime configuration for the DA service +#[derive(Clone, PartialEq, serde::Deserialize, serde::Serialize)] +pub struct DaServiceConfig { + pub light_client_url: String, + pub node_client_url: String, + //TODO: Safer strategy to load seed so it is not accidentally revealed. + pub seed: String, +} + +#[derive(Clone)] +pub struct DaProvider { + pub node_client: OnlineClient, + pub light_client_url: String, + signer: PairSigner, +} + +impl DaProvider { + fn appdata_url(&self, block_num: u64) -> String { + let light_client_url = self.light_client_url.clone(); + format!("{light_client_url}/v1/appdata/{block_num}") + } + + fn confidence_url(&self, block_num: u64) -> String { + let light_client_url = self.light_client_url.clone(); + format!("{light_client_url}/v1/confidence/{block_num}") + } + + pub async fn new(config: DaServiceConfig) -> Self { + let pair = Pair::from_string_with_seed(&config.seed, None).unwrap(); + let signer = PairSigner::::new(pair.0.clone()); + + let node_client = avail_subxt::build_client(config.node_client_url.to_string(), false) + .await + .unwrap(); + let light_client_url = config.light_client_url; + + DaProvider { + node_client, + light_client_url, + signer, + } + } +} + +const POLLING_TIMEOUT: Duration = Duration::from_secs(60); +const POLLING_INTERVAL: Duration = Duration::from_secs(1); + +// TODO: Is there a way to avoid coupling to tokio? + +async fn wait_for_confidence(confidence_url: &str) -> anyhow::Result<()> { + let start_time = std::time::Instant::now(); + + loop { + if start_time.elapsed() >= POLLING_TIMEOUT { + return Err(anyhow!("Timeout...")); + } + + let response = reqwest::get(confidence_url).await?; + if response.status() != StatusCode::OK { + info!("Confidence not received"); + tokio::time::sleep(POLLING_INTERVAL).await; + continue; + } + + let response: Confidence = serde_json::from_str(&response.text().await?)?; + if response.confidence < 92.5 { + info!("Confidence not reached"); + tokio::time::sleep(POLLING_INTERVAL).await; + continue; + } + + break; + } + + Ok(()) +} + +async fn wait_for_appdata(appdata_url: &str, block: u32) -> anyhow::Result { + let start_time = std::time::Instant::now(); + + loop { + if start_time.elapsed() >= POLLING_TIMEOUT { + return Err(anyhow!("Timeout...")); + } + + let response = reqwest::get(appdata_url).await?; + if response.status() == StatusCode::NOT_FOUND { + return Ok(ExtrinsicsData { + block, + extrinsics: vec![], + }); + } + if response.status() != StatusCode::OK { + tokio::time::sleep(POLLING_INTERVAL).await; + continue; + } + + let appdata: ExtrinsicsData = serde_json::from_str(&response.text().await?)?; + return Ok(appdata); + } +} + +#[async_trait] +impl DaService for DaProvider { + type Spec = DaLayerSpec; + + type FilteredBlock = AvailBlock; + + type Verifier = Verifier; + + type Error = anyhow::Error; + + // Make an RPC call to the node to get the finalized block at the given height, if one exists. + // If no such block exists, block until one does. + async fn get_finalized_at(&self, height: u64) -> Result { + let node_client = self.node_client.clone(); + let confidence_url = self.confidence_url(height); + let appdata_url = self.appdata_url(height); + + wait_for_confidence(&confidence_url).await?; + let appdata = wait_for_appdata(&appdata_url, height as u32).await?; + info!("Appdata: {:?}", appdata); + + let hash = node_client + .rpc() + .block_hash(Some(height.into())) + .await? + .unwrap(); + + let header = node_client.rpc().header(Some(hash)).await?.unwrap(); + + let header = AvailHeader::new(header, hash); + let transactions = appdata + .extrinsics + .iter() + .map(AvailBlobTransaction::new) + .collect(); + Ok(AvailBlock { + header, + transactions, + }) + } + + // Make an RPC call to the node to get the block at the given height + // If no such block exists, block until one does. + async fn get_block_at(&self, height: u64) -> Result { + self.get_finalized_at(height).await + } + + // Extract the blob transactions relevant to a particular rollup from a block. + // NOTE: The avail light client is expected to be run in app specific mode, and hence the + // transactions in the block are already filtered and retrieved by light client. + fn extract_relevant_txs( + &self, + block: &Self::FilteredBlock, + ) -> Vec<::BlobTransaction> { + block.transactions.clone() + } + + // Extract the inclusion and completenss proof for filtered block provided. + // The output of this method will be passed to the verifier. + // NOTE: The light client here has already completed DA sampling and verification of inclusion and soundness. + async fn get_extraction_proof( + &self, + _block: &Self::FilteredBlock, + _blobs: &[::BlobTransaction], + ) -> ( + ::InclusionMultiProof, + ::CompletenessProof, + ) { + ((), ()) + } + + async fn send_transaction(&self, blob: &[u8]) -> Result<(), Self::Error> { + let data_transfer = api::tx() + .data_availability() + .submit_data(BoundedVec(blob.to_vec())); + + let extrinsic_params = AvailExtrinsicParams::new_with_app_id(7.into()); + + let h = self + .node_client + .tx() + .sign_and_submit_then_watch(&data_transfer, &self.signer, extrinsic_params) + .await?; + + println!("Transaction submitted: {:#?}", h.extrinsic_hash()); + + Ok(()) + } +} diff --git a/adapters/avail/src/spec/address.rs b/adapters/avail/src/spec/address.rs new file mode 100644 index 000000000..d285a51e9 --- /dev/null +++ b/adapters/avail/src/spec/address.rs @@ -0,0 +1,48 @@ +use core::fmt::{Display, Formatter}; +use std::hash::Hash; +use std::str::FromStr; + +use primitive_types::H256; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Debug, PartialEq, Clone, Eq, Hash)] +pub struct AvailAddress(pub [u8; 32]); + +impl sov_rollup_interface::BasicAddress for AvailAddress {} + +impl Display for AvailAddress { + fn fmt(&self, f: &mut Formatter) -> core::fmt::Result { + let hash = H256(self.0); + write!(f, "{hash}") + } +} + +impl AsRef<[u8]> for AvailAddress { + fn as_ref(&self) -> &[u8] { + self.0.as_ref() + } +} + +impl From<[u8; 32]> for AvailAddress { + fn from(value: [u8; 32]) -> Self { + Self(value) + } +} + +impl FromStr for AvailAddress { + type Err = ::Err; + + fn from_str(s: &str) -> Result { + let h_256 = H256::from_str(s)?; + + Ok(Self(h_256.to_fixed_bytes())) + } +} + +impl<'a> TryFrom<&'a [u8]> for AvailAddress { + type Error = anyhow::Error; + + fn try_from(value: &'a [u8]) -> Result { + Ok(Self(<[u8; 32]>::try_from(value)?)) + } +} diff --git a/adapters/avail/src/spec/block.rs b/adapters/avail/src/spec/block.rs new file mode 100644 index 000000000..0a76dbbad --- /dev/null +++ b/adapters/avail/src/spec/block.rs @@ -0,0 +1,40 @@ +use crate::verifier::ChainValidityCondition; +use serde::{Deserialize, Serialize}; +use sov_rollup_interface::da::BlockHeaderTrait; +use sov_rollup_interface::services::da::SlotData; + +use super::header::AvailHeader; +use super::transaction::AvailBlobTransaction; + +#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] +pub struct AvailBlock { + pub header: AvailHeader, + pub transactions: Vec, +} + +impl SlotData for AvailBlock { + type BlockHeader = AvailHeader; + type Cond = ChainValidityCondition; + + fn hash(&self) -> [u8; 32] { + self.header.hash().0 .0 + } + + fn header(&self) -> &Self::BlockHeader { + &self.header + } + + fn validity_condition(&self) -> ChainValidityCondition { + let mut txs_commitment: [u8; 32] = [0u8; 32]; + + for tx in &self.transactions { + txs_commitment = tx.combine_hash(txs_commitment); + } + + ChainValidityCondition { + prev_hash: *self.header().prev_hash().inner(), + block_hash: ::hash(self), + txs_commitment, + } + } +} diff --git a/adapters/avail/src/spec/hash.rs b/adapters/avail/src/spec/hash.rs new file mode 100644 index 000000000..b993871f7 --- /dev/null +++ b/adapters/avail/src/spec/hash.rs @@ -0,0 +1,26 @@ +use primitive_types::H256; +use serde::{Deserialize, Serialize}; +use sov_rollup_interface::da::BlockHashTrait; + +#[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq)] +pub struct AvailHash(pub H256); + +impl BlockHashTrait for AvailHash {} + +impl AsRef<[u8]> for AvailHash { + fn as_ref(&self) -> &[u8] { + self.0.as_ref() + } +} + +impl From for [u8; 32] { + fn from(value: AvailHash) -> Self { + value.0.to_fixed_bytes() + } +} + +impl AvailHash { + pub fn inner(&self) -> &[u8; 32] { + self.0.as_fixed_bytes() + } +} diff --git a/adapters/avail/src/spec/header.rs b/adapters/avail/src/spec/header.rs new file mode 100644 index 000000000..a2e89e55c --- /dev/null +++ b/adapters/avail/src/spec/header.rs @@ -0,0 +1,65 @@ +#[cfg(feature = "native")] +use avail_subxt::primitives::Header as SubxtHeader; +use primitive_types::H256; +use serde::{Deserialize, Serialize}; +use sov_rollup_interface::da::BlockHeaderTrait; + +const KATE_START_TIME: i64 = 1686066440; +const KATE_SECONDS_PER_BLOCK: i64 = 20; + +#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] +#[serde(rename_all = "camelCase")] +pub struct Header { + pub parent_hash: H256, + pub number: u32, + pub state_root: H256, + pub extrinsics_root: H256, + pub data_root: H256, +} + +use super::hash::AvailHash; + +#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] +pub struct AvailHeader { + hash: AvailHash, + + pub header: Header, +} + +#[cfg(feature = "native")] +impl AvailHeader { + pub fn new(header: SubxtHeader, hash: H256) -> Self { + Self { + hash: AvailHash(hash), + header: Header { + parent_hash: header.parent_hash, + number: header.number, + state_root: header.state_root, + data_root: header.data_root(), + extrinsics_root: header.extrinsics_root, + }, + } + } +} + +impl BlockHeaderTrait for AvailHeader { + type Hash = AvailHash; + + fn prev_hash(&self) -> Self::Hash { + AvailHash(self.header.parent_hash) + } + + fn hash(&self) -> Self::Hash { + self.hash.clone() + } + + fn height(&self) -> u64 { + self.header.number as u64 + } + + fn time(&self) -> sov_rollup_interface::da::Time { + sov_rollup_interface::da::Time::from_secs( + KATE_START_TIME + (self.header.number as i64 * KATE_SECONDS_PER_BLOCK), + ) + } +} diff --git a/adapters/avail/src/spec/mod.rs b/adapters/avail/src/spec/mod.rs new file mode 100644 index 000000000..71dbdbf64 --- /dev/null +++ b/adapters/avail/src/spec/mod.rs @@ -0,0 +1,29 @@ +use crate::verifier::ChainValidityCondition; +use sov_rollup_interface::da::DaSpec; + +pub mod address; +pub mod block; +mod hash; +pub mod header; +pub mod transaction; + +#[derive(serde::Serialize, serde::Deserialize, PartialEq, Eq, Debug, Clone)] +pub struct DaLayerSpec; + +impl DaSpec for DaLayerSpec { + type ValidityCondition = ChainValidityCondition; + + type SlotHash = hash::AvailHash; + + type ChainParams = (); + + type BlockHeader = header::AvailHeader; + + type BlobTransaction = transaction::AvailBlobTransaction; + + type Address = address::AvailAddress; + + type InclusionMultiProof = (); + + type CompletenessProof = (); +} diff --git a/adapters/avail/src/spec/transaction.rs b/adapters/avail/src/spec/transaction.rs new file mode 100644 index 000000000..480da921a --- /dev/null +++ b/adapters/avail/src/spec/transaction.rs @@ -0,0 +1,77 @@ +#[cfg(feature = "native")] +use avail_subxt::{ + api::runtime_types::{da_control::pallet::Call, da_runtime::RuntimeCall::DataAvailability}, + primitives::AppUncheckedExtrinsic, +}; +use bytes::Bytes; +#[cfg(feature = "native")] +use codec::Encode; + +use serde::{Deserialize, Serialize}; +use sov_rollup_interface::da::{BlobReaderTrait, CountedBufReader}; + +use super::address::AvailAddress; + +#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] + +pub struct AvailBlobTransaction { + blob: CountedBufReader, + hash: [u8; 32], + address: AvailAddress, +} + +impl BlobReaderTrait for AvailBlobTransaction { + type Address = AvailAddress; + + fn sender(&self) -> AvailAddress { + self.address.clone() + } + + fn hash(&self) -> [u8; 32] { + self.hash + } + + fn verified_data(&self) -> &[u8] { + self.blob.accumulator() + } + + #[cfg(feature = "native")] + fn advance(&mut self, num_bytes: usize) -> &[u8] { + self.blob.advance(num_bytes); + self.verified_data() + } + + fn total_len(&self) -> usize { + self.blob.total_len() + } +} + +impl AvailBlobTransaction { + #[cfg(feature = "native")] + pub fn new(unchecked_extrinsic: &AppUncheckedExtrinsic) -> Self { + let address = match &unchecked_extrinsic.signature { + Some((subxt::utils::MultiAddress::Id(id), _, _)) => AvailAddress(id.clone().0), + _ => unimplemented!(), + }; + let blob = match &unchecked_extrinsic.function { + DataAvailability(Call::submit_data { data }) => { + CountedBufReader::::new(Bytes::copy_from_slice(&data.0)) + } + _ => unimplemented!(), + }; + + AvailBlobTransaction { + hash: sp_core_hashing::blake2_256(&unchecked_extrinsic.encode()), + address, + blob, + } + } + + pub fn combine_hash(&self, hash: [u8; 32]) -> [u8; 32] { + let mut combined_hashes: Vec = Vec::with_capacity(64); + combined_hashes.extend_from_slice(hash.as_ref()); + combined_hashes.extend_from_slice(self.hash().as_ref()); + + sp_core_hashing::blake2_256(&combined_hashes) + } +} diff --git a/adapters/avail/src/verifier.rs b/adapters/avail/src/verifier.rs new file mode 100644 index 000000000..f225b71ba --- /dev/null +++ b/adapters/avail/src/verifier.rs @@ -0,0 +1,82 @@ +use borsh::{BorshDeserialize, BorshSerialize}; +use serde::{Deserialize, Serialize}; +use sov_rollup_interface::da::{BlockHeaderTrait, DaSpec, DaVerifier}; +use sov_rollup_interface::zk::ValidityCondition; +use thiserror::Error; + +use crate::spec::DaLayerSpec; + +#[derive(Error, Debug)] +pub enum ValidityConditionError { + #[error("conditions for validity can only be combined if the blocks are consecutive")] + BlocksNotConsecutive, +} + +#[derive( + Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Copy, BorshDeserialize, BorshSerialize, +)] +/// A validity condition expressing that a chain of DA layer blocks is contiguous and canonical +pub struct ChainValidityCondition { + pub prev_hash: [u8; 32], + pub block_hash: [u8; 32], + //Chained or batch txs commitment. + pub txs_commitment: [u8; 32], +} + +impl ValidityCondition for ChainValidityCondition { + type Error = ValidityConditionError; + + fn combine(&self, rhs: Self) -> Result { + let mut combined_hashes: Vec = Vec::with_capacity(64); + combined_hashes.extend_from_slice(self.txs_commitment.as_ref()); + combined_hashes.extend_from_slice(rhs.txs_commitment.as_ref()); + + let combined_root = sp_core_hashing::blake2_256(&combined_hashes); + + if self.block_hash != rhs.prev_hash { + return Err(ValidityConditionError::BlocksNotConsecutive); + } + + Ok(Self { + prev_hash: rhs.prev_hash, + block_hash: rhs.block_hash, + txs_commitment: combined_root, + }) + } +} + +pub struct Verifier; + +impl DaVerifier for Verifier { + type Spec = DaLayerSpec; + + type Error = ValidityConditionError; + + // Verify that the given list of blob transactions is complete and correct. + // NOTE: Function return unit since application client already verifies application data. + fn verify_relevant_tx_list( + &self, + block_header: &::BlockHeader, + txs: &[::BlobTransaction], + _inclusion_proof: ::InclusionMultiProof, + _completeness_proof: ::CompletenessProof, + ) -> Result<::ValidityCondition, Self::Error> { + let mut txs_commitment: [u8; 32] = [0u8; 32]; + + for tx in txs { + txs_commitment = tx.combine_hash(txs_commitment); + } + + let validity_condition = ChainValidityCondition { + prev_hash: *block_header.prev_hash().inner(), + block_hash: *block_header.hash().inner(), + txs_commitment, + }; + + Ok(validity_condition) + } + + fn new(_params: ::ChainParams) -> Self { + Verifier {} + } +} From c4aaa18af619d1caf102b9fa60f8fbf6aa06ae0e Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Wed, 20 Sep 2023 16:21:16 -0500 Subject: [PATCH 02/12] fmt --- adapters/avail/src/service.rs | 4 +--- adapters/avail/src/spec/block.rs | 2 +- adapters/avail/src/spec/mod.rs | 3 ++- adapters/avail/src/spec/transaction.rs | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/adapters/avail/src/service.rs b/adapters/avail/src/service.rs index 3706fc74b..2281454b1 100644 --- a/adapters/avail/src/service.rs +++ b/adapters/avail/src/service.rs @@ -2,12 +2,10 @@ use core::time::Duration; use anyhow::anyhow; use async_trait::async_trait; -use avail_subxt::api; use avail_subxt::api::runtime_types::sp_core::bounded::bounded_vec::BoundedVec; use avail_subxt::primitives::AvailExtrinsicParams; -use avail_subxt::AvailConfig; +use avail_subxt::{api, AvailConfig}; use reqwest::StatusCode; - use sov_rollup_interface::da::DaSpec; use sov_rollup_interface::services::da::DaService; use sp_core::crypto::Pair as PairTrait; diff --git a/adapters/avail/src/spec/block.rs b/adapters/avail/src/spec/block.rs index 0a76dbbad..97ebdc7cd 100644 --- a/adapters/avail/src/spec/block.rs +++ b/adapters/avail/src/spec/block.rs @@ -1,10 +1,10 @@ -use crate::verifier::ChainValidityCondition; use serde::{Deserialize, Serialize}; use sov_rollup_interface::da::BlockHeaderTrait; use sov_rollup_interface::services::da::SlotData; use super::header::AvailHeader; use super::transaction::AvailBlobTransaction; +use crate::verifier::ChainValidityCondition; #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] pub struct AvailBlock { diff --git a/adapters/avail/src/spec/mod.rs b/adapters/avail/src/spec/mod.rs index 71dbdbf64..283b7ab67 100644 --- a/adapters/avail/src/spec/mod.rs +++ b/adapters/avail/src/spec/mod.rs @@ -1,6 +1,7 @@ -use crate::verifier::ChainValidityCondition; use sov_rollup_interface::da::DaSpec; +use crate::verifier::ChainValidityCondition; + pub mod address; pub mod block; mod hash; diff --git a/adapters/avail/src/spec/transaction.rs b/adapters/avail/src/spec/transaction.rs index 480da921a..ccb981500 100644 --- a/adapters/avail/src/spec/transaction.rs +++ b/adapters/avail/src/spec/transaction.rs @@ -6,7 +6,6 @@ use avail_subxt::{ use bytes::Bytes; #[cfg(feature = "native")] use codec::Encode; - use serde::{Deserialize, Serialize}; use sov_rollup_interface::da::{BlobReaderTrait, CountedBufReader}; From 2b62a48f4a0da30545f5a5956d713d311719de58 Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Wed, 20 Sep 2023 16:21:32 -0500 Subject: [PATCH 03/12] Allow apache license with llvm exception --- deny.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/deny.toml b/deny.toml index 4040e3ab2..2cdf60ec8 100644 --- a/deny.toml +++ b/deny.toml @@ -12,6 +12,7 @@ allow = [ "BSD-2-Clause", "BSD-3-Clause", "OpenSSL", + "Apache-2.0 WITH LLVM-exception", ] [[licenses.clarify]] From 8502f0a1e2f3a07abf86744bf37f24827e39123e Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Wed, 20 Sep 2023 16:23:00 -0500 Subject: [PATCH 04/12] update avail-subxt to 1.6.3 --- Cargo.lock | 905 ++++++++++++++++++++++++++++++++++---- adapters/avail/Cargo.toml | 2 +- 2 files changed, 810 insertions(+), 97 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0edf7b661..c4325df8d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -32,6 +32,15 @@ dependencies = [ "gimli 0.26.2", ] +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli 0.27.3", +] + [[package]] name = "addr2line" version = "0.20.0" @@ -497,8 +506,8 @@ dependencies = [ [[package]] name = "avail-subxt" -version = "0.2.1" -source = "git+https://github.com/availproject/avail.git?tag=v1.6.0#99b85257d6b5bb3fa3051b1c05d30d42f7471a7e" +version = "0.3.0" +source = "git+https://github.com/availproject/avail.git?tag=v1.6.3#b4feb4aef5af12931287247c73edb44fd8a72811" dependencies = [ "anyhow", "curve25519-dalek 2.1.3", @@ -512,9 +521,9 @@ dependencies = [ "schnorrkel", "serde", "serde-hex", - "sp-core", + "sp-core 16.0.0", "structopt", - "subxt", + "subxt 0.29.0", "tokio", ] @@ -948,6 +957,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + [[package]] name = "bs58" version = "0.5.0" @@ -1262,7 +1277,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" dependencies = [ - "bs58", + "bs58 0.5.0", "coins-core", "digest 0.10.7", "hmac 0.12.1", @@ -1296,7 +1311,7 @@ checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ "base64 0.21.4", "bech32", - "bs58", + "bs58 0.5.0", "digest 0.10.7", "generic-array 0.14.7", "hex", @@ -1412,6 +1427,15 @@ dependencies = [ "serde", ] +[[package]] +name = "cranelift-entity" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" +dependencies = [ + "serde", +] + [[package]] name = "crc" version = "3.0.1" @@ -2977,6 +3001,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", + "indexmap 1.9.3", "stable_deref_trait", ] @@ -3092,6 +3117,12 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +[[package]] +name = "hash-db" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" + [[package]] name = "hash256-std-hasher" version = "0.15.2" @@ -4394,6 +4425,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] + [[package]] name = "memoffset" version = "0.9.0" @@ -4409,10 +4449,19 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" dependencies = [ - "hash-db", + "hash-db 0.15.2", "hashbrown 0.12.3", ] +[[package]] +name = "memory-db" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" +dependencies = [ + "hash-db 0.16.0", +] + [[package]] name = "memory_units" version = "0.4.0" @@ -4839,6 +4888,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "object" +version = "0.30.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +dependencies = [ + "crc32fast", + "hashbrown 0.13.2", + "indexmap 1.9.3", + "memchr", +] + [[package]] name = "object" version = "0.31.1" @@ -6155,7 +6216,7 @@ dependencies = [ "derive_more", "ethers-core", "fixed-hash", - "hash-db", + "hash-db 0.15.2", "hex", "hex-literal 0.3.4", "impl-serde", @@ -6827,6 +6888,62 @@ dependencies = [ "thiserror", ] +[[package]] +name = "scale-decode" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0459d00b0dbd2e765009924a78ef36b2ff7ba116292d732f00eb0ed8e465d15" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-decode-derive", + "scale-info", + "smallvec 1.11.0", + "thiserror", +] + +[[package]] +name = "scale-decode-derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4391f0dfbb6690f035f6d2a15d6a12f88cc5395c36bcc056db07ffa2a90870ec" +dependencies = [ + "darling 0.14.4", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "scale-encode" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0401b7cdae8b8aa33725f3611a051358d5b32887ecaa0fda5953a775b2d4d76" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-encode-derive", + "scale-info", + "smallvec 1.11.0", + "thiserror", +] + +[[package]] +name = "scale-encode-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "316e0fb10ec0fee266822bd641bab5e332a4ab80ef8c5b5ff35e5401a394f5a6" +dependencies = [ + "darling 0.14.4", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "scale-info" version = "2.9.0" @@ -6863,11 +6980,31 @@ dependencies = [ "frame-metadata", "parity-scale-codec", "scale-bits", - "scale-decode", + "scale-decode 0.4.0", + "scale-info", + "serde", + "thiserror", + "yap 0.7.2", +] + +[[package]] +name = "scale-value" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2096d36e94ce9bf87d8addb752423b6b19730dc88edd7cc452bb2b90573f7a7" +dependencies = [ + "base58", + "blake2", + "either", + "frame-metadata", + "parity-scale-codec", + "scale-bits", + "scale-decode 0.7.0", + "scale-encode", "scale-info", "serde", "thiserror", - "yap", + "yap 0.10.0", ] [[package]] @@ -7513,10 +7650,10 @@ dependencies = [ "serde", "serde_json", "sov-rollup-interface", - "sp-core", + "sp-core 16.0.0", "sp-core-hashing 10.0.0", "sp-keyring", - "subxt", + "subxt 0.27.1", "thiserror", "tokio", "tracing", @@ -8136,9 +8273,23 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-std", + "sp-core 16.0.0", + "sp-io 17.0.0", + "sp-std 6.0.0", +] + +[[package]] +name = "sp-application-crypto" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899492ea547816d5dfe9a5a2ecc32f65a7110805af6da3380aa4902371b31dc2" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-std 8.0.0", ] [[package]] @@ -8152,7 +8303,22 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 6.0.0", + "static_assertions", +] + +[[package]] +name = "sp-arithmetic" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6020576e544c6824a51d651bc8df8e6ab67cd59f1c9ac09868bb81a5199ded" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std 8.0.0", "static_assertions", ] @@ -8170,7 +8336,7 @@ dependencies = [ "dyn-clonable", "ed25519-zebra", "futures", - "hash-db", + "hash-db 0.15.2", "hash256-std-hasher", "impl-serde", "lazy_static", @@ -8188,11 +8354,56 @@ dependencies = [ "secrecy", "serde", "sp-core-hashing 6.0.0", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-debug-derive 6.0.0", + "sp-externalities 0.17.0", + "sp-runtime-interface 13.0.0", + "sp-std 6.0.0", + "sp-storage 11.0.0", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tiny-bip39", + "zeroize", +] + +[[package]] +name = "sp-core" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f18d9e2f67d8661f9729f35347069ac29d92758b59135176799db966947a7336" +dependencies = [ + "array-bytes", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "bs58 0.4.0", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db 0.16.0", + "hash256-std-hasher", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand 0.8.5", + "regex", + "scale-info", + "schnorrkel", + "secp256k1 0.24.3", + "secrecy", + "serde", + "sp-core-hashing 9.0.0", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -8211,7 +8422,22 @@ dependencies = [ "digest 0.10.7", "sha2 0.10.7", "sha3", - "sp-std", + "sp-std 6.0.0", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing" +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.7", + "sha3", + "sp-std 8.0.0", "twox-hash", ] @@ -8240,6 +8466,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "sp-debug-derive" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f531814d2f16995144c74428830ccf7d94ff4a7749632b83ad8199b181140c" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 2.0.37", +] + [[package]] name = "sp-externalities" version = "0.17.0" @@ -8248,8 +8485,20 @@ checksum = "57052935c9c9b070ea6b339ef0da3bf241b7e065fc37f9c551669ee83ecfc3c1" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 6.0.0", + "sp-storage 11.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0f71c671e01a8ca60da925d43a1b351b69626e268b8837f8371e320cf1dd100" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 8.0.0", + "sp-storage 13.0.0", ] [[package]] @@ -8266,14 +8515,41 @@ dependencies = [ "log", "parity-scale-codec", "secp256k1 0.24.3", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-trie", + "sp-core 16.0.0", + "sp-externalities 0.17.0", + "sp-keystore 0.22.0", + "sp-runtime-interface 13.0.0", + "sp-state-machine 0.22.0", + "sp-std 6.0.0", + "sp-tracing 8.0.0", + "sp-trie 16.0.0", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-io" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d597e35a9628fe7454b08965b2442e3ec0f264b0a90d41328e87422cec02e99" +dependencies = [ + "bytes", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", + "futures", + "libsecp256k1", + "log", + "parity-scale-codec", + "rustversion", + "secp256k1 0.24.3", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-keystore 0.27.0", + "sp-runtime-interface 17.0.0", + "sp-state-machine 0.28.0", + "sp-std 8.0.0", + "sp-tracing 10.0.0", + "sp-trie 22.0.0", "tracing", "tracing-core", ] @@ -8285,8 +8561,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc13a168cdc15e185db5cbe8644e3eaafa534e229593768b3044b60bea00fc8c" dependencies = [ "lazy_static", - "sp-core", - "sp-runtime", + "sp-core 16.0.0", + "sp-runtime 18.0.0", "strum 0.24.1", ] @@ -8302,8 +8578,22 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "schnorrkel", - "sp-core", - "sp-externalities", + "sp-core 16.0.0", + "sp-externalities 0.17.0", + "thiserror", +] + +[[package]] +name = "sp-keystore" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9be3cdd67cc1d9c1db17c5cbc4ec4924054a8437009d167f21f6590797e4aa45" +dependencies = [ + "futures", + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core 21.0.0", + "sp-externalities 0.19.0", "thiserror", ] @@ -8318,6 +8608,17 @@ dependencies = [ "regex", ] +[[package]] +name = "sp-panic-handler" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd2de46003fa8212426838ca71cd42ee36a26480ba9ffea983506ce03131033" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + [[package]] name = "sp-runtime" version = "18.0.0" @@ -8333,12 +8634,35 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-std", - "sp-weights", + "sp-application-crypto 17.0.0", + "sp-arithmetic 12.0.0", + "sp-core 16.0.0", + "sp-io 17.0.0", + "sp-std 6.0.0", + "sp-weights 14.0.0", +] + +[[package]] +name = "sp-runtime" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21c5bfc764a1a8259d7e8f7cfd22c84006275a512c958d3ff966c92151e134d5" +dependencies = [ + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "sp-application-crypto 23.0.0", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-io 23.0.0", + "sp-std 8.0.0", + "sp-weights 20.0.0", ] [[package]] @@ -8351,12 +8675,31 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.17.0", + "sp-runtime-interface-proc-macro 9.0.0", + "sp-std 6.0.0", + "sp-storage 11.0.0", + "sp-tracing 8.0.0", + "sp-wasm-interface 10.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e676128182f90015e916f806cba635c8141e341e7abbc45d25525472e1bbce8" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.19.0", + "sp-runtime-interface-proc-macro 11.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", + "sp-wasm-interface 14.0.0", "static_assertions", ] @@ -8373,23 +8716,57 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "11.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d5bd5566fe5633ec48dfa35ab152fd29f8a577c21971e1c6db9f28afb9bbb9" +dependencies = [ + "Inflector", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 2.0.37", +] + [[package]] name = "sp-state-machine" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c957b8b4c252507c12674948db427c5e34fd1760ce256922f1ec5f89f781a4f" dependencies = [ - "hash-db", + "hash-db 0.15.2", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec 1.11.0", + "sp-core 16.0.0", + "sp-externalities 0.17.0", + "sp-panic-handler 6.0.0", + "sp-std 6.0.0", + "sp-trie 16.0.0", + "thiserror", + "tracing", +] + +[[package]] +name = "sp-state-machine" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef45d31f9e7ac648f8899a0cd038a3608f8499028bff55b6c799702592325b6" +dependencies = [ + "hash-db 0.16.0", "log", "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", "smallvec 1.11.0", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-std", - "sp-trie", + "sp-core 21.0.0", + "sp-externalities 0.19.0", + "sp-panic-handler 8.0.0", + "sp-std 8.0.0", + "sp-trie 22.0.0", "thiserror", "tracing", ] @@ -8400,6 +8777,12 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af0ee286f98455272f64ac5bb1384ff21ac029fbb669afbaf48477faff12760e" +[[package]] +name = "sp-std" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53458e3c57df53698b3401ec0934bea8e8cfce034816873c0b0abbd83d7bac0d" + [[package]] name = "sp-storage" version = "11.0.0" @@ -8410,8 +8793,22 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 6.0.0", + "sp-std 6.0.0", +] + +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94294be83f11d4958cfea89ed5798f0b6605f5defc3a996948848458abbcc18e" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] @@ -8421,7 +8818,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e46bd547da89a9cda69b4ce4c91a5b7e1f86915190d83cd407b715d0c6bac042" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 6.0.0", + "tracing", + "tracing-core", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "sp-tracing" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357f7591980dd58305956d32f8f6646d0a8ea9ea0e7e868e46f53b68ddf00cec" +dependencies = [ + "parity-scale-codec", + "sp-std 8.0.0", "tracing", "tracing-core", "tracing-subscriber 0.2.25", @@ -8434,21 +8844,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8efbe5b6d29a18fea7c2f52e0098135f2f864b31d335d5105b40a349866ba874" dependencies = [ "ahash 0.8.3", - "hash-db", + "hash-db 0.15.2", "hashbrown 0.12.3", "lazy_static", - "memory-db", + "memory-db 0.31.0", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", "scale-info", "schnellru", - "sp-core", - "sp-std", + "sp-core 16.0.0", + "sp-std 6.0.0", "thiserror", "tracing", - "trie-db", - "trie-root", + "trie-db 0.24.0", + "trie-root 0.17.0", +] + +[[package]] +name = "sp-trie" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4eeb7ef23f79eba8609db79ef9cef242f994f1f87a3c0387b4b5f177fda74" +dependencies = [ + "ahash 0.8.3", + "hash-db 0.16.0", + "hashbrown 0.13.2", + "lazy_static", + "memory-db 0.32.0", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "scale-info", + "schnellru", + "sp-core 21.0.0", + "sp-std 8.0.0", + "thiserror", + "tracing", + "trie-db 0.27.1", + "trie-root 0.18.0", ] [[package]] @@ -8461,9 +8895,23 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", + "sp-std 6.0.0", "wasmi", - "wasmtime", + "wasmtime 5.0.1", +] + +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19c122609ca5d8246be6386888596320d03c7bc880959eaa2c36bcd5acd6846" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 8.0.0", + "wasmtime 8.0.1", ] [[package]] @@ -8476,10 +8924,26 @@ dependencies = [ "scale-info", "serde", "smallvec 1.11.0", - "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-arithmetic 12.0.0", + "sp-core 16.0.0", + "sp-debug-derive 6.0.0", + "sp-std 6.0.0", +] + +[[package]] +name = "sp-weights" +version = "20.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45d084c735544f70625b821c3acdbc7a2fc1893ca98b85f1942631284692c75b" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "smallvec 1.11.0", + "sp-arithmetic 16.0.0", + "sp-core 21.0.0", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] @@ -8699,16 +9163,50 @@ dependencies = [ "parking_lot 0.12.1", "primitive-types", "scale-bits", - "scale-decode", + "scale-decode 0.4.0", "scale-info", - "scale-value", + "scale-value 0.6.0", "serde", "serde_json", - "sp-core", + "sp-core 16.0.0", "sp-core-hashing 6.0.0", - "sp-runtime", - "subxt-macro", - "subxt-metadata", + "sp-runtime 18.0.0", + "subxt-macro 0.27.1", + "subxt-metadata 0.27.1", + "thiserror", + "tracing", +] + +[[package]] +name = "subxt" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31a734d66fa935fbda56ba6a71d7e969f424c8c5608d416ba8499d71d8cbfc1f" +dependencies = [ + "base58", + "blake2", + "derivative", + "either", + "frame-metadata", + "futures", + "getrandom 0.2.10", + "hex", + "impl-serde", + "jsonrpsee 0.16.3", + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-decode 0.7.0", + "scale-encode", + "scale-info", + "scale-value 0.10.0", + "serde", + "serde_json", + "sp-core 21.0.0", + "sp-core-hashing 9.0.0", + "sp-runtime 24.0.0", + "subxt-macro 0.29.0", + "subxt-metadata 0.29.0", "thiserror", "tracing", ] @@ -8729,11 +9227,31 @@ dependencies = [ "proc-macro2 1.0.67", "quote 1.0.33", "scale-info", - "subxt-metadata", + "subxt-metadata 0.27.1", "syn 1.0.109", "tokio", ] +[[package]] +name = "subxt-codegen" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2f231d97c145c564bd544212c0cc0c29c09ff516af199f4ce00c8e055f8138" +dependencies = [ + "frame-metadata", + "heck 0.4.1", + "hex", + "jsonrpsee 0.16.3", + "parity-scale-codec", + "proc-macro2 1.0.67", + "quote 1.0.33", + "scale-info", + "subxt-metadata 0.29.0", + "syn 2.0.37", + "thiserror", + "tokio", +] + [[package]] name = "subxt-macro" version = "0.27.1" @@ -8742,10 +9260,22 @@ checksum = "74c08de402a78c4c06c3ee3702c80e519efdcb65911348e018b6998d04404916" dependencies = [ "darling 0.14.4", "proc-macro-error", - "subxt-codegen", + "subxt-codegen 0.27.1", "syn 1.0.109", ] +[[package]] +name = "subxt-macro" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e544e41e1c84b616632cd2f86862342868f62e11e4cd9062a9e3dbf5fc871f64" +dependencies = [ + "darling 0.20.3", + "proc-macro-error", + "subxt-codegen 0.29.0", + "syn 2.0.37", +] + [[package]] name = "subxt-metadata" version = "0.27.1" @@ -8758,6 +9288,19 @@ dependencies = [ "sp-core-hashing 6.0.0", ] +[[package]] +name = "subxt-metadata" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01ce5044c81db3404d38c56f1e69d72eff72c54e5913c9bba4c0b58d376031f" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-core-hashing 9.0.0", + "thiserror", +] + [[package]] name = "sucds" version = "0.5.0" @@ -9383,20 +9926,42 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" dependencies = [ - "hash-db", + "hash-db 0.15.2", "hashbrown 0.12.3", "log", "rustc-hex", "smallvec 1.11.0", ] +[[package]] +name = "trie-db" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +dependencies = [ + "hash-db 0.16.0", + "hashbrown 0.13.2", + "log", + "rustc-hex", + "smallvec 1.11.0", +] + [[package]] name = "trie-root" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" dependencies = [ - "hash-db", + "hash-db 0.15.2", +] + +[[package]] +name = "trie-root" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" +dependencies = [ + "hash-db 0.16.0", ] [[package]] @@ -9405,7 +9970,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" dependencies = [ - "hash-db", + "hash-db 0.15.2", "rlp", ] @@ -9828,6 +10393,16 @@ dependencies = [ "url", ] +[[package]] +name = "wasmparser" +version = "0.102.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" +dependencies = [ + "indexmap 1.9.3", + "url", +] + [[package]] name = "wasmtime" version = "5.0.1" @@ -9846,13 +10421,38 @@ dependencies = [ "psm", "serde", "target-lexicon", - "wasmparser", - "wasmtime-environ", - "wasmtime-jit", - "wasmtime-runtime", + "wasmparser 0.96.0", + "wasmtime-environ 5.0.1", + "wasmtime-jit 5.0.1", + "wasmtime-runtime 5.0.1", "windows-sys 0.42.0", ] +[[package]] +name = "wasmtime" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "object 0.30.4", + "once_cell", + "paste", + "psm", + "serde", + "target-lexicon", + "wasmparser 0.102.0", + "wasmtime-environ 8.0.1", + "wasmtime-jit 8.0.1", + "wasmtime-runtime 8.0.1", + "windows-sys 0.45.0", +] + [[package]] name = "wasmtime-asm-macros" version = "5.0.1" @@ -9862,6 +10462,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "wasmtime-asm-macros" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" +dependencies = [ + "cfg-if", +] + [[package]] name = "wasmtime-environ" version = "5.0.1" @@ -9869,7 +10478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9350c919553cddf14f78f9452119c8004d7ef6bfebb79a41a21819ed0c5604d8" dependencies = [ "anyhow", - "cranelift-entity", + "cranelift-entity 0.92.1", "gimli 0.26.2", "indexmap 1.9.3", "log", @@ -9877,8 +10486,27 @@ dependencies = [ "serde", "target-lexicon", "thiserror", - "wasmparser", - "wasmtime-types", + "wasmparser 0.96.0", + "wasmtime-types 5.0.1", +] + +[[package]] +name = "wasmtime-environ" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" +dependencies = [ + "anyhow", + "cranelift-entity 0.95.1", + "gimli 0.27.3", + "indexmap 1.9.3", + "log", + "object 0.30.4", + "serde", + "target-lexicon", + "thiserror", + "wasmparser 0.102.0", + "wasmtime-types 8.0.1", ] [[package]] @@ -9898,12 +10526,35 @@ dependencies = [ "rustc-demangle", "serde", "target-lexicon", - "wasmtime-environ", - "wasmtime-jit-icache-coherence", - "wasmtime-runtime", + "wasmtime-environ 5.0.1", + "wasmtime-jit-icache-coherence 5.0.1", + "wasmtime-runtime 5.0.1", "windows-sys 0.42.0", ] +[[package]] +name = "wasmtime-jit" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" +dependencies = [ + "addr2line 0.19.0", + "anyhow", + "bincode", + "cfg-if", + "cpp_demangle 0.3.5", + "gimli 0.27.3", + "log", + "object 0.30.4", + "rustc-demangle", + "serde", + "target-lexicon", + "wasmtime-environ 8.0.1", + "wasmtime-jit-icache-coherence 8.0.1", + "wasmtime-runtime 8.0.1", + "windows-sys 0.45.0", +] + [[package]] name = "wasmtime-jit-debug" version = "5.0.1" @@ -9913,6 +10564,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "wasmtime-jit-debug" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" +dependencies = [ + "once_cell", +] + [[package]] name = "wasmtime-jit-icache-coherence" version = "5.0.1" @@ -9924,6 +10584,17 @@ dependencies = [ "windows-sys 0.42.0", ] +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "wasmtime-runtime" version = "5.0.1" @@ -9942,22 +10613,58 @@ dependencies = [ "paste", "rand 0.8.5", "rustix 0.36.15", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-jit-debug", + "wasmtime-asm-macros 5.0.1", + "wasmtime-environ 5.0.1", + "wasmtime-jit-debug 5.0.1", "windows-sys 0.42.0", ] +[[package]] +name = "wasmtime-runtime" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "mach", + "memfd", + "memoffset 0.8.0", + "paste", + "rand 0.8.5", + "rustix 0.36.15", + "wasmtime-asm-macros 8.0.1", + "wasmtime-environ 8.0.1", + "wasmtime-jit-debug 8.0.1", + "windows-sys 0.45.0", +] + [[package]] name = "wasmtime-types" version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86e1e4f66a2b9a114f9def450ab9971828c968db6ea6fccd613724b771fa4913" dependencies = [ - "cranelift-entity", + "cranelift-entity 0.92.1", + "serde", + "thiserror", + "wasmparser 0.96.0", +] + +[[package]] +name = "wasmtime-types" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" +dependencies = [ + "cranelift-entity 0.95.1", "serde", "thiserror", - "wasmparser", + "wasmparser 0.102.0", ] [[package]] @@ -10296,6 +11003,12 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fc77f52dc9e9b10d55d3f4462c3b7fc393c4f17975d641542833ab2d3bc26ef" +[[package]] +name = "yap" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2a7eb6d82a11e4d0b8e6bda8347169aff4ccd8235d039bba7c47482d977dcf7" + [[package]] name = "yoke" version = "0.7.1" diff --git a/adapters/avail/Cargo.toml b/adapters/avail/Cargo.toml index a84095812..a81d26447 100644 --- a/adapters/avail/Cargo.toml +++ b/adapters/avail/Cargo.toml @@ -18,7 +18,7 @@ bytes = { version = "1.2.1", features = ["serde"]} primitive-types = { version = "0.12.1", features = ["serde"]} sp-core-hashing = "10.0.0" subxt = { version = "0.27.1", optional = true } -avail-subxt = { git = "https://github.com/availproject/avail.git", tag = "v1.6.0", features = ["std"], optional = true } +avail-subxt = { git = "https://github.com/availproject/avail.git", tag = "v1.6.3", features = ["std"], optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"], optional = true } #Convenience From 504b29377956be7a061624fdfc8e6d0f82f393be Mon Sep 17 00:00:00 2001 From: Preston Evans <32944016+preston-evans98@users.noreply.github.com> Date: Thu, 21 Sep 2023 06:51:13 -0700 Subject: [PATCH 05/12] Update adapters/avail/README.md Co-authored-by: Vibhu R <62562233+vibhurajeev@users.noreply.github.com> --- adapters/avail/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/avail/README.md b/adapters/avail/README.md index 4df321049..ce54aac1a 100644 --- a/adapters/avail/README.md +++ b/adapters/avail/README.md @@ -4,5 +4,5 @@ This is a _research-only_ adapter making Avail compatible with the Sovereign SDK > **_NOTE:_** None of its code is suitable for production use. -This adapter was originally written by Vibhu Rhajeev and the Avail team, but is +This adapter was originally written by Vibhu Rajeev, Aleksandar Terentić and the Avail team, but is provided as part of the Sovereign SDK under the Apache 2.0 and MIT licenses. From dcea0ef60dfcc24df67dccad3d240c8c43dc12f3 Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Thu, 21 Sep 2023 13:47:48 +0400 Subject: [PATCH 06/12] fix(sov-avail-adapter): replaced println with tracing:info --- adapters/avail/src/service.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/avail/src/service.rs b/adapters/avail/src/service.rs index 2281454b1..c7761699a 100644 --- a/adapters/avail/src/service.rs +++ b/adapters/avail/src/service.rs @@ -207,7 +207,7 @@ impl DaService for DaProvider { .sign_and_submit_then_watch(&data_transfer, &self.signer, extrinsic_params) .await?; - println!("Transaction submitted: {:#?}", h.extrinsic_hash()); + info!("Transaction submitted: {:#?}", h.extrinsic_hash()); Ok(()) } From fe87066a1768638bb7b6cca836adc514eae0a1d5 Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Thu, 28 Sep 2023 14:19:06 +0400 Subject: [PATCH 07/12] fix(avail-adapter): change unimplemented arm to errors --- Cargo.lock | 903 +++---------------------- adapters/avail/Cargo.toml | 6 +- adapters/avail/src/service.rs | 12 +- adapters/avail/src/spec/transaction.rs | 11 +- 4 files changed, 105 insertions(+), 827 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c4325df8d..4e5af383f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,15 +23,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "addr2line" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" -dependencies = [ - "gimli 0.26.2", -] - [[package]] name = "addr2line" version = "0.19.0" @@ -521,9 +512,9 @@ dependencies = [ "schnorrkel", "serde", "serde-hex", - "sp-core 16.0.0", + "sp-core", "structopt", - "subxt 0.29.0", + "subxt", "tokio", ] @@ -1418,15 +1409,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cranelift-entity" -version = "0.92.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9e39cfc857e7e539aa623e03bb6bec11f54aef3dfdef41adcfa7b594af3b54" -dependencies = [ - "serde", -] - [[package]] name = "cranelift-entity" version = "0.95.1" @@ -2984,16 +2966,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gimli" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" -dependencies = [ - "fallible-iterator", - "stable_deref_trait", -] - [[package]] name = "gimli" version = "0.27.3" @@ -4416,15 +4388,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.8.0" @@ -4443,16 +4406,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memory-db" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" -dependencies = [ - "hash-db 0.15.2", - "hashbrown 0.12.3", -] - [[package]] name = "memory-db" version = "0.32.0" @@ -4462,12 +4415,6 @@ dependencies = [ "hash-db 0.16.0", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -4876,18 +4823,6 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" -dependencies = [ - "crc32fast", - "hashbrown 0.12.3", - "indexmap 1.9.3", - "memchr", -] - [[package]] name = "object" version = "0.30.4" @@ -5075,12 +5010,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parity-wasm" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" - [[package]] name = "parking" version = "2.1.0" @@ -6876,18 +6805,6 @@ dependencies = [ "serde", ] -[[package]] -name = "scale-decode" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d823d4be477fc33321f93d08fb6c2698273d044f01362dc27573a750deb7c233" -dependencies = [ - "parity-scale-codec", - "scale-bits", - "scale-info", - "thiserror", -] - [[package]] name = "scale-decode" version = "0.7.0" @@ -6970,23 +6887,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "scale-value" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a5e7810815bd295da73e4216d1dfbced3c7c7c7054d70fa5f6e4c58123fff4" -dependencies = [ - "either", - "frame-metadata", - "parity-scale-codec", - "scale-bits", - "scale-decode 0.4.0", - "scale-info", - "serde", - "thiserror", - "yap 0.7.2", -] - [[package]] name = "scale-value" version = "0.10.0" @@ -6999,12 +6899,12 @@ dependencies = [ "frame-metadata", "parity-scale-codec", "scale-bits", - "scale-decode 0.7.0", + "scale-decode", "scale-encode", "scale-info", "serde", "thiserror", - "yap 0.10.0", + "yap", ] [[package]] @@ -7650,10 +7550,10 @@ dependencies = [ "serde", "serde_json", "sov-rollup-interface", - "sp-core 16.0.0", + "sp-core", "sp-core-hashing 10.0.0", "sp-keyring", - "subxt 0.27.1", + "subxt", "thiserror", "tokio", "tracing", @@ -8264,20 +8164,6 @@ dependencies = [ "risc0-zkvm-platform", ] -[[package]] -name = "sp-application-crypto" -version = "17.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f08604ba4bd856311946722958711a08bded5c929e1227f7a697c58deb09468" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 16.0.0", - "sp-io 17.0.0", - "sp-std 6.0.0", -] - [[package]] name = "sp-application-crypto" version = "23.0.0" @@ -8287,24 +8173,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-std 8.0.0", -] - -[[package]] -name = "sp-arithmetic" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7796939f2e3b68a3b9410ea17a2063b78038cd366f57fa772dd3be0798bd3412" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-std 6.0.0", - "static_assertions", + "sp-core", + "sp-io", + "sp-std", ] [[package]] @@ -8318,54 +8189,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 8.0.0", + "sp-std", "static_assertions", ] -[[package]] -name = "sp-core" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c96dc3debbe5c22ebf18f99e6a53199efe748e6e584a1902adb88cbad66ae7c" -dependencies = [ - "array-bytes", - "base58", - "bitflags 1.3.2", - "blake2", - "bounded-collections", - "dyn-clonable", - "ed25519-zebra", - "futures", - "hash-db 0.15.2", - "hash256-std-hasher", - "impl-serde", - "lazy_static", - "libsecp256k1", - "log", - "merlin", - "parity-scale-codec", - "parking_lot 0.12.1", - "primitive-types", - "rand 0.8.5", - "regex", - "scale-info", - "schnorrkel", - "secp256k1 0.24.3", - "secrecy", - "serde", - "sp-core-hashing 6.0.0", - "sp-debug-derive 6.0.0", - "sp-externalities 0.17.0", - "sp-runtime-interface 13.0.0", - "sp-std 6.0.0", - "sp-storage 11.0.0", - "ss58-registry", - "substrate-bip39", - "thiserror", - "tiny-bip39", - "zeroize", -] - [[package]] name = "sp-core" version = "21.0.0" @@ -8399,11 +8226,11 @@ dependencies = [ "secrecy", "serde", "sp-core-hashing 9.0.0", - "sp-debug-derive 8.0.0", - "sp-externalities 0.19.0", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -8411,21 +8238,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sp-core-hashing" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc2d1947252b7a4e403b0a260f596920443742791765ec111daa2bbf98eff25" -dependencies = [ - "blake2", - "byteorder", - "digest 0.10.7", - "sha2 0.10.7", - "sha3", - "sp-std 6.0.0", - "twox-hash", -] - [[package]] name = "sp-core-hashing" version = "9.0.0" @@ -8437,7 +8249,7 @@ dependencies = [ "digest 0.10.7", "sha2 0.10.7", "sha3", - "sp-std 8.0.0", + "sp-std", "twox-hash", ] @@ -8455,17 +8267,6 @@ dependencies = [ "twox-hash", ] -[[package]] -name = "sp-debug-derive" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fb9dc63d54de7d7bed62a505b6e0bd66c122525ea1abb348f6564717c3df2d" -dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", - "syn 1.0.109", -] - [[package]] name = "sp-debug-derive" version = "8.0.0" @@ -8477,18 +8278,6 @@ dependencies = [ "syn 2.0.37", ] -[[package]] -name = "sp-externalities" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57052935c9c9b070ea6b339ef0da3bf241b7e065fc37f9c551669ee83ecfc3c1" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std 6.0.0", - "sp-storage 11.0.0", -] - [[package]] name = "sp-externalities" version = "0.19.0" @@ -8497,34 +8286,8 @@ checksum = "a0f71c671e01a8ca60da925d43a1b351b69626e268b8837f8371e320cf1dd100" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 8.0.0", - "sp-storage 13.0.0", -] - -[[package]] -name = "sp-io" -version = "17.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578959f9a7e44fd2dd96e8b8bc893cea04fcd7c00a4ffbb0b91c5013899dd02b" -dependencies = [ - "bytes", - "ed25519 1.5.3", - "ed25519-dalek 1.0.1", - "futures", - "libsecp256k1", - "log", - "parity-scale-codec", - "secp256k1 0.24.3", - "sp-core 16.0.0", - "sp-externalities 0.17.0", - "sp-keystore 0.22.0", - "sp-runtime-interface 13.0.0", - "sp-state-machine 0.22.0", - "sp-std 6.0.0", - "sp-tracing 8.0.0", - "sp-trie 16.0.0", - "tracing", - "tracing-core", + "sp-std", + "sp-storage", ] [[package]] @@ -8542,47 +8305,30 @@ dependencies = [ "parity-scale-codec", "rustversion", "secp256k1 0.24.3", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-keystore 0.27.0", - "sp-runtime-interface 17.0.0", - "sp-state-machine 0.28.0", - "sp-std 8.0.0", - "sp-tracing 10.0.0", - "sp-trie 22.0.0", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "18.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc13a168cdc15e185db5cbe8644e3eaafa534e229593768b3044b60bea00fc8c" +checksum = "4673405248580504a8bc4e09615ab25ccb182dfaccd27e000fda9dcb2ca1dab1" dependencies = [ "lazy_static", - "sp-core 16.0.0", - "sp-runtime 18.0.0", + "sp-core", + "sp-runtime", "strum 0.24.1", ] -[[package]] -name = "sp-keystore" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "480dbd54b281c638209fbcfce69902b82a0a1af0e22219d46825eadced3136b6" -dependencies = [ - "async-trait", - "futures", - "merlin", - "parity-scale-codec", - "parking_lot 0.12.1", - "schnorrkel", - "sp-core 16.0.0", - "sp-externalities 0.17.0", - "thiserror", -] - [[package]] name = "sp-keystore" version = "0.27.0" @@ -8592,22 +8338,11 @@ dependencies = [ "futures", "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 21.0.0", - "sp-externalities 0.19.0", + "sp-core", + "sp-externalities", "thiserror", ] -[[package]] -name = "sp-panic-handler" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4abed79c3d5b3622f65ab065676addd9923b9b122cd257df23e2757ce487c6d2" -dependencies = [ - "backtrace", - "lazy_static", - "regex", -] - [[package]] name = "sp-panic-handler" version = "8.0.0" @@ -8619,29 +8354,6 @@ dependencies = [ "regex", ] -[[package]] -name = "sp-runtime" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ab2fd44668d3e8674e2253a43852857a47d49be7db737e98bf157e4bcebefd" -dependencies = [ - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "paste", - "rand 0.8.5", - "scale-info", - "serde", - "sp-application-crypto 17.0.0", - "sp-arithmetic 12.0.0", - "sp-core 16.0.0", - "sp-io 17.0.0", - "sp-std 6.0.0", - "sp-weights 14.0.0", -] - [[package]] name = "sp-runtime" version = "24.0.0" @@ -8657,31 +8369,12 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-application-crypto 23.0.0", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-io 23.0.0", - "sp-std 8.0.0", - "sp-weights 20.0.0", -] - -[[package]] -name = "sp-runtime-interface" -version = "13.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb7707246cee4967a8cc71e3ef0e82f562e8b1020606447a6a12b99c7c1b443" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities 0.17.0", - "sp-runtime-interface-proc-macro 9.0.0", - "sp-std 6.0.0", - "sp-storage 11.0.0", - "sp-tracing 8.0.0", - "sp-wasm-interface 10.0.0", - "static_assertions", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-weights", ] [[package]] @@ -8694,28 +8387,15 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.19.0", - "sp-runtime-interface-proc-macro 11.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", - "sp-tracing 10.0.0", - "sp-wasm-interface 14.0.0", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2773c90e5765847c5e8b4a24b553d38a9ca52ded47c142cfcfb7948f42827af9" -dependencies = [ - "Inflector", - "proc-macro-crate 1.3.1", - "proc-macro2 1.0.67", - "quote 1.0.33", - "syn 1.0.109", -] - [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" @@ -8731,72 +8411,31 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.22.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c957b8b4c252507c12674948db427c5e34fd1760ce256922f1ec5f89f781a4f" +checksum = "9ef45d31f9e7ac648f8899a0cd038a3608f8499028bff55b6c799702592325b6" dependencies = [ - "hash-db 0.15.2", + "hash-db 0.16.0", "log", "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", "smallvec 1.11.0", - "sp-core 16.0.0", - "sp-externalities 0.17.0", - "sp-panic-handler 6.0.0", - "sp-std 6.0.0", - "sp-trie 16.0.0", - "thiserror", - "tracing", -] - -[[package]] -name = "sp-state-machine" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef45d31f9e7ac648f8899a0cd038a3608f8499028bff55b6c799702592325b6" -dependencies = [ - "hash-db 0.16.0", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec 1.11.0", - "sp-core 21.0.0", - "sp-externalities 0.19.0", - "sp-panic-handler 8.0.0", - "sp-std 8.0.0", - "sp-trie 22.0.0", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std", + "sp-trie", "thiserror", "tracing", ] -[[package]] -name = "sp-std" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af0ee286f98455272f64ac5bb1384ff21ac029fbb669afbaf48477faff12760e" - [[package]] name = "sp-std" version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53458e3c57df53698b3401ec0934bea8e8cfce034816873c0b0abbd83d7bac0d" -[[package]] -name = "sp-storage" -version = "11.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c20cb0c562d1a159ecb2c7ca786828c81e432c535474967d2df3a484977cea4" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 6.0.0", - "sp-std 6.0.0", -] - [[package]] name = "sp-storage" version = "13.0.0" @@ -8807,21 +8446,8 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 8.0.0", - "sp-std 8.0.0", -] - -[[package]] -name = "sp-tracing" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46bd547da89a9cda69b4ce4c91a5b7e1f86915190d83cd407b715d0c6bac042" -dependencies = [ - "parity-scale-codec", - "sp-std 6.0.0", - "tracing", - "tracing-core", - "tracing-subscriber 0.2.25", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -8831,36 +8457,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357f7591980dd58305956d32f8f6646d0a8ea9ea0e7e868e46f53b68ddf00cec" dependencies = [ "parity-scale-codec", - "sp-std 8.0.0", + "sp-std", "tracing", "tracing-core", "tracing-subscriber 0.2.25", ] -[[package]] -name = "sp-trie" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8efbe5b6d29a18fea7c2f52e0098135f2f864b31d335d5105b40a349866ba874" -dependencies = [ - "ahash 0.8.3", - "hash-db 0.15.2", - "hashbrown 0.12.3", - "lazy_static", - "memory-db 0.31.0", - "nohash-hasher", - "parity-scale-codec", - "parking_lot 0.12.1", - "scale-info", - "schnellru", - "sp-core 16.0.0", - "sp-std 6.0.0", - "thiserror", - "tracing", - "trie-db 0.24.0", - "trie-root 0.17.0", -] - [[package]] name = "sp-trie" version = "22.0.0" @@ -8871,33 +8473,18 @@ dependencies = [ "hash-db 0.16.0", "hashbrown 0.13.2", "lazy_static", - "memory-db 0.32.0", + "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", "scale-info", "schnellru", - "sp-core 21.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-std", "thiserror", "tracing", - "trie-db 0.27.1", - "trie-root 0.18.0", -] - -[[package]] -name = "sp-wasm-interface" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbc05650b6338808892a7b04f0c56bb1f7f928bfa9ac58e0af2c1e5bef33229" -dependencies = [ - "anyhow", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-std 6.0.0", - "wasmi", - "wasmtime 5.0.1", + "trie-db", + "trie-root", ] [[package]] @@ -8910,24 +8497,8 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 8.0.0", - "wasmtime 8.0.1", -] - -[[package]] -name = "sp-weights" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ebab7696f915aa548494aef3ca8d15217baf10458fe6edb87e60587a47de358" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "smallvec 1.11.0", - "sp-arithmetic 12.0.0", - "sp-core 16.0.0", - "sp-debug-derive 6.0.0", - "sp-std 6.0.0", + "sp-std", + "wasmtime", ] [[package]] @@ -8940,10 +8511,10 @@ dependencies = [ "scale-info", "serde", "smallvec 1.11.0", - "sp-arithmetic 16.0.0", - "sp-core 21.0.0", - "sp-debug-derive 8.0.0", - "sp-std 8.0.0", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -9144,39 +8715,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" -[[package]] -name = "subxt" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54639dba6a113584083968b6a8f457dedae612abe1bd214762101ca29f12e332" -dependencies = [ - "base58", - "blake2", - "derivative", - "frame-metadata", - "futures", - "getrandom 0.2.10", - "hex", - "impl-serde", - "jsonrpsee 0.16.3", - "parity-scale-codec", - "parking_lot 0.12.1", - "primitive-types", - "scale-bits", - "scale-decode 0.4.0", - "scale-info", - "scale-value 0.6.0", - "serde", - "serde_json", - "sp-core 16.0.0", - "sp-core-hashing 6.0.0", - "sp-runtime 18.0.0", - "subxt-macro 0.27.1", - "subxt-metadata 0.27.1", - "thiserror", - "tracing", -] - [[package]] name = "subxt" version = "0.29.0" @@ -9196,42 +8734,21 @@ dependencies = [ "parity-scale-codec", "primitive-types", "scale-bits", - "scale-decode 0.7.0", + "scale-decode", "scale-encode", "scale-info", - "scale-value 0.10.0", + "scale-value", "serde", "serde_json", - "sp-core 21.0.0", + "sp-core", "sp-core-hashing 9.0.0", - "sp-runtime 24.0.0", - "subxt-macro 0.29.0", - "subxt-metadata 0.29.0", + "sp-runtime", + "subxt-macro", + "subxt-metadata", "thiserror", "tracing", ] -[[package]] -name = "subxt-codegen" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e86cb719003f1cedf2710a6e55ca4c37aba4c989bbd3b81dd1c52af9e4827e" -dependencies = [ - "darling 0.14.4", - "frame-metadata", - "heck 0.4.1", - "hex", - "jsonrpsee 0.16.3", - "parity-scale-codec", - "proc-macro-error", - "proc-macro2 1.0.67", - "quote 1.0.33", - "scale-info", - "subxt-metadata 0.27.1", - "syn 1.0.109", - "tokio", -] - [[package]] name = "subxt-codegen" version = "0.29.0" @@ -9246,24 +8763,12 @@ dependencies = [ "proc-macro2 1.0.67", "quote 1.0.33", "scale-info", - "subxt-metadata 0.29.0", + "subxt-metadata", "syn 2.0.37", "thiserror", "tokio", ] -[[package]] -name = "subxt-macro" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c08de402a78c4c06c3ee3702c80e519efdcb65911348e018b6998d04404916" -dependencies = [ - "darling 0.14.4", - "proc-macro-error", - "subxt-codegen 0.27.1", - "syn 1.0.109", -] - [[package]] name = "subxt-macro" version = "0.29.0" @@ -9272,22 +8777,10 @@ checksum = "e544e41e1c84b616632cd2f86862342868f62e11e4cd9062a9e3dbf5fc871f64" dependencies = [ "darling 0.20.3", "proc-macro-error", - "subxt-codegen 0.29.0", + "subxt-codegen", "syn 2.0.37", ] -[[package]] -name = "subxt-metadata" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593ab5f53435e6352675af4f9851342607f37785d84c7a3fb3139550d3c35f0" -dependencies = [ - "frame-metadata", - "parity-scale-codec", - "scale-info", - "sp-core-hashing 6.0.0", -] - [[package]] name = "subxt-metadata" version = "0.29.0" @@ -9920,19 +9413,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "trie-db" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" -dependencies = [ - "hash-db 0.15.2", - "hashbrown 0.12.3", - "log", - "rustc-hex", - "smallvec 1.11.0", -] - [[package]] name = "trie-db" version = "0.27.1" @@ -9946,15 +9426,6 @@ dependencies = [ "smallvec 1.11.0", ] -[[package]] -name = "trie-root" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" -dependencies = [ - "hash-db 0.15.2", -] - [[package]] name = "trie-root" version = "0.18.0" @@ -10350,49 +9821,6 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" -[[package]] -name = "wasmi" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" -dependencies = [ - "parity-wasm", - "wasmi-validation", - "wasmi_core", -] - -[[package]] -name = "wasmi-validation" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] - -[[package]] -name = "wasmi_core" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" -dependencies = [ - "downcast-rs", - "libm", - "memory_units", - "num-rational", - "num-traits", -] - -[[package]] -name = "wasmparser" -version = "0.96.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adde01ade41ab9a5d10ec8ed0bb954238cf8625b5cd5a13093d6de2ad9c2be1a" -dependencies = [ - "indexmap 1.9.3", - "url", -] - [[package]] name = "wasmparser" version = "0.102.0" @@ -10403,31 +9831,6 @@ dependencies = [ "url", ] -[[package]] -name = "wasmtime" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49ffcc607adc9da024e87ca814592d4bc67f5c5b58e488f5608d5734a1ebc23e" -dependencies = [ - "anyhow", - "bincode", - "cfg-if", - "indexmap 1.9.3", - "libc", - "log", - "object 0.29.0", - "once_cell", - "paste", - "psm", - "serde", - "target-lexicon", - "wasmparser 0.96.0", - "wasmtime-environ 5.0.1", - "wasmtime-jit 5.0.1", - "wasmtime-runtime 5.0.1", - "windows-sys 0.42.0", -] - [[package]] name = "wasmtime" version = "8.0.1" @@ -10446,22 +9849,13 @@ dependencies = [ "psm", "serde", "target-lexicon", - "wasmparser 0.102.0", - "wasmtime-environ 8.0.1", - "wasmtime-jit 8.0.1", - "wasmtime-runtime 8.0.1", + "wasmparser", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-runtime", "windows-sys 0.45.0", ] -[[package]] -name = "wasmtime-asm-macros" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cb5dc4d79cd7b2453c395f64e9013d2ad90bd083be556d5565cb224ebe8d57" -dependencies = [ - "cfg-if", -] - [[package]] name = "wasmtime-asm-macros" version = "8.0.1" @@ -10471,25 +9865,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "wasmtime-environ" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9350c919553cddf14f78f9452119c8004d7ef6bfebb79a41a21819ed0c5604d8" -dependencies = [ - "anyhow", - "cranelift-entity 0.92.1", - "gimli 0.26.2", - "indexmap 1.9.3", - "log", - "object 0.29.0", - "serde", - "target-lexicon", - "thiserror", - "wasmparser 0.96.0", - "wasmtime-types 5.0.1", -] - [[package]] name = "wasmtime-environ" version = "8.0.1" @@ -10497,7 +9872,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", - "cranelift-entity 0.95.1", + "cranelift-entity", "gimli 0.27.3", "indexmap 1.9.3", "log", @@ -10505,31 +9880,8 @@ dependencies = [ "serde", "target-lexicon", "thiserror", - "wasmparser 0.102.0", - "wasmtime-types 8.0.1", -] - -[[package]] -name = "wasmtime-jit" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ba5779ea786386432b94c9fc9ad5597346c319e8239db0d98d5be5cc109a7e" -dependencies = [ - "addr2line 0.17.0", - "anyhow", - "bincode", - "cfg-if", - "cpp_demangle 0.3.5", - "gimli 0.26.2", - "log", - "object 0.29.0", - "rustc-demangle", - "serde", - "target-lexicon", - "wasmtime-environ 5.0.1", - "wasmtime-jit-icache-coherence 5.0.1", - "wasmtime-runtime 5.0.1", - "windows-sys 0.42.0", + "wasmparser", + "wasmtime-types", ] [[package]] @@ -10549,21 +9901,12 @@ dependencies = [ "rustc-demangle", "serde", "target-lexicon", - "wasmtime-environ 8.0.1", - "wasmtime-jit-icache-coherence 8.0.1", - "wasmtime-runtime 8.0.1", + "wasmtime-environ", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", "windows-sys 0.45.0", ] -[[package]] -name = "wasmtime-jit-debug" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9841a44c82c74101c10ad4f215392761a2523b3c6c838597962bdb6de75fdb3" -dependencies = [ - "once_cell", -] - [[package]] name = "wasmtime-jit-debug" version = "8.0.1" @@ -10573,17 +9916,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "wasmtime-jit-icache-coherence" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4356c2493002da3b111d470c2ecea65a3017009afce8adc46eaa5758739891" -dependencies = [ - "cfg-if", - "libc", - "windows-sys 0.42.0", -] - [[package]] name = "wasmtime-jit-icache-coherence" version = "8.0.1" @@ -10595,30 +9927,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "wasmtime-runtime" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd26efea7a790fcf430e663ba2519f0ab6eb8980adf8b0c58c62b727da77c2ec" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "indexmap 1.9.3", - "libc", - "log", - "mach", - "memfd", - "memoffset 0.6.5", - "paste", - "rand 0.8.5", - "rustix 0.36.15", - "wasmtime-asm-macros 5.0.1", - "wasmtime-environ 5.0.1", - "wasmtime-jit-debug 5.0.1", - "windows-sys 0.42.0", -] - [[package]] name = "wasmtime-runtime" version = "8.0.1" @@ -10637,34 +9945,22 @@ dependencies = [ "paste", "rand 0.8.5", "rustix 0.36.15", - "wasmtime-asm-macros 8.0.1", - "wasmtime-environ 8.0.1", - "wasmtime-jit-debug 8.0.1", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-jit-debug", "windows-sys 0.45.0", ] -[[package]] -name = "wasmtime-types" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e1e4f66a2b9a114f9def450ab9971828c968db6ea6fccd613724b771fa4913" -dependencies = [ - "cranelift-entity 0.92.1", - "serde", - "thiserror", - "wasmparser 0.96.0", -] - [[package]] name = "wasmtime-types" version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ - "cranelift-entity 0.95.1", + "cranelift-entity", "serde", "thiserror", - "wasmparser 0.102.0", + "wasmparser", ] [[package]] @@ -10754,21 +10050,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -10997,12 +10278,6 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" -[[package]] -name = "yap" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc77f52dc9e9b10d55d3f4462c3b7fc393c4f17975d641542833ab2d3bc26ef" - [[package]] name = "yap" version = "0.10.0" diff --git a/adapters/avail/Cargo.toml b/adapters/avail/Cargo.toml index a81d26447..ce72c3644 100644 --- a/adapters/avail/Cargo.toml +++ b/adapters/avail/Cargo.toml @@ -17,7 +17,7 @@ sov-rollup-interface = { path = "../../rollup-interface" } bytes = { version = "1.2.1", features = ["serde"]} primitive-types = { version = "0.12.1", features = ["serde"]} sp-core-hashing = "10.0.0" -subxt = { version = "0.27.1", optional = true } +subxt = { version = "0.29", optional = true } avail-subxt = { git = "https://github.com/availproject/avail.git", tag = "v1.6.3", features = ["std"], optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"], optional = true } @@ -31,8 +31,8 @@ serde = { workspace = true } serde_json = { workspace = true } reqwest = { version = "0.11", features = ["json"], optional = true } thiserror = { workspace = true } -sp-keyring = { version = "18.0.0", optional = true } -sp-core = { version = "16.0.0", optional = true } +sp-keyring = { version = "24", optional = true } +sp-core = { version = "21", optional = true } [features] default = ["native"] diff --git a/adapters/avail/src/service.rs b/adapters/avail/src/service.rs index c7761699a..e75945792 100644 --- a/adapters/avail/src/service.rs +++ b/adapters/avail/src/service.rs @@ -153,11 +153,13 @@ impl DaService for DaProvider { let header = node_client.rpc().header(Some(hash)).await?.unwrap(); let header = AvailHeader::new(header, hash); - let transactions = appdata - .extrinsics - .iter() - .map(AvailBlobTransaction::new) - .collect(); + let transactions: Result, anyhow::Error> = appdata + .extrinsics + .iter() + .map(|x| AvailBlobTransaction::new(x)) + .collect(); + + let transactions = transactions?; Ok(AvailBlock { header, transactions, diff --git a/adapters/avail/src/spec/transaction.rs b/adapters/avail/src/spec/transaction.rs index ccb981500..83f3cfaa1 100644 --- a/adapters/avail/src/spec/transaction.rs +++ b/adapters/avail/src/spec/transaction.rs @@ -8,6 +8,7 @@ use bytes::Bytes; use codec::Encode; use serde::{Deserialize, Serialize}; use sov_rollup_interface::da::{BlobReaderTrait, CountedBufReader}; +use anyhow::anyhow; use super::address::AvailAddress; @@ -47,23 +48,23 @@ impl BlobReaderTrait for AvailBlobTransaction { impl AvailBlobTransaction { #[cfg(feature = "native")] - pub fn new(unchecked_extrinsic: &AppUncheckedExtrinsic) -> Self { + pub fn new(unchecked_extrinsic: &AppUncheckedExtrinsic) -> anyhow::Result { let address = match &unchecked_extrinsic.signature { Some((subxt::utils::MultiAddress::Id(id), _, _)) => AvailAddress(id.clone().0), - _ => unimplemented!(), + _ => return Err(anyhow!("Unsigned extrinsic being used to create AvailBlobTransaction.")), }; let blob = match &unchecked_extrinsic.function { DataAvailability(Call::submit_data { data }) => { CountedBufReader::::new(Bytes::copy_from_slice(&data.0)) } - _ => unimplemented!(), + _ => return Err(anyhow!("Invalid type of extrinsic being converted to AvailBlobTransaction.")), }; - AvailBlobTransaction { + Ok(AvailBlobTransaction { hash: sp_core_hashing::blake2_256(&unchecked_extrinsic.encode()), address, blob, - } + }) } pub fn combine_hash(&self, hash: [u8; 32]) -> [u8; 32] { From cf4b313e9eadbd4eac513484767d1640dc6a42d5 Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Thu, 28 Sep 2023 14:48:09 +0400 Subject: [PATCH 08/12] fix(avail-adapter): cleanup --- adapters/avail/src/service.rs | 53 +++++++++++++++++--------- adapters/avail/src/spec/address.rs | 2 +- adapters/avail/src/spec/block.rs | 2 +- adapters/avail/src/spec/hash.rs | 8 +++- adapters/avail/src/spec/header.rs | 4 +- adapters/avail/src/spec/transaction.rs | 3 +- 6 files changed, 48 insertions(+), 24 deletions(-) diff --git a/adapters/avail/src/service.rs b/adapters/avail/src/service.rs index e75945792..332f756b1 100644 --- a/adapters/avail/src/service.rs +++ b/adapters/avail/src/service.rs @@ -28,13 +28,20 @@ pub struct DaServiceConfig { pub node_client_url: String, //TODO: Safer strategy to load seed so it is not accidentally revealed. pub seed: String, + pub polling_timeout: Option, + pub polling_interval: Option, } +const DEFAULT_POLLING_TIMEOUT: Duration = Duration::from_secs(60); +const DEFAULT_POLLING_INTERVAL: Duration = Duration::from_secs(1); + #[derive(Clone)] pub struct DaProvider { pub node_client: OnlineClient, pub light_client_url: String, signer: PairSigner, + polling_timeout: Duration, + polling_interval: Duration, } impl DaProvider { @@ -61,34 +68,39 @@ impl DaProvider { node_client, light_client_url, signer, + polling_timeout: match config.polling_timeout { + Some(i) => Duration::from_secs(i), + None => DEFAULT_POLLING_TIMEOUT, + }, + polling_interval: match config.polling_interval { + Some(i) => Duration::from_secs(i), + None => DEFAULT_POLLING_INTERVAL, + }, } } } -const POLLING_TIMEOUT: Duration = Duration::from_secs(60); -const POLLING_INTERVAL: Duration = Duration::from_secs(1); - // TODO: Is there a way to avoid coupling to tokio? -async fn wait_for_confidence(confidence_url: &str) -> anyhow::Result<()> { +async fn wait_for_confidence(confidence_url: &str, polling_timeout: Duration, polling_interval: Duration) -> anyhow::Result<()> { let start_time = std::time::Instant::now(); loop { - if start_time.elapsed() >= POLLING_TIMEOUT { + if start_time.elapsed() >= polling_timeout { return Err(anyhow!("Timeout...")); } let response = reqwest::get(confidence_url).await?; if response.status() != StatusCode::OK { info!("Confidence not received"); - tokio::time::sleep(POLLING_INTERVAL).await; + tokio::time::sleep(polling_interval).await; continue; } let response: Confidence = serde_json::from_str(&response.text().await?)?; if response.confidence < 92.5 { info!("Confidence not reached"); - tokio::time::sleep(POLLING_INTERVAL).await; + tokio::time::sleep(polling_interval).await; continue; } @@ -98,12 +110,12 @@ async fn wait_for_confidence(confidence_url: &str) -> anyhow::Result<()> { Ok(()) } -async fn wait_for_appdata(appdata_url: &str, block: u32) -> anyhow::Result { +async fn wait_for_appdata(appdata_url: &str, block: u32, polling_timeout: Duration, polling_interval: Duration) -> anyhow::Result { let start_time = std::time::Instant::now(); loop { - if start_time.elapsed() >= POLLING_TIMEOUT { - return Err(anyhow!("Timeout...")); + if start_time.elapsed() >= polling_timeout { + return Err(anyhow!("RPC call for filtered block to light client timed out. Timeout: {}s", polling_timeout.as_secs())); } let response = reqwest::get(appdata_url).await?; @@ -114,7 +126,7 @@ async fn wait_for_appdata(appdata_url: &str, block: u32) -> anyhow::Result i, + None => return Err(anyhow!("Hash for height: {} not found.", height)) + }; + + let header = match {node_client.rpc().header(Some(hash)).await?} { + Some(i) => i, + None => return Err(anyhow!("Header for hash: {} not found.", hash)) + }; let header = AvailHeader::new(header, hash); let transactions: Result, anyhow::Error> = appdata diff --git a/adapters/avail/src/spec/address.rs b/adapters/avail/src/spec/address.rs index d285a51e9..d99b20748 100644 --- a/adapters/avail/src/spec/address.rs +++ b/adapters/avail/src/spec/address.rs @@ -6,7 +6,7 @@ use primitive_types::H256; use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, PartialEq, Clone, Eq, Hash)] -pub struct AvailAddress(pub [u8; 32]); +pub struct AvailAddress([u8; 32]); impl sov_rollup_interface::BasicAddress for AvailAddress {} diff --git a/adapters/avail/src/spec/block.rs b/adapters/avail/src/spec/block.rs index 97ebdc7cd..5d01ed1de 100644 --- a/adapters/avail/src/spec/block.rs +++ b/adapters/avail/src/spec/block.rs @@ -17,7 +17,7 @@ impl SlotData for AvailBlock { type Cond = ChainValidityCondition; fn hash(&self) -> [u8; 32] { - self.header.hash().0 .0 + self.header.hash().inner().clone() } fn header(&self) -> &Self::BlockHeader { diff --git a/adapters/avail/src/spec/hash.rs b/adapters/avail/src/spec/hash.rs index b993871f7..aa0b1546c 100644 --- a/adapters/avail/src/spec/hash.rs +++ b/adapters/avail/src/spec/hash.rs @@ -3,7 +3,13 @@ use serde::{Deserialize, Serialize}; use sov_rollup_interface::da::BlockHashTrait; #[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq)] -pub struct AvailHash(pub H256); +pub struct AvailHash(H256); + +impl AvailHash { + pub fn new(hash: H256) -> Self { + Self(hash) + } +} impl BlockHashTrait for AvailHash {} diff --git a/adapters/avail/src/spec/header.rs b/adapters/avail/src/spec/header.rs index a2e89e55c..058b6343e 100644 --- a/adapters/avail/src/spec/header.rs +++ b/adapters/avail/src/spec/header.rs @@ -30,7 +30,7 @@ pub struct AvailHeader { impl AvailHeader { pub fn new(header: SubxtHeader, hash: H256) -> Self { Self { - hash: AvailHash(hash), + hash: AvailHash::new(hash), header: Header { parent_hash: header.parent_hash, number: header.number, @@ -46,7 +46,7 @@ impl BlockHeaderTrait for AvailHeader { type Hash = AvailHash; fn prev_hash(&self) -> Self::Hash { - AvailHash(self.header.parent_hash) + AvailHash::new(self.header.parent_hash) } fn hash(&self) -> Self::Hash { diff --git a/adapters/avail/src/spec/transaction.rs b/adapters/avail/src/spec/transaction.rs index 83f3cfaa1..810b29fd6 100644 --- a/adapters/avail/src/spec/transaction.rs +++ b/adapters/avail/src/spec/transaction.rs @@ -50,7 +50,8 @@ impl AvailBlobTransaction { #[cfg(feature = "native")] pub fn new(unchecked_extrinsic: &AppUncheckedExtrinsic) -> anyhow::Result { let address = match &unchecked_extrinsic.signature { - Some((subxt::utils::MultiAddress::Id(id), _, _)) => AvailAddress(id.clone().0), + //TODO: Handle other types of MultiAddress. + Some((subxt::utils::MultiAddress::Id(id), _, _)) => AvailAddress::from(id.clone().0), _ => return Err(anyhow!("Unsigned extrinsic being used to create AvailBlobTransaction.")), }; let blob = match &unchecked_extrinsic.function { From ad6c7e1a7241de247786e96290927293dd6baef5 Mon Sep 17 00:00:00 2001 From: vibhurajeev Date: Wed, 4 Oct 2023 11:53:52 +0400 Subject: [PATCH 09/12] fix(avail-adapter): app id in config --- adapters/avail/src/service.rs | 7 +++++-- adapters/avail/src/spec/block.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/adapters/avail/src/service.rs b/adapters/avail/src/service.rs index 332f756b1..b600f4972 100644 --- a/adapters/avail/src/service.rs +++ b/adapters/avail/src/service.rs @@ -30,6 +30,7 @@ pub struct DaServiceConfig { pub seed: String, pub polling_timeout: Option, pub polling_interval: Option, + pub app_id: u64, } const DEFAULT_POLLING_TIMEOUT: Duration = Duration::from_secs(60); @@ -42,6 +43,7 @@ pub struct DaProvider { signer: PairSigner, polling_timeout: Duration, polling_interval: Duration, + app_id: u64, } impl DaProvider { @@ -76,6 +78,7 @@ impl DaProvider { Some(i) => Duration::from_secs(i), None => DEFAULT_POLLING_INTERVAL, }, + app_id: config.app_id, } } } @@ -87,7 +90,7 @@ async fn wait_for_confidence(confidence_url: &str, polling_timeout: Duration, po loop { if start_time.elapsed() >= polling_timeout { - return Err(anyhow!("Timeout...")); + return Err(anyhow!("Confidence not received after timeout: {}s", polling_timeout.as_secs())); } let response = reqwest::get(confidence_url).await?; @@ -173,7 +176,7 @@ impl DaService for DaProvider { let transactions: Result, anyhow::Error> = appdata .extrinsics .iter() - .map(|x| AvailBlobTransaction::new(x)) + .map(AvailBlobTransaction::new) .collect(); let transactions = transactions?; diff --git a/adapters/avail/src/spec/block.rs b/adapters/avail/src/spec/block.rs index 5d01ed1de..8884f3360 100644 --- a/adapters/avail/src/spec/block.rs +++ b/adapters/avail/src/spec/block.rs @@ -17,7 +17,7 @@ impl SlotData for AvailBlock { type Cond = ChainValidityCondition; fn hash(&self) -> [u8; 32] { - self.header.hash().inner().clone() + *self.header.hash().inner() } fn header(&self) -> &Self::BlockHeader { From 352f10293271fe69838930a0391563f1d9591ffa Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Wed, 4 Oct 2023 13:46:34 -0500 Subject: [PATCH 10/12] Update for latest sdk --- adapters/avail/src/service.rs | 74 ++++++++++++++++---------- adapters/avail/src/spec/transaction.rs | 14 +++-- 2 files changed, 57 insertions(+), 31 deletions(-) diff --git a/adapters/avail/src/service.rs b/adapters/avail/src/service.rs index b600f4972..f195a6829 100644 --- a/adapters/avail/src/service.rs +++ b/adapters/avail/src/service.rs @@ -28,9 +28,9 @@ pub struct DaServiceConfig { pub node_client_url: String, //TODO: Safer strategy to load seed so it is not accidentally revealed. pub seed: String, - pub polling_timeout: Option, + pub polling_timeout: Option, pub polling_interval: Option, - pub app_id: u64, + pub app_id: u32, } const DEFAULT_POLLING_TIMEOUT: Duration = Duration::from_secs(60); @@ -41,9 +41,9 @@ pub struct DaProvider { pub node_client: OnlineClient, pub light_client_url: String, signer: PairSigner, - polling_timeout: Duration, + polling_timeout: Duration, polling_interval: Duration, - app_id: u64, + app_id: u32, } impl DaProvider { @@ -71,13 +71,13 @@ impl DaProvider { light_client_url, signer, polling_timeout: match config.polling_timeout { - Some(i) => Duration::from_secs(i), + Some(i) => Duration::from_secs(i), None => DEFAULT_POLLING_TIMEOUT, }, polling_interval: match config.polling_interval { - Some(i) => Duration::from_secs(i), + Some(i) => Duration::from_secs(i), None => DEFAULT_POLLING_INTERVAL, - }, + }, app_id: config.app_id, } } @@ -85,12 +85,19 @@ impl DaProvider { // TODO: Is there a way to avoid coupling to tokio? -async fn wait_for_confidence(confidence_url: &str, polling_timeout: Duration, polling_interval: Duration) -> anyhow::Result<()> { +async fn wait_for_confidence( + confidence_url: &str, + polling_timeout: Duration, + polling_interval: Duration, +) -> anyhow::Result<()> { let start_time = std::time::Instant::now(); loop { if start_time.elapsed() >= polling_timeout { - return Err(anyhow!("Confidence not received after timeout: {}s", polling_timeout.as_secs())); + return Err(anyhow!( + "Confidence not received after timeout: {}s", + polling_timeout.as_secs() + )); } let response = reqwest::get(confidence_url).await?; @@ -113,12 +120,20 @@ async fn wait_for_confidence(confidence_url: &str, polling_timeout: Duration, po Ok(()) } -async fn wait_for_appdata(appdata_url: &str, block: u32, polling_timeout: Duration, polling_interval: Duration) -> anyhow::Result { +async fn wait_for_appdata( + appdata_url: &str, + block: u32, + polling_timeout: Duration, + polling_interval: Duration, +) -> anyhow::Result { let start_time = std::time::Instant::now(); loop { if start_time.elapsed() >= polling_timeout { - return Err(anyhow!("RPC call for filtered block to light client timed out. Timeout: {}s", polling_timeout.as_secs())); + return Err(anyhow!( + "RPC call for filtered block to light client timed out. Timeout: {}s", + polling_timeout.as_secs() + )); } let response = reqwest::get(appdata_url).await?; @@ -156,29 +171,32 @@ impl DaService for DaProvider { let appdata_url = self.appdata_url(height); wait_for_confidence(&confidence_url, self.polling_timeout, self.polling_interval).await?; - let appdata = wait_for_appdata(&appdata_url, height as u32, self.polling_timeout, self.polling_interval).await?; + let appdata = wait_for_appdata( + &appdata_url, + height as u32, + self.polling_timeout, + self.polling_interval, + ) + .await?; info!("Appdata: {:?}", appdata); - let hash = match {node_client - .rpc() - .block_hash(Some(height.into())) - .await?} { - Some(i) => i, - None => return Err(anyhow!("Hash for height: {} not found.", height)) - }; + let hash = match { node_client.rpc().block_hash(Some(height.into())).await? } { + Some(i) => i, + None => return Err(anyhow!("Hash for height: {} not found.", height)), + }; - let header = match {node_client.rpc().header(Some(hash)).await?} { + let header = match { node_client.rpc().header(Some(hash)).await? } { Some(i) => i, - None => return Err(anyhow!("Header for hash: {} not found.", hash)) + None => return Err(anyhow!("Header for hash: {} not found.", hash)), }; let header = AvailHeader::new(header, hash); let transactions: Result, anyhow::Error> = appdata - .extrinsics - .iter() - .map(AvailBlobTransaction::new) - .collect(); - + .extrinsics + .iter() + .map(AvailBlobTransaction::new) + .collect(); + let transactions = transactions?; Ok(AvailBlock { header, @@ -195,7 +213,7 @@ impl DaService for DaProvider { // Extract the blob transactions relevant to a particular rollup from a block. // NOTE: The avail light client is expected to be run in app specific mode, and hence the // transactions in the block are already filtered and retrieved by light client. - fn extract_relevant_txs( + fn extract_relevant_blobs( &self, block: &Self::FilteredBlock, ) -> Vec<::BlobTransaction> { @@ -221,7 +239,7 @@ impl DaService for DaProvider { .data_availability() .submit_data(BoundedVec(blob.to_vec())); - let extrinsic_params = AvailExtrinsicParams::new_with_app_id(7.into()); + let extrinsic_params = AvailExtrinsicParams::new_with_app_id(self.app_id.into()); let h = self .node_client diff --git a/adapters/avail/src/spec/transaction.rs b/adapters/avail/src/spec/transaction.rs index 810b29fd6..d346d3195 100644 --- a/adapters/avail/src/spec/transaction.rs +++ b/adapters/avail/src/spec/transaction.rs @@ -1,3 +1,4 @@ +use anyhow::anyhow; #[cfg(feature = "native")] use avail_subxt::{ api::runtime_types::{da_control::pallet::Call, da_runtime::RuntimeCall::DataAvailability}, @@ -8,7 +9,6 @@ use bytes::Bytes; use codec::Encode; use serde::{Deserialize, Serialize}; use sov_rollup_interface::da::{BlobReaderTrait, CountedBufReader}; -use anyhow::anyhow; use super::address::AvailAddress; @@ -52,13 +52,21 @@ impl AvailBlobTransaction { let address = match &unchecked_extrinsic.signature { //TODO: Handle other types of MultiAddress. Some((subxt::utils::MultiAddress::Id(id), _, _)) => AvailAddress::from(id.clone().0), - _ => return Err(anyhow!("Unsigned extrinsic being used to create AvailBlobTransaction.")), + _ => { + return Err(anyhow!( + "Unsigned extrinsic being used to create AvailBlobTransaction." + )) + } }; let blob = match &unchecked_extrinsic.function { DataAvailability(Call::submit_data { data }) => { CountedBufReader::::new(Bytes::copy_from_slice(&data.0)) } - _ => return Err(anyhow!("Invalid type of extrinsic being converted to AvailBlobTransaction.")), + _ => { + return Err(anyhow!( + "Invalid type of extrinsic being converted to AvailBlobTransaction." + )) + } }; Ok(AvailBlobTransaction { From 9eb4834b2037927196d8baab58378de36d429888 Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Wed, 4 Oct 2023 14:12:46 -0500 Subject: [PATCH 11/12] Fix feature gate --- adapters/avail/src/spec/transaction.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/adapters/avail/src/spec/transaction.rs b/adapters/avail/src/spec/transaction.rs index d346d3195..b09662dbb 100644 --- a/adapters/avail/src/spec/transaction.rs +++ b/adapters/avail/src/spec/transaction.rs @@ -1,3 +1,4 @@ +#[cfg(feature = "native")] use anyhow::anyhow; #[cfg(feature = "native")] use avail_subxt::{ From 4e9366ace52797fde619dee1f332d0fa441eba97 Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Wed, 4 Oct 2023 15:27:41 -0500 Subject: [PATCH 12/12] Fix ci; increase test instance --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 832e55097..f43cae2df 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -70,7 +70,7 @@ jobs: - uses: actions/checkout@v3 - uses: rui314/setup-mold@v1 - name: Install Rust - run: rustup show && rustup install nightly && rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu # Nightly is needed for our configuration of cargo fmt + run: rustup show && rustup install nightly && rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu # Nightly is needed for our configuration of cargo fmt - name: Install cargo-risc0 # Risc0 v0.17 and higher require a cargo extension to build the guest code run: cargo install cargo-risczero - name: Install risc0-zkvm toolchain # Use the risc0 cargo extension to install the risc0 std library for the current toolchain @@ -114,7 +114,7 @@ jobs: run: make check-features test: name: test - runs-on: buildjet-4vcpu-ubuntu-2204 + runs-on: buildjet-8vcpu-ubuntu-2204 timeout-minutes: 60 steps: - uses: actions/checkout@v3