diff --git a/Cargo.lock b/Cargo.lock index c6cbd574..8c52eb29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,7 +58,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.10", + "getrandom", "once_cell", "version_check", ] @@ -70,7 +70,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.10", + "getrandom", "once_cell", "version_check", ] @@ -137,16 +137,16 @@ dependencies = [ [[package]] name = "aquamarine" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074b80d14d0240b6ce94d68f059a2d26a5d77280ae142662365a21ef6e2594ef" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -419,7 +419,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", "rayon", ] @@ -468,7 +468,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -497,8 +497,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", + "sp-runtime-interface 24.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-trie", "static_assertions", "test-case", @@ -535,7 +535,7 @@ dependencies = [ "dleq_vrf", "fflonk", "merlin 3.0.0", - "rand_chacha 0.3.1", + "rand_chacha", "rand_core 0.6.4", "ring", "sha2 0.10.7", @@ -564,8 +564,8 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "binary-merkle-tree" -version = "4.0.0-dev" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "13.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "hash-db", "log", @@ -587,7 +587,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", + "rand", "rand_core 0.6.4", "serde", "unicode-normalization", @@ -710,9 +710,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.8" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" +checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" dependencies = [ "log", "parity-scale-codec", @@ -869,7 +869,7 @@ dependencies = [ "fflonk", "getrandom_or_panic", "merlin 3.0.0", - "rand_chacha 0.3.1", + "rand_chacha", ] [[package]] @@ -900,7 +900,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", @@ -1144,7 +1144,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1270,7 +1270,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.48", + "syn 2.0.50", "termcolor", "toml", "walkdir", @@ -1495,7 +1495,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1555,7 +1555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -1589,8 +1589,8 @@ dependencies = [ [[package]] name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "28.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "aquamarine", "array-bytes", @@ -1612,8 +1612,8 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-core", - "sp-core-hashing-proc-macro", - "sp-debug-derive 8.0.0", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -1621,8 +1621,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-tracing 16.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-weights", "static_assertions", "tt-call", @@ -1630,8 +1630,8 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "23.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "Inflector", "cfg-expr", @@ -1643,30 +1643,30 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-core-hashing", - "syn 2.0.48", + "sp-crypto-hashing", + "syn 2.0.50", ] [[package]] name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "10.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "11.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1738,7 +1738,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1791,17 +1791,6 @@ dependencies = [ "zeroize", ] -[[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" @@ -1810,7 +1799,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1819,7 +1808,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "rand 0.8.5", + "rand", "rand_core 0.6.4", ] @@ -2172,8 +2161,8 @@ dependencies = [ "parity-scale-codec", "poly-multiproof", "proptest", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rayon", "serde", "serde_json", @@ -2195,11 +2184,11 @@ dependencies = [ "hex", "once_cell", "parity-scale-codec", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "serde", "sp-arithmetic", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "static_assertions", "test-case", "thiserror-no-std", @@ -2245,7 +2234,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand", "serde", "sha2 0.9.9", "typenum", @@ -2310,9 +2299,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ "serde", ] @@ -2335,7 +2324,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2349,7 +2338,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2360,7 +2349,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2371,7 +2360,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2710,6 +2699,43 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" +[[package]] +name = "polkavm-common" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c99f7eee94e7be43ba37eef65ad0ee8cbaf89b7c00001c3f6d2be985cb1817" + +[[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", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c10b2654a8a10a83c260bfb93e97b262cf0017494ab94a65d389e0eda6de6c9c" +dependencies = [ + "polkavm-common", + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[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", + "syn 2.0.50", +] + [[package]] name = "poly-multiproof" version = "0.0.1" @@ -2801,7 +2827,7 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2824,8 +2850,8 @@ dependencies = [ "byteorder", "lazy_static", "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rand_xorshift", "regex-syntax 0.6.29", "rusty-fork", @@ -2863,19 +2889,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" @@ -2883,20 +2896,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", + "rand_chacha", "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", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -2912,9 +2915,6 @@ name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] [[package]] name = "rand_core" @@ -2922,16 +2922,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -2997,7 +2988,7 @@ checksum = "68bf53dad9b6086826722cdc99140793afd9f62faa14a1ad07eb4f955e7a7216" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3220,9 +3211,7 @@ dependencies = [ "arrayref", "arrayvec 0.5.2", "curve25519-dalek 2.1.3", - "getrandom 0.1.16", "merlin 2.0.1", - "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", "subtle", @@ -3303,9 +3292,9 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -3321,13 +3310,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3450,8 +3439,8 @@ checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "sp-api" -version = "4.0.0-dev" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "26.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "hash-db", "log", @@ -3459,11 +3448,11 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-trie", "sp-version", "thiserror", @@ -3471,8 +3460,8 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "15.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "Inflector", "blake2", @@ -3480,33 +3469,33 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-application-crypto" -version = "23.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "30.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", ] [[package]] name = "sp-arithmetic" -version = "16.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "23.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "static_assertions", ] @@ -3530,8 +3519,8 @@ dependencies = [ [[package]] name = "sp-core" -version = "21.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "28.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "array-bytes", "bandersnatch_vrfs", @@ -3554,18 +3543,18 @@ dependencies = [ "parking_lot", "paste", "primitive-types", - "rand 0.8.5", + "rand", "scale-info", "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", - "sp-core-hashing", - "sp-debug-derive 8.0.0", - "sp-externalities 0.19.0", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-crypto-hashing", + "sp-debug-derive 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-externalities 0.25.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-runtime-interface 24.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-storage 19.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "ss58-registry", "substrate-bip39", "thiserror", @@ -3574,33 +3563,10 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sp-core-hashing" -version = "9.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" -dependencies = [ - "blake2b_simd", - "byteorder", - "digest 0.10.7", - "sha2 0.10.7", - "sha3", - "twox-hash", -] - -[[package]] -name = "sp-core-hashing-proc-macro" -version = "9.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" -dependencies = [ - "quote", - "sp-core-hashing", - "syn 2.0.48", -] - [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#5ba8921787609dddbabb8be3443186b65fdde190" +source = "git+https://github.com/paritytech/polkadot-sdk#822082807fd6f146cd1c0561dc340dedab463c40" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -3614,81 +3580,104 @@ dependencies = [ "ark-ed-on-bls12-381-bandersnatch", "ark-ed-on-bls12-381-bandersnatch-ext", "ark-scale", - "sp-runtime-interface 24.0.0", - "sp-std 14.0.0", + "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.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.7", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" +dependencies = [ + "quote", + "sp-crypto-hashing", + "syn 2.0.50", ] [[package]] name = "sp-debug-derive" -version = "8.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "14.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#5ba8921787609dddbabb8be3443186b65fdde190" +source = "git+https://github.com/paritytech/polkadot-sdk#822082807fd6f146cd1c0561dc340dedab463c40" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-externalities" -version = "0.19.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "0.25.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-storage 19.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", ] [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#5ba8921787609dddbabb8be3443186b65fdde190" +source = "git+https://github.com/paritytech/polkadot-sdk#822082807fd6f146cd1c0561dc340dedab463c40" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-genesis-builder" -version = "0.1.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "0.7.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", ] [[package]] name = "sp-inherents" -version = "4.0.0-dev" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "26.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "thiserror", ] [[package]] name = "sp-io" -version = "23.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "30.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "bytes", "ed25519-dalek", @@ -3698,12 +3687,13 @@ dependencies = [ "rustversion", "secp256k1", "sp-core", - "sp-externalities 0.19.0", + "sp-crypto-hashing", + "sp-externalities 0.25.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-keystore", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface 24.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-tracing 16.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-trie", "tracing", "tracing-core", @@ -3711,31 +3701,31 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.27.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "0.34.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "parity-scale-codec", "parking_lot", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "thiserror", ] [[package]] name = "sp-metadata-ir" -version = "0.1.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "0.6.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", ] [[package]] name = "sp-panic-handler" -version = "8.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "13.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "backtrace", "lazy_static", @@ -3744,8 +3734,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "24.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "31.0.1" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "docify", "either", @@ -3754,7 +3744,7 @@ dependencies = [ "log", "parity-scale-codec", "paste", - "rand 0.8.5", + "rand", "scale-info", "serde", "simple-mermaid", @@ -3762,76 +3752,77 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "17.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "24.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.19.0", - "sp-runtime-interface-proc-macro 11.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", - "sp-tracing 10.0.0", - "sp-wasm-interface 14.0.0", + "sp-externalities 0.25.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-storage 19.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-tracing 16.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-wasm-interface 20.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "static_assertions", ] [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#5ba8921787609dddbabb8be3443186b65fdde190" +source = "git+https://github.com/paritytech/polkadot-sdk#822082807fd6f146cd1c0561dc340dedab463c40" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", + "polkavm-derive", "primitive-types", - "sp-externalities 0.25.0", - "sp-runtime-interface-proc-macro 17.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", - "sp-wasm-interface 20.0.0", + "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)", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "11.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "17.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "Inflector", "expander", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#5ba8921787609dddbabb8be3443186b65fdde190" +source = "git+https://github.com/paritytech/polkadot-sdk#822082807fd6f146cd1c0561dc340dedab463c40" dependencies = [ "Inflector", "expander", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-staking" -version = "4.0.0-dev" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "26.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -3839,24 +3830,24 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", ] [[package]] name = "sp-state-machine" -version = "0.28.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "0.35.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "hash-db", "log", "parity-scale-codec", "parking_lot", - "rand 0.8.5", + "rand", "smallvec", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-panic-handler", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-trie", "thiserror", "tracing", @@ -3865,47 +3856,47 @@ dependencies = [ [[package]] name = "sp-std" -version = "8.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "14.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#5ba8921787609dddbabb8be3443186b65fdde190" +source = "git+https://github.com/paritytech/polkadot-sdk#822082807fd6f146cd1c0561dc340dedab463c40" [[package]] name = "sp-storage" -version = "13.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "19.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 8.0.0", - "sp-std 8.0.0", + "sp-debug-derive 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", ] [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#5ba8921787609dddbabb8be3443186b65fdde190" +source = "git+https://github.com/paritytech/polkadot-sdk#822082807fd6f146cd1c0561dc340dedab463c40" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0", - "sp-std 14.0.0", + "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)", ] [[package]] name = "sp-tracing" -version = "10.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "16.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "parity-scale-codec", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "tracing", "tracing-core", "tracing-subscriber", @@ -3914,10 +3905,10 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#5ba8921787609dddbabb8be3443186b65fdde190" +source = "git+https://github.com/paritytech/polkadot-sdk#822082807fd6f146cd1c0561dc340dedab463c40" dependencies = [ "parity-scale-codec", - "sp-std 14.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "tracing", "tracing-core", "tracing-subscriber", @@ -3925,8 +3916,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "22.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "29.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "ahash 0.8.3", "hash-db", @@ -3935,12 +3926,12 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot", - "rand 0.8.5", + "rand", "scale-info", "schnellru", "sp-core", - "sp-externalities 0.19.0", - "sp-std 8.0.0", + "sp-externalities 0.25.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "thiserror", "tracing", "trie-db", @@ -3949,62 +3940,62 @@ dependencies = [ [[package]] name = "sp-version" -version = "22.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "29.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "impl-serde", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro", + "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "8.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "13.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-wasm-interface" -version = "14.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "20.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 8.0.0", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", "wasmtime", ] [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#5ba8921787609dddbabb8be3443186b65fdde190" +source = "git+https://github.com/paritytech/polkadot-sdk#822082807fd6f146cd1c0561dc340dedab463c40" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 14.0.0", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "wasmtime", ] [[package]] name = "sp-weights" -version = "20.0.0" -source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-v1.6.0-patch#cd9bf4752239899ac1059d366a7e717cad30648d" +version = "27.0.0" +source = "git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch#b66ca4dfd5e244b70458d12ae37b5461739bee31" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -4012,8 +4003,8 @@ dependencies = [ "serde", "smallvec", "sp-arithmetic", - "sp-debug-derive 8.0.0", - "sp-std 8.0.0", + "sp-debug-derive 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", + "sp-std 14.0.0 (git+https://github.com/availproject/polkadot-sdk.git?tag=polkadot-1.7.1-patch)", ] [[package]] @@ -4055,9 +4046,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2", @@ -4085,9 +4076,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" dependencies = [ "proc-macro2", "quote", @@ -4159,7 +4150,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4311,7 +4302,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4403,7 +4394,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -4496,8 +4487,8 @@ dependencies = [ "arrayref", "constcat", "digest 0.10.7", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rand_core 0.6.4", "sha2 0.10.7", "sha3", @@ -4524,12 +4515,6 @@ dependencies = [ "winapi-util", ] -[[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" @@ -4557,7 +4542,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-shared", ] @@ -4579,7 +4564,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4712,7 +4697,7 @@ dependencies = [ "memfd", "memoffset 0.8.0", "paste", - "rand 0.8.5", + "rand", "rustix 0.36.15", "wasmtime-asm-macros", "wasmtime-environ", @@ -4958,5 +4943,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] diff --git a/core/Cargo.toml b/core/Cargo.toml index bed34354..f9019e47 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -20,19 +20,19 @@ tiny-keccak = { version = "2.0.2", default-features = false, features = ["keccak # Substrate -binary-merkle-tree = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false, optional = true } +binary-merkle-tree = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false, optional = true } codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2", default-features = false, features = ["derive"] } -sp-arithmetic = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false } -sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false } -sp-io = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false } -sp-std = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false } -sp-trie = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false } +sp-arithmetic = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false } +sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false } +sp-io = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false } +sp-std = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false } +sp-trie = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false } # Substrate Runtime -frame-support = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false, optional = true } -sp-runtime = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false, optional = true } -sp-runtime-interface = {git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false, optional = true } +frame-support = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false, optional = true } +sp-runtime = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false, optional = true } +sp-runtime-interface = {git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false, optional = true } [dev-dependencies] hex-literal = { version = "0.3.4" } diff --git a/core/src/data_proof.rs b/core/src/data_proof.rs deleted file mode 100644 index 1ba6d3c7..00000000 --- a/core/src/data_proof.rs +++ /dev/null @@ -1,197 +0,0 @@ -#[cfg(feature = "runtime")] -use binary_merkle_tree::MerkleProof; -use codec::{Decode, Encode}; -#[cfg(feature = "serde")] -use serde::{Deserialize, Serialize}; -use sp_core::H256; -use sp_std::vec::Vec; -use thiserror_no_std::Error; -/// Wrapper of `binary-merkle-tree::MerkleProof` with codec support. -#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, Default)] -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] -pub struct DataProof { - /// Root hash of generated merkle tree. - pub root: H256, - /// Proof items (does not contain the leaf hash, nor the root obviously). - /// - /// This vec contains all inner node hashes necessary to reconstruct the root hash given the - /// leaf hash. - pub proof: Vec, - /// Number of leaves in the original tree. - /// - /// This is needed to detect a case where we have an odd number of leaves that "get promoted" - /// to upper layers. - #[codec(compact)] - pub number_of_leaves: u32, - /// Index of the leaf the proof is for (0-based). - #[codec(compact)] - pub leaf_index: u32, - /// Leaf content. - pub leaf: H256, -} - -/// Conversion error from `binary-merkle-tree::MerkleProof`. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Error)] -pub enum DataProofTryFromError { - /// Root cannot be converted into `H256`. - #[error("Root cannot be converted into `H256`")] - InvalidRoot, - /// The given index of proofs cannot be converted into `H256`. - #[error("Proof at {0} cannot be converted into `H256`")] - InvalidProof(usize), - /// Number of leaves overflowed. - #[error("Number of leaves overflowed")] - OverflowedNumberOfLeaves, - /// Number of leaves must be greater than zero. - #[error("Number of leaves cannot be zero")] - InvalidNumberOfLeaves, - /// Leaf index overflowed. - #[error("Leaf index overflowed")] - OverflowedLeafIndex, - /// Leaf index overflowed or invalid (greater or equal to `number_of_leaves`) - #[error("Leaf index is invalid")] - InvalidLeafIndex, -} - -#[cfg(feature = "runtime")] -impl core::convert::TryFrom<&MerkleProof> for DataProof -where - T: AsRef<[u8]>, - H: PartialEq + Eq + AsRef<[u8]>, -{ - type Error = DataProofTryFromError; - - fn try_from(merkle_proof: &MerkleProof) -> Result { - use crate::ensure; - use DataProofTryFromError::*; - - use sp_io::hashing::keccak_256; - - let root = <[u8; 32]>::try_from(merkle_proof.root.as_ref()) - .map_err(|_| InvalidRoot)? - .into(); - let leaf = keccak_256(merkle_proof.leaf.as_ref()).into(); - - let proof = merkle_proof - .proof - .iter() - .enumerate() - .map(|(idx, proof)| { - <[u8; 32]>::try_from(proof.as_ref()) - .map_err(|_| InvalidProof(idx)) - .map(H256::from) - }) - .collect::, _>>()?; - let number_of_leaves = - u32::try_from(merkle_proof.number_of_leaves).map_err(|_| OverflowedNumberOfLeaves)?; - ensure!(number_of_leaves != 0, InvalidNumberOfLeaves); - - let leaf_index = u32::try_from(merkle_proof.leaf_index).map_err(|_| OverflowedLeafIndex)?; - ensure!(leaf_index < number_of_leaves, InvalidLeafIndex); - - Ok(Self { - proof, - root, - leaf, - number_of_leaves, - leaf_index, - }) - } -} - -#[cfg(all(test, feature = "runtime"))] -mod test { - use crate::Keccak256; - use hex_literal::hex; - use sp_core::H512; - use sp_io::hashing::keccak_256; - use sp_std::cmp::min; - use test_case::test_case; - - use super::*; - - fn leaves() -> Vec> { - (0u8..7) - .map(|idx| H512::repeat_byte(idx).to_fixed_bytes().to_vec()) - .collect::>() - } - - /// Creates a merkle proof of `leaf_index`. - /// - /// If `leaf_index >= number_of_leaves`, it will create a fake proof using the latest possible - /// index and overwriting the proof. That case is used to test transformations into - /// `DataProof`. - fn merkle_proof_idx(leaf_index: usize) -> MerkleProof> { - let leaves = leaves(); - let index = min(leaf_index, leaves.len() - 1); - - let mut proof = binary_merkle_tree::merkle_proof::(leaves, index); - proof.leaf_index = leaf_index; - - proof - } - - fn invalid_merkle_proof_zero_leaves() -> MerkleProof> { - MerkleProof { - root: H256::default(), - proof: vec![], - number_of_leaves: 0, - leaf_index: 0, - leaf: H256::default().to_fixed_bytes().to_vec(), - } - } - - fn expected_data_proof_1() -> Result { - Ok(DataProof { - root: hex!("08a1133e47edacdc5a7a37f7301aad3c725fbf5698ca5e35acb7915ad1784b95").into(), - proof: vec![ - hex!("ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5").into(), - hex!("8421b50025cb27f1412ed7103442ecdd09d4aa1e4a1ba777597ae921e48b31e1").into(), - hex!("08f1f28658e6a37fa6fd9be84bd7315c3ca1eceb0849ec88cbd5bf9a69160653").into(), - ], - number_of_leaves: 7, - leaf_index: 1, - leaf: keccak_256(H512::repeat_byte(1).as_bytes()).into(), - }) - } - - fn expected_data_proof_0() -> Result { - Ok(DataProof { - root: hex!("08a1133e47edacdc5a7a37f7301aad3c725fbf5698ca5e35acb7915ad1784b95").into(), - proof: vec![ - hex!("401617bc4f769381f86be40df0207a0a3e31ae0839497a5ac6d4252dfc35577f").into(), - hex!("8421b50025cb27f1412ed7103442ecdd09d4aa1e4a1ba777597ae921e48b31e1").into(), - hex!("08f1f28658e6a37fa6fd9be84bd7315c3ca1eceb0849ec88cbd5bf9a69160653").into(), - ], - number_of_leaves: 7, - leaf_index: 0, - leaf: keccak_256(H512::repeat_byte(0).as_bytes()).into(), - }) - } - - fn expected_data_proof_6() -> Result { - Ok(DataProof { - root: hex!("08a1133e47edacdc5a7a37f7301aad3c725fbf5698ca5e35acb7915ad1784b95").into(), - proof: vec![ - hex!("8663c7e2962f98579b883bf5e2179f9200ae3615ec6fc3bd8027a0de9973606a").into(), - hex!("b225b28cd9168524306b0d944342b11bb21d37e9156cdbf42073d4e51b2f0a41").into(), - ], - number_of_leaves: 7, - leaf_index: 6, - leaf: keccak_256(H512::repeat_byte(6).as_bytes()).into(), - }) - } - - #[test_case(merkle_proof_idx(0) => expected_data_proof_0(); "From merkle proof 0")] - #[test_case(merkle_proof_idx(1) => expected_data_proof_1(); "From merkle proof 1")] - #[test_case(merkle_proof_idx(6) => expected_data_proof_6(); "From merkle proof 6")] - #[test_case(merkle_proof_idx(7) => Err(DataProofTryFromError::InvalidLeafIndex); "From invalid leaf index")] - #[test_case(invalid_merkle_proof_zero_leaves() => Err(DataProofTryFromError::InvalidNumberOfLeaves); "From invalid number of leaves")] - fn from_binary( - binary_proof: MerkleProof>, - ) -> Result { - let data_proof = DataProof::try_from(&binary_proof)?; - Ok(data_proof) - } -} diff --git a/core/src/header/extension/mod.rs b/core/src/header/extension/mod.rs index f964fb20..6e926965 100644 --- a/core/src/header/extension/mod.rs +++ b/core/src/header/extension/mod.rs @@ -8,16 +8,15 @@ use sp_runtime_interface::pass_by::PassByCodec; use crate::{DataLookup, HeaderVersion}; -pub mod v1; -pub mod v2; +pub mod v3; /// Header extension data. #[derive(PartialEq, Eq, Clone, RuntimeDebug, TypeInfo, Encode, Decode)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "runtime", derive(PassByCodec))] +#[repr(u8)] pub enum HeaderExtension { - V1(v1::HeaderExtension), - V2(v2::HeaderExtension), + V3(v3::HeaderExtension) = 3, } /// It forwards the call to the inner version of the header. Any invalid version will return the @@ -25,15 +24,13 @@ pub enum HeaderExtension { macro_rules! forward_to_version { ($self:ident, $function:ident) => {{ match $self { - HeaderExtension::V1(ext) => ext.$function(), - HeaderExtension::V2(ext) => ext.$function(), + HeaderExtension::V3(ext) => ext.$function(), } }}; ($self:ident, $function:ident, $arg:expr) => {{ match $self { - HeaderExtension::V1(ext) => ext.$function($arg), - HeaderExtension::V2(ext) => ext.$function($arg), + HeaderExtension::V3(ext) => ext.$function($arg), } }}; } @@ -57,28 +54,20 @@ impl HeaderExtension { pub fn get_header_version(&self) -> HeaderVersion { match self { - HeaderExtension::V1(_) => HeaderVersion::V1, - HeaderExtension::V2(_) => HeaderVersion::V2, + HeaderExtension::V3(_) => HeaderVersion::V3, } } } impl Default for HeaderExtension { fn default() -> Self { - v1::HeaderExtension::default().into() + v3::HeaderExtension::default().into() } } -impl From for HeaderExtension { +impl From for HeaderExtension { #[inline] - fn from(ext: v1::HeaderExtension) -> Self { - Self::V1(ext) - } -} - -impl From for HeaderExtension { - #[inline] - fn from(ext: v2::HeaderExtension) -> Self { - Self::V2(ext) + fn from(ext: v3::HeaderExtension) -> Self { + Self::V3(ext) } } diff --git a/core/src/header/extension/v2.rs b/core/src/header/extension/v2.rs deleted file mode 100644 index 1f6d2813..00000000 --- a/core/src/header/extension/v2.rs +++ /dev/null @@ -1,33 +0,0 @@ -use codec::{Decode, Encode}; -use scale_info::TypeInfo; -#[cfg(feature = "serde")] -use serde::{Deserialize, Serialize}; -use sp_core::{RuntimeDebug, H256}; - -use crate::{v2::KateCommitment, DataLookup}; - -#[derive(PartialEq, Eq, Clone, RuntimeDebug, TypeInfo, Encode, Decode, Default)] -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] -pub struct HeaderExtension { - pub app_lookup: DataLookup, - pub commitment: KateCommitment, -} - -impl HeaderExtension { - pub fn data_root(&self) -> H256 { - self.commitment.data_root - } - - pub fn app_lookup(&self) -> &DataLookup { - &self.app_lookup - } - - pub fn rows(&self) -> u16 { - self.commitment.rows - } - - pub fn cols(&self) -> u16 { - self.commitment.cols - } -} diff --git a/core/src/header/extension/v1.rs b/core/src/header/extension/v3.rs similarity index 94% rename from core/src/header/extension/v1.rs rename to core/src/header/extension/v3.rs index 390abed3..3980c19d 100644 --- a/core/src/header/extension/v1.rs +++ b/core/src/header/extension/v3.rs @@ -4,7 +4,7 @@ use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use sp_core::{RuntimeDebug, H256}; -use crate::{v1::KateCommitment, DataLookup}; +use crate::{v3::KateCommitment, DataLookup}; #[derive(PartialEq, Eq, Clone, RuntimeDebug, TypeInfo, Encode, Decode, Default)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] diff --git a/core/src/header/mod.rs b/core/src/header/mod.rs index 5661c59e..2bf824f8 100644 --- a/core/src/header/mod.rs +++ b/core/src/header/mod.rs @@ -284,17 +284,11 @@ mod tests { use codec::Error; use hex_literal::hex; use sp_core::H256; - use sp_runtime::{ - traits::{BlakeTwo256, Hash}, - DigestItem, - }; + use sp_runtime::{traits::BlakeTwo256, DigestItem}; use test_case::test_case; use super::*; - use crate::{ - kate_commitment::{v1, v2}, - AppId, DataLookup, - }; + use crate::{kate_commitment::v3, AppId, DataLookup}; type THeader = Header; @@ -340,59 +334,13 @@ mod tests { ); } - #[test] - fn ensure_format_is_unchanged() { - let commitment = v1::KateCommitment { - rows: 1, - cols: 4, - data_root: hex!("3fbf3227926cfa3f4167771e5ad91cfa2c2d7090667ce01e911ca90b4f315b11").into(), - commitment: hex!("80e949ebdaf5c13e09649c587c6b1905fb770b4a6843abaac6b413e3a7405d9825ac764db2341db9b7965965073e975980e949ebdaf5c13e09649c587c6b1905fb770b4a6843abaac6b413e3a7405d9825ac764db2341db9b7965965073e9759").to_vec() - }; - - let extension = extension::v1::HeaderExtension { - commitment, - ..Default::default() - }; - - let header = THeader { - parent_hash: BlakeTwo256::hash(b"1"), - number: 2, - state_root: BlakeTwo256::hash(b"3"), - extrinsics_root: BlakeTwo256::hash(b"4"), - digest: Digest { - logs: vec![DigestItem::Other(b"5".to_vec())], - }, - extension: extension.into(), - }; - - let encoded = header.encode(); - assert_eq!(encoded, hex!("92cdf578c47085a5992256f0dcf97d0b19f1f1c9de4d5fe30c3ace6191b6e5db08581348337b0f3e148620173daaa5f94d00d881705dcbf0aa83efdaba61d2ede1eb8649214997574e20c464388a172420d25403682bbbb80c496831c8cc1f8f0d040004350000000410810180e949ebdaf5c13e09649c587c6b1905fb770b4a6843abaac6b413e3a7405d9825ac764db2341db9b7965965073e975980e949ebdaf5c13e09649c587c6b1905fb770b4a6843abaac6b413e3a7405d9825ac764db2341db9b7965965073e97593fbf3227926cfa3f4167771e5ad91cfa2c2d7090667ce01e911ca90b4f315b11").to_vec()); - } - - fn header_v1() -> THeader { - let commitment = v1::KateCommitment { - data_root: hex!("3fbf3227926cfa3f4167771e5ad91cfa2c2d7090667ce01e911ca90b4f315b11").into(), - commitment: hex!("80e949ebdaf5c13e09649c587c6b1905fb770b4a6843abaac6b413e3a7405d9825ac764db2341db9b7965965073e975980e949ebdaf5c13e09649c587c6b1905fb770b4a6843abaac6b413e3a7405d9825ac764db2341db9b7965965073e9759").to_vec(), - ..Default::default() - }; - let extension = extension::v1::HeaderExtension { - commitment, - ..Default::default() - }; - - THeader { - extension: extension.into(), - ..Default::default() - } - } - /// The `commitment.data_root is none`. - fn header_v2() -> THeader { - let commitment = v2::KateCommitment { + fn header_v3() -> THeader { + let commitment = v3::KateCommitment { commitment: hex!("80e949ebdaf5c13e09649c587c6b1905fb770b4a6843abaac6b413e3a7405d9825ac764db2341db9b7965965073e975980e949ebdaf5c13e09649c587c6b1905fb770b4a6843abaac6b413e3a7405d9825ac764db2341db9b7965965073e9759").to_vec(), ..Default::default() }; - let extension = extension::v2::HeaderExtension { + let extension = extension::v3::HeaderExtension { commitment, ..Default::default() }; @@ -403,9 +351,9 @@ mod tests { } } - /// It creates a corrupted V2 header and the associated error on decodification. + /// It creates a corrupted V3 header and the associated error on decodification. fn corrupted_header() -> (Vec, Error) { - let mut encoded = header_v2().encode(); + let mut encoded = header_v3().encode(); encoded.remove(110); let error = THeader::decode(&mut encoded.as_slice()).unwrap_err(); @@ -413,8 +361,7 @@ mod tests { (encoded, error) } - #[test_case( header_v1().encode().as_ref() => Ok(header_v1()) ; "Decode V1 header")] - #[test_case( header_v2().encode().as_ref() => Ok(header_v2()) ; "Decode V2 header")] + #[test_case( header_v3().encode().as_ref() => Ok(header_v3()) ; "Decode V3 header")] #[test_case( corrupted_header().0.as_ref() => Err(corrupted_header().1) ; "Decode corrupted header")] fn header_decoding(mut encoded_header: &[u8]) -> Result { Header::decode(&mut encoded_header) @@ -424,19 +371,19 @@ mod tests { serde_json::to_string(&header).unwrap_or_default() } - #[test_case( header_serde_encode(header_v1()) => Ok(header_v1()) ; "Serde V1 header")] + #[test_case(header_serde_encode(header_v3()) => Ok(header_v3()) ; "Serde V3 header")] fn header_serde(json_header: String) -> Result { serde_json::from_str(&json_header).map_err(|serde_err| format!("{}", serde_err)) } fn header() -> (THeader, H256) { - let commitment = v1::KateCommitment { + let commitment = v3::KateCommitment { rows:1, cols:4, data_root: hex!("0000000000000000000000000000000000000000000000000000000000000000").into(), commitment: hex!("ace5bc6a21eef8b28987eb878e0b97b5ae3c8b8e05efe957802dc0008b23327b349f62ec96bcee48bdc30f6bb670f3d1ace5bc6a21eef8b28987eb878e0b97b5ae3c8b8e05efe957802dc0008b23327b349f62ec96bcee48bdc30f6bb670f3d1").into() }; - let extension = extension::v1::HeaderExtension { + let extension = extension::v3::HeaderExtension { commitment, app_lookup: DataLookup::from_id_and_len_iter([(AppId(0), 1)].into_iter()) .expect("Valid DataLookup .qed"), @@ -472,7 +419,7 @@ mod tests { assert_eq!( hash, H256(hex!( - "2658abca4272bbd01abe73b29b0396dd03eb6af104a1d9b9e601d13d933a88b5" + "0aaeda45f6b0258b5453c11c77c6cdedae3739c90a1a82851cfa5646236dc497" )) ); @@ -483,11 +430,8 @@ mod tests { let (mut header, hash) = header_and_hash; match header.extension { - extension::HeaderExtension::V1(ref mut ext) => { - ext.commitment.commitment = b"invalid commitment v1".to_vec(); - }, - extension::HeaderExtension::V2(ref mut ext) => { - ext.commitment.commitment = b"invalid commitment v2".to_vec(); + extension::HeaderExtension::V3(ref mut ext) => { + ext.commitment.commitment = b"invalid commitment v3".to_vec(); }, }; @@ -498,10 +442,7 @@ mod tests { let (mut header, hash) = header_and_hash; match header.extension { - extension::HeaderExtension::V1(ref mut ext) => { - ext.commitment.data_root = H256::repeat_byte(1u8); - }, - extension::HeaderExtension::V2(ref mut ext) => { + extension::HeaderExtension::V3(ref mut ext) => { ext.commitment.data_root = H256::repeat_byte(2u8); }, }; @@ -513,10 +454,7 @@ mod tests { let (mut header, hash) = header_and_hash; match header.extension { - extension::HeaderExtension::V1(ref mut ext) => { - ext.commitment.cols += 1; - }, - extension::HeaderExtension::V2(ref mut ext) => { + extension::HeaderExtension::V3(ref mut ext) => { ext.commitment.cols += 2; }, }; @@ -528,10 +466,7 @@ mod tests { let (mut header, hash) = header_and_hash; match header.extension { - extension::HeaderExtension::V1(ref mut ext) => { - ext.commitment.rows += 1; - }, - extension::HeaderExtension::V2(ref mut ext) => { + extension::HeaderExtension::V3(ref mut ext) => { ext.commitment.rows += 2; }, }; diff --git a/core/src/header_version/mod.rs b/core/src/header_version/mod.rs index 4f994214..e7cbd01b 100644 --- a/core/src/header_version/mod.rs +++ b/core/src/header_version/mod.rs @@ -6,6 +6,5 @@ use sp_runtime_interface::pass_by::PassByCodec; #[derive(Debug, Clone, Copy, Eq, PartialEq, Encode, Decode, TypeInfo)] #[cfg_attr(feature = "runtime", derive(PassByCodec))] pub enum HeaderVersion { - V1, - V2, // Current one + V3 = 3, // Current one } diff --git a/core/src/kate_commitment.rs b/core/src/kate_commitment.rs index d688ae4d..9edb0aaf 100644 --- a/core/src/kate_commitment.rs +++ b/core/src/kate_commitment.rs @@ -10,41 +10,7 @@ use sp_core::hexdisplay::HexDisplay; #[cfg(feature = "serde")] use sp_std::fmt; -pub mod v1 { - use super::*; - - /// Customized extrinsics root to save the commitment. - #[derive(PartialEq, Eq, Clone, Default, Encode, Decode, TypeInfo)] - #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] - #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] - #[cfg_attr(feature = "serde", serde(deny_unknown_fields))] - pub struct KateCommitment { - /// Rows - #[codec(compact)] - pub rows: u16, - /// Cols - #[codec(compact)] - pub cols: u16, - /// Plonk commitment. - pub commitment: Vec, - /// The merkle root of the data submitted - pub data_root: H256, - } - - #[cfg(feature = "serde")] - impl fmt::Debug for KateCommitment { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("KateCommitment(v1)") - .field("rows", &self.rows) - .field("cols", &self.cols) - .field("data_root", &HexDisplay::from(&self.data_root.as_ref())) - .field("commitment", &HexDisplay::from(&self.commitment.as_slice())) - .finish() - } - } -} - -pub mod v2 { +pub mod v3 { use super::*; /// Customized extrinsics root to save the commitment. @@ -82,7 +48,7 @@ pub mod v2 { let commitment = self.commitment.as_slice(); let data_root = self.data_root.as_ref(); - f.debug_struct("KateCommitment(v2)") + f.debug_struct("KateCommitment(v3)") .field("rows", &self.rows) .field("cols", &self.cols) .field("commitment", &HexDisplay::from(&commitment)) diff --git a/core/src/lib.rs b/core/src/lib.rs index 46589799..3b750084 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -38,8 +38,6 @@ pub mod traits; pub mod keccak256; pub use keccak256::Keccak256; -pub mod data_proof; -pub use data_proof::DataProof; pub mod data_proof_v2; pub use data_proof_v2::DataProofV2; diff --git a/kate/Cargo.toml b/kate/Cargo.toml index bfef476b..5baa3606 100644 --- a/kate/Cargo.toml +++ b/kate/Cargo.toml @@ -19,8 +19,8 @@ dusk-plonk = { git = "https://github.com/availproject/plonk.git", tag = "v0.12.0 # Parity & Substrate codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -sp-arithmetic = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false } -sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false } +sp-arithmetic = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false } +sp-core = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false } # 3rd-party derive_more = { version = "0.99.17", default-features = false, features = ["constructor"] } diff --git a/kate/recovery/Cargo.toml b/kate/recovery/Cargo.toml index ca33cdee..7a31559d 100644 --- a/kate/recovery/Cargo.toml +++ b/kate/recovery/Cargo.toml @@ -12,8 +12,8 @@ dusk-plonk = { git = "https://github.com/availproject/plonk.git", tag = "v0.12.0 # Substrate codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -sp-arithmetic = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false } -sp-std = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-v1.6.0-patch", default-features = false } +sp-arithmetic = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false } +sp-std = { git = "https://github.com/availproject/polkadot-sdk.git", tag = "polkadot-1.7.1-patch", default-features = false } # 3rd-parties derive_more = { version = "0.99.17" }