diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 91e4ffcff9..e89397c71d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -45,7 +45,7 @@ jobs: ${{ runner.os }}-cargo- - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.4 + uses: mozilla-actions/sccache-action@v0.0.5 - name: Install Rust toolchain run: make setup diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b685046f5a..2edcfe6f6b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: ${{ runner.os }}-cargo- - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.4 + uses: mozilla-actions/sccache-action@v0.0.5 - name: Install Rust toolchain run: make setup @@ -75,7 +75,7 @@ jobs: ${{ runner.os }}-cargo- - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.4 + uses: mozilla-actions/sccache-action@v0.0.5 - name: Install Rust toolchain run: make setup diff --git a/Cargo.lock b/Cargo.lock index cd25b0720c..7ff3209ace 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -106,17 +106,6 @@ dependencies = [ "subtle 2.4.1", ] -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom 0.2.10", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.7" @@ -124,7 +113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", - "getrandom 0.2.10", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -219,9 +208,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "approx" @@ -232,20 +221,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "aquamarine" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" -dependencies = [ - "include_dir", - "itertools", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "aquamarine" version = "0.5.0" @@ -253,11 +228,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", - "itertools", + "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -271,18 +246,6 @@ dependencies = [ "ark-std", ] -[[package]] -name = "ark-bls12-377-ext" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" -dependencies = [ - "ark-bls12-377", - "ark-ec", - "ark-models-ext", - "ark-std", -] - [[package]] name = "ark-bls12-381" version = "0.4.0" @@ -295,20 +258,6 @@ dependencies = [ "ark-std", ] -[[package]] -name = "ark-bls12-381-ext" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" -dependencies = [ - "ark-bls12-381", - "ark-ec", - "ark-ff", - "ark-models-ext", - "ark-serialize", - "ark-std", -] - [[package]] name = "ark-bw6-761" version = "0.4.0" @@ -321,19 +270,6 @@ dependencies = [ "ark-std", ] -[[package]] -name = "ark-bw6-761-ext" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" -dependencies = [ - "ark-bw6-761", - "ark-ec", - "ark-ff", - "ark-models-ext", - "ark-std", -] - [[package]] name = "ark-ec" version = "0.4.2" @@ -346,62 +282,11 @@ dependencies = [ "ark-std", "derivative", "hashbrown 0.13.2", - "itertools", + "itertools 0.10.5", "num-traits", - "rayon", "zeroize", ] -[[package]] -name = "ark-ed-on-bls12-377" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" -dependencies = [ - "ark-bls12-377", - "ark-ec", - "ark-ff", - "ark-std", -] - -[[package]] -name = "ark-ed-on-bls12-377-ext" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" -dependencies = [ - "ark-ec", - "ark-ed-on-bls12-377", - "ark-ff", - "ark-models-ext", - "ark-std", -] - -[[package]] -name = "ark-ed-on-bls12-381-bandersnatch" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" -dependencies = [ - "ark-bls12-381", - "ark-ec", - "ark-ff", - "ark-std", -] - -[[package]] -name = "ark-ed-on-bls12-381-bandersnatch-ext" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" -dependencies = [ - "ark-ec", - "ark-ed-on-bls12-381-bandersnatch", - "ark-ff", - "ark-models-ext", - "ark-std", -] - [[package]] name = "ark-ff" version = "0.4.2" @@ -414,7 +299,7 @@ dependencies = [ "ark-std", "derivative", "digest 0.10.7", - "itertools", + "itertools 0.10.5", "num-bigint", "num-traits", "paste", @@ -445,19 +330,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "ark-models-ext" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", -] - [[package]] name = "ark-poly" version = "0.4.2" @@ -471,35 +343,6 @@ dependencies = [ "hashbrown 0.13.2", ] -[[package]] -name = "ark-scale" -version = "0.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", - "parity-scale-codec", - "scale-info", -] - -[[package]] -name = "ark-secret-scalar" -version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", - "ark-transcript", - "digest 0.10.7", - "getrandom_or_panic", - "zeroize", -] - [[package]] name = "ark-serialize" version = "0.4.2" @@ -530,34 +373,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", - "rayon", -] - -[[package]] -name = "ark-transcript" -version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "digest 0.10.7", - "rand_core 0.6.4", - "sha3", + "rand", ] [[package]] name = "array-bytes" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" - -[[package]] -name = "array-bytes" -version = "6.1.0" +version = "6.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" +checksum = "5d5dde061bd34119e902bbb2d9b90c5692635cf59fb91d582c2b68043f1b8293" [[package]] name = "arrayref" @@ -577,8 +400,24 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "asn1-rs-derive", - "asn1-rs-impl", + "asn1-rs-derive 0.4.0", + "asn1-rs-impl 0.1.0", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" +dependencies = [ + "asn1-rs-derive 0.5.1", + "asn1-rs-impl 0.2.0", "displaydoc", "nom", "num-traits", @@ -596,7 +435,19 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", + "synstructure 0.13.1", ] [[package]] @@ -610,6 +461,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "assert_matches" version = "1.5.0" @@ -654,7 +516,7 @@ checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener 4.0.3", "event-listener-strategy", - "pin-project-lite 0.2.12", + "pin-project-lite", ] [[package]] @@ -665,7 +527,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -678,7 +540,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.12", + "pin-project-lite", ] [[package]] @@ -690,6 +552,23 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "attohttpc" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" +dependencies = [ + "http 0.2.9", + "log", + "url", +] + [[package]] name = "auto_impl" version = "1.1.0" @@ -723,29 +602,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "bandersnatch_vrfs" -version = "0.0.4" -source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" -dependencies = [ - "ark-bls12-381", - "ark-ec", - "ark-ed-on-bls12-381-bandersnatch", - "ark-ff", - "ark-serialize", - "ark-std", - "dleq_vrf", - "fflonk", - "merlin", - "rand_chacha 0.3.1", - "rand_core 0.6.4", - "ring 0.1.0", - "sha2 0.10.8", - "sp-ark-bls12-381", - "sp-ark-ed-on-bls12-381-bandersnatch", - "zeroize", -] - [[package]] name = "base-x" version = "0.2.11" @@ -770,6 +626,12 @@ version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64ct" version = "1.6.0" @@ -821,7 +683,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -909,9 +771,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210" dependencies = [ "arrayref", "arrayvec", @@ -1017,9 +879,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "fca2be1d5c43812bae364ee3f30b3afcb7877cf59f4aeb94c66f313a41d2fac9" [[package]] name = "bzip2-sys" @@ -1179,7 +1041,7 @@ dependencies = [ "multibase", "multihash 0.17.0", "serde", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -1192,7 +1054,7 @@ dependencies = [ "multibase", "multihash 0.18.1", "serde", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -1236,9 +1098,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3" dependencies = [ "clap_builder", "clap_derive", @@ -1246,9 +1108,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa" dependencies = [ "anstream", "anstyle", @@ -1259,14 +1121,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -1312,22 +1174,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "common" -version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "fflonk", - "getrandom_or_panic", - "merlin", - "rand_chacha 0.3.1", -] - [[package]] name = "common-path" version = "1.0.0" @@ -1356,6 +1202,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-hex" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -1378,7 +1237,7 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" dependencies = [ - "getrandom 0.2.10", + "getrandom", "once_cell", "proc-macro-hack", "tiny-keccak", @@ -1542,7 +1401,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", @@ -1639,7 +1498,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array 0.14.7", - "rand_core 0.6.4", + "rand_core", "subtle 2.4.1", "zeroize", ] @@ -1651,7 +1510,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array 0.14.7", - "rand_core 0.6.4", + "rand_core", "typenum", ] @@ -1695,29 +1554,15 @@ dependencies = [ [[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 2.4.1", - "zeroize", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms", "rustc_version", "subtle 2.4.1", "zeroize", @@ -1731,7 +1576,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -1758,7 +1603,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -1775,7 +1620,7 @@ checksum = "5fb2a9757fb085d6d97856b28d4f049141ca4a61a64c697f4426433b5f6caa1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -1833,7 +1678,21 @@ version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs", + "asn1-rs 0.5.2", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "der-parser" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" +dependencies = [ + "asn1-rs 0.6.2", "displaydoc", "nom", "num-bigint", @@ -1858,17 +1717,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive-syn-parse" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "derive-syn-parse" version = "0.2.0" @@ -1877,20 +1725,20 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.65", ] [[package]] @@ -1985,23 +1833,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", -] - -[[package]] -name = "dleq_vrf" -version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-scale", - "ark-secret-scalar", - "ark-serialize", - "ark-std", - "ark-transcript", - "arrayvec", - "zeroize", + "syn 2.0.65", ] [[package]] @@ -2020,12 +1852,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad" dependencies = [ "common-path", - "derive-syn-parse 0.2.0", + "derive-syn-parse", "once_cell", "proc-macro2", "quote", "regex", - "syn 2.0.59", + "syn 2.0.65", "termcolor", "toml 0.8.10", "walkdir", @@ -2072,9 +1904,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.12" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" @@ -2087,19 +1919,10 @@ dependencies = [ "elliptic-curve", "rfc6979", "serdect", - "signature 2.1.0", + "signature", "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" @@ -2107,21 +1930,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ "pkcs8", - "signature 2.1.0", -] - -[[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", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] @@ -2130,9 +1939,9 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.1", - "ed25519 2.2.2", - "rand_core 0.6.4", + "curve25519-dalek", + "ed25519", + "rand_core", "serde", "sha2 0.10.8", "subtle 2.4.1", @@ -2141,15 +1950,16 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "3.1.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 3.2.0", - "hashbrown 0.12.3", + "curve25519-dalek", + "ed25519", + "hashbrown 0.14.3", "hex", - "rand_core 0.6.4", - "sha2 0.9.9", + "rand_core", + "sha2 0.10.8", "zeroize", ] @@ -2175,7 +1985,7 @@ dependencies = [ "generic-array 0.14.7", "group", "pkcs8", - "rand_core 0.6.4", + "rand_core", "sec1", "serdect", "subtle 2.4.1", @@ -2209,7 +2019,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -2310,7 +2120,7 @@ checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.12", + "pin-project-lite", ] [[package]] @@ -2320,7 +2130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ "event-listener 4.0.3", - "pin-project-lite 0.2.12", + "pin-project-lite", ] [[package]] @@ -2400,7 +2210,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -2491,7 +2301,7 @@ dependencies = [ "maplit", "parity-db", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sc-block-builder", "sc-client-api", "sc-client-db", @@ -2524,7 +2334,7 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sc-block-builder", "sc-client-api", "sc-client-db", @@ -2564,7 +2374,7 @@ dependencies = [ "pallet-evm", "parity-scale-codec", "prometheus", - "rand 0.8.5", + "rand", "rlp", "sc-block-builder", "sc-client-api", @@ -2585,12 +2395,12 @@ dependencies = [ "sp-consensus", "sp-consensus-aura", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-inherents", "sp-io", "sp-runtime", "sp-state-machine", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage", "sp-timestamp", "substrate-prometheus-endpoint", "substrate-test-runtime-client", @@ -2613,6 +2423,29 @@ dependencies = [ "sp-crypto-hashing", ] +[[package]] +name = "fc-rpc-v2" +version = "2.0.0-dev" + +[[package]] +name = "fc-rpc-v2-api" +version = "0.1.0" +dependencies = [ + "ethereum-types", + "fc-rpc-v2-types", + "jsonrpsee", +] + +[[package]] +name = "fc-rpc-v2-types" +version = "0.1.0" +dependencies = [ + "const-hex", + "ethereum-types", + "serde", + "serde_json", +] + [[package]] name = "fc-storage" version = "1.0.0-dev" @@ -2626,7 +2459,7 @@ dependencies = [ "sp-api", "sp-io", "sp-runtime", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage", ] [[package]] @@ -2645,23 +2478,10 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle 2.4.1", ] -[[package]] -name = "fflonk" -version = "0.1.0" -source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "merlin", -] - [[package]] name = "fiat-crypto" version = "0.2.1" @@ -2702,7 +2522,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "scale-info", ] @@ -2713,7 +2533,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -2724,17 +2544,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -[[package]] -name = "flate2" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" -dependencies = [ - "crc32fast", - "libz-sys", - "miniz_oxide", -] - [[package]] name = "float-cmp" version = "0.9.0" @@ -2778,21 +2587,31 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" -version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", ] [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] +[[package]] +name = "forwarded-header-value" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835f84f38484cc86f110a805655697908257fb9a7af005234060891557198e9" +dependencies = [ + "nonempty", + "thiserror", +] + [[package]] name = "fp-account" version = "1.0.0-dev" @@ -2807,7 +2626,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface", + "staging-xcm", ] [[package]] @@ -2896,8 +2716,8 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-support", "frame-support-procedural", @@ -2913,19 +2733,18 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface", + "sp-storage", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" -version = "32.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "42.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "Inflector", - "array-bytes 6.1.0", + "array-bytes", "chrono", "clap", "comfy-table", @@ -2934,12 +2753,12 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "itertools", + "itertools 0.11.0", "lazy_static", "linked-hash-map", "log", "parity-scale-codec", - "rand 0.8.5", + "rand", "rand_pcg", "sc-block-builder", "sc-chain-spec", @@ -2955,26 +2774,26 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage", "sp-trie", - "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-wasm-interface", "thiserror", "thousands", ] [[package]] name = "frame-executive" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "aquamarine 0.3.3", + "aquamarine", "frame-support", "frame-system", "frame-try-runtime", @@ -2984,8 +2803,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing", ] [[package]] @@ -3000,13 +2818,28 @@ dependencies = [ "serde", ] +[[package]] +name = "frame-metadata-hash-extension" +version = "0.5.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" +dependencies = [ + "array-bytes", + "docify", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", +] + [[package]] name = "frame-support" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "aquamarine 0.5.0", - "array-bytes 6.1.0", + "aquamarine", + "array-bytes", "bitflags 1.3.2", "docify", "environmental", @@ -3026,7 +2859,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-crypto-hashing-proc-macro", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-debug-derive", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -3034,8 +2867,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-std", + "sp-tracing", "sp-weights", "static_assertions", "tt-call", @@ -3043,49 +2876,49 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "30.0.2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse 0.2.0", + "derive-syn-parse", "expander", "frame-support-procedural-tools", - "itertools", + "itertools 0.11.0", "macro_magic", - "proc-macro-warning", + "proc-macro-warning 1.0.2", "proc-macro2", "quote", "sp-crypto-hashing", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "frame-support-procedural-tools" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "12.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "frame-system" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "cfg-if", "docify", @@ -3097,15 +2930,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-std", "sp-version", "sp-weights", ] [[package]] name = "frame-system-benchmarking" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-benchmarking", "frame-support", @@ -3114,28 +2947,27 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ + "docify", "parity-scale-codec", "sp-api", ] [[package]] name = "frame-try-runtime" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -3195,6 +3027,7 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-inherents", + "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -3288,6 +3121,16 @@ dependencies = [ "futures-util", ] +[[package]] +name = "futures-bounded" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b07bbbe7d7e78809544c6f718d875627addc73a7c3582447abc052cd3dc67e0" +dependencies = [ + "futures-timer", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.30" @@ -3324,7 +3167,7 @@ checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", - "parking_lot 0.12.2", + "parking_lot 0.12.3", ] [[package]] @@ -3340,7 +3183,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ "futures-core", - "pin-project-lite 0.2.12", + "pin-project-lite", ] [[package]] @@ -3351,18 +3194,17 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "futures-rustls" -version = "0.22.2" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" +checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" dependencies = [ "futures-io", - "rustls 0.20.8", - "webpki", + "rustls 0.21.7", ] [[package]] @@ -3396,7 +3238,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.12", + "pin-project-lite", "pin-utils", "slab", ] @@ -3440,17 +3282,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -3459,7 +3290,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -3468,8 +3299,8 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "rand 0.8.5", - "rand_core 0.6.4", + "rand", + "rand_core", ] [[package]] @@ -3531,10 +3362,10 @@ dependencies = [ "futures-timer", "no-std-compat", "nonzero_ext", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "portable-atomic", "quanta", - "rand 0.8.5", + "rand", "smallvec", "spinning_top", ] @@ -3546,7 +3377,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle 2.4.1", ] @@ -3561,7 +3392,26 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.9", + "indexmap 2.0.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", "indexmap 2.0.0", "slab", "tokio", @@ -3603,9 +3453,6 @@ 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" @@ -3613,7 +3460,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.7", + "ahash", ] [[package]] @@ -3622,7 +3469,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.7", + "ahash", "allocator-api2", ] @@ -3661,6 +3508,9 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] [[package]] name = "hex-conservative" @@ -3735,6 +3585,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.5" @@ -3742,15 +3603,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", - "pin-project-lite 0.2.12", + "http 0.2.9", + "pin-project-lite", ] [[package]] -name = "http-range-header" -version = "0.3.1" +name = "http-body" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "pin-project-lite", +] [[package]] name = "httparse" @@ -3772,21 +3650,21 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.9", + "http-body 0.4.5", "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.12", + "pin-project-lite", "socket2 0.4.9", "tokio", "tower-service", @@ -3794,22 +3672,59 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.9", + "hyper 0.14.30", "log", - "rustls 0.21.6", + "rustls 0.21.7", "rustls-native-certs", "tokio", "tokio-rustls", ] +[[package]] +name = "hyper-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "tokio", + "tower", + "tower-service", +] + [[package]] name = "iana-time-zone" version = "0.1.57" @@ -3854,6 +3769,16 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "if-addrs" version = "0.10.2" @@ -3883,6 +3808,25 @@ dependencies = [ "windows 0.51.1", ] +[[package]] +name = "igd-next" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064d90fec10d541084e7b39ead8875a5a80d9114a2b18791565253bae25f49e4" +dependencies = [ + "async-trait", + "attohttpc", + "bytes", + "futures", + "http 0.2.9", + "hyper 0.14.30", + "log", + "rand", + "tokio", + "url", + "xmltree", +] + [[package]] name = "impl-codec" version = "0.6.0" @@ -4011,7 +3955,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.5", + "socket2 0.5.7", "widestring", "windows-sys 0.48.0", "winreg", @@ -4043,6 +3987,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -4069,9 +4022,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.22.5" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdb12a2381ea5b2e68c3469ec604a007b367778cdb14d09612c8069ebd616ad" +checksum = "62b089779ad7f80768693755a031cc14a7766aba707cbe886674e3f79e9b7e47" dependencies = [ "jsonrpsee-core", "jsonrpsee-proc-macros", @@ -4083,18 +4036,21 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.22.5" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257e1ec385e07b0255dde0b933f948b5c8b8c28d42afda9587c3a967b896d" +checksum = "79712302e737d23ca0daa178e752c9334846b08321d439fd89af9a384f8c830b" dependencies = [ "anyhow", "async-trait", "beef", + "bytes", "futures-util", - "hyper", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "jsonrpsee-types", - "parking_lot 0.12.2", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "rustc-hash", "serde", "serde_json", @@ -4105,26 +4061,30 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.22.5" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d0bb047e79a143b32ea03974a6bf59b62c2a4c5f5d42a381c907a8bbb3f75c0" +checksum = "7895f186d5921065d96e16bd795e5ca89ac8356ec423fafc6e3d7cf8ec11aee4" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "jsonrpsee-server" -version = "0.22.5" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12d8b6a9674422a8572e0b0abb12feeb3f2aeda86528c80d0350c2bd0923ab41" +checksum = "654afab2e92e5d88ebd8a39d6074483f3f2bfdf91c5ac57fe285e7127cdd4f51" dependencies = [ + "anyhow", "futures-util", - "http", - "hyper", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "jsonrpsee-core", "jsonrpsee-types", "pin-project", @@ -4142,12 +4102,12 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.22.5" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "150d6168405890a7a3231a3c74843f58b8959471f6df76078db2619ddee1d07d" +checksum = "d9c465fbe385238e861fdc4d1c85e04ada6c1fd246161d26385c1b311724d2af" dependencies = [ - "anyhow", "beef", + "http 1.1.0", "serde", "serde_json", "thiserror", @@ -4198,7 +4158,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parking_lot 0.12.2", + "parking_lot 0.12.3", ] [[package]] @@ -4209,7 +4169,7 @@ checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "regex", "rocksdb", "smallvec", @@ -4232,9 +4192,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.152" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" @@ -4254,14 +4214,15 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libp2p" -version = "0.51.4" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" +checksum = "e94495eb319a85b70a68b85e2389a95bb3555c71c49025b78c691a854a7e6464" dependencies = [ "bytes", + "either", "futures", "futures-timer", - "getrandom 0.2.10", + "getrandom", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -4278,18 +4239,21 @@ dependencies = [ "libp2p-request-response", "libp2p-swarm", "libp2p-tcp", + "libp2p-upnp", "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", - "multiaddr", + "multiaddr 0.18.1", "pin-project", + "rw-stream-sink", + "thiserror", ] [[package]] name = "libp2p-allow-block-list" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" +checksum = "55b46558c5c0bf99d3e2a1a38fd54ff5476ca66dd1737b12466a1824dd219311" dependencies = [ "libp2p-core", "libp2p-identity", @@ -4299,9 +4263,9 @@ dependencies = [ [[package]] name = "libp2p-connection-limits" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +checksum = "2f5107ad45cb20b2f6c3628c7b6014b996fcb13a88053f4569c872c6e30abf58" dependencies = [ "libp2p-core", "libp2p-identity", @@ -4311,9 +4275,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.39.2" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" +checksum = "dd44289ab25e4c9230d9246c475a22241e301b23e8f4061d3bdef304a1a99713" dependencies = [ "either", "fnv", @@ -4322,44 +4286,47 @@ dependencies = [ "instant", "libp2p-identity", "log", - "multiaddr", - "multihash 0.17.0", + "multiaddr 0.18.1", + "multihash 0.19.1", "multistream-select", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", "quick-protobuf", - "rand 0.8.5", + "rand", "rw-stream-sink", "smallvec", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", "void", ] [[package]] name = "libp2p-dns" -version = "0.39.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" +checksum = "e6a18db73084b4da2871438f6239fef35190b05023de7656e877c18a00541a3b" dependencies = [ + "async-trait", "futures", "libp2p-core", + "libp2p-identity", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "smallvec", - "trust-dns-resolver 0.22.0", + "trust-dns-resolver", ] [[package]] name = "libp2p-identify" -version = "0.42.2" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" +checksum = "45a96638a0a176bec0a4bcaebc1afa8cf909b114477209d7456ade52c61cd9cd" dependencies = [ "asynchronous-codec", "either", "futures", + "futures-bounded", "futures-timer", "libp2p-core", "libp2p-identity", @@ -4375,27 +4342,27 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.1.3" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" +checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" dependencies = [ - "bs58 0.4.0", - "ed25519-dalek 2.1.1", - "log", - "multiaddr", - "multihash 0.17.0", + "bs58 0.5.0", + "ed25519-dalek", + "hkdf", + "multihash 0.19.1", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "thiserror", + "tracing", "zeroize", ] [[package]] name = "libp2p-kad" -version = "0.43.3" +version = "0.44.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" +checksum = "16ea178dabba6dde6ffc260a8e0452ccdc8f79becf544946692fff9d412fc29d" dependencies = [ "arrayvec", "asynchronous-codec", @@ -4410,20 +4377,21 @@ dependencies = [ "libp2p-swarm", "log", "quick-protobuf", - "rand 0.8.5", + "quick-protobuf-codec", + "rand", "sha2 0.10.8", "smallvec", "thiserror", "uint", - "unsigned-varint", + "unsigned-varint 0.7.2", "void", ] [[package]] name = "libp2p-mdns" -version = "0.43.1" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" +checksum = "42a2567c305232f5ef54185e9604579a894fd0674819402bb0ac0246da82f52a" dependencies = [ "data-encoding", "futures", @@ -4432,9 +4400,9 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "smallvec", - "socket2 0.4.9", + "socket2 0.5.7", "tokio", "trust-dns-proto 0.22.0", "void", @@ -4442,63 +4410,69 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" +checksum = "239ba7d28f8d0b5d77760dc6619c05c7e88e74ec8fbbe97f856f20a56745e620" dependencies = [ + "instant", "libp2p-core", "libp2p-identify", + "libp2p-identity", "libp2p-kad", "libp2p-ping", "libp2p-swarm", + "once_cell", "prometheus-client", ] [[package]] name = "libp2p-noise" -version = "0.42.2" +version = "0.43.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" +checksum = "d2eeec39ad3ad0677551907dd304b2f13f17208ccebe333bef194076cd2e8921" dependencies = [ "bytes", - "curve25519-dalek 3.2.0", + "curve25519-dalek", "futures", "libp2p-core", "libp2p-identity", "log", + "multiaddr 0.18.1", + "multihash 0.19.1", "once_cell", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "snow", "static_assertions", "thiserror", - "x25519-dalek 1.1.1", + "x25519-dalek", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" +checksum = "e702d75cd0827dfa15f8fd92d15b9932abe38d10d21f47c50438c71dd1b5dae3" dependencies = [ "either", "futures", "futures-timer", "instant", "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "void", ] [[package]] name = "libp2p-quic" -version = "0.7.0-alpha.3" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" +checksum = "130d451d83f21b81eb7b35b360bc7972aeafb15177784adc56528db082e6b927" dependencies = [ "bytes", "futures", @@ -4508,19 +4482,21 @@ dependencies = [ "libp2p-identity", "libp2p-tls", "log", - "parking_lot 0.12.2", - "quinn-proto", - "rand 0.8.5", - "rustls 0.20.8", + "parking_lot 0.12.3", + "quinn 0.10.2", + "rand", + "ring 0.16.20", + "rustls 0.21.7", + "socket2 0.5.7", "thiserror", "tokio", ] [[package]] name = "libp2p-request-response" -version = "0.24.1" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" +checksum = "d8e3b4d67870478db72bac87bfc260ee6641d0734e0e3e275798f089c3fecfd4" dependencies = [ "async-trait", "futures", @@ -4528,15 +4504,17 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.5", + "log", + "rand", "smallvec", + "void", ] [[package]] name = "libp2p-swarm" -version = "0.42.2" +version = "0.43.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" +checksum = "580189e0074af847df90e75ef54f3f30059aedda37ea5a1659e8b9fca05c0141" dependencies = [ "either", "fnv", @@ -4547,7 +4525,9 @@ dependencies = [ "libp2p-identity", "libp2p-swarm-derive", "log", - "rand 0.8.5", + "multistream-select", + "once_cell", + "rand", "smallvec", "tokio", "void", @@ -4555,36 +4535,39 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" +checksum = "c4d5ec2a3df00c7836d7696c136274c9c59705bac69133253696a6c932cd1d74" dependencies = [ "heck 0.4.1", + "proc-macro-warning 0.4.2", + "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.65", ] [[package]] name = "libp2p-tcp" -version = "0.39.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" +checksum = "b558dd40d1bcd1aaaed9de898e9ec6a436019ecc2420dd0016e712fbb61c5508" dependencies = [ "futures", "futures-timer", "if-watch", "libc", "libp2p-core", + "libp2p-identity", "log", - "socket2 0.4.9", + "socket2 0.5.7", "tokio", ] [[package]] name = "libp2p-tls" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" +checksum = "8218d1d5482b122ccae396bbf38abdcb283ecc96fa54760e1dfd251f0546ac61" dependencies = [ "futures", "futures-rustls", @@ -4592,51 +4575,69 @@ dependencies = [ "libp2p-identity", "rcgen", "ring 0.16.20", - "rustls 0.20.8", + "rustls 0.21.7", + "rustls-webpki", "thiserror", - "webpki", - "x509-parser 0.14.0", + "x509-parser 0.15.1", "yasna", ] +[[package]] +name = "libp2p-upnp" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82775a47b34f10f787ad3e2a22e2c1541e6ebef4fe9f28f3ac553921554c94c1" +dependencies = [ + "futures", + "futures-timer", + "igd-next", + "libp2p-core", + "libp2p-swarm", + "log", + "tokio", + "void", +] + [[package]] name = "libp2p-wasm-ext" -version = "0.39.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" +checksum = "1e5d8e3a9e07da0ef5b55a9f26c009c8fb3c725d492d8bb4b431715786eea79c" dependencies = [ "futures", "js-sys", "libp2p-core", - "parity-send-wrapper", + "send_wrapper", "wasm-bindgen", "wasm-bindgen-futures", ] [[package]] name = "libp2p-websocket" -version = "0.41.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" +checksum = "004ee9c4a4631435169aee6aad2f62e3984dc031c43b6d29731e8e82a016c538" dependencies = [ "either", "futures", "futures-rustls", "libp2p-core", + "libp2p-identity", "log", - "parking_lot 0.12.2", - "quicksink", + "parking_lot 0.12.3", + "pin-project-lite", "rw-stream-sink", "soketto", + "thiserror", "url", "webpki-roots", ] [[package]] name = "libp2p-yamux" -version = "0.43.1" +version = "0.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" +checksum = "8eedcb62824c4300efb9cfd4e2a6edaf3ca097b9e68b36dabe45a44469fd6a85" dependencies = [ "futures", "libp2p-core", @@ -4673,7 +4674,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand", "serde", "sha2 0.9.9", "typenum", @@ -4789,30 +4790,31 @@ dependencies = [ [[package]] name = "litep2p" -version = "0.3.0" -source = "git+https://github.com/paritytech/litep2p?branch=master#b142c9eb611fb2fe78d2830266a3675b37299ceb" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f46c51c205264b834ceed95c8b195026e700494bc3991aaba3b4ea9e20626d9" dependencies = [ "async-trait", "bs58 0.4.0", "bytes", "cid 0.10.1", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "futures", "futures-timer", "hex-literal", "indexmap 2.0.0", "libc", - "mockall", - "multiaddr", + "mockall 0.12.1", + "multiaddr 0.17.1", "multihash 0.17.0", "network-interface", "nohash-hasher", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", - "prost 0.11.9", - "prost-build", - "quinn", - "rand 0.8.5", + "prost 0.12.6", + "prost-build 0.11.9", + "quinn 0.9.4", + "rand", "rcgen", "ring 0.16.20", "rustls 0.20.8", @@ -4821,7 +4823,7 @@ dependencies = [ "simple-dns", "smallvec", "snow", - "socket2 0.5.5", + "socket2 0.5.7", "static_assertions", "str0m", "thiserror", @@ -4830,13 +4832,13 @@ dependencies = [ "tokio-tungstenite", "tokio-util", "tracing", - "trust-dns-resolver 0.23.2", + "trust-dns-resolver", "uint", - "unsigned-varint", + "unsigned-varint 0.8.0", "url", "webpki", - "x25519-dalek 2.0.0", - "x509-parser 0.15.1", + "x25519-dalek", + "x509-parser 0.16.0", "yasna", "zeroize", ] @@ -4859,11 +4861,11 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" -version = "0.10.1" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.3", ] [[package]] @@ -4906,50 +4908,50 @@ dependencies = [ [[package]] name = "macro_magic" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" +checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d" dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "macro_magic_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" +checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150" dependencies = [ "const-random", - "derive-syn-parse 0.1.5", + "derive-syn-parse", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "macro_magic_core_macros" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" +checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "macro_magic_macros" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" +checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -4965,7 +4967,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -4980,15 +4982,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -[[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" @@ -5016,9 +5009,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memfd" @@ -5074,6 +5067,20 @@ dependencies = [ "hash-db", ] +[[package]] +name = "merkleized-metadata" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f313fcff1d2a4bcaa2deeaa00bf7530d77d5f7bd0467a117dde2e29a75a7a17a" +dependencies = [ + "array-bytes", + "blake3", + "frame-metadata", + "parity-scale-codec", + "scale-decode", + "scale-info", +] + [[package]] name = "merlin" version = "3.0.0" @@ -5082,7 +5089,7 @@ checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ "byteorder", "keccak", - "rand_core 0.6.4", + "rand_core", "zeroize", ] @@ -5108,7 +5115,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -5123,14 +5130,14 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", - "curve25519-dalek 4.1.1", + "curve25519-dalek", "either", "hashlink", "lioness", "log", - "parking_lot 0.12.2", - "rand 0.8.5", - "rand_chacha 0.3.1", + "parking_lot 0.12.3", + "rand", + "rand_chacha", "rand_distr", "subtle 2.4.1", "thiserror", @@ -5147,8 +5154,23 @@ dependencies = [ "downcast", "fragile", "lazy_static", - "mockall_derive", - "predicates", + "mockall_derive 0.11.4", + "predicates 2.1.5", + "predicates-tree", +] + +[[package]] +name = "mockall" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive 0.12.1", + "predicates 3.1.2", "predicates-tree", ] @@ -5164,6 +5186,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "mockall_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "multiaddr" version = "0.17.1" @@ -5179,7 +5213,26 @@ dependencies = [ "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.7.2", + "url", +] + +[[package]] +name = "multiaddr" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "libp2p-identity", + "multibase", + "multihash 0.19.1", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint 0.7.2", "url", ] @@ -5208,7 +5261,7 @@ dependencies = [ "multihash-derive", "sha2 0.10.8", "sha3", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -5225,7 +5278,17 @@ dependencies = [ "multihash-derive", "sha2 0.10.8", "sha3", - "unsigned-varint", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multihash" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +dependencies = [ + "core2", + "unsigned-varint 0.7.2", ] [[package]] @@ -5239,7 +5302,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -5250,16 +5313,16 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" +checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" dependencies = [ "bytes", "futures", "log", "pin-project", "smallvec", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -5295,7 +5358,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ - "rand 0.8.5", + "rand", ] [[package]] @@ -5427,6 +5490,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonempty" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e591e719385e6ebaeb5ce5d3887f7d5676fceca6411d1925ccc95745f3d6f7" + [[package]] name = "nonzero_ext" version = "0.3.0" @@ -5451,9 +5520,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -5465,20 +5534,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -5504,9 +5572,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -5515,11 +5583,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -5527,9 +5594,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -5563,7 +5630,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -5602,7 +5669,16 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs", + "asn1-rs 0.5.2", +] + +[[package]] +name = "oid-registry" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" +dependencies = [ + "asn1-rs 0.6.2", ] [[package]] @@ -5625,9 +5701,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.60" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.4.0", "cfg-if", @@ -5646,7 +5722,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -5666,9 +5742,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.96" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -5691,8 +5767,8 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pallet-aura" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-support", "frame-system", @@ -5703,13 +5779,12 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-authorship" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-support", "frame-system", @@ -5717,13 +5792,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-babe" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-benchmarking", "frame-support", @@ -5741,13 +5815,12 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-balances" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "docify", "frame-benchmarking", @@ -5757,7 +5830,6 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -5839,7 +5911,6 @@ dependencies = [ "pallet-evm-precompile-simple", "pallet-timestamp", "parity-scale-codec", - "rlp", "scale-info", "sp-core", "sp-io", @@ -5914,7 +5985,7 @@ dependencies = [ name = "pallet-evm-precompile-curve25519" version = "1.0.0-dev" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek", "fp-evm", ] @@ -5940,7 +6011,7 @@ dependencies = [ name = "pallet-evm-precompile-ed25519" version = "2.0.0-dev" dependencies = [ - "ed25519-dalek 2.1.1", + "ed25519-dalek", "fp-evm", ] @@ -6006,8 +6077,8 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-benchmarking", "frame-support", @@ -6024,7 +6095,6 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -6044,8 +6114,8 @@ dependencies = [ [[package]] name = "pallet-session" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-support", "frame-system", @@ -6060,14 +6130,13 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", ] [[package]] name = "pallet-sudo" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "docify", "frame-benchmarking", @@ -6077,13 +6146,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-timestamp" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "36.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "docify", "frame-benchmarking", @@ -6095,15 +6163,14 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-support", "frame-system", @@ -6113,13 +6180,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "pallet-transaction-payment-rpc" -version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "40.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6134,8 +6200,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6146,8 +6212,8 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-benchmarking", "frame-support", @@ -6157,7 +6223,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] @@ -6167,8 +6232,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", - "rand_core 0.6.4", + "rand", + "rand_core", "serde", "unicode-normalization", ] @@ -6187,8 +6252,8 @@ dependencies = [ "log", "lz4", "memmap2 0.5.10", - "parking_lot 0.12.2", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "siphasher", "snap", "winapi", @@ -6196,9 +6261,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.4" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", @@ -6211,22 +6276,16 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.4" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "parity-send-wrapper" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" - [[package]] name = "parity-wasm" version = "0.45.0" @@ -6252,9 +6311,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core 0.9.9", @@ -6300,7 +6359,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", - "rand_core 0.6.4", + "rand_core", "subtle 2.4.1", ] @@ -6337,9 +6396,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" @@ -6372,7 +6431,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -6413,20 +6472,14 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - -[[package]] -name = "pin-project-lite" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -6450,12 +6503,6 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "platforms" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" - [[package]] name = "polkavm" version = "0.9.3" @@ -6465,7 +6512,7 @@ dependencies = [ "libc", "log", "polkavm-assembler", - "polkavm-common 0.9.0", + "polkavm-common", "polkavm-linux-raw", ] @@ -6478,12 +6525,6 @@ dependencies = [ "log", ] -[[package]] -name = "polkavm-common" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92c99f7eee94e7be43ba37eef65ad0ee8cbaf89b7c00001c3f6d2be985cb1817" - [[package]] name = "polkavm-common" version = "0.9.0" @@ -6493,34 +6534,13 @@ dependencies = [ "log", ] -[[package]] -name = "polkavm-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79fa916f7962348bd1bb1a65a83401675e6fc86c51a0fdbcf92a3108e58e6125" -dependencies = [ - "polkavm-derive-impl-macro 0.8.0", -] - [[package]] name = "polkavm-derive" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606" dependencies = [ - "polkavm-derive-impl-macro 0.9.0", -] - -[[package]] -name = "polkavm-derive-impl" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c10b2654a8a10a83c260bfb93e97b262cf0017494ab94a65d389e0eda6de6c9c" -dependencies = [ - "polkavm-common 0.8.0", - "proc-macro2", - "quote", - "syn 2.0.59", + "polkavm-derive-impl-macro", ] [[package]] @@ -6529,20 +6549,10 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c4fdfc49717fb9a196e74a5d28e0bc764eb394a2c803eb11133a31ac996c60c" dependencies = [ - "polkavm-common 0.9.0", + "polkavm-common", "proc-macro2", "quote", - "syn 2.0.59", -] - -[[package]] -name = "polkavm-derive-impl-macro" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66" -dependencies = [ - "polkavm-derive-impl 0.8.0", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -6551,8 +6561,8 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" dependencies = [ - "polkavm-derive-impl 0.9.0", - "syn 2.0.59", + "polkavm-derive-impl", + "syn 2.0.65", ] [[package]] @@ -6565,7 +6575,7 @@ dependencies = [ "hashbrown 0.14.3", "log", "object 0.32.2", - "polkavm-common 0.9.0", + "polkavm-common", "regalloc2 0.9.3", "rustc-demangle", ] @@ -6584,7 +6594,7 @@ checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" dependencies = [ "cfg-if", "concurrent-queue", - "pin-project-lite 0.2.12", + "pin-project-lite", "rustix 0.38.31", "tracing", "windows-sys 0.52.0", @@ -6711,12 +6721,22 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", ] +[[package]] +name = "predicates" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +dependencies = [ + "anstyle", + "predicates-core", +] + [[package]] name = "predicates-core" version = "1.0.6" @@ -6750,7 +6770,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -6816,6 +6836,17 @@ version = "0.5.20+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" +[[package]] +name = "proc-macro-warning" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "proc-macro-warning" version = "1.0.2" @@ -6824,14 +6855,14 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "proc-macro2" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -6846,19 +6877,19 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "thiserror", ] [[package]] name = "prometheus-client" -version = "0.19.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" +checksum = "3c99afa9a01501019ac3a14d71d9f94050346f55ca471ce90c799a15c58f61e2" dependencies = [ "dtoa", "itoa", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "prometheus-client-derive-encode", ] @@ -6868,9 +6899,23 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b6a5217beb0ad503ee7fa752d451c905113d70721b937126158f3106a48cc1" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bitflags 2.4.0", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "unarray", ] [[package]] @@ -6885,12 +6930,12 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive 0.12.3", + "prost-derive 0.12.6", ] [[package]] @@ -6901,20 +6946,41 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck 0.4.1", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", "petgraph", "prettyplease 0.1.25", "prost 0.11.9", - "prost-types", + "prost-types 0.11.9", "regex", "syn 1.0.109", "tempfile", "which", ] +[[package]] +name = "prost-build" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +dependencies = [ + "bytes", + "heck 0.5.0", + "itertools 0.11.0", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease 0.2.20", + "prost 0.12.6", + "prost-types 0.12.6", + "regex", + "syn 2.0.65", + "tempfile", +] + [[package]] name = "prost-derive" version = "0.11.9" @@ -6922,7 +6988,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -6930,15 +6996,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools", + "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -6950,6 +7016,15 @@ dependencies = [ "prost 0.11.9", ] +[[package]] +name = "prost-types" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +dependencies = [ + "prost 0.12.6", +] + [[package]] name = "psm" version = "0.1.21" @@ -6969,7 +7044,7 @@ dependencies = [ "libc", "once_cell", "raw-cpuid", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "web-sys", "winapi", ] @@ -6991,44 +7066,51 @@ dependencies = [ [[package]] name = "quick-protobuf-codec" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +checksum = "f8ededb1cd78531627244d51dd0c7139fbe736c7d57af0092a76f0ffb2f56e98" dependencies = [ "asynchronous-codec", "bytes", "quick-protobuf", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] -name = "quicksink" -version = "0.1.2" +name = "quinn" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" +checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" dependencies = [ - "futures-core", - "futures-sink", - "pin-project-lite 0.1.12", + "bytes", + "pin-project-lite", + "quinn-proto 0.9.5", + "quinn-udp 0.3.2", + "rustc-hash", + "rustls 0.20.8", + "thiserror", + "tokio", + "tracing", + "webpki", ] [[package]] name = "quinn" -version = "0.9.4" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" +checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" dependencies = [ "bytes", - "pin-project-lite 0.2.12", - "quinn-proto", - "quinn-udp", + "futures-io", + "pin-project-lite", + "quinn-proto 0.10.6", + "quinn-udp 0.4.1", "rustc-hash", - "rustls 0.20.8", + "rustls 0.21.7", "thiserror", "tokio", "tracing", - "webpki", ] [[package]] @@ -7038,7 +7120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ "bytes", - "rand 0.8.5", + "rand", "ring 0.16.20", "rustc-hash", "rustls 0.20.8", @@ -7049,6 +7131,23 @@ dependencies = [ "webpki", ] +[[package]] +name = "quinn-proto" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" +dependencies = [ + "bytes", + "rand", + "ring 0.16.20", + "rustc-hash", + "rustls 0.21.7", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + [[package]] name = "quinn-udp" version = "0.3.2" @@ -7056,12 +7155,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" dependencies = [ "libc", - "quinn-proto", + "quinn-proto 0.9.5", "socket2 0.4.9", "tracing", "windows-sys 0.42.0", ] +[[package]] +name = "quinn-udp" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" +dependencies = [ + "bytes", + "libc", + "socket2 0.5.7", + "tracing", + "windows-sys 0.48.0", +] + [[package]] name = "quote" version = "1.0.36" @@ -7077,19 +7189,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -7097,18 +7196,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -7118,16 +7207,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -7136,7 +7216,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom", ] [[package]] @@ -7146,25 +7226,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "rand_pcg" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" dependencies = [ - "rand_core 0.5.1", + "rand_core", ] [[package]] -name = "rand_pcg" -version = "0.3.1" +name = "rand_xorshift" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -7240,7 +7320,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.10", + "getrandom", "redox_syscall 0.2.16", "thiserror", ] @@ -7262,7 +7342,7 @@ checksum = "2dfaf0c85b766276c797f3791f5bc6d5bd116b41d53049af2789666b0c0bc9fa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -7292,14 +7372,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -7313,13 +7393,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.8.4", ] [[package]] @@ -7330,9 +7410,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "resolv-conf" @@ -7354,22 +7434,6 @@ dependencies = [ "subtle 2.4.1", ] -[[package]] -name = "ring" -version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "blake2 0.10.6", - "common", - "fflonk", - "merlin", -] - [[package]] name = "ring" version = "0.16.20" @@ -7392,7 +7456,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" dependencies = [ "cc", - "getrandom 0.2.10", + "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -7551,7 +7615,6 @@ version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ - "log", "ring 0.16.20", "sct", "webpki", @@ -7559,9 +7622,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.6" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring 0.16.20", @@ -7608,9 +7671,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rw-stream-sink" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" +checksum = "d8c9026ff5d2f23da5e45bbc283f156383001bfb09c4e44256d02c1a685fe9a1" dependencies = [ "futures", "pin-project", @@ -7643,19 +7706,19 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "29.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "log", "sp-core", - "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-wasm-interface", "thiserror", ] [[package]] name = "sc-basic-authorship" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "futures", "futures-timer", @@ -7676,8 +7739,8 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.42.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", "sp-api", @@ -7691,10 +7754,10 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "docify", "log", "memmap2 0.9.4", @@ -7713,37 +7776,37 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing", ] [[package]] name = "sc-chain-spec-derive" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "12.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "sc-cli" -version = "0.36.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.46.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "chrono", "clap", "fdlimit", "futures", - "itertools", + "itertools 0.11.0", "libp2p-identity", "log", "names", "parity-bip39", "parity-scale-codec", - "rand 0.8.5", + "rand", "regex", "rpassword", "sc-client-api", @@ -7770,14 +7833,14 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "fnv", "futures", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -7786,19 +7849,19 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage", "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "hash-db", "kvdb", @@ -7808,7 +7871,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sc-client-api", "sc-state-db", "schnellru", @@ -7823,15 +7886,14 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "futures", - "futures-timer", "log", - "mockall", - "parking_lot 0.12.2", + "mockall 0.11.4", + "parking_lot 0.12.3", "sc-client-api", "sc-network-types", "sc-utils", @@ -7848,8 +7910,8 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "futures", @@ -7877,8 +7939,8 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "fork-tree", @@ -7888,7 +7950,7 @@ dependencies = [ "num-rational", "num-traits", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sc-client-api", "sc-consensus", "sc-consensus-epochs", @@ -7913,8 +7975,8 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7926,11 +7988,11 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "ahash 0.8.7", - "array-bytes 6.1.0", + "ahash", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", @@ -7939,8 +8001,8 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "parking_lot 0.12.2", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -7970,8 +8032,8 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "assert_matches", "async-trait", @@ -8005,8 +8067,8 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "futures", @@ -8028,73 +8090,73 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.40.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sc-executor-common", "sc-executor-polkavm", "sc-executor-wasmtime", "schnellru", "sp-api", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-io", "sp-panic-handler", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface", "sp-trie", "sp-version", - "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-wasm-interface", "tracing", ] [[package]] name = "sc-executor-common" -version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "polkavm", "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-wasm-interface", "thiserror", "wasm-instrument", ] [[package]] name = "sc-executor-polkavm" -version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.32.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "log", "polkavm", "sc-executor-common", - "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-wasm-interface", ] [[package]] name = "sc-executor-wasmtime" -version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.35.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "anyhow", "cfg-if", "libc", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface", + "sp-wasm-interface", "wasmtime", ] [[package]] name = "sc-informant" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "ansi_term", "futures", @@ -8110,11 +8172,11 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "25.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "33.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", - "parking_lot 0.12.2", + "array-bytes", + "parking_lot 0.12.3", "serde_json", "sp-application-crypto", "sp-core", @@ -8124,10 +8186,10 @@ dependencies = [ [[package]] name = "sc-mixnet" -version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.14.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "arrayvec", "blake2 0.10.6", "bytes", @@ -8135,9 +8197,9 @@ dependencies = [ "futures-timer", "log", "mixnet", - "multiaddr", + "multiaddr 0.18.1", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sc-client-api", "sc-network", "sc-network-types", @@ -8153,10 +8215,10 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "async-channel", "async-trait", "asynchronous-codec", @@ -8171,15 +8233,15 @@ dependencies = [ "linked_hash_set", "litep2p", "log", - "mockall", + "mockall 0.11.4", "once_cell", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "partial_sort", "pin-project", - "prost 0.11.9", - "prost-build", - "rand 0.8.5", + "prost 0.12.6", + "prost-build 0.12.6", + "rand", "sc-client-api", "sc-network-common", "sc-network-types", @@ -8196,7 +8258,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "unsigned-varint", + "unsigned-varint 0.7.2", "void", "wasm-timer", "zeroize", @@ -8204,15 +8266,15 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "bitflags 1.3.2", "futures", "libp2p-identity", "parity-scale-codec", - "prost-build", + "prost-build 0.12.6", "sc-consensus", "sc-network-types", "sp-consensus", @@ -8222,13 +8284,12 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "ahash 0.8.7", + "ahash", "futures", "futures-timer", - "libp2p", "log", "sc-network", "sc-network-common", @@ -8242,16 +8303,16 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "async-channel", "futures", "log", "parity-scale-codec", - "prost 0.12.3", - "prost-build", + "prost 0.12.6", + "prost-build 0.12.6", "sc-client-api", "sc-network", "sc-network-types", @@ -8263,10 +8324,10 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "async-channel", "async-trait", "fork-tree", @@ -8274,10 +8335,10 @@ dependencies = [ "futures-timer", "libp2p", "log", - "mockall", + "mockall 0.11.4", "parity-scale-codec", - "prost 0.12.3", - "prost-build", + "prost 0.12.6", + "prost-build 0.12.6", "sc-client-api", "sc-consensus", "sc-network", @@ -8300,12 +8361,11 @@ dependencies = [ [[package]] name = "sc-network-transactions" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "futures", - "libp2p", "log", "parity-scale-codec", "sc-network", @@ -8320,37 +8380,39 @@ dependencies = [ [[package]] name = "sc-network-types" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.12.1" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "bs58 0.4.0", + "bs58 0.5.0", + "ed25519-dalek", "libp2p-identity", "litep2p", - "multiaddr", - "multihash 0.17.0", - "rand 0.8.5", + "log", + "multiaddr 0.18.1", + "multihash 0.19.1", + "rand", "thiserror", + "zeroize", ] [[package]] name = "sc-offchain" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "bytes", "fnv", "futures", "futures-timer", - "hyper", + "hyper 0.14.30", "hyper-rustls", - "libp2p", "log", "num_cpus", "once_cell", "parity-scale-codec", - "parking_lot 0.12.2", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "sc-client-api", "sc-network", "sc-network-common", @@ -8359,7 +8421,7 @@ dependencies = [ "sc-utils", "sp-api", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-keystore", "sp-offchain", "sp-runtime", @@ -8369,8 +8431,8 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.18.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8378,14 +8440,14 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "futures", "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -8410,8 +8472,8 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.33.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -8430,15 +8492,19 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "16.0.2" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ + "forwarded-header-value", "futures", "governor", - "http", - "hyper", + "http 1.1.0", + "http-body-util", + "hyper 1.4.1", + "ip_network", "jsonrpsee", "log", + "serde", "serde_json", "substrate-prometheus-endpoint", "tokio", @@ -8448,18 +8514,18 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.44.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "futures", "futures-util", "hex", "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.2", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "sc-chain-spec", "sc-client-api", "sc-rpc", @@ -8480,8 +8546,8 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.45.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "directories", @@ -8491,9 +8557,9 @@ dependencies = [ "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", - "rand 0.8.5", + "rand", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -8523,12 +8589,12 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-storage", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -8544,25 +8610,25 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.30.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.36.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sp-core", ] [[package]] name = "sc-sysinfo" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "derive_more", "futures", "libc", "log", - "rand 0.8.5", + "rand", "rand_pcg", "regex", "sc-telemetry", @@ -8571,21 +8637,21 @@ dependencies = [ "sp-core", "sp-crypto-hashing", "sp-io", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-std", ] [[package]] name = "sc-telemetry" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "chrono", "futures", "libp2p", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", - "rand 0.8.5", + "rand", "sc-network", "sc-utils", "serde", @@ -8596,8 +8662,8 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "ansi_term", "chrono", @@ -8606,7 +8672,7 @@ dependencies = [ "libc", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "regex", "rustc-hash", "sc-client-api", @@ -8617,28 +8683,28 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing", "thiserror", "tracing", - "tracing-log 0.1.3", - "tracing-subscriber 0.3.18", + "tracing-log", + "tracing-subscriber", ] [[package]] name = "sc-tracing-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "sc-transaction-pool" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "futures", @@ -8646,7 +8712,7 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sc-client-api", "sc-transaction-pool-api", "sc-utils", @@ -8656,7 +8722,7 @@ dependencies = [ "sp-core", "sp-crypto-hashing", "sp-runtime", - "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -8664,8 +8730,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "futures", @@ -8680,24 +8746,47 @@ dependencies = [ [[package]] name = "sc-utils" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-channel", "futures", "futures-timer", "lazy_static", "log", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "prometheus", "sp-arithmetic", ] +[[package]] +name = "scale-bits" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" +dependencies = [ + "parity-scale-codec", + "scale-type-resolver", +] + +[[package]] +name = "scale-decode" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e98f3262c250d90e700bb802eb704e1f841e03331c2eb815e46516c4edbf5b27" +dependencies = [ + "derive_more", + "parity-scale-codec", + "scale-bits", + "scale-type-resolver", + "smallvec", +] + [[package]] name = "scale-info" -version = "2.11.2" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "bitvec", "cfg-if", @@ -8709,16 +8798,22 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.2" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "scale-type-resolver" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb" + [[package]] name = "schannel" version = "0.1.22" @@ -8730,11 +8825,11 @@ dependencies = [ [[package]] name = "schnellru" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" dependencies = [ - "ahash 0.8.7", + "ahash", "cfg-if", "hashbrown 0.13.2", ] @@ -8748,10 +8843,10 @@ dependencies = [ "aead 0.5.2", "arrayref", "arrayvec", - "curve25519-dalek 4.1.1", + "curve25519-dalek", "getrandom_or_panic", "merlin", - "rand_core 0.6.4", + "rand_core", "serde_bytes", "sha2 0.10.8", "subtle 2.4.1", @@ -8782,15 +8877,15 @@ dependencies = [ [[package]] name = "sctp-proto" -version = "0.1.7" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f64cef148d3295c730c3cb340b0b252a4d570b1c7d4bf0808f88540b0a888bc" +checksum = "b6220f78bb44c15f326b0596113305f6101097a18755d53727a575c97e09fb24" dependencies = [ "bytes", "crc", "fxhash", "log", - "rand 0.8.5", + "rand", "slab", "thiserror", ] @@ -8884,11 +8979,17 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "serde" -version = "1.0.200" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -8904,20 +9005,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.200" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -8943,19 +9044,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - [[package]] name = "sha-1" version = "0.10.1" @@ -9046,12 +9134,6 @@ 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" @@ -9059,7 +9141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -9152,8 +9234,8 @@ dependencies = [ "aes-gcm 0.9.4", "blake2 0.10.6", "chacha20poly1305", - "curve25519-dalek 4.1.1", - "rand_core 0.6.4", + "curve25519-dalek", + "rand_core", "ring 0.16.20", "rustc_version", "sha2 0.10.8", @@ -9172,48 +9254,47 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "soketto" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +checksum = "37468c595637c10857701c990f93a40ce0e357cedb0953d1c26c8d8027f9bb53" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "bytes", - "flate2", "futures", - "http", + "http 1.1.0", "httparse", "log", - "rand 0.8.5", - "sha-1 0.9.8", + "rand", + "sha1", ] [[package]] name = "sp-api" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ + "docify", "hash-db", "log", "parity-scale-codec", "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-metadata-ir", "sp-runtime", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "sp-trie", "sp-version", "thiserror", @@ -9221,8 +9302,8 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "Inflector", "blake2 0.10.6", @@ -9230,26 +9311,25 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "sp-application-crypto" -version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", ] [[package]] name = "sp-arithmetic" -version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "26.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "docify", "integer-sqrt", @@ -9257,32 +9337,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", "static_assertions", ] -[[package]] -name = "sp-ark-bls12-381" -version = "0.4.2" -source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" -dependencies = [ - "ark-bls12-381-ext", - "sp-crypto-ec-utils", -] - -[[package]] -name = "sp-ark-ed-on-bls12-381-bandersnatch" -version = "0.4.2" -source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" -dependencies = [ - "ark-ed-on-bls12-381-bandersnatch-ext", - "sp-crypto-ec-utils", -] - [[package]] name = "sp-block-builder" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "sp-api", "sp-inherents", @@ -9291,26 +9352,27 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "futures", - "log", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "schnellru", "sp-api", "sp-consensus", + "sp-core", "sp-database", "sp-runtime", "sp-state-machine", "thiserror", + "tracing", ] [[package]] name = "sp-consensus" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.40.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "futures", @@ -9324,8 +9386,8 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.40.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "parity-scale-codec", @@ -9340,8 +9402,8 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.40.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "parity-scale-codec", @@ -9358,8 +9420,8 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "finality-grandpa", "log", @@ -9375,8 +9437,8 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.32.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.40.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", "scale-info", @@ -9386,11 +9448,10 @@ dependencies = [ [[package]] name = "sp-core" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", - "bandersnatch_vrfs", + "array-bytes", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", @@ -9401,28 +9462,28 @@ dependencies = [ "hash-db", "hash256-std-hasher", "impl-serde", - "itertools", + "itertools 0.11.0", "k256", "libsecp256k1", "log", "merlin", "parity-bip39", "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "paste", "primitive-types", - "rand 0.8.5", + "rand", "scale-info", "schnorrkel", "secp256k1", "secrecy", "serde", "sp-crypto-hashing", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -9431,31 +9492,10 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sp-crypto-ec-utils" -version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1c435e91c117b877c803427a91c0ccd18c527382" -dependencies = [ - "ark-bls12-377", - "ark-bls12-377-ext", - "ark-bls12-381", - "ark-bls12-381-ext", - "ark-bw6-761", - "ark-bw6-761-ext", - "ark-ec", - "ark-ed-on-bls12-377", - "ark-ed-on-bls12-377-ext", - "ark-ed-on-bls12-381-bandersnatch", - "ark-ed-on-bls12-381-bandersnatch-ext", - "ark-scale", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", -] - [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "blake2b_simd", "byteorder", @@ -9468,67 +9508,46 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "quote", "sp-crypto-hashing", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "kvdb", - "parking_lot 0.12.2", -] - -[[package]] -name = "sp-debug-derive" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", + "parking_lot 0.12.3", ] [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1c435e91c117b877c803427a91c0ccd18c527382" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", -] - -[[package]] -name = "sp-externalities" -version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "syn 2.0.65", ] [[package]] name = "sp-externalities" -version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1c435e91c117b877c803427a91c0ccd18c527382" +version = "0.29.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage", ] [[package]] name = "sp-genesis-builder" -version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.15.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", "scale-info", @@ -9539,8 +9558,8 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9552,25 +9571,25 @@ dependencies = [ [[package]] name = "sp-io" -version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "bytes", - "ed25519-dalek 2.1.1", + "docify", + "ed25519-dalek", "libsecp256k1", "log", "parity-scale-codec", - "polkavm-derive 0.9.1", + "polkavm-derive", "rustversion", "secp256k1", "sp-core", "sp-crypto-hashing", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-keystore", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface", "sp-state-machine", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-tracing", "sp-trie", "tracing", "tracing-core", @@ -9578,8 +9597,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "sp-core", "sp-runtime", @@ -9588,19 +9607,19 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.40.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", ] [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "thiserror", "zstd 0.12.4", @@ -9608,8 +9627,8 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.7.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -9618,8 +9637,8 @@ dependencies = [ [[package]] name = "sp-mixnet" -version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.12.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", "scale-info", @@ -9629,8 +9648,8 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "sp-api", "sp-core", @@ -9640,7 +9659,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "backtrace", "lazy_static", @@ -9649,8 +9668,8 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "32.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "rustc-hash", "serde", @@ -9659,17 +9678,18 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "31.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "39.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", + "num-traits", "parity-scale-codec", "paste", - "rand 0.8.5", + "rand", "scale-info", "serde", "simple-mermaid", @@ -9677,78 +9697,47 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-std", "sp-weights", + "tracing", ] [[package]] name = "sp-runtime-interface" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "polkavm-derive 0.9.1", - "primitive-types", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", - "static_assertions", -] - -[[package]] -name = "sp-runtime-interface" -version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1c435e91c117b877c803427a91c0ccd18c527382" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.8.0", + "polkavm-derive", "primitive-types", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-tracing 16.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-wasm-interface 20.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "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 = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" -dependencies = [ - "Inflector", - "expander", - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1c435e91c117b877c803427a91c0ccd18c527382" +version = "18.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "Inflector", "expander", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "sp-session" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "35.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", "scale-info", @@ -9761,8 +9750,8 @@ dependencies = [ [[package]] name = "sp-staking" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9774,17 +9763,17 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.43.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.2", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "smallvec", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-panic-handler", "sp-trie", "thiserror", @@ -9794,67 +9783,49 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "18.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "aes-gcm 0.10.2", - "curve25519-dalek 4.1.1", - "ed25519-dalek 2.1.1", + "curve25519-dalek", + "ed25519-dalek", "hkdf", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sha2 0.10.8", "sp-api", "sp-application-crypto", "sp-core", "sp-crypto-hashing", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-runtime", - "sp-runtime-interface 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-runtime-interface", "thiserror", - "x25519-dalek 2.0.0", + "x25519-dalek", ] [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" - -[[package]] -name = "sp-std" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1c435e91c117b877c803427a91c0ccd18c527382" - -[[package]] -name = "sp-storage" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", -] +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" [[package]] name = "sp-storage" -version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1c435e91c117b877c803427a91c0ccd18c527382" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-debug-derive", ] [[package]] name = "sp-timestamp" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "parity-scale-codec", @@ -9865,31 +9836,19 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" -dependencies = [ - "parity-scale-codec", - "tracing", - "tracing-core", - "tracing-subscriber 0.3.18", -] - -[[package]] -name = "sp-tracing" -version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1c435e91c117b877c803427a91c0ccd18c527382" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "tracing", "tracing-core", - "tracing-subscriber 0.2.25", + "tracing-subscriber", ] [[package]] name = "sp-transaction-pool" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "sp-api", "sp-runtime", @@ -9897,8 +9856,8 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" -version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "34.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "async-trait", "parity-scale-codec", @@ -9911,21 +9870,21 @@ dependencies = [ [[package]] name = "sp-trie" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "ahash 0.8.7", + "ahash", "hash-db", "lazy_static", "memory-db", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.12.2", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "scale-info", "schnellru", "sp-core", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "thiserror", "tracing", "trie-db", @@ -9934,8 +9893,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "37.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9944,51 +9903,38 @@ dependencies = [ "serde", "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-std", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.59", -] - -[[package]] -name = "sp-wasm-interface" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" -dependencies = [ - "anyhow", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "wasmtime", + "syn 2.0.65", ] [[package]] name = "sp-wasm-interface" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#1c435e91c117b877c803427a91c0ccd18c527382" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "wasmtime", ] [[package]] name = "sp-weights" -version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "31.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -9996,7 +9942,7 @@ dependencies = [ "serde", "smallvec", "sp-arithmetic", - "sp-debug-derive 14.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-debug-derive", ] [[package]] @@ -10039,7 +9985,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" dependencies = [ - "itertools", + "itertools 0.10.5", "nom", "unicode_categories", ] @@ -10061,7 +10007,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" dependencies = [ - "ahash 0.8.7", + "ahash", "atoi", "byteorder", "bytes", @@ -10177,10 +10123,10 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "14.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "bounded-collections", "derivative", "environmental", @@ -10229,20 +10175,20 @@ dependencies = [ [[package]] name = "str0m" -version = "0.2.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee48572247f422dcbe68630c973f8296fbd5157119cd36a3223e48bf83d47727" +checksum = "6706347e49b13373f7ddfafad47df7583ed52083d6fc8a594eb2c80497ef959d" dependencies = [ "combine", "crc", + "fastrand", "hmac 0.12.1", "once_cell", "openssl", "openssl-sys", - "rand 0.8.5", "sctp-proto", "serde", - "sha-1 0.10.1", + "sha-1", "thiserror", "tracing", ] @@ -10291,13 +10237,13 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "substrate-bip39" -version = "0.4.7" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "0.6.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -10315,20 +10261,21 @@ dependencies = [ "byteorder", "crunchy", "lazy_static", - "rand 0.8.5", + "rand", "rustc-hex", ] [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" [[package]] name = "substrate-frame-rpc-system" -version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "38.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ + "docify", "frame-system-rpc-runtime-api", "futures", "jsonrpsee", @@ -10346,9 +10293,11 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "hyper", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "log", "prometheus", "thiserror", @@ -10358,9 +10307,9 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "async-trait", "futures", "parity-scale-codec", @@ -10385,14 +10334,14 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-rpc-runtime-api", - "hex-literal", "log", "pallet-babe", "pallet-balances", @@ -10409,7 +10358,7 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-crypto-hashing", - "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0)", + "sp-externalities", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -10422,13 +10371,14 @@ dependencies = [ "sp-trie", "sp-version", "substrate-wasm-builder", + "tracing", "trie-db", ] [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "futures", "sc-block-builder", @@ -10445,16 +10395,25 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ + "array-bytes", "build-helper", "cargo_metadata", "console", "filetime", + "frame-metadata", + "merkleized-metadata", + "parity-scale-codec", "parity-wasm", "polkavm-linker", + "sc-executor", + "sp-core", + "sp-io", "sp-maybe-compressed-blob", + "sp-tracing", + "sp-version", "strum 0.26.2", "tempfile", "toml 0.8.10", @@ -10487,9 +10446,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.59" +version = "2.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" +checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" dependencies = [ "proc-macro2", "quote", @@ -10508,6 +10467,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -10595,7 +10565,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -10687,32 +10657,32 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", "libc", "mio", "num_cpus", - "parking_lot 0.12.2", - "pin-project-lite 0.2.12", + "parking_lot 0.12.3", + "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2 0.5.7", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -10721,7 +10691,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.6", + "rustls 0.21.7", "tokio", ] @@ -10732,7 +10702,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.12", + "pin-project-lite", "tokio", "tokio-util", ] @@ -10745,7 +10715,7 @@ checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "rustls 0.21.6", + "rustls 0.21.7", "rustls-native-certs", "tokio", "tokio-rustls", @@ -10762,7 +10732,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.12", + "pin-project-lite", "tokio", ] @@ -10829,7 +10799,8 @@ dependencies = [ "futures-core", "futures-util", "pin-project", - "pin-project-lite 0.2.12", + "pin-project-lite", + "tokio", "tower-layer", "tower-service", "tracing", @@ -10837,18 +10808,16 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ "bitflags 2.4.0", "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite 0.2.12", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "pin-project-lite", "tower-layer", "tower-service", ] @@ -10872,7 +10841,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", - "pin-project-lite 0.2.12", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -10885,7 +10854,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] @@ -10908,17 +10877,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tracing-log" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" -dependencies = [ - "lazy_static", - "log", - "tracing-core", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -10930,55 +10888,23 @@ 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", - "thread_local", - "tracing", - "tracing-core", - "tracing-log 0.1.3", - "tracing-serde", -] - [[package]] name = "tracing-subscriber" version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ - "matchers 0.1.0", + "matchers", "nu-ansi-term", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "regex", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", - "tracing-log 0.2.0", + "tracing-log", ] [[package]] @@ -11018,7 +10944,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.9", "thiserror", @@ -11044,7 +10970,7 @@ dependencies = [ "idna 0.4.0", "ipnet", "once_cell", - "rand 0.8.5", + "rand", "smallvec", "thiserror", "tinyvec", @@ -11053,26 +10979,6 @@ dependencies = [ "url", ] -[[package]] -name = "trust-dns-resolver" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lazy_static", - "lru-cache", - "parking_lot 0.12.2", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "tracing", - "trust-dns-proto 0.22.0", -] - [[package]] name = "trust-dns-resolver" version = "0.23.2" @@ -11084,8 +10990,8 @@ dependencies = [ "ipconfig", "lru-cache", "once_cell", - "parking_lot 0.12.2", - "rand 0.8.5", + "parking_lot 0.12.3", + "rand", "resolv-conf", "smallvec", "thiserror", @@ -11102,9 +11008,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.96" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a5f13f11071020bb12de7a16b925d2d58636175c20c11dc5f96cb64bb6c9b3" +checksum = "5b1e5645f2ee8025c2f1d75e1138f2dd034d74e6ba54620f3c569ba2a2a1ea06" dependencies = [ "glob", "serde", @@ -11129,11 +11035,11 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 0.2.9", "httparse", "log", - "rand 0.8.5", - "rustls 0.21.6", + "rand", + "rustls 0.21.7", "sha1", "thiserror", "url", @@ -11148,7 +11054,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -11176,6 +11082,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.13" @@ -11251,6 +11163,15 @@ dependencies = [ "bytes", "futures-io", "futures-util", +] + +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" +dependencies = [ + "bytes", "tokio-util", ] @@ -11268,12 +11189,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] @@ -11334,9 +11255,9 @@ dependencies = [ "arrayref", "constcat", "digest 0.10.7", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "rand", + "rand_chacha", + "rand_core", "sha2 0.10.8", "sha3", "thiserror", @@ -11362,12 +11283,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -11395,7 +11310,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", "wasm-bindgen-shared", ] @@ -11429,7 +11344,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -11689,7 +11604,7 @@ dependencies = [ "memfd", "memoffset 0.8.0", "paste", - "rand 0.8.5", + "rand", "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", @@ -11731,12 +11646,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "which" @@ -12065,42 +11977,30 @@ dependencies = [ "tap", ] -[[package]] -name = "x25519-dalek" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" -dependencies = [ - "curve25519-dalek 3.2.0", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "x25519-dalek" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.1.1", - "rand_core 0.6.4", + "curve25519-dalek", + "rand_core", "serde", "zeroize", ] [[package]] name = "x509-parser" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" dependencies = [ - "asn1-rs", - "base64 0.13.1", + "asn1-rs 0.5.2", "data-encoding", - "der-parser", + "der-parser 8.2.0", "lazy_static", "nom", - "oid-registry", + "oid-registry 0.6.1", "rusticata-macros", "thiserror", "time", @@ -12108,16 +12008,16 @@ dependencies = [ [[package]] name = "x509-parser" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" dependencies = [ - "asn1-rs", + "asn1-rs 0.6.2", "data-encoding", - "der-parser", + "der-parser 9.0.0", "lazy_static", "nom", - "oid-registry", + "oid-registry 0.7.0", "rusticata-macros", "thiserror", "time", @@ -12125,26 +12025,42 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.11.0#0bb6249268c0b77d2834640b84cb52fdd3d7e860" +version = "10.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2407#743dc632fd6115b408376a6e4efe815bd804cd52" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", +] + +[[package]] +name = "xml-rs" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" + +[[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", ] [[package]] name = "yamux" -version = "0.10.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" +checksum = "9ed0164ae619f2dc144909a9f082187ebb5893693d8c0196e8085283ccd4b776" dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.2", - "rand 0.8.5", + "parking_lot 0.12.3", + "pin-project", + "rand", "static_assertions", ] @@ -12174,14 +12090,14 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -12194,7 +12110,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn 2.0.65", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 28adc8259d..cf7d008fc8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,9 @@ members = [ "client/consensus", "client/rpc-core", "client/rpc", + "client/rpc-v2", + "client/rpc-v2/api", + "client/rpc-v2/types", "client/db", "client/storage", "client/mapping-sync", @@ -48,6 +51,7 @@ repository = "https://github.com/paritytech/frontier/" async-trait = "0.1" bn = { package = "substrate-bn", version = "0.6", default-features = false } clap = { version = "4.5", features = ["derive", "deprecated"] } +const-hex = { version = "1.12", default-features = false, features = ["alloc"] } derive_more = "0.99" environmental = { version = "1.1.4", default-features = false } ethereum = { version = "0.15.0", default-features = false } @@ -59,99 +63,100 @@ hex = { version = "0.4.3", default-features = false, features = ["alloc"] } hex-literal = "0.4.1" impl-serde = { version = "0.4.0", default-features = false } impl-trait-for-tuples = "0.2.1" -jsonrpsee = "0.22.5" +jsonrpsee = { version = "0.23.2" } +jsonrpsee-core = { version = "0.23.2" } kvdb-rocksdb = "0.19.0" libsecp256k1 = { version = "0.7.1", default-features = false } log = { version = "0.4.21", default-features = false } num_enum = { version = "0.7.2", default-features = false } parity-db = "0.4.13" -parking_lot = "0.12.2" +parking_lot = "0.12.3" rlp = { version = "0.5.2", default-features = false } -scale-codec = { package = "parity-scale-codec", version = "3.6.4", default-features = false, features = ["derive"] } -scale-info = { version = "2.11.2", default-features = false, features = ["derive"] } +scale-codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.3", default-features = false, features = ["derive"] } serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] } serde_json = "1.0" similar-asserts = "1.5.0" sqlx = { version = "0.7.4", default-features = false, features = ["macros"] } thiserror = "1.0" -tokio = "1.37.0" +tokio = "1.38.0" # Substrate Client -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-client-db = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-consensus-manual-seal = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sc-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-client-db = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-consensus-manual-seal = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sc-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } # Substrate Primitive -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-crypto-hashing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-database = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sp-externalities = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-crypto-hashing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-database = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sp-externalities = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } # Substrate FRAME -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } # Substrate Utility -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -substrate-test-runtime-client = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } -substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +substrate-test-runtime-client = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407" } # XCM -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.11.0", default-features = false } +xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false } # Arkworks ark-bls12-377 = { version = "0.4.0", default-features = false, features = ["curve"] } @@ -169,6 +174,9 @@ fc-db = { path = "client/db", default-features = false } fc-mapping-sync = { path = "client/mapping-sync", default-features = false } fc-rpc = { path = "client/rpc", default-features = false } fc-rpc-core = { path = "client/rpc-core" } +fc-rpc-v2 = { path = "client/rpc-v2" } +fc-rpc-v2-api = { path = "client/rpc-v2/api" } +fc-rpc-v2-types = { path = "client/rpc-v2/types" } fc-storage = { path = "client/storage" } # Frontier Primitive fp-account = { path = "primitives/account", default-features = false } diff --git a/client/consensus/src/lib.rs b/client/consensus/src/lib.rs index 7e31df2744..f8dcaed608 100644 --- a/client/consensus/src/lib.rs +++ b/client/consensus/src/lib.rs @@ -105,10 +105,7 @@ where { type Error = ConsensusError; - async fn check_block( - &mut self, - block: BlockCheckParams, - ) -> Result { + async fn check_block(&self, block: BlockCheckParams) -> Result { self.inner.check_block(block).await.map_err(Into::into) } diff --git a/client/db/src/sql/mod.rs b/client/db/src/sql/mod.rs index 86cebf59f4..d5c335a954 100644 --- a/client/db/src/sql/mod.rs +++ b/client/db/src/sql/mod.rs @@ -28,13 +28,13 @@ use sqlx::{ ConnectOptions, Error, Execute, QueryBuilder, Row, Sqlite, }; // Substrate -use sc_client_api::backend::{Backend as BackendT, StateBackend, StorageProvider}; +use sc_client_api::backend::{Backend as BackendT, StorageProvider}; use sp_api::{ApiExt, ProvideRuntimeApi}; use sp_blockchain::HeaderBackend; use sp_core::{H160, H256}; use sp_runtime::{ generic::BlockId, - traits::{BlakeTwo256, Block as BlockT, Header as HeaderT, UniqueSaturatedInto, Zero}, + traits::{Block as BlockT, Header as HeaderT, UniqueSaturatedInto, Zero}, }; // Frontier use fc_api::{FilteredLog, TransactionMetadata}; @@ -203,7 +203,6 @@ where Client: ProvideRuntimeApi, Client::Api: EthereumRuntimeRPCApi, BE: BackendT + 'static, - BE::State: StateBackend, { let id = BlockId::Number(Zero::zero()); let substrate_genesis_hash = client @@ -272,7 +271,6 @@ where where Client: StorageProvider + HeaderBackend + 'static, BE: BackendT + 'static, - BE::State: StateBackend, { log::trace!(target: "frontier-sql", "🛠️ [Metadata] Retrieving digest data for block {hash:?}"); if let Ok(Some(header)) = client.header(hash) { @@ -362,7 +360,6 @@ where where Client: StorageProvider + HeaderBackend + 'static, BE: BackendT + 'static, - BE::State: StateBackend, { // Spawn a blocking task to get block metadata from substrate backend. let storage_override = self.storage_override.clone(); diff --git a/client/mapping-sync/src/sql/mod.rs b/client/mapping-sync/src/sql/mod.rs index 89e2d87630..72cb065fc6 100644 --- a/client/mapping-sync/src/sql/mod.rs +++ b/client/mapping-sync/src/sql/mod.rs @@ -20,12 +20,12 @@ use std::{ops::DerefMut, sync::Arc, time::Duration}; use futures::prelude::*; // Substrate -use sc_client_api::backend::{Backend as BackendT, StateBackend, StorageProvider}; +use sc_client_api::backend::{Backend as BackendT, StorageProvider}; use sp_api::ProvideRuntimeApi; use sp_blockchain::{Backend, HeaderBackend}; use sp_consensus::SyncOracle; use sp_core::H256; -use sp_runtime::traits::{BlakeTwo256, Block as BlockT, Header as HeaderT, UniqueSaturatedInto}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, UniqueSaturatedInto}; // Frontier use fp_rpc::EthereumRuntimeRPCApi; @@ -70,7 +70,6 @@ where Client::Api: EthereumRuntimeRPCApi, Client: HeaderBackend + StorageProvider + 'static, Backend: BackendT + 'static, - Backend::State: StateBackend, { /// Spawn the indexing worker. The worker can be given commands via the sender channel. /// Once the buffer is full, attempts to send new messages will wait until a message is read from the channel. @@ -278,7 +277,6 @@ async fn index_block_and_ancestors( Client::Api: EthereumRuntimeRPCApi, Client: HeaderBackend + StorageProvider + 'static, Backend: BackendT + 'static, - Backend::State: StateBackend, { let blockchain_backend = substrate_backend.blockchain(); let mut hashes = vec![hash]; @@ -326,7 +324,6 @@ async fn index_canonical_block_and_ancestors( Client::Api: EthereumRuntimeRPCApi, Client: HeaderBackend + StorageProvider + 'static, Backend: BackendT + 'static, - Backend::State: StateBackend, { let blockchain_backend = substrate_backend.blockchain(); let mut hashes = vec![hash]; @@ -411,7 +408,6 @@ async fn index_missing_blocks( Client::Api: EthereumRuntimeRPCApi, Client: HeaderBackend + StorageProvider + 'static, Backend: BackendT + 'static, - Backend::State: StateBackend, { if let Some(block_number) = indexer_backend.get_first_missing_canon_block().await { log::debug!(target: "frontier-sql", "Missing {block_number:?}"); @@ -449,7 +445,6 @@ async fn index_genesis_block( Client::Api: EthereumRuntimeRPCApi, Client: HeaderBackend + StorageProvider + 'static, Backend: BackendT + 'static, - Backend::State: StateBackend, { log::info!( target: "frontier-sql", diff --git a/client/rpc-v2/Cargo.toml b/client/rpc-v2/Cargo.toml new file mode 100644 index 0000000000..6268318116 --- /dev/null +++ b/client/rpc-v2/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "fc-rpc-v2" +version = "2.0.0-dev" +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +description = "Ethereum RPC (web3) compatibility layer for Substrate." +authors = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] diff --git a/client/rpc-v2/api/Cargo.toml b/client/rpc-v2/api/Cargo.toml new file mode 100644 index 0000000000..f180557fe2 --- /dev/null +++ b/client/rpc-v2/api/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "fc-rpc-v2-api" +version = "0.1.0" +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +description = "Ethereum RPC (web3) interfaces." +authors = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } + +[dependencies] +ethereum-types = { workspace = true } +jsonrpsee = { workspace = true, features = ["client-core", "server-core", "macros"] } + +# Frontier +fc-rpc-v2-types = { workspace = true } diff --git a/client/rpc-v2/api/src/debug.rs b/client/rpc-v2/api/src/debug.rs new file mode 100644 index 0000000000..71ab33bb07 --- /dev/null +++ b/client/rpc-v2/api/src/debug.rs @@ -0,0 +1,47 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::H256; +use jsonrpsee::{core::RpcResult, proc_macros::rpc}; + +use crate::types::{block_id::BlockNumberOrTagOrHash, bytes::Bytes}; + +/// Debug RPC interface. +#[rpc(client, server, namespace = "debug")] +#[async_trait] +pub trait DebugApi { + /// Returns an RLP-encoded header. + #[method(name = "getRawHeader")] + async fn raw_header(&self, block: BlockNumberOrTagOrHash) -> RpcResult>; + + /// Returns an RLP-encoded block. + #[method(name = "getRawBlock")] + async fn raw_block(&self, block: BlockNumberOrTagOrHash) -> RpcResult>; + + /// Returns the EIP-2718 binary-encoded transaction. + #[method(name = "getRawTransaction")] + async fn raw_transaction(&self, transaction_hash: H256) -> RpcResult>; + + /// Returns an array of EIP-2718 binary-encoded receipts. + #[method(name = "getRawReceipts")] + async fn raw_receipts(&self, block: BlockNumberOrTagOrHash) -> RpcResult>; + + /// Returns an array of recent bad blocks that the client has seen on the network. + #[method(name = "getBadBlocks")] + async fn bad_blocks(&self) -> RpcResult>; +} diff --git a/client/rpc-v2/api/src/eth/mod.rs b/client/rpc-v2/api/src/eth/mod.rs new file mode 100644 index 0000000000..704ef9521a --- /dev/null +++ b/client/rpc-v2/api/src/eth/mod.rs @@ -0,0 +1,359 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +/// (Non-standard) Ethereum pubsub interface. +pub mod pubsub; + +use ethereum_types::{Address, H256, U256, U64}; +use jsonrpsee::{core::RpcResult, proc_macros::rpc}; + +pub use self::pubsub::*; +use crate::types::{ + access_list::AccessListResult, + block::Block, + block_id::{BlockNumberOrTag, BlockNumberOrTagOrHash}, + bytes::Bytes, + fee::FeeHistoryResult, + filter::{Filter, FilterChanges}, + index::Index, + log::Log, + proof::AccountProof, + state::StateOverrides, + sync::SyncingStatus, + transaction::{Transaction, TransactionReceipt, TransactionRequest}, +}; + +/// Ethereum RPC client interfaces. +pub trait EthApiClient: + EthBlockApiClient + + EthClientApiClient + + EthExecuteApiClient + + EthFeeMarketApiClient + + EthFilterApiClient + + EthSignApiClient + + EthStateApiClient + + EthSubmitApiClient + + EthTransactionApiClient + + EthPubSubApiClient +{ +} + +impl EthApiClient for T where + T: EthBlockApiClient + + EthClientApiClient + + EthExecuteApiClient + + EthFeeMarketApiClient + + EthFilterApiClient + + EthSignApiClient + + EthStateApiClient + + EthSubmitApiClient + + EthTransactionApiClient + + EthPubSubApiClient +{ +} + +/// Ethereum RPC server interfaces. +pub trait EthApiServer: + EthBlockApiServer + + EthClientApiServer + + EthExecuteApiServer + + EthFeeMarketApiServer + + EthFilterApiServer + + EthSignApiServer + + EthStateApiServer + + EthSubmitApiServer + + EthTransactionApiServer + + EthPubSubApiServer +{ +} + +impl EthApiServer for T where + T: EthBlockApiServer + + EthClientApiServer + + EthExecuteApiServer + + EthFeeMarketApiServer + + EthFilterApiServer + + EthSignApiServer + + EthStateApiServer + + EthSubmitApiServer + + EthTransactionApiServer + + EthPubSubApiServer +{ +} + +/// Ethereum (block) RPC interface. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthBlockApi { + /// Returns information about a block by hash. + #[method(name = "getBlockByHash")] + async fn block_by_hash(&self, hash: H256, full: bool) -> RpcResult>; + + /// Returns information about a block by number. + #[method(name = "getBlockByNumber")] + async fn block_by_number( + &self, + block: BlockNumberOrTag, + full: bool, + ) -> RpcResult>; + + /// Returns the number of transactions in a block from a block matching the given block hash. + #[method(name = "getBlockTransactionCountByHash")] + async fn block_transaction_count_by_hash(&self, block_hash: H256) -> RpcResult>; + + /// Returns the number of transactions in a block matching the given block number. + #[method(name = "getBlockTransactionCountByNumber")] + async fn block_transaction_count_by_number( + &self, + block: BlockNumberOrTag, + ) -> RpcResult>; + + /// Returns the number of uncles in a block from a block matching the given block hash. + #[method(name = "getUncleCountByBlockHash")] + async fn block_uncles_count_by_hash(&self, block_hash: H256) -> RpcResult; + + /// Returns the number of uncles in a block matching the given block number. + #[method(name = "getUncleCountByBlockNumber")] + async fn block_uncles_count_by_number(&self, block: BlockNumberOrTag) -> RpcResult; + + /// Returns the receipts of a block by number or hash. + #[method(name = "getBlockReceipts")] + async fn block_transaction_receipts( + &self, + number_or_hash: BlockNumberOrTagOrHash, + ) -> RpcResult>>; +} + +/// Ethereum (client) RPC interface. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthClientApi { + /// Returns the chain ID of the current network. + #[method(name = "chainId")] + async fn chain_id(&self) -> RpcResult; + + /// Returns an object with data about the sync status or false. + #[method(name = "syncing")] + async fn syncing(&self) -> RpcResult; + + /// Returns the client coinbase address. + #[method(name = "coinbase")] + async fn author(&self) -> RpcResult
; + + /// Returns a list of addresses owned by client. + #[method(name = "accounts")] + async fn accounts(&self) -> RpcResult>; + + /// Returns the number of most recent block. + #[method(name = "blockNumber")] + async fn block_number(&self) -> RpcResult; +} + +/// Ethereum (execute) RPC interface. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthExecuteApi { + /// Executes a new message call immediately without creating a transaction on the blockchain. + #[method(name = "call")] + async fn call( + &self, + request: TransactionRequest, + number_or_hash: Option, + state_overrides: Option, + // block_overrides: Option, + ) -> RpcResult; + + /// Generates and returns an estimate of hou much gas is necessary to allow the transaction to complete. + #[method(name = "estimateGas")] + async fn estimate_gas( + &self, + request: TransactionRequest, + number_or_hash: Option, + state_overrides: Option, + ) -> RpcResult; + + /// Generates an access list for a transaction. + #[method(name = "createAccessList")] + async fn create_access_list( + &self, + request: TransactionRequest, + number_or_hash: Option, + ) -> RpcResult; +} + +/// Ethereum (fee market) RPC interface. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthFeeMarketApi { + /// Returns the current price per gas in wei. + #[method(name = "gasPrice")] + async fn gas_price(&self) -> RpcResult; + + /// Returns the current maxPriorityFeePerGas per gas in wei, which introduced in EIP-1159. + #[method(name = "maxPriorityFeePerGas")] + async fn max_priority_fee_per_gas(&self) -> RpcResult; + + /// Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range. + /// + /// Transaction fee history, which is introduced in EIP-1159. + #[method(name = "feeHistory")] + async fn fee_history( + &self, + block_count: U256, + newest_block: BlockNumberOrTag, + reward_percentiles: Option>, + ) -> RpcResult; +} + +/// Ethereum (filter) RPC interface. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthFilterApi { + /// Creates a filter object, based on filter options, to notify when the state changes (logs). + #[method(name = "newFilter")] + async fn new_filter(&self, filter: Filter) -> RpcResult; + + /// Creates a filter in the node, to notify when a new block arrives. + #[method(name = "newBlockFilter")] + async fn new_block_filter(&self) -> RpcResult; + + /// Creates a filter in the node, to notify when new pending transactions arrive. + #[method(name = "newPendingTransactionFilter")] + async fn new_pending_transaction_filter(&self, full: Option) -> RpcResult; + + /// Uninstalls a filter with given id. + #[method(name = "uninstallFilter")] + async fn uninstall_filter(&self, filter_id: Index) -> RpcResult; + + /// Polling method for a filter, which returns an array of logs which occurred since last poll. + #[method(name = "getFilterChanges")] + async fn filter_changes(&self, filter_id: Index) -> RpcResult; + + /// Returns an array of all logs matching filter with given id. + #[method(name = "getFilterLogs")] + async fn filter_logs(&self, filter_id: Index) -> RpcResult>; + + /// Returns an array of all logs matching filter with given id. + #[method(name = "getLogs")] + async fn logs(&self, filter: Filter) -> RpcResult>; +} + +/// Ethereum (sign) RPC interface. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthSignApi { + /// Returns an EIP-191 signature over the provided data. + #[method(name = "sign")] + async fn sign(&self, address: Address, message: Bytes) -> RpcResult; + + /// Returns an RLP encoded transaction signed by the specified account. + #[method(name = "signTransaction")] + async fn sign_transaction(&self, request: TransactionRequest) -> RpcResult; +} + +/// Ethereum (state) RPC interface. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthStateApi { + /// Returns the balance of the account of given address. + #[method(name = "getBalance")] + async fn balance( + &self, + address: Address, + block: Option, + ) -> RpcResult; + + /// Returns the value from a storage position at a given address. + #[method(name = "getStorageAt")] + async fn storage_at( + &self, + address: Address, + slot: U256, + block: Option, + ) -> RpcResult; + + /// Returns the number of transactions sent from an address. + #[method(name = "getTransactionCount")] + async fn transaction_count( + &self, + address: Address, + block: Option, + ) -> RpcResult; + + /// Returns the code at a given address. + #[method(name = "getCode")] + async fn code( + &self, + address: Address, + block: Option, + ) -> RpcResult; + + /// Returns the merkle proof for a given account and optionally some storage keys. + #[method(name = "getProof")] + async fn proof( + &self, + address: Address, + storage_keys: H256, + block: Option, + ) -> RpcResult; +} + +/// Ethereum (submit) RPC interface. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthSubmitApi { + /// Signs and submits a transaction; will block waiting for signer to return the transaction hash. + #[method(name = "eth_sendTransaction")] + async fn send_transaction(&self, request: TransactionRequest) -> RpcResult; + + /// Submits a raw signed transaction, returning its hash. + #[method(name = "eth_sendRawTransaction")] + async fn send_raw_transaction(&self, bytes: Bytes) -> RpcResult; +} + +/// Ethereum (transaction) RPC interface. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthTransactionApi { + /// Returns the information about a transaction requested by transaction hash. + #[method(name = "getTransactionByHash")] + async fn transaction_by_hash(&self, transaction_hash: H256) -> RpcResult>; + + /// Returns information about a transaction by block hash and transaction index position. + #[method(name = "getTransactionByBlockHashAndIndex")] + async fn transaction_by_block_hash_and_index( + &self, + block_hash: H256, + transaction_index: Index, + ) -> RpcResult>; + + /// Returns information about a transaction by block number and transaction index position. + #[method(name = "getTransactionByBlockNumberAndIndex")] + async fn transaction_by_block_number_and_index( + &self, + block: BlockNumberOrTag, + transaction_index: Index, + ) -> RpcResult>; + + /// Returns the receipt of a transaction by transaction hash. + #[method(name = "getTransactionReceipt")] + async fn transaction_receipt( + &self, + transaction_hash: H256, + ) -> RpcResult>; +} diff --git a/client/rpc-v2/api/src/eth/pubsub.rs b/client/rpc-v2/api/src/eth/pubsub.rs new file mode 100644 index 0000000000..64b15c2297 --- /dev/null +++ b/client/rpc-v2/api/src/eth/pubsub.rs @@ -0,0 +1,38 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use jsonrpsee::{core::SubscriptionResult, proc_macros::rpc}; + +use crate::types::pubsub::{PubSubKind, PubSubParams, PubSubResult}; + +/// (Non-standard) Ethereum pubsub interface. +/// +/// It's not part of the standard interface for Ethereum clients, but this interface is very useful +/// and almost all Ethereum clients implement this interface. So we also provide the interface +/// compatible with geth. +#[rpc(client, server, namespace = "eth")] +#[async_trait] +pub trait EthPubSubApi { + /// Create an ethereum subscription for the given params + #[subscription( + name = "subscribe" => "subscription", + unsubscribe = "unsubscribe", + item = PubSubResult + )] + async fn sub(&self, kind: PubSubKind, params: Option) -> SubscriptionResult; +} diff --git a/client/rpc-v2/api/src/lib.rs b/client/rpc-v2/api/src/lib.rs new file mode 100644 index 0000000000..bf47d76053 --- /dev/null +++ b/client/rpc-v2/api/src/lib.rs @@ -0,0 +1,35 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Ethereum RPC APIs. + +#![warn(unused_crate_dependencies)] + +/// RPC types. +pub use fc_rpc_v2_types as types; + +/// Debug namespace API +pub mod debug; +/// Eth namespace API +pub mod eth; +/// Net namespace API +pub mod net; +/// Txpool namespace API +pub mod txpool; +/// Web3 namespace API +pub mod web3; diff --git a/client/rpc-v2/api/src/net.rs b/client/rpc-v2/api/src/net.rs new file mode 100644 index 0000000000..d00eab66ee --- /dev/null +++ b/client/rpc-v2/api/src/net.rs @@ -0,0 +1,37 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::U64; +use jsonrpsee::{core::RpcResult, proc_macros::rpc}; + +/// Net RPC interface. +#[rpc(client, server, namespace = "net")] +#[async_trait] +pub trait NetApi { + /// Returns the network ID (e.g. 1 for mainnet, 5 for goerli). + #[method(name = "version")] + async fn version(&self) -> RpcResult; + + /// Returns the number of connected peers. + #[method(name = "peerCount")] + async fn peer_count(&self) -> RpcResult; + + /// Returns an indication if the node is listening for network connections. + #[method(name = "listening")] + async fn listening(&self) -> RpcResult; +} diff --git a/client/rpc-v2/api/src/txpool.rs b/client/rpc-v2/api/src/txpool.rs new file mode 100644 index 0000000000..532423ec20 --- /dev/null +++ b/client/rpc-v2/api/src/txpool.rs @@ -0,0 +1,71 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::Address; +use jsonrpsee::{core::RpcResult, proc_macros::rpc}; + +use crate::types::txpool::{TxpoolContent, TxpoolContentFrom, TxpoolInspect, TxpoolStatus}; + +/// TxPool RPC interface. +#[rpc(client, server, namespace = "txpool")] +#[async_trait] +pub trait TxPoolApi { + /// The content inspection property can be queried to list the exact details of all the + /// transactions currently pending for inclusion in the next block(s), as well as the ones that + /// are being scheduled for future execution only. + /// + /// The result is an object with two fields pending and queued. Each of these fields are + /// associative arrays, in which each entry maps an origin-address to a batch of scheduled + /// transactions. These batches themselves are maps associating nonces with actual transactions. + /// + /// Refer to [txpool_content](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-content). + #[method(name = "content")] + async fn content(&self) -> RpcResult; + + /// Retrieves the transactions contained within the txpool, returning pending as well as queued + /// transactions of this address, grouped by nonce. + /// + /// Refer to [txpool_contentFrom](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-contentfrom). + #[method(name = "contentFrom")] + async fn content_from(&self, address: Address) -> RpcResult; + + /// The inspect inspection property can be queried to list a textual summary of all the + /// transactions currently pending for inclusion in the next block(s), as well as the ones that + /// are being scheduled for future execution only. This is a method specifically tailored to + /// developers to quickly see the transactions in the pool and find any potential issues. + /// + /// The result is an object with two fields pending and queued. Each of these fields are + /// associative arrays, in which each entry maps an origin-address to a batch of scheduled + /// transactions. These batches themselves are maps associating nonces with transactions + /// summary strings. + /// + /// Refer to [txpool_inspect](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-inspect). + #[method(name = "inspect")] + async fn inspect(&self) -> RpcResult; + + /// The status inspection property can be queried for the number of transactions currently + /// pending for inclusion in the next block(s), as well as the ones that are being scheduled + /// for future execution only. + /// + /// The result is an object with two fields pending and queued, each of which is a counter + /// representing the number of transactions in that particular state. + /// + /// Refer to [txpool_status](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool#txpool-status). + #[method(name = "status")] + async fn status(&self) -> RpcResult; +} diff --git a/client/rpc-v2/api/src/web3.rs b/client/rpc-v2/api/src/web3.rs new file mode 100644 index 0000000000..0243aba3ac --- /dev/null +++ b/client/rpc-v2/api/src/web3.rs @@ -0,0 +1,35 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::H256; +use jsonrpsee::{core::RpcResult, proc_macros::rpc}; + +use crate::types::bytes::Bytes; + +/// Web3 RPC interface. +#[rpc(client, server, namespace = "web3")] +#[async_trait] +pub trait Web3Api { + /// Returns the current client version. + #[method(name = "clientVersion")] + async fn client_version(&self) -> RpcResult; + + /// Returns sha3 of the given data. + #[method(name = "sha3")] + async fn sha3(&self, input: Bytes) -> RpcResult; +} diff --git a/client/rpc-v2/src/lib.rs b/client/rpc-v2/src/lib.rs new file mode 100644 index 0000000000..c8a1a8529e --- /dev/null +++ b/client/rpc-v2/src/lib.rs @@ -0,0 +1,19 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#![warn(unused_crate_dependencies)] diff --git a/client/rpc-v2/types/Cargo.toml b/client/rpc-v2/types/Cargo.toml new file mode 100644 index 0000000000..25de936ae1 --- /dev/null +++ b/client/rpc-v2/types/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "fc-rpc-v2-types" +version = "0.1.0" +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +description = "Ethereum RPC (web3) types." +authors = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +const-hex = { workspace = true, features = ["serde"] } +ethereum-types = { workspace = true, features = ["ethbloom", "serialize"] } +serde = { workspace = true } +serde_json = { workspace = true } diff --git a/client/rpc-v2/types/src/access_list.rs b/client/rpc-v2/types/src/access_list.rs new file mode 100644 index 0000000000..39e13ae544 --- /dev/null +++ b/client/rpc-v2/types/src/access_list.rs @@ -0,0 +1,46 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::{Address, H256, U256}; +use serde::{Deserialize, Serialize}; + +/// A list of addresses and storage keys. +/// +/// These addresses and storage keys are added into the `accessed_addresses` and +/// `accessed_storage_keys` global sets (introduced in [EIP-2929](https://eips.ethereum.org/EIPS/eip-2929)). +/// +/// A gas cost is charged, though at a discount relative to the cost of accessing outside the list. +pub type AccessList = Vec; + +/// The item of access list. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct AccessListItem { + pub address: Address, + pub storage_keys: Vec, +} + +/// The response type of `eth_createAccessList`. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct AccessListResult { + pub access_list: AccessList, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub error: Option, + pub gas_used: U256, +} diff --git a/client/rpc-v2/types/src/block.rs b/client/rpc-v2/types/src/block.rs new file mode 100644 index 0000000000..76f383db8b --- /dev/null +++ b/client/rpc-v2/types/src/block.rs @@ -0,0 +1,157 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::{Address, Bloom, H256, U256, U64}; +use serde::{Deserialize, Serialize}; + +use crate::{bytes::Bytes, transaction::Transaction}; + +/// Block information. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Block { + /// Block header. + #[serde(flatten)] + pub header: Header, + + /// Block transactions. + pub transactions: BlockTransactions, + + /// Uncles' hashes. + #[serde(default)] + pub uncles: Vec, + + /// Block size in bytes. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub size: Option, + + /// Withdrawals, see [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895). + #[serde(skip_serializing_if = "Option::is_none")] + pub withdrawals: Option>, +} + +/// Block header representation. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Header { + /// Block number. + pub number: U256, + /// Block hash. + pub hash: Option, + /// Hash of the parent block. + pub parent_hash: H256, + /// Hash of the uncles. + #[serde(rename = "sha3Uncles")] + pub uncles_hash: H256, + /// Nonce. + pub nonce: Option, + /// Authors address. + #[serde(rename = "miner")] + pub author: Address, + /// State root hash. + pub state_root: H256, + /// Transactions root hash. + pub transactions_root: H256, + /// Transactions receipts root hash. + pub receipts_root: H256, + /// Logs bloom. + pub logs_bloom: Bloom, + /// Gas limit. + pub gas_limit: U256, + /// Gas used + pub gas_used: U256, + /// Timestamp. + pub timestamp: U64, + /// Extra data. + pub extra_data: Bytes, + /// Difficulty. + pub difficulty: U256, + /// Total difficulty. + #[serde(skip_serializing_if = "Option::is_none")] + pub total_difficulty: Option, + /// Mix hash. + pub mix_hash: H256, + + /// Base fee per unit of gas, which is added by [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub base_fee_per_gas: Option, + /// Withdrawals root hash, which is added by [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895). + #[serde(skip_serializing_if = "Option::is_none")] + pub withdrawals_root: Option, + /// Parent beacon block root, which is added by [EIP-4788](https://eips.ethereum.org/EIPS/eip-4788). + #[serde(skip_serializing_if = "Option::is_none")] + pub parent_beacon_block_root: Option, +} + +/// Block Transactions +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BlockTransactions { + /// Only hashes. + Hashes(Vec), + /// Full transactions. + Full(Vec), +} + +// Withdrawal represents a validator withdrawal from the consensus layer. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Withdrawal { + /// Monotonically increasing identifier issued by consensus layer. + pub index: U64, + /// Index of validator associated with withdrawal. + pub validator_index: U64, + /// Target address for withdrawn ether. + pub address: Address, + /// Value of withdrawal in Gwei. + pub amount: U64, +} + +/// [`BlockOverrides`] is a set of header fields to override. +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default, rename_all = "camelCase")] +pub struct BlockOverrides { + /// Fake block number. + // Note: geth uses `number`, erigon uses `blockNumber` + #[serde( + default, + skip_serializing_if = "Option::is_none", + alias = "blockNumber" + )] + pub number: Option, + /// Fake difficulty. + // Note post-merge difficulty should be 0. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub difficulty: Option, + /// Fake block timestamp. + // Note: geth uses `time`, erigon uses `timestamp` + #[serde(default, skip_serializing_if = "Option::is_none", alias = "timestamp")] + pub time: Option, + /// Block gas capacity. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub gas_limit: Option, + /// Block fee recipient. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub coinbase: Option
, + /// Fake PrevRandao value. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub random: Option, + /// Block base fee. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub base_fee: Option, +} diff --git a/client/rpc-v2/types/src/block_id.rs b/client/rpc-v2/types/src/block_id.rs new file mode 100644 index 0000000000..7d77f5cff2 --- /dev/null +++ b/client/rpc-v2/types/src/block_id.rs @@ -0,0 +1,427 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use std::{fmt, str}; + +use ethereum_types::H256; +use serde::{Deserialize, Serialize}; + +/// A Block identifier. +/// +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +pub enum BlockNumberOrTagOrHash { + /// A block number or tag. + Number(BlockNumberOrTag), + /// A block hash and an optional indication if it's canonical. + Hash(BlockHash), +} + +impl Default for BlockNumberOrTagOrHash { + fn default() -> Self { + Self::Number(BlockNumberOrTag::default()) + } +} + +impl From for BlockNumberOrTagOrHash { + fn from(value: BlockNumberOrTag) -> Self { + Self::Number(value) + } +} + +impl From for BlockNumberOrTagOrHash { + fn from(value: u64) -> Self { + Self::Number(BlockNumberOrTag::Number(value)) + } +} + +impl From for BlockNumberOrTagOrHash { + fn from(value: BlockHash) -> Self { + Self::Hash(value) + } +} + +impl serde::Serialize for BlockNumberOrTagOrHash { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + Self::Number(number) => number.serialize(serializer), + Self::Hash(hash) => hash.serialize(serializer), + } + } +} + +impl<'de> serde::Deserialize<'de> for BlockNumberOrTagOrHash { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + use serde::de; + + struct BlockNumberOrTagOrHashVisitor; + + impl<'de> de::Visitor<'de> for BlockNumberOrTagOrHashVisitor { + type Value = BlockNumberOrTagOrHash; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("Block number or hash parameter that following EIP-1898") + } + + fn visit_str(self, v: &str) -> Result + where + E: de::Error, + { + // There is no way to clearly distinguish between a DATA parameter and a QUANTITY parameter. + // However, since the hex string should be a QUANTITY, we can safely assume that if the len is 66 bytes, it is in fact a hash, + if v.len() == 66 { + let hash = v.parse::().map_err(de::Error::custom)?; + Ok(BlockNumberOrTagOrHash::Hash(hash.into())) + } else { + // quantity hex string or tag + let number = v.parse::().map_err(de::Error::custom)?; + Ok(BlockNumberOrTagOrHash::Number(number)) + } + } + + fn visit_map(self, mut map: A) -> Result + where + A: de::MapAccess<'de>, + { + let mut number = None; + let mut block_hash = None; + let mut require_canonical = None; + + while let Some(key) = map.next_key::()? { + match key.as_str() { + "blockNumber" => { + if number.is_some() || block_hash.is_some() { + return Err(de::Error::duplicate_field("blockNumber")); + } + if require_canonical.is_some() { + return Err(de::Error::custom("Non-valid require_canonical field")); + } + number = Some(map.next_value::()?) + } + "blockHash" => { + if number.is_some() || block_hash.is_some() { + return Err(de::Error::duplicate_field("blockHash")); + } + block_hash = Some(map.next_value::()?); + } + "requireCanonical" => { + if number.is_some() || require_canonical.is_some() { + return Err(de::Error::duplicate_field("requireCanonical")); + } + require_canonical = Some(map.next_value::()?) + } + key => { + return Err(de::Error::unknown_field( + key, + &["blockNumber", "blockHash", "requireCanonical"], + )) + } + } + } + + if let Some(number) = number { + Ok(BlockNumberOrTagOrHash::Number(number)) + } else if let Some(block_hash) = block_hash { + Ok(BlockNumberOrTagOrHash::Hash(BlockHash { + block_hash, + require_canonical, + })) + } else { + Err(de::Error::custom( + "Expected `blockNumber` or `blockHash` with `requireCanonical` optionally", + )) + } + } + } + + deserializer.deserialize_any(BlockNumberOrTagOrHashVisitor) + } +} + +/// A block number or tag ("latest", "earliest", "pending", "finalized", "safe"). +#[derive(Copy, Clone, Debug, PartialEq, Eq, Default, Hash)] +pub enum BlockNumberOrTag { + /// Latest block. + /// + /// The most recent block in the canonical chain observed by the client, this block may be + /// re-organized out of the canonical chain even under healthy/normal condition. + #[default] + Latest, + /// Finalized block accepted as canonical. + /// + /// The most recent crypto-economically secure block, cannot be re-organized outside manual + /// intervention driven by community coordination. + Finalized, + /// Safe head block. + /// + /// The most recent block that is safe from re-organized under honest majority and certain + /// synchronicity assumptions. + /// + /// There is no difference between Ethereum's `safe` and `finalized` in Substrate finality gadget + Safe, + /// Earliest block (genesis). + /// + /// The lowest numbered block the client has available. + Earliest, + /// Pending block (being mined). + /// + /// A sample next block built by the client on top of `latest` and containing the set of + /// transactions usually taken from local txpool. + Pending, + /// Block number. + Number(u64), +} + +impl From for BlockNumberOrTag { + fn from(value: u64) -> Self { + Self::Number(value) + } +} + +impl str::FromStr for BlockNumberOrTag { + type Err = String; + + fn from_str(s: &str) -> Result { + Ok(match s { + "latest" => Self::Latest, + "finalized" => Self::Finalized, + "safe" => Self::Safe, + "earliest" => Self::Earliest, + "pending" => Self::Pending, + _number => { + if let Some(hex_val) = s.strip_prefix("0x") { + let number = u64::from_str_radix(hex_val, 16).map_err(|err| err.to_string())?; + BlockNumberOrTag::Number(number) + } else { + return Err("hex string without 0x prefix".to_string()); + } + } + }) + } +} + +impl serde::Serialize for BlockNumberOrTag { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + Self::Latest => serializer.serialize_str("latest"), + Self::Finalized => serializer.serialize_str("finalized"), + Self::Safe => serializer.serialize_str("safe"), + Self::Earliest => serializer.serialize_str("earliest"), + Self::Pending => serializer.serialize_str("pending"), + Self::Number(num) => serializer.serialize_str(&format!("0x{num:x}")), + } + } +} + +impl<'de> serde::Deserialize<'de> for BlockNumberOrTag { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = String::deserialize(deserializer)?.to_lowercase(); + s.parse().map_err(serde::de::Error::custom) + } +} + +/// A block hash which may have a boolean `requireCanonical` field. +/// +/// If it's false, an RPC call should raise if a block matching the hash is not found. +/// If it's true, an RPC call should additionally raise if the block is not in the canonical chain. +/// +/// +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +#[derive(Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct BlockHash { + /// A block hash. + block_hash: H256, + /// The indication if the block hash is canonical. + #[serde(skip_serializing_if = "Option::is_none")] + require_canonical: Option, +} + +impl From for BlockHash { + fn from(value: H256) -> Self { + Self { + block_hash: value, + require_canonical: None, + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn eip1898_block_number_serde_impl() { + let cases = [ + ( + BlockNumberOrTagOrHash::Number(BlockNumberOrTag::Latest), + serde_json::json!("latest"), + serde_json::json!({ "blockNumber": "latest" }), + ), + ( + BlockNumberOrTagOrHash::Number(BlockNumberOrTag::Finalized), + serde_json::json!("finalized"), + serde_json::json!({ "blockNumber": "finalized" }), + ), + ( + BlockNumberOrTagOrHash::Number(BlockNumberOrTag::Safe), + serde_json::json!("safe"), + serde_json::json!({ "blockNumber": "safe" }), + ), + ( + BlockNumberOrTagOrHash::Number(BlockNumberOrTag::Earliest), + serde_json::json!("earliest"), + serde_json::json!({ "blockNumber": "earliest" }), + ), + ( + BlockNumberOrTagOrHash::Number(BlockNumberOrTag::Pending), + serde_json::json!("pending"), + serde_json::json!({ "blockNumber": "pending" }), + ), + ( + BlockNumberOrTagOrHash::Number(BlockNumberOrTag::Number(0)), + serde_json::json!("0x0"), + serde_json::json!("0x0"), + ), + ( + BlockNumberOrTagOrHash::Number(BlockNumberOrTag::Number(0)), + serde_json::json!("0x0"), + serde_json::json!({ "blockNumber": "0x0" }), + ), + ( + BlockNumberOrTagOrHash::Number(BlockNumberOrTag::Number(255)), + serde_json::json!("0xff"), + serde_json::json!("0xff"), + ), + ( + BlockNumberOrTagOrHash::Number(BlockNumberOrTag::Number(255)), + serde_json::json!("0xff"), + serde_json::json!({ "blockNumber": "0xff" }), + ), + ]; + for (block_number, ser, de) in cases { + assert_eq!(serde_json::to_value(block_number).unwrap(), ser); + assert_eq!( + serde_json::from_value::(de).unwrap(), + block_number + ); + } + } + + #[test] + fn eip1898_block_hash_serde_impl() { + let cases = [ + ( + BlockNumberOrTagOrHash::Hash(BlockHash { + block_hash: + "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" + .parse() + .unwrap(), + require_canonical: None, + }), + serde_json::json!({ "blockHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" }), + serde_json::json!( + "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" + ), + ), + ( + BlockNumberOrTagOrHash::Hash(BlockHash { + block_hash: + "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" + .parse() + .unwrap(), + require_canonical: None, + }), + serde_json::json!({ "blockHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" }), + serde_json::json!({ "blockHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" }), + ), + ( + BlockNumberOrTagOrHash::Hash(BlockHash { + block_hash: + "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" + .parse() + .unwrap(), + require_canonical: Some(true), + }), + serde_json::json!({ + "blockHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", + "requireCanonical": true + }), + serde_json::json!({ + "blockHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", + "requireCanonical": true + }), + ), + ( + BlockNumberOrTagOrHash::Hash(BlockHash { + block_hash: + "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" + .parse() + .unwrap(), + require_canonical: Some(false), + }), + serde_json::json!({ + "blockHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", + "requireCanonical": false + }), + serde_json::json!({ + "blockHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", + "requireCanonical": false + }), + ), + ]; + for (block_hash, ser, de) in cases { + assert_eq!(serde_json::to_value(block_hash).unwrap(), ser); + assert_eq!( + serde_json::from_value::(de).unwrap(), + block_hash + ); + } + } + + #[test] + fn invalid_eip1898_block_parameter_deserialization() { + let invalid_cases = [ + serde_json::json!(0), + serde_json::json!({ "blockNumber": "0" }), + serde_json::json!({ "blockNumber": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3" }), + serde_json::json!({ "blockHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa" }), + serde_json::json!({ + "blockNumber": "0x00", + "blockHash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", + "requireCanonical": false + }), + ]; + for case in invalid_cases { + let res = serde_json::from_value::(case); + // println!("{res:?}"); + assert!(res.is_err()); + } + } +} diff --git a/client/rpc-v2/types/src/bytes.rs b/client/rpc-v2/types/src/bytes.rs new file mode 100644 index 0000000000..e850ecf023 --- /dev/null +++ b/client/rpc-v2/types/src/bytes.rs @@ -0,0 +1,206 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use std::{fmt, ops}; + +#[derive(Clone, Default, Eq, PartialEq, Hash)] +pub struct Bytes(pub Vec); + +impl Bytes { + pub fn new(bytes: Vec) -> Self { + Self(bytes) + } + + pub fn into_vec(self) -> Vec { + self.0 + } +} + +impl fmt::Debug for Bytes { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::LowerHex::fmt(self, f) + } +} + +impl fmt::Display for Bytes { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::LowerHex::fmt(self, f) + } +} + +impl fmt::LowerHex for Bytes { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.pad(&const_hex::encode_prefixed(self.as_ref())) + } +} + +impl fmt::UpperHex for Bytes { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.pad(&const_hex::encode_upper_prefixed(self.as_ref())) + } +} + +impl ops::Deref for Bytes { + type Target = [u8]; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl ops::DerefMut for Bytes { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} + +impl AsRef<[u8]> for Bytes { + #[inline] + fn as_ref(&self) -> &[u8] { + self.0.as_ref() + } +} + +impl From> for Bytes { + fn from(bytes: Vec) -> Bytes { + Bytes(bytes) + } +} + +impl From for Vec { + fn from(bytes: Bytes) -> Vec { + bytes.0 + } +} + +impl serde::Serialize for Bytes { + #[inline] + fn serialize(&self, serializer: S) -> Result { + if serializer.is_human_readable() { + const_hex::serialize(self, serializer) + } else { + serializer.serialize_bytes(self.as_ref()) + } + } +} + +impl<'de> serde::Deserialize<'de> for Bytes { + #[inline] + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + use serde::de; + + struct BytesVisitor; + + impl<'de> de::Visitor<'de> for BytesVisitor { + type Value = Bytes; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str( + "a variable number of bytes represented as a hex string, an array of u8, or raw bytes", + ) + } + + fn visit_str(self, v: &str) -> Result + where + E: de::Error, + { + if v.is_empty() { + return Err(de::Error::invalid_value( + de::Unexpected::Str(v), + &"a valid hex string", + )); + } + + const_hex::decode(v) + .map_err(|_| { + de::Error::invalid_value(de::Unexpected::Str(v), &"a valid hex string") + }) + .map(From::from) + } + + fn visit_string(self, value: String) -> Result + where + E: de::Error, + { + self.visit_str(value.as_ref()) + } + + fn visit_bytes(self, v: &[u8]) -> Result { + Ok(Bytes::from(v.to_vec())) + } + + fn visit_byte_buf(self, v: Vec) -> Result { + Ok(Bytes::from(v)) + } + + fn visit_seq>(self, mut seq: A) -> Result { + let mut bytes = Vec::with_capacity(seq.size_hint().unwrap_or(0)); + + while let Some(byte) = seq.next_element()? { + bytes.push(byte); + } + + Ok(Bytes::from(bytes)) + } + } + + if deserializer.is_human_readable() { + deserializer.deserialize_any(BytesVisitor) + } else { + deserializer.deserialize_byte_buf(BytesVisitor) + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn bytes_serialize() { + let bytes = const_hex::decode("0123456789abcdef").unwrap(); + let bytes = Bytes::new(bytes); + let serialized = serde_json::to_string(&bytes).unwrap(); + assert_eq!(serialized, r#""0x0123456789abcdef""#); + } + + #[test] + fn bytes_deserialize() { + let bytes0: Result = serde_json::from_str(r#""∀∂""#); + let bytes1: Result = serde_json::from_str(r#""""#); + let bytes2: Result = serde_json::from_str(r#""0x123""#); + let bytes3: Result = serde_json::from_str(r#""0xgg""#); + + let bytes4: Bytes = serde_json::from_str(r#""0x""#).unwrap(); + let bytes5: Bytes = serde_json::from_str(r#""0x12""#).unwrap(); + let bytes6: Bytes = serde_json::from_str(r#""0x0123""#).unwrap(); + + assert!(bytes0.is_err()); + assert!(bytes1.is_err()); + assert!(bytes2.is_err()); + assert!(bytes3.is_err()); + assert_eq!(bytes4, Bytes(vec![])); + assert_eq!(bytes5, Bytes(vec![0x12])); + assert_eq!(bytes6, Bytes(vec![0x1, 0x23])); + } +} diff --git a/client/rpc-v2/types/src/fee.rs b/client/rpc-v2/types/src/fee.rs new file mode 100644 index 0000000000..ba65d75e81 --- /dev/null +++ b/client/rpc-v2/types/src/fee.rs @@ -0,0 +1,45 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::U256; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct FeeHistoryResult { + /// Lowest number block of the returned range. + pub oldest_block: U256, + + /// An array of block base fees per gas. + /// + /// This includes the next block after the newest of the returned range, because this value can + /// be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub base_fee_per_gas: Vec, + + /// An array of block gas used ratios. + /// These are calculated as the ratio of `gasUsed` and `gasLimit`. + pub gas_used_ratio: Vec, + + /// A two-dimensional array of effective priority fees per gas at the requested block percentiles. + /// + /// A given percentile sample of effective priority fees per gas from a single block in + /// ascending order, weighted by gas used. Zeroes are returned if the block is empty. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub reward: Vec>, +} diff --git a/client/rpc-v2/types/src/filter/block_option.rs b/client/rpc-v2/types/src/filter/block_option.rs new file mode 100644 index 0000000000..a0e50b8446 --- /dev/null +++ b/client/rpc-v2/types/src/filter/block_option.rs @@ -0,0 +1,111 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use std::ops::{RangeFrom, RangeTo}; + +use ethereum_types::H256; + +use crate::block_id::BlockNumberOrTag; + +/// Represents the target range of blocks for the filter. +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub enum FilterBlockOption { + /// A range of blocks with optional from and to blocks. + /// + /// Note: ranges are considered to be __inclusive__. + BlockNumberRange { + /// The block number or tag this filter should start at. + from_block: Option, + /// The block number or tag this filter should end at. + to_block: Option, + }, + /// The hash of the block if the filter only targets a single block. + /// + /// See [EIP-234](https://eips.ethereum.org/EIPS/eip-234) for more details. + BlockHashAt { block_hash: H256 }, +} + +impl Default for FilterBlockOption { + fn default() -> Self { + Self::BlockNumberRange { + from_block: None, + to_block: None, + } + } +} + +impl FilterBlockOption { + /// Sets the block number this range filter should start at. + pub const fn from_block(self, block: BlockNumberOrTag) -> Self { + let to_block = if let Self::BlockNumberRange { to_block, .. } = self { + to_block + } else { + None + }; + Self::BlockNumberRange { + from_block: Some(block), + to_block, + } + } + + /// Sets the block number this range filter should end at. + pub const fn to_block(self, block: BlockNumberOrTag) -> Self { + let from_block = if let Self::BlockNumberRange { from_block, .. } = self { + from_block + } else { + None + }; + Self::BlockNumberRange { + from_block, + to_block: Some(block), + } + } + + /// Pins the block hash this filter should target. + pub const fn block_hash(block_hash: H256) -> Self { + Self::BlockHashAt { block_hash } + } +} + +impl> From> for FilterBlockOption { + fn from(value: RangeFrom) -> Self { + let from_block = Some(value.start.into()); + let to_block = Some(BlockNumberOrTag::Latest); + Self::BlockNumberRange { + from_block, + to_block, + } + } +} + +impl> From> for FilterBlockOption { + fn from(value: RangeTo) -> Self { + let from_block = Some(BlockNumberOrTag::Earliest); + let to_block = Some(value.end.into()); + Self::BlockNumberRange { + from_block, + to_block, + } + } +} + +impl From for FilterBlockOption { + fn from(value: H256) -> Self { + Self::BlockHashAt { block_hash: value } + } +} diff --git a/client/rpc-v2/types/src/filter/mod.rs b/client/rpc-v2/types/src/filter/mod.rs new file mode 100644 index 0000000000..0526877e4b --- /dev/null +++ b/client/rpc-v2/types/src/filter/mod.rs @@ -0,0 +1,439 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +mod block_option; +mod utility; + +use std::fmt; + +use ethereum_types::{Address, H256}; +use serde::{ + de::{self, MapAccess, Visitor}, + ser::SerializeStruct, + Deserialize, +}; + +pub use self::{ + block_option::FilterBlockOption, + utility::{FilterSet, ValueOrArray}, +}; +use crate::{block_id::BlockNumberOrTag, log::Log}; + +/// The maximum number of topics supported in [`Filter`]. +pub const MAX_TOPICS: usize = 4; + +pub type AddressFilter = FilterSet
; +pub type TopicFilter = FilterSet; + +/// Filter parameters of `eth_newFilter` and `eth_getLogs` RPC. +#[derive(Clone, Debug, Eq, PartialEq, Default)] +pub struct Filter { + /// Filter block options, specifying on which blocks the filter should match. + pub block_option: FilterBlockOption, + /// Address filter. + pub address: Option, + /// Topics filter. + pub topics: Option<[TopicFilter; MAX_TOPICS]>, +} + +impl Filter { + /// Creates a new, empty filter. + pub fn new() -> Self { + Self::default() + } + + /// Sets the block number this range filter should start at. + #[allow(clippy::wrong_self_convention)] + pub fn from_block>(mut self, block: T) -> Self { + self.block_option = self.block_option.from_block(block.into()); + self + } + + /// Sets the block number this range filter should end at. + #[allow(clippy::wrong_self_convention)] + pub fn to_block>(mut self, block: T) -> Self { + self.block_option = self.block_option.to_block(block.into()); + self + } + + /// Pins the block hash this filter should target. + pub fn at_block_hash>(mut self, hash: T) -> Self { + self.block_option = FilterBlockOption::block_hash(hash.into()); + self + } + + /// Sets the address filter. + pub fn address>>(mut self, address: T) -> Self { + self.address = Some(address.into().into()); + self + } + + /// Sets event_signature(topic0) (the event name for non-anonymous events). + pub fn event_signature>(self, topic: T) -> Self { + self.topic(0, topic) + } + + /// Sets the 1st indexed topic. + pub fn topic1>(self, topic: T) -> Self { + self.topic(1, topic) + } + + /// Sets the 2nd indexed topic. + pub fn topic2>(self, topic: T) -> Self { + self.topic(2, topic) + } + + /// Sets the 3rd indexed topic. + pub fn topic3>(self, topic: T) -> Self { + self.topic(3, topic) + } + + fn topic>(mut self, index: usize, topic: T) -> Self { + match &mut self.topics { + Some(topics) => { + topics[index] = topic.into(); + } + None => { + let mut topics: [TopicFilter; MAX_TOPICS] = Default::default(); + topics[index] = topic.into(); + self.topics = Some(topics); + } + } + self + } +} + +type RawAddressFilter = ValueOrArray
; +type RawTopicsFilter = Vec>>; + +impl serde::Serialize for Filter { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + let mut s = match &self.block_option { + FilterBlockOption::BlockNumberRange { + from_block, + to_block, + } => { + let mut s = serializer.serialize_struct("Filter", 2 + 1 + 1)?; + s.serialize_field("fromBlock", from_block)?; + s.serialize_field("toBlock", to_block)?; + s + } + FilterBlockOption::BlockHashAt { block_hash } => { + let mut s = serializer.serialize_struct("Filter", 1 + 1 + 1)?; + s.serialize_field("blockHash", block_hash)?; + s + } + }; + + match &self.address { + Some(address) => s.serialize_field("address", &address.to_value_or_array())?, + None => s.serialize_field("address", &Option::::None)?, + } + + match &self.topics { + Some(topics) => { + let mut filtered_topics = Vec::new(); + + let mut filtered_topics_len = 0; + for (idx, topic) in topics.iter().enumerate() { + if !topic.is_empty() { + filtered_topics_len = idx + 1; + } + filtered_topics.push(topic.to_value_or_array()); + } + filtered_topics.truncate(filtered_topics_len); + + s.serialize_field("topics", &filtered_topics)?; + } + None => s.serialize_field("topics", &Option::::None)?, + } + + s.end() + } +} + +impl<'de> serde::Deserialize<'de> for Filter { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + struct FilterVisitor; + + impl<'de> Visitor<'de> for FilterVisitor { + type Value = Filter; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("Filter object") + } + + fn visit_map(self, mut map: A) -> Result + where + A: MapAccess<'de>, + { + let mut from_block: Option> = None; + let mut to_block: Option> = None; + let mut block_hash: Option> = None; + let mut address: Option> = None; + let mut topics: Option> = None; + + while let Some(key) = map.next_key::()? { + match key.as_str() { + "fromBlock" => { + if from_block.is_some() { + return Err(de::Error::duplicate_field("fromBlock")); + } + if block_hash.is_some() { + return Err(de::Error::custom( + "fromBlock not allowed with blockHash", + )); + } + from_block = Some(map.next_value()?) + } + "toBlock" => { + if to_block.is_some() { + return Err(de::Error::duplicate_field("toBlock")); + } + if block_hash.is_some() { + return Err(de::Error::custom( + "toBlock not allowed with blockHash", + )); + } + to_block = Some(map.next_value()?) + } + "blockHash" => { + if block_hash.is_some() { + return Err(de::Error::duplicate_field("blockHash")); + } + if from_block.is_some() || to_block.is_some() { + return Err(de::Error::custom( + "fromBlock,toBlock not allowed with blockHash", + )); + } + block_hash = Some(map.next_value()?) + } + "address" => { + if address.is_some() { + return Err(de::Error::duplicate_field("address")); + } + address = Some(map.next_value()?) + } + "topics" => { + if topics.is_some() { + return Err(de::Error::duplicate_field("topics")); + } + topics = Some(map.next_value()?) + } + key => { + return Err(de::Error::unknown_field( + key, + &["fromBlock", "toBlock", "blockHash", "address", "topics"], + )) + } + } + } + + let from_block = from_block.unwrap_or_default(); + let to_block = to_block.unwrap_or_default(); + let block_hash = block_hash.unwrap_or_default(); + + let block_option = if let Some(block_hash) = block_hash { + FilterBlockOption::BlockHashAt { block_hash } + } else { + FilterBlockOption::BlockNumberRange { + from_block, + to_block, + } + }; + + let address = address.flatten().map(FilterSet::from); + + let topics = match topics.flatten() { + Some(topics_vec) => { + if topics_vec.len() > MAX_TOPICS { + return Err(de::Error::custom("exceeded maximum topics")); + } + + let mut topics: [TopicFilter; MAX_TOPICS] = Default::default(); + for (idx, topic) in topics_vec.into_iter().enumerate() { + topics[idx] = topic.map(FilterSet::from).unwrap_or_default(); + } + Some(topics) + } + None => None, + }; + + Ok(Filter { + block_option, + address, + topics, + }) + } + } + + deserializer.deserialize_any(FilterVisitor) + } +} + +#[derive(Clone, Debug, Eq, PartialEq, Default)] +pub enum FilterChanges { + /// Empty result. + #[default] + Empty, + /// New logs. + Logs(Vec), + /// New hashes (block or transactions). + Hashes(Vec), +} + +impl serde::Serialize for FilterChanges { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + Self::Empty => (&[] as &[()]).serialize(serializer), + Self::Logs(logs) => logs.serialize(serializer), + Self::Hashes(hashes) => hashes.serialize(serializer), + } + } +} + +impl<'de> serde::Deserialize<'de> for FilterChanges { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + #[derive(Deserialize)] + #[serde(untagged)] + enum Changes { + Logs(Vec), + Hashes(Vec), + } + + let changes = Changes::deserialize(deserializer)?; + Ok(match changes { + Changes::Logs(logs) => { + if logs.is_empty() { + Self::Empty + } else { + Self::Logs(logs) + } + } + Changes::Hashes(hashes) => { + if hashes.is_empty() { + Self::Empty + } else { + Self::Hashes(hashes) + } + } + }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn h256(s: &str) -> H256 { + s.parse().unwrap() + } + + fn address(s: &str) -> Address { + s.parse().unwrap() + } + + #[test] + fn filter_serde_impl() { + let valid_cases = [ + ( + r#"{ + "fromBlock":"earliest", + "toBlock":null, + "address":null, + "topics":null + }"#, + Filter::default().from_block(BlockNumberOrTag::Earliest), + ), + ( + r#"{ + "fromBlock":"earliest", + "toBlock":null, + "address":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "topics":null + }"#, + Filter::default() + .from_block(BlockNumberOrTag::Earliest) + .address(address("0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")), + ), + ( + r#"{ + "blockHash":"0x1111111111111111111111111111111111111111111111111111111111111111", + "address":[ + "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + ], + "topics":null + }"#, + Filter::default() + .at_block_hash(h256( + "0x1111111111111111111111111111111111111111111111111111111111111111", + )) + .address(vec![ + address("0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), + address("0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"), + ]), + ), + ]; + + for (raw, typed) in valid_cases { + let deserialized = serde_json::from_str::(raw).unwrap(); + assert_eq!(deserialized, typed); + + let serialized = serde_json::to_string(&typed).unwrap(); + assert_eq!(serialized, raw.split_whitespace().collect::()); + } + } + + #[test] + fn filter_changes_serde_impl() { + let cases = [ + (r#"[]"#, FilterChanges::Empty), + ( + r#"[ + "0x1111111111111111111111111111111111111111111111111111111111111111", + "0x2222222222222222222222222222222222222222222222222222222222222222" + ]"#, + FilterChanges::Hashes(vec![ + h256("0x1111111111111111111111111111111111111111111111111111111111111111"), + h256("0x2222222222222222222222222222222222222222222222222222222222222222"), + ]), + ), + ]; + + for (raw, typed) in cases { + let deserialized = serde_json::from_str::(raw).unwrap(); + assert_eq!(deserialized, typed); + + let serialized = serde_json::to_string(&typed).unwrap(); + assert_eq!(serialized, raw.split_whitespace().collect::()); + } + } +} diff --git a/client/rpc-v2/types/src/filter/utility.rs b/client/rpc-v2/types/src/filter/utility.rs new file mode 100644 index 0000000000..a46e1177cc --- /dev/null +++ b/client/rpc-v2/types/src/filter/utility.rs @@ -0,0 +1,110 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use std::collections::BTreeSet; + +use serde::{Deserialize, Serialize}; + +/// Union type for representing a single value or a list of values inside a filter. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ValueOrArray { + /// A single value. + Value(T), + /// A list of values. + Array(Vec), +} + +impl From for ValueOrArray { + fn from(value: T) -> Self { + Self::Value(value) + } +} + +impl From> for ValueOrArray { + fn from(array: Vec) -> Self { + Self::Array(array) + } +} + +/// FilterSet is a set of values that will be used to filter addresses and topics. +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct FilterSet(BTreeSet); + +impl From for FilterSet { + fn from(value: T) -> Self { + Self(BTreeSet::from([value])) + } +} + +impl From> for FilterSet { + fn from(value: Vec) -> Self { + Self(value.into_iter().collect()) + } +} + +impl From> for FilterSet { + fn from(value: ValueOrArray) -> Self { + match value { + ValueOrArray::Value(value) => value.into(), + ValueOrArray::Array(array) => array.into(), + } + } +} + +impl From>> for FilterSet { + fn from(src: ValueOrArray>) -> Self { + match src { + ValueOrArray::Value(None) => Self(BTreeSet::new()), + ValueOrArray::Value(Some(value)) => value.into(), + ValueOrArray::Array(array) => { + // If the array contains at least one `null` (i.e. None), as it's considered + // a "wildcard" value, the whole filter should be treated as matching everything, + // thus is empty. + if array.contains(&None) { + Self(BTreeSet::new()) + } else { + // Otherwise, we flatten the array, knowing there are no `None` values + array.into_iter().flatten().collect::>().into() + } + } + } + } +} + +impl FilterSet { + /// Returns whether the filter is empty. + pub fn is_empty(&self) -> bool { + self.0.is_empty() + } + + /// Returns a [`ValueOrArray`] inside an Option: + /// - If the filter is empty, it returns `None` + /// - If the filter has only 1 value, it returns the single value + /// - Otherwise it returns an array of values + pub fn to_value_or_array(&self) -> Option> { + let values_len = self.0.len(); + match values_len { + 0 => None, + 1 => Some(ValueOrArray::Value( + self.0.iter().next().cloned().expect("at least one item"), + )), + _ => Some(ValueOrArray::Array(self.0.iter().cloned().collect())), + } + } +} diff --git a/client/rpc-v2/types/src/index.rs b/client/rpc-v2/types/src/index.rs new file mode 100644 index 0000000000..1baa4b3f7e --- /dev/null +++ b/client/rpc-v2/types/src/index.rs @@ -0,0 +1,124 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use std::fmt; + +#[derive(Copy, Clone, PartialEq, Eq, Default, Hash)] +pub struct Index(usize); + +impl fmt::Debug for Index { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::LowerHex::fmt(&self.0, f) + } +} + +impl fmt::Display for Index { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::LowerHex::fmt(&self.0, f) + } +} + +impl From for usize { + fn from(idx: Index) -> Self { + idx.0 + } +} + +impl From for Index { + fn from(value: usize) -> Self { + Self(value) + } +} + +impl serde::Serialize for Index { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serializer.serialize_str(&format!("0x{:x}", self.0)) + } +} + +impl<'de> serde::Deserialize<'de> for Index { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + use serde::de; + + struct IndexVisitor; + + impl<'de> de::Visitor<'de> for IndexVisitor { + type Value = Index; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("hex-encoded or decimal index") + } + + fn visit_u64(self, value: u64) -> Result + where + E: de::Error, + { + Ok(Index(value as usize)) + } + + fn visit_str(self, value: &str) -> Result + where + E: de::Error, + { + if let Some(val) = value.strip_prefix("0x") { + usize::from_str_radix(val, 16) + .map(Index) + .map_err(de::Error::custom) + } else { + value.parse::().map(Index).map_err(de::Error::custom) + } + } + + fn visit_string(self, value: String) -> Result + where + E: de::Error, + { + self.visit_str(value.as_ref()) + } + } + + deserializer.deserialize_any(IndexVisitor) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn index_serialize() { + let indexes = vec![Index(10), Index(10), Index(u32::MAX as usize)]; + let serialized = serde_json::to_string(&indexes).unwrap(); + let expected = r#"["0xa","0xa","0xffffffff"]"#; + assert_eq!(serialized, expected); + } + + #[test] + fn index_deserialize() { + let s = r#"["0xa", "10", "0xffffffff"]"#; + let deserialized: Vec = serde_json::from_str(s).unwrap(); + let expected = vec![Index(10), Index(10), Index(u32::MAX as usize)]; + assert_eq!(deserialized, expected); + } +} diff --git a/client/rpc-v2/types/src/lib.rs b/client/rpc-v2/types/src/lib.rs new file mode 100644 index 0000000000..c3e2b36b4d --- /dev/null +++ b/client/rpc-v2/types/src/lib.rs @@ -0,0 +1,42 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! RPC types + +#![warn(unused_crate_dependencies)] + +pub mod access_list; +pub mod block; +pub mod block_id; +pub mod bytes; +pub mod fee; +pub mod filter; +pub mod index; +pub mod log; +pub mod proof; +pub mod pubsub; +pub mod state; +pub mod sync; +pub mod transaction; +pub mod txpool; + +pub use self::{ + access_list::*, block::*, block_id::*, bytes::Bytes, fee::*, filter::*, index::Index, log::Log, + proof::*, pubsub::*, state::*, sync::*, transaction::*, txpool::*, +}; +pub use ethereum_types::{Address, Bloom, H256, U128, U256, U64}; diff --git a/client/rpc-v2/types/src/log.rs b/client/rpc-v2/types/src/log.rs new file mode 100644 index 0000000000..e28b0e1ae2 --- /dev/null +++ b/client/rpc-v2/types/src/log.rs @@ -0,0 +1,52 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::{Address, H256, U256}; +use serde::{Deserialize, Serialize}; + +use crate::bytes::Bytes; + +/// Log represents a contract log event, which is emitted by a transaction. +/// These events are generated by the LOG opcode and stored/indexed by the node. +#[derive(Clone, Debug, Eq, PartialEq, Default, Hash, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Log { + // Consensus fields: + /// Address of the contract that generated the event. + pub address: Address, + /// List of topics provided by the contract. + pub topics: Vec, + /// Additional data fields of the log. + pub data: Bytes, + + // Derived fields: + /// Hash of block in which the transaction was included. + pub block_hash: Option, + /// Number of the block in which the transaction was included. + pub block_number: Option, + /// Transaction hash. + pub transaction_hash: Option, + /// Index of the transaction in the block. + pub transaction_index: Option, + /// Index of the log in the block. + pub log_index: Option, + + /// Whether this log was removed due to a chain reorganisation. + #[serde(default)] + pub removed: bool, +} diff --git a/client/rpc-v2/types/src/proof.rs b/client/rpc-v2/types/src/proof.rs new file mode 100644 index 0000000000..75a9839ba6 --- /dev/null +++ b/client/rpc-v2/types/src/proof.rs @@ -0,0 +1,58 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::{Address, H256, U256, U64}; +use serde::{Deserialize, Serialize}; + +use crate::bytes::Bytes; + +/// The response type of `eth_getProof`. +/// +/// See [EIP-1186](https://eips.ethereum.org/EIPS/eip-1186) for more details. +#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct AccountProof { + /// The address of the account. + pub address: Address, + /// Array of rlp-serialized MerkleTree-Nodes, starting with the stateRoot-Node, following the + /// path of the SHA3 (address) as key. + pub account_proof: Vec, + /// The balance of the account. + pub balance: U256, + /// Code hash of the account. + pub code_hash: H256, + /// The nonce of the account. + pub nonce: U64, + /// The hash of storage root. + pub storage_hash: H256, + /// Array of storage-entries as requested. + pub storage_proof: Vec, +} + +/// Data structure with proof for one single storage-entry +#[derive(Clone, Debug, Eq, PartialEq, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct StorageProof { + /// Storage key. + pub key: H256, + /// Storage value. + pub value: U256, + /// Array of rlp-serialized MerkleTree-Nodes, starting with the storageHash-Node, following the + /// path of the SHA3 (key) as path. + pub proof: Vec, +} diff --git a/client/rpc-v2/types/src/pubsub.rs b/client/rpc-v2/types/src/pubsub.rs new file mode 100644 index 0000000000..2a34f231ef --- /dev/null +++ b/client/rpc-v2/types/src/pubsub.rs @@ -0,0 +1,115 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::H256; +use serde::{de, Deserialize, Serialize}; + +use crate::{block::Header, filter::Filter, log::Log, transaction::Transaction}; + +/// Subscription kind. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub enum PubSubKind { + /// New block headers subscription. + NewHeads, + /// Logs subscription. + Logs, + /// New Pending Transactions subscription. + NewPendingTransactions, +} + +/// Any additional parameters for a subscription. +#[derive(Clone, Debug, Eq, PartialEq, Default)] +pub enum PubSubParams { + /// No parameters passed. + #[default] + None, + /// Log parameters. + Logs(Box), + /// Boolean parameter for new pending transactions. + Bool(bool), +} + +impl serde::Serialize for PubSubParams { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + Self::None => serializer.serialize_none(), + Self::Logs(logs) => logs.serialize(serializer), + Self::Bool(full) => full.serialize(serializer), + } + } +} + +impl<'de> serde::Deserialize<'de> for PubSubParams { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let v = serde_json::Value::deserialize(deserializer)?; + + if v.is_null() { + return Ok(Self::None); + } + + if let Some(val) = v.as_bool() { + return Ok(Self::Bool(val)); + } + + serde_json::from_value(v) + .map(|f| Self::Logs(Box::new(f))) + .map_err(|e| de::Error::custom(format!("Invalid Pub-Sub parameters: {e}"))) + } +} + +/// Subscription result. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PubSubResult { + /// New block header. + Header(Box
), + /// Log. + Log(Box), + /// Transaction hash. + TransactionHash(H256), + /// Transaction. + FullTransaction(Box), +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn pubsub_params_serde_impl() { + let cases = [ + ("null", PubSubParams::None), + ("true", PubSubParams::Bool(true)), + ("false", PubSubParams::Bool(false)), + ]; + for (raw, typed) in cases { + let deserialized = serde_json::from_str::(raw).unwrap(); + assert_eq!(deserialized, typed); + + let serialized = serde_json::to_string(&typed).unwrap(); + assert_eq!(serialized, raw); + } + } +} diff --git a/client/rpc-v2/types/src/state.rs b/client/rpc-v2/types/src/state.rs new file mode 100644 index 0000000000..530b0f4137 --- /dev/null +++ b/client/rpc-v2/types/src/state.rs @@ -0,0 +1,53 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use std::collections::HashMap; + +use ethereum_types::{Address, H256, U256, U64}; +use serde::{Deserialize, Serialize}; + +use crate::bytes::Bytes; + +pub type StateOverrides = HashMap; + +/// Indicates the overriding fields of account during the execution of a message call. +/// +/// Note, state and stateDiff can't be specified at the same time. +/// If state is set, message execution will only use the data in the given state. +/// Otherwise, if statDiff is set, all diff will be applied first and then execute the call message. +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default, rename_all = "camelCase")] +pub struct AccountOverride { + /// Fake balance to set for the account before executing the call. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub balance: Option, + /// Fake nonce to set for the account before executing the call. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub nonce: Option, + /// Fake EVM bytecode to inject into the account before executing the call. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub code: Option, + /// Fake key-value mapping to override all slots in the account storage before + /// executing the call. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub state: Option>, + /// Fake key-value mapping to override individual slots in the account storage before + /// executing the call. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub state_diff: Option>, +} diff --git a/client/rpc-v2/types/src/sync.rs b/client/rpc-v2/types/src/sync.rs new file mode 100644 index 0000000000..794a2e7c5c --- /dev/null +++ b/client/rpc-v2/types/src/sync.rs @@ -0,0 +1,108 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::U64; +use serde::{de, Deserialize, Serialize}; + +/// The syncing status of client. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub enum SyncingStatus { + /// Progress when syncing. + IsSyncing(SyncingProgress), + /// Not syncing. + NotSyncing, +} + +impl serde::Serialize for SyncingStatus { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + Self::IsSyncing(progress) => progress.serialize(serializer), + Self::NotSyncing => serializer.serialize_bool(false), + } + } +} + +impl<'de> serde::Deserialize<'de> for SyncingStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + #[derive(Deserialize)] + #[serde(untagged)] + enum Syncing { + IsSyncing(SyncingProgress), + NotSyncing(bool), + } + + match Syncing::deserialize(deserializer)? { + Syncing::IsSyncing(sync) => Ok(Self::IsSyncing(sync)), + Syncing::NotSyncing(false) => Ok(Self::NotSyncing), + Syncing::NotSyncing(true) => Err(de::Error::custom( + "eth_syncing should always return false if not syncing.", + )), + } + } +} + +/// The syncing progress. +#[derive(Copy, Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SyncingProgress { + /// Block number this node started to synchronize from. + pub starting_block: U64, + /// Block number this node is currently importing. + pub current_block: U64, + /// Block number of the highest block header this node has received from peers. + pub highest_block: U64, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn syncing_status_serde_impl() { + let valid_cases = [ + ( + r#"{"startingBlock":"0x64","currentBlock":"0xc8","highestBlock":"0x12c"}"#, + SyncingStatus::IsSyncing(SyncingProgress { + starting_block: 100.into(), + current_block: 200.into(), + highest_block: 300.into(), + }), + ), + ("false", SyncingStatus::NotSyncing), + ]; + for (raw, typed) in valid_cases { + let deserialized = serde_json::from_str::(raw).unwrap(); + assert_eq!(deserialized, typed); + + let serialized = serde_json::to_string(&typed).unwrap(); + assert_eq!(serialized, raw); + } + + let invalid_cases = ["true"]; + for raw in invalid_cases { + let status: Result = serde_json::from_str(raw); + assert!(status.is_err()); + } + } +} diff --git a/client/rpc-v2/types/src/transaction/mod.rs b/client/rpc-v2/types/src/transaction/mod.rs new file mode 100644 index 0000000000..0677c8d6a4 --- /dev/null +++ b/client/rpc-v2/types/src/transaction/mod.rs @@ -0,0 +1,133 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +mod receipt; +mod request; +mod signature; + +use ethereum_types::{Address, H256, U256, U64}; +use serde::{Deserialize, Serialize}; + +pub use self::{receipt::*, request::*, signature::*}; +use crate::{access_list::AccessList, bytes::Bytes}; + +/// [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) transaction type. +#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Default)] +#[repr(u8)] +pub enum TxType { + /// Legacy transaction + #[default] + Legacy = 0u8, + /// [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) transaction + EIP2930 = 1u8, + /// [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) transaction + EIP1559 = 2u8, +} + +impl TryFrom for TxType { + type Error = &'static str; + + fn try_from(value: u8) -> Result { + match value { + 0u8 => Ok(Self::Legacy), + 1u8 => Ok(Self::EIP2930), + 2u8 => Ok(Self::EIP1559), + _ => Err("Unsupported transaction type"), + } + } +} + +impl serde::Serialize for TxType { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + Self::Legacy => serializer.serialize_str("0x0"), + Self::EIP2930 => serializer.serialize_str("0x1"), + Self::EIP1559 => serializer.serialize_str("0x2"), + } + } +} + +impl<'de> serde::Deserialize<'de> for TxType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = String::deserialize(deserializer)?; + match s.as_str() { + "0x0" => Ok(Self::Legacy), + "0x1" => Ok(Self::EIP2930), + "0x2" => Ok(Self::EIP1559), + _ => Err(serde::de::Error::custom("Unsupported transaction type")), + } + } +} + +#[derive(Clone, Debug, Eq, PartialEq, Default, Serialize, Deserialize)] +pub struct Transaction { + /// [EIP-2718](https://eips.ethereum.org/EIPS/eip-27 gg ) transaction type + #[serde(rename = "type")] + pub tx_type: TxType, + + /// Transaction hash + pub hash: H256, + /// Nonce + pub nonce: U64, + /// Block hash + #[serde(default, skip_serializing_if = "Option::is_none")] + pub block_hash: Option, + /// Block number + #[serde(default, skip_serializing_if = "Option::is_none")] + pub block_number: Option, + /// Transaction index + #[serde(default, skip_serializing_if = "Option::is_none")] + pub transaction_index: Option, + /// Sender + pub from: Address, + /// Recipient + pub to: Option
, + /// Transferred value + pub value: U256, + /// Input data + pub input: Bytes, + + /// Gas limit + pub gas: U64, + /// Gas price + #[serde(default, skip_serializing_if = "Option::is_none")] + pub gas_price: Option, + /// Max BaseFeePerGas the user is willing to pay + #[serde(default, skip_serializing_if = "Option::is_none")] + pub max_fee_per_gas: Option, + /// The miner's tip + #[serde(default, skip_serializing_if = "Option::is_none")] + pub max_priority_fee_per_gas: Option, + + /// Chain ID that this transaction is valid on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub chain_id: Option, + /// All _flattened_ fields of the transaction signature + #[serde(flatten)] + pub signature: TransactionSignature, + + /// EIP-2930 access list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub access_list: Option, +} diff --git a/client/rpc-v2/types/src/transaction/receipt.rs b/client/rpc-v2/types/src/transaction/receipt.rs new file mode 100644 index 0000000000..bdbd7771bb --- /dev/null +++ b/client/rpc-v2/types/src/transaction/receipt.rs @@ -0,0 +1,67 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::{Address, Bloom, H256, U256, U64}; +use serde::{Deserialize, Serialize}; + +use crate::{log::Log, transaction::TxType}; + +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct TransactionReceipt { + /// Hash of the block this transaction was included within. + pub block_hash: Option, + /// Number of the block this transaction was included within. + pub block_number: Option, + + /// Transaction hash. + pub transaction_hash: H256, + /// Transaction index within the block. + pub transaction_index: U64, + #[serde(rename = "type")] + pub tx_type: TxType, + /// Gas used by this transaction. + pub gas_used: U64, + + /// Address of the sender + pub from: Address, + /// Address of the receiver, or None when it's a contract creation transaction. + pub to: Option
, + /// Contract address created, or None if not a deployment. + pub contract_address: Option
, + + /// The price paid post-execution by the transaction. + /// Pre-eip1559 : gas price. + /// Post-eip1559: base fee + priority fee. + pub effective_gas_price: U256, + + /// Transaction execution status. + pub status: U64, + + /// Cumulative gas used. + pub cumulative_gas_used: U64, + + /// Log send from contracts. + pub logs: Vec, + /// [`Log`]'s bloom filter + pub logs_bloom: Bloom, + + /// The post-transaction state root (pre Byzantium). + #[serde(rename = "root", skip_serializing_if = "Option::is_none")] + pub state_root: Option, +} diff --git a/client/rpc-v2/types/src/transaction/request.rs b/client/rpc-v2/types/src/transaction/request.rs new file mode 100644 index 0000000000..e79d275608 --- /dev/null +++ b/client/rpc-v2/types/src/transaction/request.rs @@ -0,0 +1,306 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::{Address, U128, U256, U64}; +use serde::{ + de, + ser::{self, SerializeStruct}, + Deserialize, Serialize, +}; + +use crate::{access_list::AccessList, bytes::Bytes, transaction::TxType}; + +/// Transaction request from the RPC. +#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct TransactionRequest { + /// [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) transaction type + #[serde(default, rename = "type", skip_serializing_if = "Option::is_none")] + pub tx_type: Option, + + /// Sender + #[serde(default, skip_serializing_if = "Option::is_none")] + pub from: Option
, + /// Recipient + #[serde(default, skip_serializing_if = "Option::is_none")] + pub to: Option
, + + /// Value of transaction in wei + #[serde(default, skip_serializing_if = "Option::is_none")] + pub value: Option, + /// Transaction's nonce + #[serde(default, skip_serializing_if = "Option::is_none")] + pub nonce: Option, + + /// Gas limit + #[serde(default, skip_serializing_if = "Option::is_none")] + pub gas: Option, + /// The gas price willing to be paid by the sender in wei + #[serde(default, skip_serializing_if = "Option::is_none")] + pub gas_price: Option, + /// The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei + #[serde(default, skip_serializing_if = "Option::is_none")] + pub max_fee_per_gas: Option, + /// Maximum fee per gas the sender is willing to pay to miners in wei + #[serde(default, skip_serializing_if = "Option::is_none")] + pub max_priority_fee_per_gas: Option, + + /// Additional data + #[serde(default, flatten)] + pub input: TransactionInput, + + /// Chain ID that this transaction is valid on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub chain_id: Option, + + /// EIP-2930 access list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub access_list: Option, +} + +impl TransactionRequest { + /// Sets the transactions type for the transactions. + #[inline] + pub const fn tx_type(mut self, tx_type: TxType) -> Self { + self.tx_type = Some(tx_type); + self + } + + /// Sets the `from` field in the call to the provided address + #[inline] + pub const fn from(mut self, from: Address) -> Self { + self.from = Some(from); + self + } + + /// Sets the recipient address for the transaction. + #[inline] + pub const fn to(mut self, to: Address) -> Self { + self.to = Some(to); + self + } + + /// Sets the nonce for the transaction. + #[inline] + pub const fn nonce(mut self, nonce: U64) -> Self { + self.nonce = Some(nonce); + self + } + + /// Sets the value (amount) for the transaction. + #[inline] + pub const fn value(mut self, value: U256) -> Self { + self.value = Some(value); + self + } + + /// Sets the gas limit for the transaction. + #[inline] + pub const fn gas_limit(mut self, gas_limit: U128) -> Self { + self.gas = Some(gas_limit); + self + } + + /// Sets the maximum fee per gas for the transaction. + #[inline] + pub const fn max_fee_per_gas(mut self, max_fee_per_gas: U128) -> Self { + self.max_fee_per_gas = Some(max_fee_per_gas); + self + } + + /// Sets the maximum priority fee per gas for the transaction. + #[inline] + pub const fn max_priority_fee_per_gas(mut self, max_priority_fee_per_gas: U128) -> Self { + self.max_priority_fee_per_gas = Some(max_priority_fee_per_gas); + self + } + + /// Sets the input data for the transaction. + pub fn input(mut self, input: TransactionInput) -> Self { + self.input = input; + self + } + + /// Sets the access list for the transaction. + pub fn access_list(mut self, access_list: AccessList) -> Self { + self.access_list = Some(access_list); + self + } + + /// Returns the configured fee cap, if any. + /// + /// The returns `gas_price` (legacy) if set or `max_fee_per_gas` (EIP1559) + #[inline] + pub fn fee_cap(&self) -> Option { + self.gas_price.or(self.max_fee_per_gas) + } +} + +/// Additional data of the transaction. +/// +/// We accept (older) "data" and (newer) "input" for backwards-compatibility reasons. +/// If both fields are set, it is expected that they contain the same value, otherwise an error is returned. +#[derive(Clone, Debug, Default, Eq, PartialEq)] +pub struct TransactionInput { + /// Transaction data + pub input: Option, + /// Transaction data + /// + /// This is the same as `input` but is used for backwards compatibility: + pub data: Option, +} + +impl TransactionInput { + /// Return the additional data of the transaction. + pub fn into_bytes(self) -> Option { + match (self.input, self.data) { + (Some(input), _) => Some(input), + (None, Some(data)) => Some(data), + (None, None) => None, + } + } +} + +impl serde::Serialize for TransactionInput { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match (&self.input, &self.data) { + (Some(input), Some(data)) => { + if input == data { + let mut s = + serde::Serializer::serialize_struct(serializer, "TransactionInput", 2)?; + s.serialize_field("input", input)?; + s.serialize_field("data", data)?; + s.end() + } else { + Err(ser::Error::custom("Ambiguous value for `input` and `data`")) + } + } + (Some(input), None) => { + let mut s = serde::Serializer::serialize_struct(serializer, "TransactionInput", 1)?; + s.serialize_field("input", input)?; + s.skip_field("data")?; + s.end() + } + (None, Some(data)) => { + let mut s = serde::Serializer::serialize_struct(serializer, "TransactionInput", 1)?; + s.skip_field("input")?; + s.serialize_field("data", data)?; + s.end() + } + (None, None) => { + let mut s = serde::Serializer::serialize_struct(serializer, "TransactionInput", 0)?; + s.skip_field("input")?; + s.skip_field("data")?; + s.end() + } + } + } +} + +impl<'de> serde::Deserialize<'de> for TransactionInput { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + #[derive(Deserialize)] + struct InputOrData { + input: Option, + data: Option, + } + + let InputOrData { input, data } = InputOrData::deserialize(deserializer)?; + + match (input, data) { + (Some(input), Some(data)) => { + if input == data { + Ok(Self { + input: Some(input), + data: Some(data), + }) + } else { + Err(de::Error::custom("Ambiguous value for `input` and `data`")) + } + } + (input, data) => Ok(Self { input, data }), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn transaction_input_serde_impl() { + let valid_cases = [ + ( + r#"{"input":"0x12","data":"0x12"}"#, + TransactionInput { + input: Some(Bytes(vec![0x12])), + data: Some(Bytes(vec![0x12])), + }, + ), + ( + r#"{"input":"0x12"}"#, + TransactionInput { + input: Some(Bytes(vec![0x12])), + data: None, + }, + ), + ( + r#"{"data":"0x12"}"#, + TransactionInput { + input: None, + data: Some(Bytes(vec![0x12])), + }, + ), + ( + r#"{}"#, + TransactionInput { + input: None, + data: None, + }, + ), + ]; + for (raw, typed) in valid_cases { + let deserialized = serde_json::from_str::(raw).unwrap(); + assert_eq!(deserialized, typed); + + let serialized = serde_json::to_string(&typed).unwrap(); + assert_eq!(serialized, raw); + } + + let invalid_serialization_cases = [TransactionInput { + input: Some(Bytes(vec![0x12])), + data: Some(Bytes(vec![0x23])), + }]; + for typed in invalid_serialization_cases { + let serialized: Result = serde_json::to_string(&typed); + assert!(serialized.is_err()); + } + + let invalid_deserialization_cases = [r#"{"input":"0x12","data":"0x23"}"#]; + for raw in invalid_deserialization_cases { + let input: Result = serde_json::from_str(raw); + assert!(input.is_err()); + } + } +} diff --git a/client/rpc-v2/types/src/transaction/signature.rs b/client/rpc-v2/types/src/transaction/signature.rs new file mode 100644 index 0000000000..bd4f0d1203 --- /dev/null +++ b/client/rpc-v2/types/src/transaction/signature.rs @@ -0,0 +1,152 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use ethereum_types::U256; +use serde::{Deserialize, Serialize}; + +/// Transaction signature. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct TransactionSignature { + /// The R field of the signature + pub r: U256, + /// The S field of the signature + pub s: U256, + + /// The standardised V field of the signature. + /// + /// - For legacy transactions, this is the recovery id. + /// - For typed transactions (EIP-2930, EIP-1559, EIP-4844), this is set to the parity + /// (0 for even, 1 for odd) of the y-value of the secp256k1 signature. + /// + /// # Note + /// + /// For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. + /// This field is DEPRECATED and all use of it should migrate to `yParity`. + pub v: U256, + /// The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. + /// + /// This is only used for typed (non-legacy) transactions. + #[serde(skip_serializing_if = "Option::is_none")] + pub y_parity: Option, +} + +/// Type that represents the parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature. +/// +/// This will be serialized as "0x0" if false, and "0x1" if true. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +pub struct Parity(pub bool); + +impl serde::Serialize for Parity { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serializer.serialize_str(if self.0 { "0x1" } else { "0x0" }) + } +} + +impl<'de> serde::Deserialize<'de> for Parity { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = String::deserialize(deserializer)?; + match s.as_str() { + "0x0" => Ok(Self(false)), + "0x1" => Ok(Self(true)), + _ => Err(serde::de::Error::custom(format!( + "invalid parity value, parity should be either \"0x0\" or \"0x1\": {s}", + ))), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parity_serde_impl() { + let valid_cases = [(r#""0x1""#, Parity(true)), (r#""0x0""#, Parity(false))]; + for (raw, typed) in valid_cases { + let deserialized = serde_json::from_str::(raw).unwrap(); + assert_eq!(deserialized, typed); + + let serialized = serde_json::to_string(&typed).unwrap(); + assert_eq!(serialized, raw); + } + + let invalid_cases = [r#""0x2""#, r#""0x""#, r#""0""#, r#""1""#]; + for raw in invalid_cases { + let parity: Result = serde_json::from_str(raw); + assert!(parity.is_err()); + } + } + + #[test] + fn signature_serde_impl() { + let cases = [ + // without parity + ( + r#"{ + "r":"0xab3743210536a011365f73bc6e25668177203562aa53741086f56d1ef3e101c0", + "s":"0x479de4b30541dd1d3b73d5b9d8393d48d91d64ca3ff71f64bd7adaac2657a8e5", + "v":"0x1546d71" + }"#, + TransactionSignature { + r: "0xab3743210536a011365f73bc6e25668177203562aa53741086f56d1ef3e101c0" + .parse() + .unwrap(), + s: "0x479de4b30541dd1d3b73d5b9d8393d48d91d64ca3ff71f64bd7adaac2657a8e5" + .parse() + .unwrap(), + v: "0x1546d71".parse().unwrap(), + y_parity: None, + }, + ), + // with parity + ( + r#"{ + "r":"0x39614515ff2794c0e005b33dd05e2cdce7857ae7ee47e9b6aa739c314c760f5", + "s":"0x32670b1a7dbf2700e5fb65eb8e24c87ba18694a11fae98e5cf731f10f27f1f72", + "v":"0x1", + "yParity":"0x1" + }"#, + TransactionSignature { + r: "0x39614515ff2794c0e005b33dd05e2cdce7857ae7ee47e9b6aa739c314c760f5" + .parse() + .unwrap(), + s: "0x32670b1a7dbf2700e5fb65eb8e24c87ba18694a11fae98e5cf731f10f27f1f72" + .parse() + .unwrap(), + v: "0x1".parse().unwrap(), + y_parity: Some(Parity(true)), + }, + ), + ]; + + for (raw, typed) in cases { + let deserialized = serde_json::from_str::(raw).unwrap(); + assert_eq!(deserialized, typed); + + let serialized = serde_json::to_string(&typed).unwrap(); + assert_eq!(serialized, raw.split_whitespace().collect::()); + } + } +} diff --git a/client/rpc-v2/types/src/txpool.rs b/client/rpc-v2/types/src/txpool.rs new file mode 100644 index 0000000000..d874c08480 --- /dev/null +++ b/client/rpc-v2/types/src/txpool.rs @@ -0,0 +1,198 @@ +// This file is part of Frontier. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use std::{collections::BTreeMap, fmt}; + +use ethereum_types::{Address, U256, U64}; +use serde::{de, Deserialize, Serialize}; + +use crate::transaction::Transaction; + +pub type TxpoolInspect = TxpoolResult>>; +pub type TxpoolContent = TxpoolResult>>; +pub type TxpoolContentFrom = TxpoolResult>; +pub type TxpoolStatus = TxpoolResult; + +pub type NonceMapping = BTreeMap; +pub type AddressMapping = BTreeMap; + +/// The txpool result type. +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +pub struct TxpoolResult { + /// Pending transactions. + pub pending: T, + /// Queued transactions. + pub queued: T, +} + +/// The textual summary of all the transactions currently pending for inclusion in the next block(s). +#[derive(Clone, Debug, Eq, PartialEq)] +pub struct Summary { + /// Recipient. + pub to: Option
, + /// Transferred value. + pub value: U256, + /// Gas limit. + pub gas: u128, + /// Gas price. + pub gas_price: u128, +} + +impl serde::Serialize for Summary { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + let formatted_to = if let Some(to) = self.to { + format!("{to:?}") + } else { + "contract creation".to_string() + }; + let formatted = format!( + "{}: {} wei + {} gas × {} wei", + formatted_to, self.value, self.gas, self.gas_price + ); + serializer.serialize_str(&formatted) + } +} + +impl<'de> serde::Deserialize<'de> for Summary { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + struct SummaryVisitor; + impl<'de> de::Visitor<'de> for SummaryVisitor { + type Value = Summary; + + fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + formatter.write_str("{{to}}: {{value}} wei + {{gas}} gas × {{gas_price}} wei") + } + + fn visit_str(self, v: &str) -> Result + where + E: de::Error, + { + let addr_split: Vec<&str> = v.split(": ").collect(); + if addr_split.len() != 2 { + return Err(de::Error::custom("invalid `to` format")); + } + + let value_split: Vec<&str> = addr_split[1].split(" wei + ").collect(); + if value_split.len() != 2 { + return Err(de::Error::custom("invalid `value` format")); + } + + let gas_split: Vec<&str> = value_split[1].split(" gas × ").collect(); + if gas_split.len() != 2 { + return Err(de::Error::custom("invalid `gas` format")); + } + + let gas_price_split: Vec<&str> = gas_split[1].split(" wei").collect(); + if gas_price_split.len() != 2 { + return Err(de::Error::custom("invalid `gas_price` format")); + } + + let to = match addr_split[0] { + "contract creation" => None, + addr => { + let addr = addr + .trim_start_matches("0x") + .parse::
() + .map_err(de::Error::custom)?; + Some(addr) + } + }; + let value = U256::from_dec_str(value_split[0]).map_err(de::Error::custom)?; + let gas = gas_split[0].parse::().map_err(de::Error::custom)?; + let gas_price = gas_price_split[0] + .parse::() + .map_err(de::Error::custom)?; + + Ok(Summary { + to, + value, + gas, + gas_price, + }) + } + + fn visit_string(self, v: String) -> Result + where + E: de::Error, + { + self.visit_str(&v) + } + } + + deserializer.deserialize_str(SummaryVisitor) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn inspect_summary_serde_impl() { + let valid_cases = [ + ( + r#""contract creation: 2472666000 wei + 21000 gas × 1000 wei""#, + Summary { + to: None, + value: U256::from(2472666000u64), + gas: 21000, + gas_price: 1000, + }, + ), + ( + r#""0x1111111111111111111111111111111111111111: 2472666000 wei + 21000 gas × 1000 wei""#, + Summary { + to: Some( + "0x1111111111111111111111111111111111111111" + .parse::
() + .unwrap(), + ), + value: U256::from(2472666000u64), + gas: 21000, + gas_price: 1000, + }, + ), + ]; + for (raw, typed) in valid_cases { + let deserialized = serde_json::from_str::(raw).unwrap(); + assert_eq!(deserialized, typed); + + let serialized = serde_json::to_string(&typed).unwrap(); + assert_eq!(serialized, raw); + } + + let invalid_cases = [ + r#"": ""#, + r#"" : 2472666000 wei + 21000 gas × 1000 wei""#, + r#""0x: 2472666000 wei + 21000 gas × 1000 wei""#, + r#""0x1111111111111111111111111111111111111111: 2472666000 wei""#, + r#""0x1111111111111111111111111111111111111111: 2472666000 wei + 21000 gas × ""#, + r#""0x1111111111111111111111111111111111111111: 2472666000 wei + 21000 gas × 1000""#, + ]; + for raw in invalid_cases { + let summary: Result = serde_json::from_str(raw); + assert!(summary.is_err()); + } + } +} diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index 70898bd3b7..4db1948c5e 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -23,7 +23,7 @@ prometheus = { version = "0.13.4", default-features = false } rand = "0.8" rlp = { workspace = true } scale-codec = { package = "parity-scale-codec", workspace = true } -schnellru = "0.2.1" +schnellru = "0.2.3" serde = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["sync"] } diff --git a/client/rpc/src/eth/pending.rs b/client/rpc/src/eth/pending.rs index ea208ecf12..f03522c9a3 100644 --- a/client/rpc/src/eth/pending.rs +++ b/client/rpc/src/eth/pending.rs @@ -37,6 +37,7 @@ use sp_runtime::{ use sp_timestamp::TimestampInherentData; use crate::eth::Eth; +use fp_rpc::EthereumRuntimeRPCApi; const LOG_TARGET: &str = "eth-pending"; @@ -60,6 +61,7 @@ where B: BlockT, C: ProvideRuntimeApi, C::Api: BlockBuilderApi, + C::Api: EthereumRuntimeRPCApi, C: HeaderBackend + StorageProvider + 'static, BE: Backend, A: ChainApi, @@ -99,7 +101,12 @@ where ); // Initialize the pending block header - api.initialize_block(best_hash, &pending_header)?; + if api + .initialize_pending_block(best_hash, &pending_header) + .is_err() + { + api.initialize_block(best_hash, &pending_header)?; + } // Apply inherents to the pending block. let inherents = api.execute_in_transaction(move |api| { diff --git a/frame/base-fee/src/lib.rs b/frame/base-fee/src/lib.rs index ad1dda2620..5fde505735 100644 --- a/frame/base-fee/src/lib.rs +++ b/frame/base-fee/src/lib.rs @@ -15,6 +15,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +//! # BaseFee pallet +//! +//! The BaseFee pallet is responsible for managing the `BaseFeePerGas` value. +//! This pallet can dynamically adjust the `BaseFeePerGas` by utilizing `Elasticity`. + #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::comparison_chain)] #![warn(unused_crate_dependencies)] diff --git a/frame/evm/Cargo.toml b/frame/evm/Cargo.toml index 825f95ad44..a5ee70e2b0 100644 --- a/frame/evm/Cargo.toml +++ b/frame/evm/Cargo.toml @@ -15,11 +15,9 @@ targets = ["x86_64-unknown-linux-gnu"] environmental = { workspace = true, optional = true } evm = { workspace = true, features = ["with-codec"] } hash-db = { workspace = true } -hex = { workspace = true, optional = true } hex-literal = { workspace = true } impl-trait-for-tuples = "0.2.2" log = { workspace = true } -rlp = { workspace = true, optional = true } scale-codec = { package = "parity-scale-codec", workspace = true } scale-info = { workspace = true } # Substrate @@ -46,9 +44,8 @@ std = [ "environmental?/std", "evm/std", "evm/with-serde", - "hex?/std", + "hex/std", "log/std", - "rlp?/std", "scale-codec/std", "scale-info/std", # Substrate @@ -63,8 +60,6 @@ std = [ "fp-evm/std", ] runtime-benchmarks = [ - "hex", - "rlp", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", diff --git a/frame/evm/precompile/dispatch/src/mock.rs b/frame/evm/precompile/dispatch/src/mock.rs index 079a13af0b..d2fce9dc8d 100644 --- a/frame/evm/precompile/dispatch/src/mock.rs +++ b/frame/evm/precompile/dispatch/src/mock.rs @@ -17,7 +17,6 @@ //! Test mock for unit tests and benchmarking -use alloc::boxed::Box; use core::str::FromStr; use frame_support::{ derive_impl, parameter_types, diff --git a/frame/evm/precompile/modexp/Cargo.toml b/frame/evm/precompile/modexp/Cargo.toml index 32748345f1..7a0e48ff31 100644 --- a/frame/evm/precompile/modexp/Cargo.toml +++ b/frame/evm/precompile/modexp/Cargo.toml @@ -8,7 +8,7 @@ edition = { workspace = true } repository = { workspace = true } [dependencies] -num = { version = "0.4.2", default-features = false, features = ["alloc"] } +num = { version = "0.4.3", default-features = false, features = ["alloc"] } # Frontier fp-evm = { workspace = true } diff --git a/frame/evm/src/benchmarking.rs b/frame/evm/src/benchmarking.rs index 3cd4f4d672..a5e282dc6f 100644 --- a/frame/evm/src/benchmarking.rs +++ b/frame/evm/src/benchmarking.rs @@ -23,116 +23,6 @@ use frame_benchmarking::benchmarks; type CurrencyOf = ::Currency; benchmarks! { - - runner_execute { - // This benchmark tests the relationship between gas and weight. It deploys a contract which - // has an infinite loop in a public function. We then call this function with varying amounts - // of gas, expecting it to OOG. The benchmarking framework measures the amount of time (aka - // weight) it takes before OOGing and relates that to the amount of gas provided, leaving us - // with an estimate for gas-to-weight mapping. - - let x in 1..10000000; - - use rlp::RlpStream; - use sp_core::{H160, U256}; - use alloc::vec; - - // contract bytecode below is for: - // - // pragma solidity >=0.8.0; - // - // contract InfiniteContractVar { - // uint public count; - - // constructor() public { - // count = 0; - // } - - // function infinite() public { - // while (true) { - // count=count+1; - // } - // } - // } - - let contract_bytecode = hex::decode(concat!( - "608060405234801561001057600080fd5b506000808190555061017c806100276000396000f3fe60", - "8060405234801561001057600080fd5b50600436106100365760003560e01c806306661abd146100", - "3b5780635bec9e6714610059575b600080fd5b610043610063565b604051610050919061009c565b", - "60405180910390f35b610061610069565b005b60005481565b5b60011561008b5760016000546100", - "8091906100b7565b60008190555061006a565b565b6100968161010d565b82525050565b60006020", - "820190506100b1600083018461008d565b92915050565b60006100c28261010d565b91506100cd83", - "61010d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "ff0382111561010257610101610117565b5b828201905092915050565b6000819050919050565b7f", - "4e487b71000000000000000000000000000000000000000000000000000000006000526011600452", - "60246000fdfea2646970667358221220bcab0385167dbed28dee34f1c5b30ecfcd67915495f0a32d", - "2eeada8e094193a364736f6c63430008030033")) - .expect("Bad hex string"); - - let caller = "1000000000000000000000000000000000000001".parse::().unwrap(); - - let mut nonce: u64 = 1; - let nonce_as_u256: U256 = nonce.into(); - - let value = U256::default(); - let gas_limit_create: u64 = 1000000; - let is_transactional = true; - let validate = true; - let create_runner_results = T::Runner::create( - caller, - contract_bytecode, - value, - gas_limit_create, - Some(U256::from(1_000_000_000)), - Some(U256::from(1_000_000_000)), - Some(nonce_as_u256), - Vec::new(), - is_transactional, - validate, - None, - None, - T::config(), - ); - assert!(create_runner_results.is_ok(), "create() failed"); - - // derive the resulting contract address from our create - let mut rlp = RlpStream::new_list(2); - rlp.append(&caller); - rlp.append(&0u8); - let contract_address = H160::from_slice(&sp_io::hashing::keccak_256(&rlp.out())[12..]); - - // derive encoded contract call -- in this case, just the function selector - let mut encoded_call = vec![0u8; 4]; - encoded_call[0..4].copy_from_slice(&sp_io::hashing::keccak_256(b"infinite()")[0..4]); - - let gas_limit_call = gas_limit_create; - - }: { - - nonce += 1; - let nonce_as_u256: U256 = nonce.into(); - - let is_transactional = true; - let validate = true; - let call_runner_results = T::Runner::call( - caller, - contract_address, - encoded_call, - value, - gas_limit_call, - Some(U256::from(1_000_000_000)), - Some(U256::from(1_000_000_000)), - Some(nonce_as_u256), - Vec::new(), - is_transactional, - validate, - None, - None, - T::config(), - ); - assert!(call_runner_results.is_ok(), "call() failed"); - } - withdraw { let caller = frame_benchmarking::whitelisted_caller::(); let from = H160::from_low_u64_le(0); diff --git a/frame/evm/src/mock.rs b/frame/evm/src/mock.rs index d75bee8839..ab98820f11 100644 --- a/frame/evm/src/mock.rs +++ b/frame/evm/src/mock.rs @@ -17,7 +17,6 @@ //! Test mock for unit tests and benchmarking -use alloc::boxed::Box; use core::str::FromStr; use frame_support::{ derive_impl, parameter_types, diff --git a/frame/evm/src/weights.rs b/frame/evm/src/weights.rs index 9c8d711a3f..034c179bfd 100644 --- a/frame/evm/src/weights.rs +++ b/frame/evm/src/weights.rs @@ -17,11 +17,11 @@ //! Autogenerated weights for pallet_evm //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `archlinux`, CPU: `AMD Ryzen 9 5900X 12-Core Processor` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `ubuntu`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/frontier-template-node @@ -31,12 +31,12 @@ // --steps=50 // --repeat=20 // --pallet=pallet_evm -// --extrinsic=withdraw +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --output=weights.rs +// --output=./frame/evm/src/weights.rs // --header=HEADER-APACHE2 -// --template=./.scripts/frame-weight-template.hbs +// --template=./scripts/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,8 +58,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 1_564_000 picoseconds. + Weight::from_parts(1_696_000, 0) } } @@ -69,7 +69,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + // Minimum execution time: 1_564_000 picoseconds. + Weight::from_parts(1_696_000, 0) } } diff --git a/primitives/account/Cargo.toml b/primitives/account/Cargo.toml index 80186587f1..cff2294b91 100644 --- a/primitives/account/Cargo.toml +++ b/primitives/account/Cargo.toml @@ -22,6 +22,9 @@ sp-io = { workspace = true } sp-runtime = { workspace = true } sp-runtime-interface = { workspace = true } +# Polkadot / XCM +xcm = { workspace = true } + [dev-dependencies] [features] @@ -39,6 +42,7 @@ std = [ "sp-io/std", "sp-runtime/std", "sp-runtime-interface/std", + "xcm/std", ] serde = [ "dep:serde", diff --git a/primitives/account/src/lib.rs b/primitives/account/src/lib.rs index 97e9c47fd3..b1f1588dcb 100644 --- a/primitives/account/src/lib.rs +++ b/primitives/account/src/lib.rs @@ -31,6 +31,9 @@ use sp_io::hashing::keccak_256; use sp_runtime::MultiSignature; use sp_runtime_interface::pass_by::PassByInner; +// Polkadot / XCM +use xcm::latest::{Junction, Location}; + /// A fully Ethereum-compatible `AccountId`. /// Conforms to H160 address and ECDSA key standards. /// Alternative to H256->H160 mapping. @@ -171,6 +174,16 @@ impl From for AccountId20 { } } +impl From for Location { + fn from(id: AccountId20) -> Self { + Junction::AccountKey20 { + network: None, + key: id.into(), + } + .into() + } +} + #[derive(Clone, Eq, PartialEq)] #[derive(RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] diff --git a/primitives/rpc/src/lib.rs b/primitives/rpc/src/lib.rs index 51c9c50a15..9c3d623c94 100644 --- a/primitives/rpc/src/lib.rs +++ b/primitives/rpc/src/lib.rs @@ -256,6 +256,12 @@ sp_api::decl_runtime_apis! { fn pending_block( xts: Vec<::Extrinsic>, ) -> (Option, Option>); + /// Initialize the pending block. + /// The behavior should be the same as the runtime api Core_initialize_block but + /// for a "pending" block. + /// If your project don't need to have a different behavior to initialize "pending" blocks, + /// you can copy your Core_initialize_block implementation. + fn initialize_pending_block(header: &::Header); } #[api_version(2)] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index cf934f2541..79def24465 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,8 +1,8 @@ [toolchain] # Stable -#channel = "1.75.0" # rustc 1.75.0 (82e1608df 2023-12-21) +channel = "1.77.0" # rustc 1.77.0 (aedd173a2 2024-03-21) # Nightly -channel = "nightly-2024-01-22" # rustc 1.77.0-nightly (ef71f1047 2024-01-21) +#channel = "nightly-2024-02-05" # rustc 1.78.0-nightly (f067fd608 2024-02-05) components = ["cargo", "clippy", "rustc", "rustfmt", "rust-src", "rust-docs"] profile = "minimal" -targets = ["wasm32-unknown-unknown"] +targets = ["wasm32-unknown-unknown"] \ No newline at end of file diff --git a/template/node/Cargo.toml b/template/node/Cargo.toml index ec0bd7bc87..70016bf93c 100644 --- a/template/node/Cargo.toml +++ b/template/node/Cargo.toml @@ -49,6 +49,7 @@ sp-consensus-aura = { workspace = true, features = ["default"] } sp-consensus-grandpa = { workspace = true, features = ["default"] } sp-core = { workspace = true, features = ["default"] } sp-inherents = { workspace = true, features = ["default"] } +sp-io = { workspace = true, features = ["default"] } sp-offchain = { workspace = true, features = ["default"] } sp-runtime = { workspace = true, features = ["default"] } sp-session = { workspace = true, features = ["default"] } diff --git a/template/node/src/benchmarking.rs b/template/node/src/benchmarking.rs index 19bc896d53..2dafe1247b 100644 --- a/template/node/src/benchmarking.rs +++ b/template/node/src/benchmarking.rs @@ -14,7 +14,7 @@ use sp_runtime::{generic::Era, OpaqueExtrinsic, SaturatedConversion}; use fp_account::AccountId20; use frontier_template_runtime::{self as runtime, AccountId, Balance, BalancesCall, SystemCall}; -use crate::client::Client; +use crate::service::Client; /// Generates extrinsics for the `benchmark overhead` command. /// diff --git a/template/node/src/chain_spec.rs b/template/node/src/chain_spec.rs index d49f61dc9a..614161fa35 100644 --- a/template/node/src/chain_spec.rs +++ b/template/node/src/chain_spec.rs @@ -10,15 +10,13 @@ use sp_core::ecdsa; use sp_core::{Pair, Public, H160, U256}; use sp_runtime::traits::{IdentifyAccount, Verify}; // Frontier -use frontier_template_runtime::{ - AccountId, Balance, RuntimeGenesisConfig, SS58Prefix, Signature, WASM_BINARY, -}; +use frontier_template_runtime::{AccountId, Balance, SS58Prefix, Signature, WASM_BINARY}; // The URL for the telemetry server. // const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; /// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = sc_service::GenericChainSpec; +pub type ChainSpec = sc_service::GenericChainSpec; /// Generate a crypto pair from seed. pub fn get_from_seed(seed: &str) -> ::Public { diff --git a/template/node/src/client.rs b/template/node/src/client.rs index e4c9ee54a1..ef9b2282ef 100644 --- a/template/node/src/client.rs +++ b/template/node/src/client.rs @@ -1,41 +1,17 @@ +use scale_codec::Codec; // Substrate -use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch, NativeVersion}; -use sp_consensus_aura::sr25519::AuthorityId as AuraId; -// Local -use frontier_template_runtime::{opaque::Block, AccountId, Balance, Nonce}; +use sc_executor::WasmExecutor; +use sp_runtime::traits::{Block as BlockT, MaybeDisplay}; use crate::eth::EthCompatRuntimeApiCollection; /// Full backend. -pub type FullBackend = sc_service::TFullBackend; +pub type FullBackend = sc_service::TFullBackend; /// Full client. -pub type FullClient = - sc_service::TFullClient>; +pub type FullClient = sc_service::TFullClient>; -pub type Client = FullClient; - -/// Only enable the benchmarking host functions when we actually want to benchmark. -#[cfg(feature = "runtime-benchmarks")] -pub type HostFunctions = frame_benchmarking::benchmarking::HostFunctions; -/// Otherwise we use empty host functions for ext host functions. -#[cfg(not(feature = "runtime-benchmarks"))] -pub type HostFunctions = (); - -pub struct TemplateRuntimeExecutor; -impl NativeExecutionDispatch for TemplateRuntimeExecutor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - frontier_template_runtime::api::dispatch(method, data) - } - - fn native_version() -> NativeVersion { - frontier_template_runtime::native_version() - } -} - -/// A set of APIs that every runtimes must implement. -pub trait BaseRuntimeApiCollection: +/// A set of APIs that every runtime must implement. +pub trait BaseRuntimeApiCollection: sp_api::ApiExt + sp_api::Metadata + sp_block_builder::BlockBuilder @@ -45,20 +21,28 @@ pub trait BaseRuntimeApiCollection: { } -impl BaseRuntimeApiCollection for Api where +impl BaseRuntimeApiCollection for Api +where + Block: BlockT, Api: sp_api::ApiExt + sp_api::Metadata + sp_block_builder::BlockBuilder + sp_offchain::OffchainWorkerApi + sp_session::SessionKeys - + sp_transaction_pool::runtime_api::TaggedTransactionQueue + + sp_transaction_pool::runtime_api::TaggedTransactionQueue, { } /// A set of APIs that template runtime must implement. -pub trait RuntimeApiCollection: - BaseRuntimeApiCollection - + EthCompatRuntimeApiCollection +pub trait RuntimeApiCollection< + Block: BlockT, + AuraId: Codec, + AccountId: Codec, + Nonce: Codec, + Balance: Codec + MaybeDisplay, +>: + BaseRuntimeApiCollection + + EthCompatRuntimeApiCollection + sp_consensus_aura::AuraApi + sp_consensus_grandpa::GrandpaApi + frame_system_rpc_runtime_api::AccountNonceApi @@ -66,12 +50,19 @@ pub trait RuntimeApiCollection: { } -impl RuntimeApiCollection for Api where - Api: BaseRuntimeApiCollection - + EthCompatRuntimeApiCollection +impl + RuntimeApiCollection for Api +where + Block: BlockT, + AuraId: Codec, + AccountId: Codec, + Nonce: Codec, + Balance: Codec + MaybeDisplay, + Api: BaseRuntimeApiCollection + + EthCompatRuntimeApiCollection + sp_consensus_aura::AuraApi + sp_consensus_grandpa::GrandpaApi + frame_system_rpc_runtime_api::AccountNonceApi - + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi + + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi, { } diff --git a/template/node/src/eth.rs b/template/node/src/eth.rs index 228e7113ab..b48e8d7300 100644 --- a/template/node/src/eth.rs +++ b/template/node/src/eth.rs @@ -8,28 +8,28 @@ use std::{ use futures::{future, prelude::*}; // Substrate use sc_client_api::BlockchainEvents; -use sc_executor::NativeExecutionDispatch; +use sc_executor::HostFunctions; use sc_network_sync::SyncingService; use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; use sp_api::ConstructRuntimeApi; +use sp_core::H256; +use sp_runtime::traits::Block as BlockT; // Frontier pub use fc_consensus::FrontierBlockImport; use fc_rpc::EthTask; pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; pub use fc_storage::{StorageOverride, StorageOverrideHandler}; -// Local -use frontier_template_runtime::opaque::Block; use crate::client::{FullBackend, FullClient}; /// Frontier DB backend type. -pub type FrontierBackend = fc_db::Backend; +pub type FrontierBackend = fc_db::Backend; pub fn db_config_dir(config: &Configuration) -> PathBuf { config.base_path.config_dir(config.chain_spec.id()) } -/// Avalailable frontier backend types. +/// Available frontier backend types. #[derive(Debug, Copy, Clone, Default, clap::ValueEnum)] pub enum BackendType { /// Either RocksDb or ParityDb as per inherited from the global backend settings. @@ -109,40 +109,43 @@ pub fn new_frontier_partial( } /// A set of APIs that ethereum-compatible runtimes must implement. -pub trait EthCompatRuntimeApiCollection: +pub trait EthCompatRuntimeApiCollection: sp_api::ApiExt + fp_rpc::ConvertTransactionRuntimeApi + fp_rpc::EthereumRuntimeRPCApi { } -impl EthCompatRuntimeApiCollection for Api where +impl EthCompatRuntimeApiCollection for Api +where + Block: BlockT, Api: sp_api::ApiExt + fp_rpc::ConvertTransactionRuntimeApi - + fp_rpc::EthereumRuntimeRPCApi + + fp_rpc::EthereumRuntimeRPCApi, { } -pub async fn spawn_frontier_tasks( +pub async fn spawn_frontier_tasks( task_manager: &TaskManager, - client: Arc>, - backend: Arc, - frontier_backend: Arc>>, + client: Arc>, + backend: Arc>, + frontier_backend: Arc>>, filter_pool: Option, - storage_override: Arc>, + storage_override: Arc>, fee_history_cache: FeeHistoryCache, fee_history_cache_limit: FeeHistoryCacheLimit, - sync: Arc>, + sync: Arc>, pubsub_notification_sinks: Arc< fc_mapping_sync::EthereumBlockNotificationSinks< - fc_mapping_sync::EthereumBlockNotification, + fc_mapping_sync::EthereumBlockNotification, >, >, ) where - RuntimeApi: ConstructRuntimeApi>, - RuntimeApi: Send + Sync + 'static, - RuntimeApi::RuntimeApi: EthCompatRuntimeApiCollection, - Executor: NativeExecutionDispatch + 'static, + B: BlockT, + RA: ConstructRuntimeApi>, + RA: Send + Sync + 'static, + RA::RuntimeApi: EthCompatRuntimeApiCollection, + HF: HostFunctions + 'static, { // Spawn main mapping sync worker background task. match &*frontier_backend { @@ -158,7 +161,7 @@ pub async fn spawn_frontier_tasks( storage_override.clone(), b.clone(), 3, - 0, + 0u32.into(), fc_mapping_sync::SyncStrategy::Normal, sync, pubsub_notification_sinks, diff --git a/template/node/src/rpc/eth.rs b/template/node/src/rpc/eth.rs index 322679da0d..59f956b69d 100644 --- a/template/node/src/rpc/eth.rs +++ b/template/node/src/rpc/eth.rs @@ -78,7 +78,7 @@ pub fn create_eth( >, ) -> Result, Box> where - B: BlockT, + B: BlockT, C: CallApiAt + ProvideRuntimeApi, C::Api: AuraApi + BlockBuilderApi diff --git a/template/node/src/rpc/mod.rs b/template/node/src/rpc/mod.rs index 0c8a7300ff..1aec2f7f8e 100644 --- a/template/node/src/rpc/mod.rs +++ b/template/node/src/rpc/mod.rs @@ -21,13 +21,13 @@ use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_inherents::CreateInherentDataProviders; use sp_runtime::traits::Block as BlockT; // Runtime -use frontier_template_runtime::{opaque::Block, AccountId, Balance, Hash, Nonce}; +use frontier_template_runtime::{AccountId, Balance, Hash, Nonce}; mod eth; pub use self::eth::{create_eth, EthDeps}; /// Full client dependencies. -pub struct FullDeps { +pub struct FullDeps { /// The client instance to use. pub client: Arc, /// Transaction pool instance. @@ -37,46 +37,48 @@ pub struct FullDeps { /// Manual seal command sink pub command_sink: Option>>, /// Ethereum-compatibility specific dependencies. - pub eth: EthDeps, + pub eth: EthDeps, } pub struct DefaultEthConfig(std::marker::PhantomData<(C, BE)>); -impl fc_rpc::EthConfig for DefaultEthConfig +impl fc_rpc::EthConfig for DefaultEthConfig where - C: StorageProvider + Sync + Send + 'static, - BE: Backend + 'static, + B: BlockT, + C: StorageProvider + Sync + Send + 'static, + BE: Backend + 'static, { type EstimateGasAdapter = (); type RuntimeStorageOverride = - fc_rpc::frontier_backend_client::SystemAccountId20StorageOverride; + fc_rpc::frontier_backend_client::SystemAccountId20StorageOverride; } /// Instantiate all Full RPC extensions. -pub fn create_full( - deps: FullDeps, +pub fn create_full( + deps: FullDeps, subscription_task_executor: SubscriptionTaskExecutor, pubsub_notification_sinks: Arc< fc_mapping_sync::EthereumBlockNotificationSinks< - fc_mapping_sync::EthereumBlockNotification, + fc_mapping_sync::EthereumBlockNotification, >, >, ) -> Result, Box> where - C: CallApiAt + ProvideRuntimeApi, - C::Api: sp_block_builder::BlockBuilder, - C::Api: sp_consensus_aura::AuraApi, - C::Api: substrate_frame_rpc_system::AccountNonceApi, - C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, - C::Api: fp_rpc::ConvertTransactionRuntimeApi, - C::Api: fp_rpc::EthereumRuntimeRPCApi, - C: HeaderBackend + HeaderMetadata + 'static, - C: BlockchainEvents + AuxStore + UsageProvider + StorageProvider, - BE: Backend + 'static, - P: TransactionPool + 'static, - A: ChainApi + 'static, - CIDP: CreateInherentDataProviders + Send + 'static, - CT: fp_rpc::ConvertTransaction<::Extrinsic> + Send + Sync + 'static, + B: BlockT, + C: CallApiAt + ProvideRuntimeApi, + C::Api: sp_block_builder::BlockBuilder, + C::Api: sp_consensus_aura::AuraApi, + C::Api: substrate_frame_rpc_system::AccountNonceApi, + C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, + C::Api: fp_rpc::ConvertTransactionRuntimeApi, + C::Api: fp_rpc::EthereumRuntimeRPCApi, + C: HeaderBackend + HeaderMetadata + 'static, + C: BlockchainEvents + AuxStore + UsageProvider + StorageProvider, + BE: Backend + 'static, + P: TransactionPool + 'static, + A: ChainApi + 'static, + CIDP: CreateInherentDataProviders + Send + 'static, + CT: fp_rpc::ConvertTransaction<::Extrinsic> + Send + Sync + 'static, { use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_consensus_manual_seal::rpc::{ManualSeal, ManualSealApiServer}; diff --git a/template/node/src/service.rs b/template/node/src/service.rs index ca96763fb2..8749729863 100644 --- a/template/node/src/service.rs +++ b/template/node/src/service.rs @@ -5,21 +5,25 @@ use std::{cell::RefCell, path::Path, sync::Arc, time::Duration}; use futures::{channel::mpsc, prelude::*}; // Substrate use prometheus_endpoint::Registry; -use sc_client_api::{Backend, BlockBackend}; -use sc_consensus::BasicQueue; -use sc_executor::NativeExecutionDispatch; +use sc_client_api::{Backend as BackendT, BlockBackend}; +use sc_consensus::{BasicQueue, BoxBlockImport}; +use sc_consensus_grandpa::BlockNumberOps; +use sc_executor::HostFunctions as HostFunctionsT; use sc_network_sync::strategy::warp::{WarpSyncParams, WarpSyncProvider}; use sc_service::{error::Error as ServiceError, Configuration, PartialComponents, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker}; +use sc_transaction_pool::FullPool; use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_api::ConstructRuntimeApi; -use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; -use sp_core::U256; -use sp_runtime::traits::Block as BlockT; - +use sp_consensus_aura::sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPair}; +use sp_core::{H256, U256}; +use sp_runtime::traits::{Block as BlockT, NumberFor}; // Runtime -use frontier_template_runtime::{opaque::Block, Hash, TransactionConverter}; +use frontier_template_runtime::{ + opaque::Block, AccountId, Balance, Nonce, RuntimeApi, TransactionConverter, +}; +pub use crate::eth::{db_config_dir, EthConfiguration}; use crate::{ cli::Sealing, client::{BaseRuntimeApiCollection, FullBackend, FullClient, RuntimeApiCollection}, @@ -29,58 +33,64 @@ use crate::{ StorageOverrideHandler, }, }; -pub use crate::{ - client::{Client, TemplateRuntimeExecutor}, - eth::{db_config_dir, EthConfiguration}, -}; -type BasicImportQueue = sc_consensus::DefaultImportQueue; -type FullPool = sc_transaction_pool::FullPool; -type FullSelectChain = sc_consensus::LongestChain; +/// Only enable the benchmarking host functions when we actually want to benchmark. +#[cfg(feature = "runtime-benchmarks")] +pub type HostFunctions = ( + sp_io::SubstrateHostFunctions, + frame_benchmarking::benchmarking::HostFunctions, +); +/// Otherwise we use empty host functions for ext host functions. +#[cfg(not(feature = "runtime-benchmarks"))] +pub type HostFunctions = sp_io::SubstrateHostFunctions; -type GrandpaBlockImport = - sc_consensus_grandpa::GrandpaBlockImport; -type GrandpaLinkHalf = sc_consensus_grandpa::LinkHalf; -type BoxBlockImport = sc_consensus::BoxBlockImport; +pub type Backend = FullBackend; +pub type Client = FullClient; + +type FullSelectChain = sc_consensus::LongestChain, B>; +type GrandpaBlockImport = + sc_consensus_grandpa::GrandpaBlockImport, B, C, FullSelectChain>; +type GrandpaLinkHalf = sc_consensus_grandpa::LinkHalf>; /// The minimum period of blocks on which justifications will be /// imported and generated. const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512; -pub fn new_partial( +pub fn new_partial( config: &Configuration, eth_config: &EthConfiguration, build_import_queue: BIQ, ) -> Result< PartialComponents< - FullClient, - FullBackend, - FullSelectChain, - BasicImportQueue, - FullPool>, + FullClient, + FullBackend, + FullSelectChain, + BasicQueue, + FullPool>, ( Option, - BoxBlockImport, - GrandpaLinkHalf>, - FrontierBackend>, - Arc>, + BoxBlockImport, + GrandpaLinkHalf>, + FrontierBackend>, + Arc>, ), >, ServiceError, > where - RuntimeApi: ConstructRuntimeApi>, - RuntimeApi: Send + Sync + 'static, - RuntimeApi::RuntimeApi: BaseRuntimeApiCollection + EthCompatRuntimeApiCollection, - Executor: NativeExecutionDispatch + 'static, + B: BlockT, + RA: ConstructRuntimeApi>, + RA: Send + Sync + 'static, + RA::RuntimeApi: BaseRuntimeApiCollection + EthCompatRuntimeApiCollection, + HF: HostFunctionsT + 'static, BIQ: FnOnce( - Arc>, + Arc>, &Configuration, &EthConfiguration, &TaskManager, Option, - GrandpaBlockImport>, - ) -> Result<(BasicImportQueue, BoxBlockImport), ServiceError>, + GrandpaBlockImport>, + ) -> Result<(BasicQueue, BoxBlockImport), ServiceError>, { let telemetry = config .telemetry_endpoints @@ -93,14 +103,13 @@ where }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(config); + let executor = sc_service::new_wasm_executor(config); - let (client, backend, keystore_container, task_manager) = - sc_service::new_full_parts::( - config, - telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - executor, - )?; + let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( + config, + telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), + executor, + )?; let client = Arc::new(client); let telemetry = telemetry.map(|(worker, telemetry)| { @@ -119,7 +128,7 @@ where telemetry.as_ref().map(|x| x.handle()), )?; - let storage_override = Arc::new(StorageOverrideHandler::new(client.clone())); + let storage_override = Arc::new(StorageOverrideHandler::::new(client.clone())); let frontier_backend = match eth_config.frontier_backend_type { BackendType::KeyValue => FrontierBackend::KeyValue(Arc::new(fc_db::kv::Backend::open( Arc::clone(&client), @@ -185,19 +194,21 @@ where } /// Build the import queue for the template runtime (aura + grandpa). -pub fn build_aura_grandpa_import_queue( - client: Arc>, +pub fn build_aura_grandpa_import_queue( + client: Arc>, config: &Configuration, eth_config: &EthConfiguration, task_manager: &TaskManager, telemetry: Option, - grandpa_block_import: GrandpaBlockImport>, -) -> Result<(BasicImportQueue, BoxBlockImport), ServiceError> + grandpa_block_import: GrandpaBlockImport>, +) -> Result<(BasicQueue, BoxBlockImport), ServiceError> where - RuntimeApi: ConstructRuntimeApi>, - RuntimeApi: Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: NativeExecutionDispatch + 'static, + B: BlockT, + NumberFor: BlockNumberOps, + RA: ConstructRuntimeApi>, + RA: Send + Sync + 'static, + RA::RuntimeApi: RuntimeApiCollection, + HF: HostFunctionsT + 'static, { let frontier_block_import = FrontierBlockImport::new(grandpa_block_import.clone(), client.clone()); @@ -234,19 +245,20 @@ where } /// Build the import queue for the template runtime (manual seal). -pub fn build_manual_seal_import_queue( - client: Arc>, +pub fn build_manual_seal_import_queue( + client: Arc>, config: &Configuration, _eth_config: &EthConfiguration, task_manager: &TaskManager, _telemetry: Option, - _grandpa_block_import: GrandpaBlockImport>, -) -> Result<(BasicImportQueue, BoxBlockImport), ServiceError> + _grandpa_block_import: GrandpaBlockImport>, +) -> Result<(BasicQueue, BoxBlockImport), ServiceError> where - RuntimeApi: ConstructRuntimeApi>, - RuntimeApi: Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: NativeExecutionDispatch + 'static, + B: BlockT, + RA: ConstructRuntimeApi>, + RA: Send + Sync + 'static, + RA::RuntimeApi: RuntimeApiCollection, + HF: HostFunctionsT + 'static, { let frontier_block_import = FrontierBlockImport::new(client.clone(), client); Ok(( @@ -260,22 +272,25 @@ where } /// Builds a new service for a full client. -pub async fn new_full( +pub async fn new_full( mut config: Configuration, eth_config: EthConfiguration, sealing: Option, ) -> Result where - RuntimeApi: ConstructRuntimeApi>, - RuntimeApi: Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: NativeExecutionDispatch + 'static, - N: sc_network::NetworkBackend::Hash>, + B: BlockT, + NumberFor: BlockNumberOps, + ::Header: Unpin, + RA: ConstructRuntimeApi>, + RA: Send + Sync + 'static, + RA::RuntimeApi: RuntimeApiCollection, + HF: HostFunctionsT + 'static, + NB: sc_network::NetworkBackend::Hash>, { let build_import_queue = if sealing.is_some() { - build_manual_seal_import_queue:: + build_manual_seal_import_queue:: } else { - build_aura_grandpa_import_queue:: + build_aura_grandpa_import_queue:: }; let PartialComponents { @@ -296,19 +311,21 @@ where } = new_frontier_partial(ð_config)?; let mut net_config = - sc_network::config::FullNetworkConfiguration::<_, _, N>::new(&config.network); + sc_network::config::FullNetworkConfiguration::<_, _, NB>::new(&config.network); let peer_store_handle = net_config.peer_store_handle(); - let metrics = N::register_notification_metrics( + let metrics = NB::register_notification_metrics( config.prometheus_config.as_ref().map(|cfg| &cfg.registry), ); let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name( - &client.block_hash(0)?.expect("Genesis block exists; qed"), + &client + .block_hash(0u32.into())? + .expect("Genesis block exists; qed"), &config.chain_spec, ); let (grandpa_protocol_config, grandpa_notification_service) = - sc_consensus_grandpa::grandpa_peers_set_config::<_, N>( + sc_consensus_grandpa::grandpa_peers_set_config::<_, NB>( grandpa_protocol_name.clone(), metrics.clone(), peer_store_handle, @@ -318,11 +335,11 @@ where None } else { net_config.add_notification_protocol(grandpa_protocol_config); - let warp_sync: Arc> = + let warp_sync: Arc> = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( backend.clone(), grandpa_link.shared_authority_set().clone(), - Vec::default(), + Vec::new(), )); Some(WarpSyncParams::WithProvider(warp_sync)) }; @@ -377,7 +394,7 @@ where // The MappingSyncWorker sends through the channel on block import and the subscription emits a notification to the subscriber on receiving a message through this channel. // This way we avoid race conditions when using native substrate block import notification stream. let pubsub_notification_sinks: fc_mapping_sync::EthereumBlockNotificationSinks< - fc_mapping_sync::EthereumBlockNotification, + fc_mapping_sync::EthereumBlockNotification, > = Default::default(); let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks); @@ -426,7 +443,7 @@ where client: client.clone(), pool: pool.clone(), graph: pool.pool().clone(), - converter: Some(TransactionConverter), + converter: Some(TransactionConverter::::default()), is_authority, enable_dev_signer, network: network.clone(), @@ -613,23 +630,26 @@ where Ok(task_manager) } -fn run_manual_seal_authorship( +fn run_manual_seal_authorship( eth_config: &EthConfiguration, sealing: Sealing, - client: Arc>, - transaction_pool: Arc>>, - select_chain: FullSelectChain, - block_import: BoxBlockImport, + client: Arc>, + transaction_pool: Arc>>, + select_chain: FullSelectChain, + block_import: BoxBlockImport, task_manager: &TaskManager, prometheus_registry: Option<&Registry>, telemetry: Option<&Telemetry>, - commands_stream: mpsc::Receiver>, + commands_stream: mpsc::Receiver< + sc_consensus_manual_seal::rpc::EngineCommand<::Hash>, + >, ) -> Result<(), ServiceError> where - RuntimeApi: ConstructRuntimeApi>, - RuntimeApi: Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection, - Executor: NativeExecutionDispatch + 'static, + B: BlockT, + RA: ConstructRuntimeApi>, + RA: Send + Sync + 'static, + RA::RuntimeApi: RuntimeApiCollection, + HF: HostFunctionsT + 'static, { let proposer_factory = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), @@ -712,11 +732,9 @@ pub async fn build_full( eth_config: EthConfiguration, sealing: Option, ) -> Result { - new_full::< - frontier_template_runtime::RuntimeApi, - TemplateRuntimeExecutor, - sc_network::NetworkWorker<_, _>, - >(config, eth_config, sealing) + new_full::>( + config, eth_config, sealing, + ) .await } @@ -726,10 +744,10 @@ pub fn new_chain_ops( ) -> Result< ( Arc, - Arc, + Arc, BasicQueue, TaskManager, - FrontierBackend, + FrontierBackend, ), ServiceError, > { @@ -741,7 +759,7 @@ pub fn new_chain_ops( task_manager, other, .. - } = new_partial::( + } = new_partial::( config, eth_config, build_aura_grandpa_import_queue, diff --git a/template/runtime/src/lib.rs b/template/runtime/src/lib.rs index 054e8ba091..27e0611c8f 100644 --- a/template/runtime/src/lib.rs +++ b/template/runtime/src/lib.rs @@ -12,7 +12,7 @@ extern crate alloc; #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -use alloc::{boxed::Box, vec, vec::Vec}; +use alloc::{vec, vec::Vec}; use core::marker::PhantomData; use scale_codec::{Decode, Encode}; use sp_api::impl_runtime_apis; @@ -497,25 +497,24 @@ mod runtime { } #[derive(Clone)] -pub struct TransactionConverter; -impl fp_rpc::ConvertTransaction for TransactionConverter { - fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic { - UncheckedExtrinsic::new_unsigned( - pallet_ethereum::Call::::transact { transaction }.into(), - ) +pub struct TransactionConverter(PhantomData); + +impl Default for TransactionConverter { + fn default() -> Self { + Self(PhantomData) } } -impl fp_rpc::ConvertTransaction for TransactionConverter { +impl fp_rpc::ConvertTransaction<::Extrinsic> for TransactionConverter { fn convert_transaction( &self, transaction: pallet_ethereum::Transaction, - ) -> opaque::UncheckedExtrinsic { + ) -> ::Extrinsic { let extrinsic = UncheckedExtrinsic::new_unsigned( pallet_ethereum::Call::::transact { transaction }.into(), ); let encoded = extrinsic.encode(); - opaque::UncheckedExtrinsic::decode(&mut &encoded[..]) + ::Extrinsic::decode(&mut &encoded[..]) .expect("Encoded extrinsic is always valid") } } @@ -995,6 +994,10 @@ impl_runtime_apis! { pallet_ethereum::CurrentTransactionStatuses::::get() ) } + + fn initialize_pending_block(header: &::Header) { + Executive::initialize_block(header); + } } impl fp_rpc::ConvertTransactionRuntimeApi for Runtime { diff --git a/ts-tests/package-lock.json b/ts-tests/package-lock.json index fea88108c2..8e4df787d9 100644 --- a/ts-tests/package-lock.json +++ b/ts-tests/package-lock.json @@ -2866,11 +2866,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -4296,9 +4296,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -12185,11 +12185,11 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "brorand": { @@ -13336,9 +13336,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "requires": { "to-regex-range": "^5.0.1" }