diff --git a/.maintain/frame-weight-template.hbs b/.maintain/frame-weight-template.hbs new file mode 100644 index 00000000..34852daf --- /dev/null +++ b/.maintain/frame-weight-template.hbs @@ -0,0 +1,114 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for {{pallet}} +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}} +//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}` +//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}} + +// Executed Command: +{{#each args as |arg|}} +// {{arg}} +{{/each}} + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for {{pallet}}. +pub trait WeightInfo { + {{#each benchmarks as |benchmark|}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{c.name}}: u32, {{/each~}} + ) -> Weight; + {{/each}} +} + +/// Weights for {{pallet}} using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +{{#if (eq pallet "frame_system")}} +impl WeightInfo for SubstrateWeight { +{{else}} +impl WeightInfo for SubstrateWeight { +{{/if}} + {{#each benchmarks as |benchmark|}} + {{#each benchmark.comments as |comment|}} + // {{comment}} + {{/each}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} + ) -> Weight { + ({{underscore benchmark.base_weight}} as Weight) + {{#each benchmark.component_weight as |cw|}} + // Standard Error: {{underscore cw.error}} + .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + {{/each}} + {{#if (ne benchmark.base_reads "0")}} + .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) + {{/if}} + {{#each benchmark.component_reads as |cr|}} + .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + {{/each}} + {{#if (ne benchmark.base_writes "0")}} + .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) + {{/if}} + {{#each benchmark.component_writes as |cw|}} + .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + {{/each}} + } + {{/each}} +} + +// For backwards compatibility and tests +impl WeightInfo for () { + {{#each benchmarks as |benchmark|}} + {{#each benchmark.comments as |comment|}} + // {{comment}} + {{/each}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} + ) -> Weight { + ({{underscore benchmark.base_weight}} as Weight) + {{#each benchmark.component_weight as |cw|}} + // Standard Error: {{underscore cw.error}} + .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + {{/each}} + {{#if (ne benchmark.base_reads "0")}} + .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) + {{/if}} + {{#each benchmark.component_reads as |cr|}} + .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + {{/each}} + {{#if (ne benchmark.base_writes "0")}} + .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) + {{/if}} + {{#each benchmark.component_writes as |cw|}} + .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + {{/each}} + } + {{/each}} +} diff --git a/Cargo.lock b/Cargo.lock index 8786d8e7..06fe55de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,11 +23,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.27.2", + "gimli 0.28.0", ] [[package]] @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -115,12 +115,12 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead 0.5.2", - "aes 0.8.2", + "aes 0.8.3", "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", @@ -153,7 +153,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "once_cell", "version_check", ] @@ -165,28 +165,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.9", + "getrandom 0.2.10", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] [[package]] -name = "aho-corasick" -version = "1.0.1" +name = "android-tzdata" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" -dependencies = [ - "memchr", -] +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" @@ -229,9 +226,9 @@ checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -247,9 +244,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -257,9 +254,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "approx" @@ -302,7 +299,7 @@ dependencies = [ "blake2", "derivative", "digest 0.10.7", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -317,7 +314,7 @@ dependencies = [ "ark-std", "derivative", "hashbrown 0.13.2", - "itertools", + "itertools 0.10.5", "num-traits", "zeroize", ] @@ -334,7 +331,7 @@ dependencies = [ "ark-std", "derivative", "digest 0.10.7", - "itertools", + "itertools 0.10.5", "num-bigint", "num-traits", "paste", @@ -469,9 +466,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ascii-canvas" @@ -495,7 +492,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.17", + "time", ] [[package]] @@ -511,7 +508,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.17", + "time", ] [[package]] @@ -601,30 +598,30 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.19", + "rustix 0.37.23", "slab", - "socket2", + "socket2 0.4.9", "waker-fn", ] [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -640,22 +637,22 @@ dependencies = [ [[package]] name = "asynchronous-codec" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" +checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" dependencies = [ "bytes", "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", ] [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atty" @@ -688,16 +685,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.19.0", + "addr2line 0.21.0", "cc", "cfg-if", "libc", - "miniz_oxide 0.6.2", - "object 0.30.3", + "miniz_oxide", + "object 0.32.1", "rustc-demangle", ] @@ -733,9 +730,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -745,9 +742,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bech32" -version = "0.7.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dabbe35f96fb9507f7330793dc490461b2962659ac5d427181e451a623751d1" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "beef" @@ -819,19 +816,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" - -[[package]] -name = "bitvec" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" -dependencies = [ - "either", - "radium 0.3.0", -] +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "bitvec" @@ -868,37 +855,37 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.2", - "constant_time_eq 0.2.5", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", ] [[package]] name = "blake2s_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", - "arrayvec 0.7.2", - "constant_time_eq 0.2.5", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", ] [[package]] name = "blake3" -version = "1.3.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq 0.2.5", + "constant_time_eq 0.3.0", ] [[package]] @@ -1004,12 +991,12 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbd1d11282a1eb134d3c3b7cf8ce213b5161c6e5f73fb1b98618482c606b64" +checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" dependencies = [ "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", ] @@ -1019,19 +1006,25 @@ name = "bs58" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.9.9", + "sha2 0.10.8", + "tinyvec", ] [[package]] name = "bstr" -version = "1.5.0" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" dependencies = [ "memchr", - "once_cell", - "regex-automata", + "regex-automata 0.3.8", "serde", ] @@ -1046,9 +1039,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -1064,9 +1057,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" @@ -1076,9 +1069,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] @@ -1106,18 +1099,18 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" dependencies = [ "serde", ] @@ -1130,7 +1123,21 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.17", + "semver 1.0.19", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cargo_metadata" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.19", "serde", "serde_json", "thiserror", @@ -1138,11 +1145,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -1213,17 +1221,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -1320,7 +1327,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -1341,56 +1348,52 @@ dependencies = [ [[package]] name = "coins-bip32" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30a84aab436fcb256a2ab3c80663d8aec686e6bae12827bb05fef3e1e439c9f" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" dependencies = [ - "bincode", - "bs58", + "bs58 0.5.0", "coins-core", "digest 0.10.7", - "getrandom 0.2.9", "hmac 0.12.1", "k256 0.13.1", - "lazy_static", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", ] [[package]] name = "coins-bip39" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f4d04ee18e58356accd644896aeb2094ddeafb6a713e056cef0c0a8e468c15" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" dependencies = [ - "bitvec 0.17.4", + "bitvec 1.0.1", "coins-bip32", - "getrandom 0.2.9", "hmac 0.12.1", "once_cell", - "pbkdf2 0.12.1", + "pbkdf2 0.12.2", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", ] [[package]] name = "coins-core" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b949a1c63fb7eb591eb7ba438746326aedf0ae843e51ec92ba6bec5bb382c4f" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "bech32", - "bs58", + "bs58 0.5.0", "digest 0.10.7", "generic-array 0.14.7", "hex", "ripemd", "serde", "serde_derive", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.8", "thiserror", ] @@ -1407,25 +1410,37 @@ version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" dependencies = [ - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "unicode-width", ] [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] +[[package]] +name = "const-hex" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa72a10d0e914cad6bcad4e7409e68d230c1c2db67896e19a37f758b1fcbdab5" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "serde", +] + [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "constant_time_eq" @@ -1435,9 +1450,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "convert_case" @@ -1481,9 +1496,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -1503,7 +1518,7 @@ version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", @@ -1580,7 +1595,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", @@ -1611,16 +1626,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.3" @@ -1634,22 +1639,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -1674,9 +1679,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", @@ -1761,23 +1766,37 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.1" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", "fiat-crypto", - "packed_simd_2", - "platforms 3.0.2", + "platforms 3.1.2", + "rustc_version 0.4.0", "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.37", +] + [[package]] name = "cxx" -version = "1.0.95" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109308c20e8445959c2792e81871054c6a17e6976489a93d2769641a2ba5839c" +checksum = "bbe98ba1789d56fb3db3bee5e032774d4f421b685de7ba703643584ba24effbe" dependencies = [ "cc", "cxxbridge-flags", @@ -1787,9 +1806,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.95" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf4c6755cdf10798b97510e0e2b3edb9573032bd9379de8fffa59d68165494f" +checksum = "c4ce20f6b8433da4841b1dadfb9468709868022d829d5ca1f2ffbda928455ea3" dependencies = [ "cc", "codespan-reporting", @@ -1797,24 +1816,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] name = "cxxbridge-flags" -version = "1.0.95" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882074421238e84fe3b4c65d0081de34e5b323bf64555d3e61991f76eb64a7bb" +checksum = "20888d9e1d2298e2ff473cee30efe7d5036e437857ab68bbfea84c74dba91da2" [[package]] name = "cxxbridge-macro" -version = "1.0.95" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a076022ece33e7686fb76513518e219cca4fce5750a8ae6d1ce6c0f48fd1af9" +checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -1862,7 +1881,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -1884,7 +1903,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -1926,9 +1945,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", @@ -2076,7 +2095,7 @@ version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" dependencies = [ - "dirs-sys", + "dirs-sys 0.3.7", ] [[package]] @@ -2089,6 +2108,15 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", +] + [[package]] name = "dirs-next" version = "2.0.0" @@ -2110,6 +2138,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -2129,7 +2169,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -2152,9 +2192,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dunce" @@ -2185,9 +2225,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "ecdsa" @@ -2203,11 +2243,11 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.6", + "der 0.7.8", "digest 0.10.7", "elliptic-curve 0.13.5", "rfc6979 0.4.0", @@ -2224,6 +2264,16 @@ dependencies = [ "signature 1.6.4", ] +[[package]] +name = "ed25519" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.1.0", +] + [[package]] name = "ed25519-dalek" version = "1.0.1" @@ -2231,13 +2281,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519", + "ed25519 1.5.3", "rand 0.7.3", "serde", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "ed25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519 2.2.2", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "ed25519-zebra" version = "3.1.0" @@ -2254,9 +2318,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -2287,14 +2351,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ "base16ct 0.2.0", - "crypto-bigint 0.5.2", + "crypto-bigint 0.5.3", "digest 0.10.7", "ff 0.13.0", "generic-array 0.14.7", "group 0.13.0", "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1 0.7.2", + "sec1 0.7.3", "subtle", "zeroize", ] @@ -2310,20 +2374,20 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] [[package]] name = "enr" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf56acd72bb22d2824e66ae8e9e5ada4d0de17a69c7fd35569dde2ada8ec9116" +checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" dependencies = [ - "base64 0.13.1", + "base64 0.21.4", "bytes", "hex", "k256 0.13.1", @@ -2349,22 +2413,22 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -2386,20 +2450,26 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "erased-serde" -version = "0.3.26" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6984864d65d092d9e9ada107007a846a09f75d2e24046bcce9a38d14aa52052" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" dependencies = [ "serde", ] [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -2422,7 +2492,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ - "aes 0.8.2", + "aes 0.8.3", "ctr 0.9.2", "digest 0.10.7", "hex", @@ -2432,7 +2502,7 @@ dependencies = [ "scrypt", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.8", "thiserror", "uuid 0.8.2", @@ -2508,7 +2578,7 @@ dependencies = [ "ethereum-types 0.14.1", "hash-db 0.15.2", "hash256-std-hasher", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "rlp", "scale-info", "serde", @@ -2548,9 +2618,9 @@ dependencies = [ [[package]] name = "ethers" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d5486fdc149826f38c388f26a7df72534ee3f20d3a3f72539376fa7b3bbc43d" +checksum = "1ad13497f6e0a24292fc7b408e30d22fe9dc262da1f40d7b542c3a44e7fc0476" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -2564,9 +2634,9 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c66a426b824a0f6d1361ad74b6b01adfd26c44ee1e14c3662dcf28406763ec5" +checksum = "c6e9e8acd0ed348403cc73a670c24daba3226c40b98dc1a41903766b3ab6240a" dependencies = [ "ethers-core", "once_cell", @@ -2576,16 +2646,16 @@ dependencies = [ [[package]] name = "ethers-contract" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa43e2e69632492d7b38e59465d125a0066cf4c477390ece00d3acbd11b338b" +checksum = "d79269278125006bb0552349c03593ffa9702112ca88bc7046cc669f148fb47c" dependencies = [ + "const-hex", "ethers-contract-abigen", "ethers-contract-derive", "ethers-core", "ethers-providers", "futures-util", - "hex", "once_cell", "pin-project", "serde", @@ -2595,72 +2665,68 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2edb8fdbf77459819a443234b461171a024476bfc12f1853b889a62c6e1185ff" +checksum = "ce95a43c939b2e4e2f3191c5ad4a1f279780b8a39139c9905b43a7433531e2ab" dependencies = [ "Inflector", + "const-hex", "dunce", "ethers-core", "ethers-etherscan", "eyre", - "getrandom 0.2.9", - "hex", - "prettyplease 0.2.6", + "prettyplease 0.2.15", "proc-macro2", "quote", "regex", "reqwest", "serde", "serde_json", - "syn 2.0.17", - "tokio", - "toml 0.7.4", - "url", + "syn 2.0.37", + "toml 0.7.8", "walkdir", ] [[package]] name = "ethers-contract-derive" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "939b0c37746929f869285ee37d270b7c998d80cc7404c2e20dda8efe93e3b295" +checksum = "8e9ce44906fc871b3ee8c69a695ca7ec7f70e50cb379c9b9cb5e532269e492f6" dependencies = [ "Inflector", + "const-hex", "ethers-contract-abigen", "ethers-core", - "hex", "proc-macro2", "quote", "serde_json", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] name = "ethers-core" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198ea9efa8480fa69f73d31d41b1601dace13d053c6fe4be6f5878d9dfcf0108" +checksum = "c0a17f0708692024db9956b31d7a20163607d2745953f5ae8125ab368ba280ad" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bytes", - "cargo_metadata", + "cargo_metadata 0.17.0", "chrono", + "const-hex", "elliptic-curve 0.13.5", "ethabi 18.0.0", "generic-array 0.14.7", - "getrandom 0.2.9", - "hex", "k256 0.13.1", - "num_enum 0.6.1", + "num_enum 0.7.0", "once_cell", "open-fastrlp", "rand 0.8.5", "rlp", "serde", "serde_json", - "strum", - "syn 2.0.17", + "strum 0.25.0", + "syn 2.0.37", "tempfile", "thiserror", "tiny-keccak", @@ -2669,15 +2735,13 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196a21d6939ab78b7a1e4c45c2b33b0c2dd821a2e1af7c896f06721e1ba2a0c7" +checksum = "0e53451ea4a8128fbce33966da71132cf9e1040dcfd2a2084fd7733ada7b2045" dependencies = [ "ethers-core", - "ethers-solc", - "getrandom 0.2.9", "reqwest", - "semver 1.0.17", + "semver 1.0.19", "serde", "serde_json", "thiserror", @@ -2686,9 +2750,9 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75594cc450992fc7de701c9145de612325fd8a18be765b8ae78767ba2b74876f" +checksum = "473f1ccd0c793871bbc248729fa8df7e6d2981d6226e4343e3bbaa9281074d5d" dependencies = [ "async-trait", "auto_impl", @@ -2713,24 +2777,24 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1009041f40476b972b5d79346cc512e97c662b1a0a2f78285eabe9a122909783" +checksum = "6838fa110e57d572336178b7c79e94ff88ef976306852d8cb87d9e5b1fc7c0b5" dependencies = [ "async-trait", "auto_impl", - "base64 0.21.2", + "base64 0.21.4", "bytes", + "const-hex", "enr", "ethers-core", "futures-core", "futures-timer", "futures-util", - "getrandom 0.2.9", "hashers", - "hex", "http", "instant", + "jsonwebtoken", "once_cell", "pin-project", "reqwest", @@ -2750,35 +2814,35 @@ dependencies = [ [[package]] name = "ethers-signers" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bd11ad6929f01f01be74bb00d02bbd6552f22de030865c898b340a3a592db1" +checksum = "5ea44bec930f12292866166f9ddbea6aa76304850e4d8dcd66dc492b43d00ff1" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", + "const-hex", "elliptic-curve 0.13.5", "eth-keystore", "ethers-core", - "hex", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "tracing", ] [[package]] name = "ethers-solc" -version = "2.0.4" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2284784306de73d8ad1bc792ecc1b87da0268185683698d60fd096d23d168c99" +checksum = "de34e484e7ae3cab99fbfd013d6c5dc7f9013676a4e0e414d8b12e1213e8b3ba" dependencies = [ "cfg-if", + "const-hex", + "dirs", "dunce", "ethers-core", - "getrandom 0.2.9", "glob", - "hex", "home", "md-5", "num_cpus", @@ -2786,7 +2850,7 @@ dependencies = [ "path-slash", "rayon", "regex", - "semver 1.0.17", + "semver 1.0.19", "serde", "serde_json", "solang-parser", @@ -2818,7 +2882,7 @@ dependencies = [ "evm-gasometer", "evm-runtime", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "primitive-types 0.12.1", "rlp", "scale-info", @@ -2832,7 +2896,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f1f13264b044cb66f0602180f0bc781c29accb41ff560669a3ec15858d5b606" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "primitive-types 0.12.1", "scale-info", "serde", @@ -2916,6 +2980,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + [[package]] name = "fc-cli" version = "1.0.0-dev" @@ -2960,7 +3030,7 @@ dependencies = [ "kvdb-rocksdb", "log", "parity-db", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-client-db", "smallvec", @@ -3014,7 +3084,7 @@ dependencies = [ "log", "lru", "pallet-evm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "prometheus", "rand 0.8.5", "rlp", @@ -3062,7 +3132,7 @@ dependencies = [ "ethereum-types 0.14.1", "fp-rpc", "fp-storage", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-client-api", "sp-api", "sp-blockchain", @@ -3102,9 +3172,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" [[package]] name = "file-per-thread-logger" @@ -3118,13 +3188,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -3139,7 +3209,7 @@ dependencies = [ "futures-timer", "log", "num-traits", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "scale-info", ] @@ -3176,13 +3246,13 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -3230,14 +3300,14 @@ name = "fork-tree" version = "3.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", ] [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -3251,7 +3321,7 @@ dependencies = [ "impl-serde 0.4.0", "libsecp256k1", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-core", @@ -3266,7 +3336,7 @@ version = "2.0.0-dev" source = "git+https://github.com/AstarNetwork/frontier.git?branch=polkadot-v0.9.40#e2f5879d243f5d9b8272a1ae640669065c8546f2" dependencies = [ "ethereum", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-core", "sp-runtime", "sp-std 5.0.0", @@ -3292,7 +3362,7 @@ dependencies = [ "fp-evm", "frame-support", "num_enum 0.5.11", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-std 5.0.0", ] @@ -3303,7 +3373,7 @@ source = "git+https://github.com/AstarNetwork/frontier.git?branch=polkadot-v0.9. dependencies = [ "evm", "frame-support", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "serde", "sp-core", "sp-runtime", @@ -3318,7 +3388,7 @@ dependencies = [ "ethereum", "ethereum-types 0.14.1", "fp-evm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-api", "sp-core", @@ -3333,7 +3403,7 @@ version = "1.0.0-dev" source = "git+https://github.com/AstarNetwork/frontier.git?branch=polkadot-v0.9.40#e2f5879d243f5d9b8272a1ae640669065c8546f2" dependencies = [ "frame-support", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-runtime", @@ -3344,7 +3414,7 @@ name = "fp-storage" version = "2.0.0" source = "git+https://github.com/AstarNetwork/frontier.git?branch=polkadot-v0.9.40#e2f5879d243f5d9b8272a1ae640669065c8546f2" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "serde", ] @@ -3364,7 +3434,7 @@ dependencies = [ "frame-system", "linregress", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "paste", "scale-info", "serde", @@ -3394,11 +3464,11 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "itertools", + "itertools 0.10.5", "lazy_static", "linked-hash-map", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "rand 0.8.5", "rand_pcg", "sc-block-builder", @@ -3445,7 +3515,7 @@ dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-arithmetic", "sp-core", @@ -3461,7 +3531,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-io", @@ -3477,7 +3547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" dependencies = [ "cfg-if", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", ] @@ -3495,7 +3565,7 @@ dependencies = [ "k256 0.11.6", "log", "once_cell", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "paste", "scale-info", "serde", @@ -3524,7 +3594,7 @@ dependencies = [ "cfg-expr", "derive-syn-parse", "frame-support-procedural-tools", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -3559,7 +3629,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "frame-support", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-core", @@ -3578,7 +3648,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-runtime", @@ -3590,7 +3660,7 @@ name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-api", ] @@ -3616,7 +3686,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.4", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -3687,12 +3757,12 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", "parking", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "waker-fn", ] @@ -3714,7 +3784,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -3724,8 +3794,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls 0.20.8", - "webpki 0.22.0", + "rustls 0.20.9", + "webpki 0.22.1", ] [[package]] @@ -3763,7 +3833,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "pin-utils", "slab", ] @@ -3820,9 +3890,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "js-sys", @@ -3861,12 +3931,12 @@ dependencies = [ "log", "mmr-gadget", "mmr-rpc", - "nix 0.26.2", + "nix 0.26.4", "num-bigint", "pallet-balances", "pallet-transaction-payment", "pallet-transaction-payment-rpc", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "polkadot-rpc", "prometheus", "rand 0.8.5", @@ -3907,7 +3977,7 @@ dependencies = [ "subxt", "tempfile", "tokio", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "wait-timeout", "web3", ] @@ -3974,7 +4044,7 @@ dependencies = [ "pallet-vesting", "pallet-whitelist", "pallet-xvm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "paste", "prost", "runtime-common", @@ -4053,7 +4123,7 @@ dependencies = [ "pallet-vesting", "pallet-whitelist", "pallet-xvm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "paste", "runtime-common", "scale-info", @@ -4093,7 +4163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug 0.3.0", - "polyval 0.6.0", + "polyval 0.6.1", ] [[package]] @@ -4103,15 +4173,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", - "indexmap", + "indexmap 1.9.3", "stable_deref_trait", ] [[package]] name = "gimli" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -4121,11 +4191,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -4168,9 +4238,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -4178,18 +4248,18 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "tracing", ] [[package]] name = "handlebars" -version = "4.3.7" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" dependencies = [ "log", "pest", @@ -4238,6 +4308,12 @@ dependencies = [ "ahash 0.8.3", ] +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "hashers" version = "1.0.1" @@ -4249,12 +4325,11 @@ dependencies = [ [[package]] name = "headers" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", + "base64 0.21.4", "bytes", "headers-core", "http", @@ -4289,18 +4364,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -4402,14 +4468,14 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", ] [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" @@ -4419,9 +4485,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -4431,9 +4497,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -4445,8 +4511,8 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.9", - "socket2", + "pin-project-lite 0.2.13", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -4462,24 +4528,27 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.20.8", + "rustls 0.20.9", "rustls-native-certs", "tokio", "tokio-rustls 0.23.4", - "webpki-roots", ] [[package]] name = "hyper-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ + "futures-util", "http", "hyper", - "rustls 0.21.1", + "log", + "rustls 0.21.7", + "rustls-native-certs", "tokio", - "tokio-rustls 0.24.0", + "tokio-rustls 0.24.1", + "webpki-roots 0.23.1", ] [[package]] @@ -4497,9 +4566,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -4532,7 +4601,7 @@ dependencies = [ "ibc-proto 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)", "ics23", "num-traits", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "primitive-types 0.12.1", "prost", "safe-regex", @@ -4540,12 +4609,12 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "subtle-encoding", "tendermint", "tendermint-light-client-verifier", "tendermint-proto", - "time 0.3.17", + "time", "tracing", "uint", ] @@ -4565,7 +4634,7 @@ dependencies = [ "ics23", "log", "num-traits", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "primitive-types 0.12.1", "prost", "safe-regex", @@ -4573,12 +4642,12 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "subtle-encoding", "tendermint", "tendermint-light-client-verifier", "tendermint-proto", - "time 0.3.17", + "time", "tracing", "uint", ] @@ -4593,7 +4662,7 @@ dependencies = [ "borsh", "bytes", "flex-error", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "prost", "scale-info", "serde", @@ -4610,7 +4679,7 @@ dependencies = [ "borsh", "bytes", "flex-error", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "prost", "scale-info", "serde", @@ -4629,7 +4698,7 @@ dependencies = [ "hex", "prost", "ripemd", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.8", ] @@ -4652,9 +4721,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4704,7 +4773,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", ] [[package]] @@ -4762,6 +4831,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "indexmap-nostd" version = "0.4.0" @@ -4820,7 +4899,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.3", "libc", "windows-sys 0.48.0", ] @@ -4833,31 +4912,30 @@ checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" [[package]] name = "ipconfig" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd302af1b90f2463a98fa5ad469fc212c8e3175a41c3068601bfa2727591c5be" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2", + "socket2 0.5.4", "widestring", - "winapi", + "windows-sys 0.48.0", "winreg", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix 0.37.19", + "hermit-abi 0.3.3", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -4870,11 +4948,20 @@ 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.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" @@ -4887,9 +4974,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -4911,9 +4998,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -4927,9 +5014,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ "futures-util", "http", @@ -4940,20 +5027,20 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls 0.23.4", - "tokio-util 0.7.8", + "tokio-rustls 0.24.1", + "tokio-util 0.7.9", "tracing", - "webpki-roots", + "webpki-roots 0.25.2", ] [[package]] name = "jsonrpsee-core" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "async-lock", "async-trait", "beef", @@ -4976,13 +5063,13 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" dependencies = [ "async-trait", "hyper", - "hyper-rustls 0.23.2", + "hyper-rustls 0.24.1", "jsonrpsee-core", "jsonrpsee-types", "rustc-hash", @@ -4995,9 +5082,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", "proc-macro-crate 1.1.3", @@ -5008,9 +5095,9 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" dependencies = [ "futures-channel", "futures-util", @@ -5023,16 +5110,16 @@ dependencies = [ "soketto", "tokio", "tokio-stream", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "tower", "tracing", ] [[package]] name = "jsonrpsee-types" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" dependencies = [ "anyhow", "beef", @@ -5044,9 +5131,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", "jsonrpsee-client-transport", @@ -5054,6 +5141,20 @@ dependencies = [ "jsonrpsee-types", ] +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.4", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "k256" version = "0.11.6" @@ -5063,7 +5164,7 @@ dependencies = [ "cfg-if", "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -5073,10 +5174,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", - "ecdsa 0.16.7", + "ecdsa 0.16.8", "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.6", + "sha2 0.10.8", "signature 2.1.0", ] @@ -5124,20 +5225,20 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.19.12" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b" +checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" dependencies = [ "ascii-canvas", "bit-set", "diff", "ena", "is-terminal", - "itertools", + "itertools 0.10.5", "lalrpop-util", "petgraph", "regex", - "regex-syntax 0.6.29", + "regex-syntax 0.7.5", "string_cache", "term", "tiny-keccak", @@ -5146,12 +5247,9 @@ dependencies = [ [[package]] name = "lalrpop-util" -version = "0.19.12" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" -dependencies = [ - "regex", -] +checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" [[package]] name = "lazy_static" @@ -5170,9 +5268,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libloading" @@ -5184,12 +5282,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "libm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" - [[package]] name = "libm" version = "0.2.7" @@ -5205,7 +5297,7 @@ dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.9", + "getrandom 0.2.10", "instant", "libp2p-core 0.38.0", "libp2p-dns", @@ -5237,8 +5329,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" dependencies = [ "asn1_der", - "bs58", - "ed25519-dalek", + "bs58 0.4.0", + "ed25519-dalek 1.0.1", "either", "fnv", "futures", @@ -5256,7 +5348,7 @@ dependencies = [ "rand 0.8.5", "rw-stream-sink", "sec1 0.3.0", - "sha2 0.10.6", + "sha2 0.10.8", "smallvec", "thiserror", "unsigned-varint", @@ -5329,18 +5421,18 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2d584751cecb2aabaa56106be6be91338a60a0f4e420cf2af639204f596fc1" +checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ - "bs58", - "ed25519-dalek", + "bs58 0.4.0", + "ed25519-dalek 2.0.0", "log", "multiaddr 0.17.1", "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "zeroize", ] @@ -5351,7 +5443,7 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "asynchronous-codec", "bytes", "either", @@ -5365,7 +5457,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.8", "smallvec", "thiserror", "uint", @@ -5387,7 +5479,7 @@ dependencies = [ "log", "rand 0.8.5", "smallvec", - "socket2", + "socket2 0.4.9", "tokio", "trust-dns-proto", "void", @@ -5440,7 +5532,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.8", "snow", "static_assertions", "thiserror", @@ -5480,7 +5572,7 @@ dependencies = [ "parking_lot 0.12.1", "quinn-proto", "rand 0.8.5", - "rustls 0.20.8", + "rustls 0.20.9", "thiserror", "tokio", ] @@ -5548,7 +5640,7 @@ dependencies = [ "libc", "libp2p-core 0.38.0", "log", - "socket2", + "socket2 0.4.9", "tokio", ] @@ -5564,9 +5656,9 @@ dependencies = [ "libp2p-identity", "rcgen 0.10.0", "ring", - "rustls 0.20.8", + "rustls 0.20.9", "thiserror", - "webpki 0.22.0", + "webpki 0.22.1", "x509-parser 0.14.0", "yasna", ] @@ -5612,7 +5704,7 @@ dependencies = [ "thiserror", "tinytemplate", "tokio", - "tokio-util 0.7.8", + "tokio-util 0.7.9", "webrtc", ] @@ -5632,7 +5724,7 @@ dependencies = [ "rw-stream-sink", "soketto", "url", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -5714,9 +5806,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "pkg-config", @@ -5725,9 +5817,9 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" dependencies = [ "cc", ] @@ -5749,9 +5841,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475015a7f8f017edb28d2e69813be23500ad4b32cfe3421c4148efc97324ee52" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ "nalgebra", ] @@ -5770,15 +5862,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -5786,12 +5878,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" @@ -5852,7 +5941,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -5863,9 +5952,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ "autocfg", "rawpointer", @@ -5873,26 +5962,27 @@ dependencies = [ [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest 0.10.7", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memfd" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.37.19", + "rustix 0.38.14", ] [[package]] @@ -5924,9 +6014,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -5970,15 +6060,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -5990,14 +6071,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -6007,7 +6087,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "futures", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-client-api", "sc-offchain", "sp-api", @@ -6026,7 +6106,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "anyhow", "jsonrpsee", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "serde", "sp-api", "sp-blockchain", @@ -6122,7 +6202,7 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.8", "unsigned-varint", ] @@ -6174,9 +6254,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ "approx", "matrixmultiply", @@ -6190,9 +6270,9 @@ dependencies = [ [[package]] name = "nalgebra-macros" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ "proc-macro2", "quote", @@ -6312,16 +6392,15 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", "pin-utils", - "static_assertions", ] [[package]] @@ -6348,9 +6427,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint", "num-complex", @@ -6362,9 +6441,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -6374,9 +6453,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -6398,7 +6477,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "itoa", ] @@ -6437,21 +6516,21 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", - "libm 0.2.7", + "libm", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.3", "libc", ] @@ -6466,11 +6545,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +checksum = "70bf6736f74634d299d00086f02986875b3c2d924781a6a2cb6c201e73da0ceb" dependencies = [ - "num_enum_derive 0.6.1", + "num_enum_derive 0.7.0", ] [[package]] @@ -6487,14 +6566,14 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +checksum = "56ea360eafe1022f7cc56cd7b869ed57330fb2453d0c7831d99b74c65d2f5597" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -6505,15 +6584,15 @@ checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "crc32fast", "hashbrown 0.12.3", - "indexmap", + "indexmap 1.9.3", "memchr", ] [[package]] name = "object" -version = "0.30.3" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -6538,9 +6617,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -6560,7 +6639,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "auto_impl", "bytes", "ethereum-types 0.14.1", @@ -6581,11 +6660,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if", "foreign-types", "libc", @@ -6602,7 +6681,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -6613,9 +6692,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -6623,6 +6702,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "p256" version = "0.11.1" @@ -6631,7 +6716,7 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -6642,17 +6727,7 @@ checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", -] - -[[package]] -name = "packed_simd_2" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" -dependencies = [ - "cfg-if", - "libm 0.1.4", + "sha2 0.10.8", ] [[package]] @@ -6663,7 +6738,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-runtime", @@ -6678,7 +6753,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-application-crypto", "sp-consensus-aura", @@ -6694,7 +6769,7 @@ dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-runtime", "sp-std 5.0.0", @@ -6709,7 +6784,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-runtime", "sp-std 5.0.0", @@ -6723,7 +6798,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-runtime", @@ -6738,7 +6813,7 @@ dependencies = [ "frame-system", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-consensus-beefy", @@ -6761,7 +6836,7 @@ dependencies = [ "pallet-beefy", "pallet-mmr", "pallet-session", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-api", @@ -6782,7 +6857,7 @@ dependencies = [ "frame-system", "log", "pallet-treasury", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-io", @@ -6802,7 +6877,7 @@ dependencies = [ "pallet-contracts", "pallet-contracts-primitives", "pallet-xvm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-runtime", @@ -6824,7 +6899,7 @@ dependencies = [ "log", "pallet-contracts-primitives", "pallet-contracts-proc-macro", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "rand 0.8.5", "scale-info", "serde", @@ -6845,7 +6920,7 @@ version = "7.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bitflags 1.3.2", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-runtime", "sp-std 5.0.0", @@ -6871,7 +6946,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-io", @@ -6888,7 +6963,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-inherents", @@ -6906,7 +6981,7 @@ dependencies = [ "frame-system", "log", "pallet-election-provider-support-benchmarking", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "rand 0.8.5", "scale-info", "sp-arithmetic", @@ -6915,7 +6990,7 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-std 5.0.0", - "strum", + "strum 0.24.1", ] [[package]] @@ -6926,7 +7001,7 @@ dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-npos-elections", "sp-runtime", ] @@ -6948,7 +7023,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-evm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-io", "sp-runtime", @@ -6970,7 +7045,7 @@ dependencies = [ "hex", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "rlp", "scale-info", "sp-core", @@ -6986,7 +7061,7 @@ source = "git+https://github.com/AstarNetwork/frontier.git?branch=polkadot-v0.9. dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", ] @@ -7013,7 +7088,7 @@ name = "pallet-evm-precompile-ed25519" version = "2.0.0-dev" source = "git+https://github.com/AstarNetwork/frontier.git?branch=polkadot-v0.9.40#e2f5879d243f5d9b8272a1ae640669065c8546f2" dependencies = [ - "ed25519-dalek", + "ed25519-dalek 1.0.1", "fp-evm", ] @@ -7041,7 +7116,7 @@ dependencies = [ "pallet-evm", "pallet-session", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "precompile-utils", "serde", "sha3 0.8.2", @@ -7080,7 +7155,7 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-evm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "precompile-utils", "sp-core", "sp-io", @@ -7096,7 +7171,7 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-evm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "precompile-utils", "sp-core", "sp-io", @@ -7115,7 +7190,7 @@ dependencies = [ "num_enum 0.5.11", "pallet-evm", "pallet-xvm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "precompile-utils", "sp-core", "sp-io", @@ -7148,7 +7223,7 @@ dependencies = [ "pallet-balances", "pallet-evm", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "precompile-utils", "serde", "sha3 0.8.2", @@ -7170,7 +7245,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-application-crypto", "sp-consensus-grandpa", @@ -7191,7 +7266,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-evm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-runtime", @@ -7211,7 +7286,7 @@ dependencies = [ "log", "pallet-ibc-utils", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "serde_json", @@ -7231,7 +7306,7 @@ dependencies = [ "frame-support", "ibc 0.28.0 (git+https://github.com/octopus-network/ibc-rs.git?branch=icf-m3)", "ibc-proto 0.25.0 (git+https://github.com/octopus-network/ibc-proto-rs?branch=ibc)", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-runtime", "sp-std 5.0.0", @@ -7250,10 +7325,10 @@ dependencies = [ "ibc-proto 0.25.0 (git+https://github.com/octopus-network/ibc-proto-rs?branch=ibc)", "log", "pallet-ibc-utils", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "primitive-types 0.12.1", "scale-info", - "sha2 0.10.6", + "sha2 0.10.8", "sp-io", "sp-runtime", "sp-std 5.0.0", @@ -7269,7 +7344,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-io", "sp-runtime", @@ -7286,7 +7361,7 @@ dependencies = [ "frame-system", "log", "pallet-authorship", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-application-crypto", "sp-core", @@ -7304,7 +7379,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-io", @@ -7320,7 +7395,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "safe-mix", "scale-info", "sp-runtime", @@ -7335,7 +7410,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-io", @@ -7353,7 +7428,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-io", "sp-runtime", @@ -7369,7 +7444,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-runtime", @@ -7386,7 +7461,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-io", @@ -7402,7 +7477,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-io", "sp-runtime", @@ -7418,7 +7493,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-arithmetic", "sp-core", @@ -7432,11 +7507,12 @@ name = "pallet-referenda" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ + "assert_matches", "frame-benchmarking", "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-arithmetic", @@ -7454,7 +7530,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-io", "sp-runtime", @@ -7472,7 +7548,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "pallet-timestamp", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-io", @@ -7490,7 +7566,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "rand_chacha 0.2.2", "scale-info", "sp-runtime", @@ -7509,7 +7585,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-application-crypto", @@ -7526,7 +7602,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-io", "sp-runtime", @@ -7542,7 +7618,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-inherents", "sp-io", @@ -7558,7 +7634,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-core", @@ -7574,7 +7650,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-api", "sp-blockchain", "sp-core", @@ -7589,7 +7665,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "pallet-transaction-payment", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-api", "sp-runtime", "sp-weights", @@ -7605,7 +7681,7 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "pallet-balances", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-runtime", @@ -7621,7 +7697,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-runtime", "sp-std 5.0.0", @@ -7635,7 +7711,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-api", "sp-runtime", @@ -7653,7 +7729,7 @@ dependencies = [ "log", "pallet-contracts", "pallet-evm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-core", @@ -7663,9 +7739,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.8" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4890dcb9556136a4ec2b0c51fa4a08c8b733b829506af8fff2e853f3a065985b" +checksum = "ab512a34b3c2c5e465731cc7668edf79208bbe520be03484eeb05e63ed221735" dependencies = [ "blake2", "crc32fast", @@ -7687,7 +7763,7 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bitvec 0.20.4", "byte-slice-cast", "impl-trait-for-tuples", @@ -7697,16 +7773,16 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.5.0" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bitvec 1.0.1", "byte-slice-cast", "bytes", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.1.4", + "parity-scale-codec-derive 3.6.5", "serde", ] @@ -7724,9 +7800,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.4" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -7748,9 +7824,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" [[package]] name = "parking_lot" @@ -7770,7 +7846,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", ] [[package]] @@ -7789,15 +7865,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] [[package]] @@ -7813,9 +7889,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "path-slash" @@ -7841,14 +7917,14 @@ dependencies = [ "digest 0.10.7", "hmac 0.12.1", "password-hash", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] name = "pbkdf2" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", "hmac 0.12.1", @@ -7880,25 +7956,26 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.6.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.6.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8" dependencies = [ "pest", "pest_generator", @@ -7906,36 +7983,36 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] name = "pest_meta" -version = "2.6.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 2.0.0", ] [[package]] @@ -7950,35 +8027,35 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", - "phf_shared 0.11.1", + "phf_shared 0.11.2", ] [[package]] name = "phf_generator" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_shared 0.11.1", + "phf_shared 0.11.2", "rand 0.8.5", ] [[package]] name = "phf_macros" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator", - "phf_shared 0.11.1", + "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] @@ -7992,31 +8069,31 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -8027,9 +8104,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -8053,7 +8130,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.6", + "der 0.7.8", "spki 0.7.2", ] @@ -8071,16 +8148,16 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "platforms" -version = "3.0.2" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" [[package]] name = "polkadot-core-primitives" version = "0.9.40" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.40#95fe4c8862810bffd68343231a517e62689c05c0" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-runtime", @@ -8095,7 +8172,7 @@ dependencies = [ "bounded-collections", "derive_more", "frame-support", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "polkadot-core-primitives", "scale-info", "serde", @@ -8111,7 +8188,7 @@ source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.40#95fe dependencies = [ "bitvec 1.0.1", "hex-literal", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "polkadot-core-primitives", "polkadot-parachain", "scale-info", @@ -8174,7 +8251,7 @@ dependencies = [ "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "windows-sys 0.48.0", ] @@ -8203,9 +8280,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if", "cpufeatures", @@ -8233,7 +8310,7 @@ dependencies = [ "log", "num_enum 0.5.11", "pallet-evm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "precompile-utils-macro", "sha3 0.10.8", "sp-core", @@ -8269,7 +8346,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", @@ -8283,7 +8360,7 @@ checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" dependencies = [ "anstyle", "difflib", - "itertools", + "itertools 0.10.5", "predicates-core", ] @@ -8315,12 +8392,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.6" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b69d39aab54d069e7f2fe8cb970493e7834601ca2d8c65fd7bbd183578080d1" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -8395,9 +8472,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -8477,7 +8554,7 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", @@ -8511,7 +8588,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", @@ -8563,37 +8640,31 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ "bytes", "rand 0.8.5", "ring", "rustc-hash", - "rustls 0.20.8", + "rustls 0.20.9", "slab", "thiserror", "tinyvec", "tracing", - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" - [[package]] name = "radium" version = "0.6.2" @@ -8665,7 +8736,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -8703,9 +8774,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -8713,14 +8784,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -8731,7 +8800,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", - "time 0.3.17", + "time", "x509-parser 0.13.2", "yasna", ] @@ -8744,7 +8813,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.17", + "time", "yasna", ] @@ -8772,29 +8841,29 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -8811,13 +8880,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.3" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ - "aho-corasick 1.0.1", + "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.3.8", + "regex-syntax 0.7.5", ] [[package]] @@ -8829,6 +8899,17 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.5", +] + [[package]] name = "regex-syntax" version = "0.6.29" @@ -8837,9 +8918,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "region" @@ -8855,11 +8936,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "bytes", "encoding_rs", "futures-core", @@ -8868,7 +8949,7 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-rustls 0.24.0", + "hyper-rustls 0.24.1", "hyper-tls", "ipnet", "js-sys", @@ -8877,21 +8958,21 @@ dependencies = [ "native-tls", "once_cell", "percent-encoding", - "pin-project-lite 0.2.9", - "rustls 0.21.1", + "pin-project-lite 0.2.13", + "rustls 0.21.7", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", - "tokio-rustls 0.24.0", + "tokio-rustls 0.24.1", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.2", "winreg", ] @@ -9047,9 +9128,14 @@ dependencies = [ name = "runtime-common" version = "0.1.2" dependencies = [ + "ethabi 18.0.0", + "fp-evm", + "frame-benchmarking", + "frame-election-provider-support", "frame-support", "frame-system", "log", + "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-contracts", @@ -9068,12 +9154,17 @@ dependencies = [ "pallet-scheduler", "pallet-session", "pallet-staking", + "pallet-timestamp", + "pallet-treasury", "pallet-xvm", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", + "paste", "proptest", "scale-info", "serde", + "sp-consensus-aura", "sp-core", + "sp-io", "sp-runtime", "sp-staking", "sp-std 5.0.0", @@ -9113,7 +9204,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.19", ] [[package]] @@ -9127,9 +9218,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.14" +version = "0.36.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" +checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" dependencies = [ "bitflags 1.3.2", "errno", @@ -9141,9 +9232,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags 1.3.2", "errno", @@ -9155,14 +9246,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.4" +version = "0.38.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys 0.4.7", "windows-sys 0.48.0", ] @@ -9181,33 +9272,33 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring", "sct 0.7.0", - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] name = "rustls" -version = "0.21.1" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.6", "sct 0.7.0", ] [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -9217,18 +9308,28 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64 0.21.4", +] + +[[package]] +name = "rustls-webpki" +version = "0.100.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" dependencies = [ - "base64 0.21.2", + "ring", + "untrusted", ] [[package]] name = "rustls-webpki" -version = "0.100.1" +version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring", "untrusted", @@ -9236,9 +9337,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rusty-fork" @@ -9265,9 +9366,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe-mix" @@ -9280,11 +9381,11 @@ dependencies = [ [[package]] name = "safe-proc-macro2" -version = "1.0.36" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "814c536dcd27acf03296c618dab7ad62d28e70abd7ba41d3f34a2ce707a2c666" +checksum = "7fd85be67db87168aa3c13fd0da99f48f2ab005dccad5af5626138dc1df20eb6" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -9327,9 +9428,9 @@ dependencies = [ [[package]] name = "safe_arch" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794821e4ccb0d9f979512f9c1973480123f9bd62a90d74ab0f9426fcf8f4a529" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" dependencies = [ "bytemuck", ] @@ -9371,7 +9472,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-block-builder", "sc-client-api", "sc-proposer-metrics", @@ -9391,7 +9492,7 @@ name = "sc-block-builder" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-client-api", "sp-api", "sp-block-builder", @@ -9444,7 +9545,7 @@ dependencies = [ "libp2p", "log", "names", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "rand 0.8.5", "regex", "rpassword", @@ -9479,7 +9580,7 @@ dependencies = [ "fnv", "futures", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", @@ -9509,7 +9610,7 @@ dependencies = [ "linked-hash-map", "log", "parity-db", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-client-api", "sc-state-db", @@ -9556,7 +9657,7 @@ dependencies = [ "async-trait", "futures", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -9590,7 +9691,7 @@ dependencies = [ "num-bigint", "num-rational", "num-traits", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-client-api", "sc-consensus", @@ -9648,7 +9749,7 @@ dependencies = [ "fnv", "futures", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-client-api", "sc-consensus", @@ -9681,7 +9782,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-consensus-beefy", "sc-rpc", @@ -9698,7 +9799,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "fork-tree", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-client-api", "sc-consensus", "sp-blockchain", @@ -9719,7 +9820,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "rand 0.8.5", "sc-block-builder", @@ -9754,7 +9855,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-client-api", "sc-consensus-grandpa", "sc-rpc", @@ -9775,7 +9876,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-client-api", "sc-consensus", "sc-consensus-aura", @@ -9808,7 +9909,7 @@ dependencies = [ "futures", "futures-timer", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-client-api", "sc-consensus", "sc-telemetry", @@ -9828,7 +9929,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "lru", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmi", @@ -9882,7 +9983,7 @@ dependencies = [ "libc", "log", "once_cell", - "rustix 0.36.14", + "rustix 0.36.15", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -9941,7 +10042,7 @@ dependencies = [ "log", "lru", "mockall", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "pin-project", "rand 0.8.5", @@ -9997,7 +10098,7 @@ dependencies = [ "futures", "futures-timer", "libp2p", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "prost-build", "sc-consensus", "sc-peerset", @@ -10041,7 +10142,7 @@ dependencies = [ "futures", "libp2p", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "prost", "prost-build", "sc-client-api", @@ -10068,7 +10169,7 @@ dependencies = [ "log", "lru", "mockall", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "prost", "prost-build", "sc-client-api", @@ -10097,7 +10198,7 @@ dependencies = [ "futures", "libp2p", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "pin-project", "sc-network", "sc-network-common", @@ -10123,7 +10224,7 @@ dependencies = [ "libp2p", "num_cpus", "once_cell", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "rand 0.8.5", "sc-client-api", @@ -10169,7 +10270,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", @@ -10197,7 +10298,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -10236,7 +10337,7 @@ dependencies = [ "hex", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-chain-spec", "sc-client-api", @@ -10263,7 +10364,7 @@ dependencies = [ "futures-timer", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "pin-project", "rand 0.8.5", @@ -10323,7 +10424,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sp-core", ] @@ -10350,7 +10451,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -10454,7 +10555,7 @@ dependencies = [ "linked-hash-map", "log", "num-traits", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -10505,7 +10606,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", ] @@ -10516,7 +10617,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0459d00b0dbd2e765009924a78ef36b2ff7ba116292d732f00eb0ed8e465d15" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "primitive-types 0.12.1", "scale-bits", "scale-decode-derive", @@ -10544,7 +10645,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0401b7cdae8b8aa33725f3611a051358d5b32887ecaa0fda5953a775b2d4d76" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "primitive-types 0.12.1", "scale-bits", "scale-encode-derive", @@ -10568,23 +10669,23 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.7.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b569c32c806ec3abdf3b5869fb8bf1e0d275a7c1c9b0b05603d9464632649edf" +checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" dependencies = [ "bitvec 1.0.1", "cfg-if", "derive_more", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info-derive", "serde", ] [[package]] name = "scale-info-derive" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482" +checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -10602,7 +10703,7 @@ dependencies = [ "blake2", "either", "frame-metadata", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-bits", "scale-decode", "scale-encode", @@ -10614,11 +10715,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -10652,15 +10753,15 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scratch" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" [[package]] name = "scrypt" @@ -10671,7 +10772,7 @@ dependencies = [ "hmac 0.12.1", "pbkdf2 0.11.0", "salsa20", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -10722,12 +10823,12 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.6", + "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle", @@ -10781,9 +10882,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -10794,9 +10895,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -10822,9 +10923,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" dependencies = [ "serde", ] @@ -10849,38 +10950,38 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.10" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c5113243e4a3a1c96587342d067f3e6b0f50790b6cf40d2868eb647a3eef0e" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -10889,20 +10990,20 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.13" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0a21fba416426ac927b1691996e82079f8b6156e920c85345f135b2e9ba2de" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -10934,9 +11035,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -10970,9 +11071,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -11025,9 +11126,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook-registry" @@ -11071,17 +11172,29 @@ dependencies = [ "wide", ] +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror", + "time", +] + [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -11094,9 +11207,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "snap" @@ -11106,18 +11219,18 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" +checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" dependencies = [ "aes-gcm 0.9.4", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.1", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "ring", "rustc_version 0.4.0", - "sha2 0.10.6", + "sha2 0.10.8", "subtle", ] @@ -11131,6 +11244,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soketto" version = "0.7.1" @@ -11150,11 +11273,11 @@ dependencies = [ [[package]] name = "solang-parser" -version = "0.2.4" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c5ead679f39243782be98c2689e592fc0fc9489ca2e47c9e027bd30f948df31" +checksum = "7cb9fa2fa2fa6837be8a2495486ff92e3ffe68a99b6eeba288e139efdd842457" dependencies = [ - "itertools", + "itertools 0.11.0", "lalrpop", "lalrpop-util", "phf", @@ -11169,7 +11292,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "hash-db 0.16.0", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-api-proc-macro", "sp-core", "sp-runtime", @@ -11199,7 +11322,7 @@ name = "sp-application-crypto" version = "7.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-core", @@ -11214,7 +11337,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "integer-sqrt", "num-traits", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-std 5.0.0", @@ -11226,7 +11349,7 @@ name = "sp-authority-discovery" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-api", "sp-application-crypto", @@ -11239,7 +11362,7 @@ name = "sp-block-builder" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-api", "sp-inherents", "sp-runtime", @@ -11254,7 +11377,7 @@ dependencies = [ "futures", "log", "lru", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "sp-api", "sp-consensus", @@ -11285,7 +11408,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-api", "sp-application-crypto", @@ -11304,7 +11427,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "async-trait", "merlin", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-api", @@ -11326,7 +11449,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "lazy_static", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-api", @@ -11336,7 +11459,7 @@ dependencies = [ "sp-mmr-primitives", "sp-runtime", "sp-std 5.0.0", - "strum", + "strum 0.24.1", ] [[package]] @@ -11346,7 +11469,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "finality-grandpa", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-api", @@ -11362,7 +11485,7 @@ name = "sp-consensus-slots" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-std 5.0.0", @@ -11374,7 +11497,7 @@ name = "sp-consensus-vrf" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "schnorrkel", "sp-core", @@ -11402,7 +11525,7 @@ dependencies = [ "libsecp256k1", "log", "merlin", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "primitive-types 0.12.1", "rand 0.8.5", @@ -11433,7 +11556,7 @@ dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.8", "sp-std 5.0.0", "twox-hash", @@ -11448,7 +11571,7 @@ dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.6", + "sha2 0.10.8", "sha3 0.10.8", "sp-std 8.0.0", "twox-hash", @@ -11490,7 +11613,7 @@ version = "0.13.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "environmental", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-std 5.0.0", "sp-storage", ] @@ -11502,7 +11625,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "async-trait", "impl-trait-for-tuples", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-runtime", @@ -11516,12 +11639,12 @@ version = "7.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bytes", - "ed25519", - "ed25519-dalek", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", "futures", "libsecp256k1", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "secp256k1 0.24.3", "sp-core", "sp-externalities", @@ -11543,7 +11666,7 @@ dependencies = [ "lazy_static", "sp-core", "sp-runtime", - "strum", + "strum 0.24.1", ] [[package]] @@ -11554,7 +11677,7 @@ dependencies = [ "async-trait", "futures", "merlin", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "schnorrkel", "serde", @@ -11579,7 +11702,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "ckb-merkle-mountain-range", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-api", @@ -11595,7 +11718,7 @@ name = "sp-npos-elections" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-arithmetic", @@ -11643,7 +11766,7 @@ dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "paste", "rand 0.8.5", "scale-info", @@ -11663,7 +11786,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "bytes", "impl-trait-for-tuples", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "primitive-types 0.12.1", "sp-externalities", "sp-runtime-interface-proc-macro", @@ -11691,7 +11814,7 @@ name = "sp-session" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-api", "sp-core", @@ -11705,7 +11828,7 @@ name = "sp-staking" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-runtime", @@ -11719,7 +11842,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "hash-db 0.16.0", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "rand 0.8.5", "smallvec", @@ -11749,7 +11872,7 @@ version = "7.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "impl-serde 0.4.0", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "ref-cast", "serde", "sp-debug-derive", @@ -11764,7 +11887,7 @@ dependencies = [ "async-trait", "futures-timer", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-inherents", "sp-runtime", "sp-std 5.0.0", @@ -11776,7 +11899,7 @@ name = "sp-tracing" version = "6.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-std 5.0.0", "tracing", "tracing-core", @@ -11799,7 +11922,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "async-trait", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core", "sp-inherents", @@ -11819,7 +11942,7 @@ dependencies = [ "lazy_static", "memory-db", "nohash-hasher", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parking_lot 0.12.1", "scale-info", "schnellru", @@ -11837,7 +11960,7 @@ version = "5.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "impl-serde 0.4.0", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "parity-wasm", "scale-info", "serde", @@ -11853,7 +11976,7 @@ name = "sp-version-proc-macro" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "proc-macro2", "quote", "syn 1.0.109", @@ -11867,7 +11990,7 @@ dependencies = [ "anyhow", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sp-std 5.0.0", "wasmi 0.13.2", "wasmtime", @@ -11878,7 +12001,7 @@ name = "sp-weights" version = "4.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "smallvec", @@ -11917,14 +12040,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.6", + "der 0.7.8", ] [[package]] name = "ss58-registry" -version = "1.40.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" +checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" dependencies = [ "Inflector", "num-format", @@ -11996,25 +12119,25 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structmeta" -version = "0.1.6" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "104842d6278bf64aa9d2f182ba4bde31e8aec7a131d29b7f444bb9b344a09e2a" +checksum = "78ad9e09554f0456d67a69c1584c9798ba733a5b50349a6c0d0948710523922d" dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] name = "structmeta-derive" -version = "0.1.6" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24420be405b590e2d746d83b01f09af673270cf80e9b003a5fa7b651c58c7d93" +checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] @@ -12023,7 +12146,16 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", +] + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros 0.25.2", ] [[package]] @@ -12039,6 +12171,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.37", +] + [[package]] name = "stun" version = "0.4.4" @@ -12065,7 +12210,7 @@ source = "git+https://github.com/ggxchain/ggx-frames.git?branch=polkadot-v0.9.40 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-core", @@ -12116,7 +12261,7 @@ dependencies = [ "futures", "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-rpc-api", "sc-transaction-pool-api", "sp-api", @@ -12158,7 +12303,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "jsonrpsee", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "sc-client-api", "sc-rpc-api", "scale-info", @@ -12198,10 +12343,10 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "ansi_term", "build-helper", - "cargo_metadata", + "cargo_metadata 0.15.4", "filetime", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", "toml 0.5.11", "walkdir", @@ -12243,11 +12388,11 @@ dependencies = [ "either", "frame-metadata", "futures", - "getrandom 0.2.9", + "getrandom 0.2.10", "hex", "impl-serde 0.4.0", "jsonrpsee", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "primitive-types 0.12.1", "scale-bits", "scale-decode", @@ -12272,12 +12417,12 @@ dependencies = [ "heck", "hex", "jsonrpsee", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "proc-macro2", "quote", "scale-info", "subxt-metadata", - "syn 2.0.17", + "syn 2.0.37", "thiserror", "tokio", ] @@ -12290,7 +12435,7 @@ dependencies = [ "darling 0.20.3", "proc-macro-error", "subxt-codegen", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -12299,7 +12444,7 @@ version = "0.29.0" source = "git+https://github.com/paritytech/subxt?tag=v0.29.0#e40a8629e279e80a7fbb56ff553a430a36612956" dependencies = [ "frame-metadata", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-core-hashing 9.0.0", "thiserror", @@ -12307,19 +12452,19 @@ dependencies = [ [[package]] name = "svm-rs" -version = "0.2.23" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a04fc4f5cd35c700153b233f5575ccb3237e0f941fa5049d9e98254d10bf2fe" +checksum = "597e3a746727984cb7ea2487b6a40726cad0dbe86628e7d429aa6b8c4c153db4" dependencies = [ + "dirs", "fs2", "hex", - "home", "once_cell", "reqwest", - "semver 1.0.17", + "semver 1.0.19", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "url", "zip", @@ -12338,9 +12483,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.17" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45b6ddbb36c5b969c182aec3c4a0bce7df3fbad4b77114706a49aacc80567388" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -12388,21 +12533,21 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.37.19", - "windows-sys 0.45.0", + "rustix 0.38.14", + "windows-sys 0.48.0", ] [[package]] @@ -12412,8 +12557,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c518c082146825f10d6f9a32159ae46edcfd7dae8ac630c8067594bb2a784d72" dependencies = [ "bytes", - "ed25519", - "ed25519-dalek", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", "flex-error", "futures", "num-traits", @@ -12429,7 +12574,7 @@ dependencies = [ "subtle", "subtle-encoding", "tendermint-proto", - "time 0.3.17", + "time", "zeroize", ] @@ -12443,7 +12588,7 @@ dependencies = [ "flex-error", "serde", "tendermint", - "time 0.3.17", + "time", ] [[package]] @@ -12461,7 +12606,7 @@ dependencies = [ "serde", "serde_bytes", "subtle-encoding", - "time 0.3.17", + "time", ] [[package]] @@ -12477,9 +12622,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -12492,34 +12637,34 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-strategy" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61348cf95c0dfa12f0b6155f5b564d2806f518620a28263280ae357b41c96b4a" +checksum = "b8361c808554228ad09bfed70f5c823caf8a3450b6881cc3a38eb57e8c08c1d9" dependencies = [ "proc-macro2", "quote", "structmeta", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -12549,25 +12694,14 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.5.3+5.3.0-patched" +version = "0.5.4+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" dependencies = [ "cc", "libc", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.17" @@ -12607,7 +12741,7 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -12650,19 +12784,19 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2", + "socket2 0.5.4", "tokio-macros", "windows-sys 0.48.0", ] @@ -12675,7 +12809,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -12694,18 +12828,18 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.8", + "rustls 0.20.9", "tokio", - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] name = "tokio-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.1", + "rustls 0.21.7", "tokio", ] @@ -12716,25 +12850,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tokio", - "tokio-util 0.7.8", + "tokio-util 0.7.9", ] [[package]] name = "tokio-tungstenite" -version = "0.18.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "rustls 0.20.8", + "rustls 0.21.7", "tokio", - "tokio-rustls 0.23.4", + "tokio-rustls 0.24.1", "tungstenite", - "webpki 0.22.0", - "webpki-roots", + "webpki-roots 0.25.2", ] [[package]] @@ -12748,21 +12881,21 @@ dependencies = [ "futures-io", "futures-sink", "log", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tokio", "tracing", ] @@ -12778,9 +12911,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -12790,20 +12923,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -12834,7 +12967,7 @@ dependencies = [ "http", "http-body", "http-range-header", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tower-layer", "tower-service", ] @@ -12859,20 +12992,20 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "log", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -12989,7 +13122,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2", + "socket2 0.4.9", "thiserror", "tinyvec", "tokio", @@ -13031,23 +13164,22 @@ checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" [[package]] name = "tungstenite" -version = "0.18.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ - "base64 0.13.1", "byteorder", "bytes", + "data-encoding", "http", "httparse", "log", "rand 0.8.5", - "rustls 0.20.8", + "rustls 0.21.7", "sha1", "thiserror", "url", "utf-8", - "webpki 0.22.0", ] [[package]] @@ -13083,15 +13215,15 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -13119,9 +13251,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -13134,9 +13266,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -13166,9 +13298,9 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ "asynchronous-codec", "bytes", @@ -13184,12 +13316,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", - "idna 0.3.0", + "idna 0.4.0", "percent-encoding", ] @@ -13211,17 +13343,17 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "serde", ] [[package]] name = "uuid" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -13268,15 +13400,15 @@ dependencies = [ [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -13284,11 +13416,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -13298,12 +13429,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -13312,9 +13437,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -13322,24 +13447,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -13349,9 +13474,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -13359,22 +13484,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-instrument" @@ -13402,8 +13527,8 @@ checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -13495,7 +13620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ "downcast-rs", - "libm 0.2.7", + "libm", "memory_units", "num-rational", "num-traits", @@ -13509,7 +13634,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5bf998ab792be85e20e771fe14182b4295571ad1d4f89d3da521c1bef5f597a" dependencies = [ "downcast-rs", - "libm 0.2.7", + "libm", "num-traits", ] @@ -13519,7 +13644,7 @@ version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" dependencies = [ - "indexmap", + "indexmap 1.9.3", "url", ] @@ -13541,7 +13666,7 @@ dependencies = [ "anyhow", "bincode", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", "object 0.29.0", @@ -13581,9 +13706,9 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.14", + "rustix 0.36.15", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "toml 0.5.11", "windows-sys 0.42.0", "zstd", @@ -13619,7 +13744,7 @@ dependencies = [ "anyhow", "cranelift-entity", "gimli 0.26.2", - "indexmap", + "indexmap 1.9.3", "log", "object 0.29.0", "serde", @@ -13661,7 +13786,7 @@ checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.36.14", + "rustix 0.36.15", ] [[package]] @@ -13684,7 +13809,7 @@ dependencies = [ "anyhow", "cc", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", "mach", @@ -13692,7 +13817,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.36.14", + "rustix 0.36.15", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -13713,9 +13838,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -13727,7 +13852,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44f258e254752d210b84fe117b31f1e3cc9cbf04c0d747eb7f8cf7cf5e370f6d" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "base64 0.13.1", "bytes", "derive_more", @@ -13781,9 +13906,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" dependencies = [ "ring", "untrusted", @@ -13795,9 +13920,24 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.0", + "webpki 0.22.1", +] + +[[package]] +name = "webpki-roots" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" +dependencies = [ + "rustls-webpki 0.100.3", ] +[[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + [[package]] name = "webrtc" version = "0.6.0" @@ -13821,10 +13961,10 @@ dependencies = [ "sdp", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "stun", "thiserror", - "time 0.3.17", + "time", "tokio", "turn", "url", @@ -13856,12 +13996,12 @@ dependencies = [ [[package]] name = "webrtc-dtls" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05" +checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" dependencies = [ "aes 0.6.0", - "aes-gcm 0.10.2", + "aes-gcm 0.10.3", "async-trait", "bincode", "block-modes", @@ -13873,25 +14013,24 @@ dependencies = [ "hkdf", "hmac 0.12.1", "log", - "oid-registry 0.6.1", "p256", "p384", "rand 0.8.5", "rand_core 0.6.4", - "rcgen 0.9.3", + "rcgen 0.10.0", "ring", "rustls 0.19.1", "sec1 0.3.0", "serde", "sha1", - "sha2 0.10.6", + "sha2 0.10.8", "signature 1.6.4", "subtle", "thiserror", "tokio", "webpki 0.21.4", "webrtc-util", - "x25519-dalek 2.0.0-pre.1", + "x25519-dalek 2.0.0", "x509-parser 0.13.2", ] @@ -13913,7 +14052,7 @@ dependencies = [ "tokio", "turn", "url", - "uuid 1.3.3", + "uuid 1.4.1", "waitgroup", "webrtc-mdns", "webrtc-util", @@ -13926,7 +14065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" dependencies = [ "log", - "socket2", + "socket2 0.4.9", "thiserror", "tokio", "webrtc-util", @@ -14009,20 +14148,21 @@ dependencies = [ [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.14", ] [[package]] name = "wide" -version = "0.7.9" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd0496a71f3cc6bc4bf0ed91346426a5099e93d89807e663162dc5a1069ff65" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" dependencies = [ "bytemuck", "safe_arch", @@ -14030,9 +14170,9 @@ dependencies = [ [[package]] name = "widestring" -version = "0.5.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" [[package]] name = "winapi" @@ -14052,9 +14192,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -14084,7 +14224,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -14117,7 +14257,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -14137,17 +14277,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -14158,9 +14298,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -14176,9 +14316,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -14194,9 +14334,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -14212,9 +14352,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -14230,9 +14370,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -14242,9 +14382,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -14260,26 +14400,27 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -14329,12 +14470,13 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0-pre.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", + "serde", "zeroize", ] @@ -14354,7 +14496,7 @@ dependencies = [ "ring", "rusticata-macros", "thiserror", - "time 0.3.17", + "time", ] [[package]] @@ -14372,7 +14514,7 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.17", + "time", ] [[package]] @@ -14384,7 +14526,7 @@ dependencies = [ "derivative", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "serde", "sp-weights", @@ -14407,7 +14549,7 @@ name = "xvm-chain-extension-types" version = "0.1.0" source = "git+https://github.com/AstarNetwork/astar-frame.git?branch=temp/polkadot-v0.9.40#29951da0091591a2e8fc0785adc4931c2f4d3785" dependencies = [ - "parity-scale-codec 3.5.0", + "parity-scale-codec 3.6.5", "scale-info", "sp-runtime", "sp-std 5.0.0", @@ -14445,7 +14587,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.17", + "time", ] [[package]] @@ -14465,7 +14607,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.17", + "syn 2.0.37", ] [[package]] @@ -14474,7 +14616,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ - "aes 0.8.2", + "aes 0.8.3", "byteorder", "bzip2", "constant_time_eq 0.1.5", @@ -14484,7 +14626,7 @@ dependencies = [ "hmac 0.12.1", "pbkdf2 0.11.0", "sha1", - "time 0.3.17", + "time", "zstd", ] diff --git a/Cargo.toml b/Cargo.toml index 5c894274..80a6a831 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -215,7 +215,10 @@ pallet-ics20-transfer = { default-features = false, git = "https://github.com/ib prost = { version = "0.11", default-features = false } # zk precompile +ethabi = { version = "18.0.0", default-features = false } num-bigint = { version = "0.4", default-features = false, features = ["rand"] } +rlp = { version = "0.5.2", default-features = false } + # zksnark ark-bn254 = { version = "0.4.0" } ark-crypto-primitives = { version = "0.4.0", default-features = false } diff --git a/node/src/benchmarking.rs b/node/src/benchmarking.rs index 072f5626..4e8c72c0 100644 --- a/node/src/benchmarking.rs +++ b/node/src/benchmarking.rs @@ -23,7 +23,6 @@ use std::{sync::Arc, time::Duration}; use scale_codec::Encode; // Substrate -use ggxchain_runtime::{self as runtime, AccountId, Balance, BalancesCall, SystemCall}; use sc_cli::Result; use sc_client_api::BlockBackend; use sp_core::{sr25519, Pair}; @@ -31,6 +30,11 @@ use sp_inherents::{InherentData, InherentDataProvider}; use sp_keyring::Sr25519Keyring; use sp_runtime::{generic::Era, AccountId32, OpaqueExtrinsic, SaturatedConversion}; +#[cfg(feature = "brooklyn")] +use ggxchain_runtime_brooklyn::{self as runtime, AccountId, Balance, BalancesCall, SystemCall}; +#[cfg(not(feature = "brooklyn"))] +use ggxchain_runtime_sydney::{self as runtime, AccountId, Balance, BalancesCall, SystemCall}; + use crate::service::FullClient; /// Generates extrinsics for the `benchmark overhead` command. @@ -138,6 +142,7 @@ pub fn create_benchmark_extrinsic( .checked_next_power_of_two() .map(|c| c / 2) .unwrap_or(2) as u64; + let extra: runtime::SignedExtra = ( frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), @@ -149,7 +154,9 @@ pub fn create_benchmark_extrinsic( )), frame_system::CheckNonce::::from(nonce), frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(0), + (pallet_transaction_payment::ChargeTransactionPayment::< + runtime::Runtime, + >::from(0),), ); let raw_payload = runtime::SignedPayload::from_raw( @@ -163,7 +170,7 @@ pub fn create_benchmark_extrinsic( best_hash, (), (), - (), + ((),), ), ); let signature = raw_payload.using_encoded(|e| sender.sign(e)); diff --git a/node/src/command.rs b/node/src/command.rs index c6a4c213..2587a02f 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -182,7 +182,12 @@ pub fn run() -> sc_cli::Result<()> { use frame_benchmarking_cli::{ BenchmarkCmd, ExtrinsicFactory, SUBSTRATE_REFERENCE_HARDWARE, }; - use ggxchain_runtime::{Block, ExistentialDeposit}; + + #[cfg(not(feature = "brooklyn"))] + use ggxchain_runtime_sydney::{Block, ExistentialDeposit}; + + #[cfg(feature = "brooklyn")] + use ggxchain_runtime_brooklyn::{Block, ExistentialDeposit}; let runner = cli.create_runner(cmd)?; match cmd { diff --git a/node/src/runtime/mainnet.rs b/node/src/runtime/mainnet.rs index b480ee9b..780433ad 100644 --- a/node/src/runtime/mainnet.rs +++ b/node/src/runtime/mainnet.rs @@ -149,7 +149,6 @@ pub fn testnet_genesis( }, ) }) - .into_iter() .collect(), }, ethereum: Default::default(), diff --git a/node/src/runtime/testnet.rs b/node/src/runtime/testnet.rs index da728038..725e56c8 100644 --- a/node/src/runtime/testnet.rs +++ b/node/src/runtime/testnet.rs @@ -144,7 +144,20 @@ pub fn testnet_genesis( evm_chain_id: EVMChainIdConfig { chain_id }, evm: EVMConfig { accounts: { - let mut map = BTreeMap::new(); + let mut map: BTreeMap = + Precompiles::used_addresses() + .map(|addr| { + ( + addr, + GenesisAccount { + nonce: Default::default(), + balance: Default::default(), + storage: Default::default(), + code: revert_bytecode.clone(), + }, + ) + }) + .collect(); map.insert( // H160 address of Alice dev account // Derived from SS58 (42 prefix) address @@ -184,6 +197,16 @@ pub fn testnet_genesis( code: vec![0x00], }, ); + map.insert( + H160::from_str("1000000000000000000000000000000000000666") + .expect("internal H160 is valid; qed"), + fp_evm::GenesisAccount { + nonce: U256::from(1), + balance: U256::max_value(), + storage: Default::default(), + code: vec![], // No code, this is an EOA + }, + ); map }, }, diff --git a/node/tests/evm_zk_verify_precompile_abi.json b/node/tests/evm_zk_verify_precompile_abi.json index 92d81848..42e36309 100644 --- a/node/tests/evm_zk_verify_precompile_abi.json +++ b/node/tests/evm_zk_verify_precompile_abi.json @@ -51,7 +51,7 @@ "outputs": [ { "internalType": "bool", - "name": "", + "name": "valid", "type": "bool" } ], diff --git a/precompiles/zk-groth16-verify/src/lib.rs b/precompiles/zk-groth16-verify/src/lib.rs index 590f74e7..6d608b56 100644 --- a/precompiles/zk-groth16-verify/src/lib.rs +++ b/precompiles/zk-groth16-verify/src/lib.rs @@ -9,12 +9,19 @@ use ark_crypto_primitives::snark::SNARK; use ark_groth16::Groth16; use ark::{ark_bn254_fr, ark_bn254_g1, ark_bn254_g2}; -use precompile_utils::EvmDataWriter; +use ark_std::format; +use precompile_utils::{EvmDataReader, EvmDataWriter}; pub struct ZKGroth16Verify; mod ark; +#[precompile_utils::generate_function_selector] +#[derive(Debug, PartialEq)] +pub enum Action { + Verify = "verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])", +} + impl LinearCostPrecompile for ZKGroth16Verify { const BASE: u64 = 60; const WORD: u64 = 12; @@ -22,11 +29,19 @@ impl LinearCostPrecompile for ZKGroth16Verify { fn execute(input: &[u8], _cost: u64) -> Result<(ExitSucceed, Vec), PrecompileFailure> { log::trace!(target: "precompiles::zk_groth16_verify::execute", "In zk-groth16-verify"); const MIN_INPUT_LENGTH: usize = 24 * 32; + let selector: Action = EvmDataReader::read_selector(input)?; + if input.len() < 4 + MIN_INPUT_LENGTH { return Err(PrecompileFailure::from(ExitError::InvalidRange)); } - let (_selector, input_stripped) = input.split_at(4); + match selector { + Action::Verify => Self::verify(&input[4..]), + } + } +} +impl ZKGroth16Verify { + pub fn verify(input_stripped: &[u8]) -> Result<(ExitSucceed, Vec), PrecompileFailure> { let mut cursor = 0; let mut next = || { let start = cursor; @@ -77,11 +92,15 @@ impl LinearCostPrecompile for ZKGroth16Verify { .collect::, _>>()?; // Read the input array - let pub_inputs: Vec<_> = input_stripped[input_offset..] + let pub_inputs: Vec = input_stripped[input_offset..] .chunks_exact(32) .map(ark_bn254_fr) .collect(); - + log::debug!( + target: "precompiles::zk_groth16_verify::execute", + "Pub_inputs: {:?}", + pub_inputs + ); let vk: ark_groth16::VerifyingKey> = ark_groth16::VerifyingKey { alpha_g1: vk_alpha, @@ -96,8 +115,13 @@ impl LinearCostPrecompile for ZKGroth16Verify { vk ); - let verified = Groth16::::verify(&vk, &pub_inputs, &proof) - .map_err(|_e| PrecompileFailure::from(ExitError::InvalidRange))?; + let verified = + Groth16::::verify(&vk, &pub_inputs, &proof).map_err(|e| { + let error_message = format!("{e}"); // Convert the error to a string + PrecompileFailure::Error { + exit_status: ExitError::Other(error_message.into()), + } + })?; log::debug!( target: "precompiles::zk_groth16_verify::execute", diff --git a/runtime/brooklyn/Cargo.toml b/runtime/brooklyn/Cargo.toml index 1d4263a3..bd623c46 100644 --- a/runtime/brooklyn/Cargo.toml +++ b/runtime/brooklyn/Cargo.toml @@ -100,11 +100,11 @@ pallet-contracts-primitives.workspace = true pallet-contracts.workspace = true # Ibc +ibc-proto.workspace = true +ibc.workspace = true +pallet-ibc-utils.workspace = true pallet-ibc.workspace = true pallet-ics20-transfer.workspace = true -pallet-ibc-utils.workspace = true -ibc.workspace = true -ibc-proto.workspace = true prost.workspace = true [build-dependencies] @@ -213,7 +213,16 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", + "pallet-ranked-collective/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-society/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-hotfix-sufficients/runtime-benchmarks", + "runtime-common/runtime-benchmarks", ] diff --git a/runtime/brooklyn/src/lib.rs b/runtime/brooklyn/src/lib.rs index 897d4065..7ac18a2f 100644 --- a/runtime/brooklyn/src/lib.rs +++ b/runtime/brooklyn/src/lib.rs @@ -66,6 +66,7 @@ use pallet_grandpa::{fg_primitives, AuthorityList as GrandpaAuthorityList}; use pallet_session::historical::{self as pallet_session_historical}; use pallet_transaction_payment::CurrencyAdapter; use pos::{currency, session_payout}; +use runtime_common::zk_precompile_gas_estimation; use sp_consensus_beefy as beefy_primitives; // A few exports that help ease life for downstream crates. @@ -90,9 +91,11 @@ pub use pallet_im_online::sr25519::AuthorityId as ImOnlineId; pub use pallet_timestamp::Call as TimestampCall; pub use pallet_staking::StakerStatus; -pub use runtime_common::chain_spec::{self, RuntimeConfig}; - -pub use runtime_common::precompiles::GoldenGatePrecompiles; +pub use runtime_common::{ + chain_spec::{self, RuntimeConfig}, + precompiles::GoldenGatePrecompiles, + validator_manager, +}; pub type Precompiles = GoldenGatePrecompiles; /// Type of block number. @@ -173,6 +176,7 @@ pub type OptionalSignedExtension = ( pub type OptionalSignedExtension = (pallet_transaction_payment::ChargeTransactionPayment,); pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, @@ -443,6 +447,11 @@ parameter_types! { // For weight estimation, we assume that the most locks on an individual account will be 50. // This number may need to be adjusted in the future if this assumption no longer holds true. pub const MaxLocks: u32 = 50; + + // The minimum balance that an account must have in order to be kept alive on-chain. + // This value is used by the Balances pallet to determine if an account should be + // kept alive or if it should be reaped to free up storage space. + pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; } impl pallet_balances::Config for Runtime { @@ -451,7 +460,7 @@ impl pallet_balances::Config for Runtime { type DustRemoval = (); /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = pallet_balances::weights::SubstrateWeight; type MaxLocks = MaxLocks; @@ -545,6 +554,8 @@ impl pallet_preimage::Config for Runtime { type ByteDeposit = PreimageByteDeposit; } +impl zk_precompile_gas_estimation::Config for Runtime {} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime where @@ -611,6 +622,8 @@ construct_runtime!( Mmr: pallet_mmr, Beefy: pallet_beefy, MmrLeaf: pallet_beefy_mmr, + // GGX pallets + ZKPrecompileGasEstimation: zk_precompile_gas_estimation, } ); @@ -689,7 +702,8 @@ extern crate frame_benchmarking; #[cfg(feature = "runtime-benchmarks")] mod benches { - define_benchmarks!([pallet_evm, EVM]); + // define_benchmarks!([pallet_evm, EVM]); + define_benchmarks!([zk_precompile_gas_estimation, ZKPrecompileGasEstimation]); } use fp_rpc::TransactionStatus; @@ -1150,6 +1164,7 @@ impl_runtime_apis! { add_benchmark!(params, batches, pallet_evm, PalletEvmBench::); add_benchmark!(params, batches, pallet_hotfix_sufficients, PalletHotfixSufficients::); + add_benchmark!(params, batches, zk_precompile_gas_estimation, ZKPrecompileGasEstimation); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } Ok(batches) diff --git a/runtime/runtime-common/Cargo.toml b/runtime/runtime-common/Cargo.toml index bec30a4a..83409e38 100644 --- a/runtime/runtime-common/Cargo.toml +++ b/runtime/runtime-common/Cargo.toml @@ -8,18 +8,23 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -scale-codec = { package = "parity-scale-codec", workspace = true } +scale-codec = { package = "parity-scale-codec", workspace = true, features = ["max-encoded-len"] } scale-info.workspace = true serde = { workspace = true, optional = true } +frame-benchmarking = { workspace = true, optional = true } +frame-election-provider-support.workspace = true frame-support.workspace = true frame-system.workspace = true pallet-session = { workspace = true, features = ["historical"] } +sp-consensus-aura.workspace = true sp-core.workspace = true +sp-io.workspace = true sp-runtime.workspace = true sp-staking.workspace = true sp-std.workspace = true +pallet-aura.workspace = true pallet-authorship.workspace = true pallet-balances.workspace = true pallet-contracts = { workspace = true, optional = true } @@ -37,12 +42,18 @@ pallet-evm-precompile-xvm = { workspace = true, optional = true } pallet-evm-precompile-zk-groth16-verify = { workspace = true, optional = true } pallet-scheduler.workspace = true pallet-staking.workspace = true +pallet-treasury.workspace = true pallet-xvm = { workspace = true, optional = true } -# eth abi log.workspace = true +# zk groth16 precompile gas estimation +ethabi.workspace = true [dev-dependencies] +paste.workspace = true +fp-evm.workspace = true +pallet-balances.workspace = true +pallet-timestamp.workspace = true proptest.workspace = true test-strategy.workspace = true @@ -68,12 +79,19 @@ std = [ "serde/std", "scale-codec/std", "scale-info/std", + "frame-election-provider-support/std", "frame-support/std", "frame-system/std", + "pallet-aura/std", + "pallet-balances/std", "pallet-session/std", + "pallet-staking/std", + "pallet-treasury/std", + "sp-consensus-aura/std", "sp-core/std", "sp-staking/std", "sp-std/std", + "frame-benchmarking/std", "pallet-contracts?/std", "pallet-evm?/std", @@ -90,3 +108,8 @@ std = [ "pallet-evm-precompile-zk-groth16-verify?/std", "pallet-xvm?/std", ] +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", +] diff --git a/runtime/runtime-common/src/lib.rs b/runtime/runtime-common/src/lib.rs index c376c6e0..8e85d55e 100644 --- a/runtime/runtime-common/src/lib.rs +++ b/runtime/runtime-common/src/lib.rs @@ -5,6 +5,8 @@ extern crate core; #[cfg(feature = "precompiles")] pub mod precompiles; +pub mod zk_precompile_gas_estimation; + pub mod chain_spec; pub mod pos; pub mod validator_manager; diff --git a/runtime/runtime-common/src/zk_precompile_gas_estimation/benchmarking.rs b/runtime/runtime-common/src/zk_precompile_gas_estimation/benchmarking.rs new file mode 100644 index 00000000..75a019ac --- /dev/null +++ b/runtime/runtime-common/src/zk_precompile_gas_estimation/benchmarking.rs @@ -0,0 +1,5316 @@ +use super::*; +use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; +// frontier +use ethabi::Token; +use frame_benchmarking::vec; +use pallet_evm::Runner; +use sp_core::{H256, U256}; +use sp_std::prelude::*; + +struct ZKPrecompileVerifier { + selector: H256, + verifying_key: VerifyingKey, +} + +struct VerifyingKey { + proof: Proof, + vk: VerifyingKeyComponents, + public_input: Vec, +} + +struct Proof { + a: Vec, + b: Vec>, + c: Vec, +} + +struct VerifyingKeyComponents { + alpha: Vec, + beta: Vec>, + gamma: Vec>, + delta: Vec>, + ic: Vec>, +} + +impl ZKPrecompileVerifier { + pub fn new(selector: H256, verifying_key: VerifyingKey) -> Self { + Self { + selector, + verifying_key, + } + } +} + +impl VerifyingKey { + pub fn new(proof: Proof, vk: VerifyingKeyComponents, public_input: Vec) -> Self { + Self { + proof, + vk, + public_input, + } + } +} + +impl Proof { + pub fn new(a: Vec, b: Vec>, c: Vec) -> Self { + Self { a, b, c } + } +} + +impl VerifyingKeyComponents { + pub fn new( + alpha: Vec, + beta: Vec>, + gamma: Vec>, + delta: Vec>, + ic: Vec>, + ) -> Self { + Self { + alpha, + beta, + gamma, + delta, + ic, + } + } +} + +impl ZKPrecompileVerifier { + pub fn generate_benchmarking_parameters(&self) -> Vec { + let mut encoded_call = vec![0u8; 4]; + encoded_call[0..4].copy_from_slice(&self.selector.as_bytes()[0..4]); + + let parameters = ethabi::encode(&[ + Token::FixedArray( + self.verifying_key + .proof + .a + .clone() + .into_iter() + .map(Token::Uint) + .collect(), + ), + Token::FixedArray( + self.verifying_key + .proof + .b + .clone() + .into_iter() + .map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())) + .collect(), + ), + Token::FixedArray( + self.verifying_key + .proof + .c + .clone() + .into_iter() + .map(Token::Uint) + .collect(), + ), + Token::FixedArray( + self.verifying_key + .vk + .alpha + .clone() + .into_iter() + .map(Token::Uint) + .collect(), + ), + Token::FixedArray( + self.verifying_key + .vk + .beta + .clone() + .into_iter() + .map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())) + .collect(), + ), + Token::FixedArray( + self.verifying_key + .vk + .gamma + .clone() + .into_iter() + .map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())) + .collect(), + ), + Token::FixedArray( + self.verifying_key + .vk + .delta + .clone() + .into_iter() + .map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())) + .collect(), + ), + Token::Array( + self.verifying_key + .vk + .ic + .clone() + .into_iter() + .map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())) + .collect(), + ), + Token::Array( + self.verifying_key + .public_input + .clone() + .into_iter() + .map(Token::Uint) + .collect(), + ), + ]); + encoded_call.extend(parameters); + encoded_call + } +} + +benchmarks! { + nconstraints_10 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("323654832133639084097738656057999026789295280666886852594984576709163539526").unwrap(), + U256::from_dec_str("6142957218280645039826855630872622613337777761157366378615236951849913775542").unwrap() + ], + vec![ + vec![ + U256::from_dec_str("3781402603457401622553078625624300084337446058890012151530042647448923283156").unwrap(), + U256::from_dec_str("3517436796495769146106898128956048233729888622957356948216773257280783319311").unwrap() + ], + vec![ + U256::from_dec_str("18697717875318192535466611481750571094853863458428844875498420533596881568336").unwrap(), + U256::from_dec_str("21426423909981695530725752097567643188095093768132522705564475372400085021436").unwrap() + ], + ], + vec![ + U256::from_dec_str("21613404883582191576526635676329374200679201344239432919502376530553941450391").unwrap(), + U256::from_dec_str("15157755445966041962464884593780030869511182260822371637833098723763718514455").unwrap() + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("11521346682463921906610271064518766485088278761420928386309550940286650671457").unwrap(), + U256::from_dec_str("14352830518175561380348856554041231805603495989169432000725584250110291361678").unwrap() + ], + vec![ + vec![ + U256::from_dec_str("15782596638536803844844408481637582589736413871396993858917786753770876529739").unwrap(), + U256::from_dec_str("14911823231521430202833448929652297782496660742577343858219844871404504144036").unwrap() + ], + vec![ + U256::from_dec_str("2082222914940990020573243578958386229340150899029559516350605378857473031525").unwrap(), + U256::from_dec_str("13498996195230132373906915048494917069165130851394909752977335076805840989307").unwrap() + ], + ], + vec![ + vec![ + U256::from_dec_str("3598021131780341035246011324427156192540414244243113294885735792953741606880").unwrap(), + U256::from_dec_str("2036084172531515709709771052774738245922046202318890723044728246225539963428").unwrap() + ], + vec![ + U256::from_dec_str("5925457711548235099025126547368719549508643015841982506039250719340224619945").unwrap(), + U256::from_dec_str("6297446610567432982066083461547400065680646594595441716191878482607632761242").unwrap() + ], + ], + vec![ + vec![ + U256::from_dec_str("8540596677770285018018336727251534074846909511956041125063939097422779191925").unwrap(), + U256::from_dec_str("4004145476643750015352094786522189637304633549022019774555222068038038169997").unwrap() + ], + vec![ + U256::from_dec_str("14044576757821380530542904664046256148829410228513509672845139471539338485558").unwrap(), + U256::from_dec_str("21655834928283484760531472827487408029775629615266614212974138202212982461041").unwrap() + ] + ], + vec![ + vec![ + U256::from_dec_str("18160015955331442477546361309657533914485780296451278252095683998154112390415").unwrap(), + U256::from_dec_str("2421052745427024367257863480713357899822722660532800486395996070904226714086").unwrap() + ], + vec![ + U256::from_dec_str("13418845437340247256566377432948869602549774753220761674399899795516131627829").unwrap(), + U256::from_dec_str("19073971532401628571532840417056837528958340897410372352356543204393028153748").unwrap() + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 14965631224775206224, + 3021577815302938909, + 14359293880404272991, + 1555005537055779113 + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results: Result = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ).map_err(|e| e.error.into()); + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_10 Benchmarking call end." + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_10 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_10 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_10 Benchmarking failed: {:?}", + e, + ); + panic!("nconstraints_10 Benchmarking failed"); + } + } + } + + nconstraints_50 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("2903574088029507435491062627919627539459038881203099780902103872696986272650").unwrap(), + U256::from_dec_str("3875062839032259754068923295563862040166715100637843024855021734684308685930").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("5467576156112132028552287163049386912078800648727055176723583005212825192497").unwrap(), + U256::from_dec_str("14958898784032520052694892656913773236193256742890765604760593633503039104983").unwrap(), + ], + vec![ + U256::from_dec_str("5396143311660903133040196691443703988892234257628755380984718394981374344158").unwrap(), + U256::from_dec_str("8621644456104449033213297238562527153800159584768570376273022394943050969320").unwrap(), + ], + ], + vec![ + U256::from_dec_str("11879092906448699692394725971977132036554363118574468164770659810752018463948").unwrap(), + U256::from_dec_str("6829624468475499149259780051037762599455296300930683215687755977165243124154").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("12520775544030530008009522467466185193766786263812261579427634884004150619566").unwrap(), + U256::from_dec_str("5032545863820965741764073435262250124257467813113463153084126384917060899315").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("10017955328073015145877787608777450033090741247853140204265773706371885379542").unwrap(), + U256::from_dec_str("9658203662920649739629860626443008098625554125855709045942833415049413198251").unwrap(), + ], + vec![ + U256::from_dec_str("7602415148393817869205609282139785691690714005596249546125364310759985118071").unwrap(), + U256::from_dec_str("6621887421318408197643297351639235440436194355283660692959196816576578875866").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("5311307398908794283615493653665859916837738758333406097237626345248614605789").unwrap(), + U256::from_dec_str("17876886843886949913975349493510247353159584223381019718903135647608874168034").unwrap(), + ], + vec![ + U256::from_dec_str("16871344858870476549165036353120397473700844904231047018564735968613233188965").unwrap(), + U256::from_dec_str("3780010632071163899826543545524090280002435997376718121100375224910528030644").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("5274939476765287332787933848172441391963317633567336761478263433231602711901").unwrap(), + U256::from_dec_str("20318717968421229127062334564952813061229602553850186042308931686220563993985").unwrap(), + ], + vec![ + U256::from_dec_str("18867986549807700609691354300906273266753459571664361845748650324369589087167").unwrap(), + U256::from_dec_str("3462802759155100024118895949055238081126591020075851877084161838812514424801").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("2073721309366561324099267234284336470258146869696430225377434175843251484752").unwrap(), + U256::from_dec_str("5562089018027206512286783868306950659834000523781522158661084193254167305831").unwrap(), + ], + vec![ + U256::from_dec_str("7633925392184781104787537197952383405066326059553608577981951477761067715424").unwrap(), + U256::from_dec_str("19510227686274170330355317434483857344641524658406254379151352263942714837771").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 14754876691570659999, + 1449725765053302887, + 10573592104590215630, + 2031301759166401468 + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_50 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_50 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_50 Benchmarking failed", + ); + panic!("nconstraints_50 Benchmarking failed"); + } + } + } + + nconstraints_1000 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("12451505848309631687252015279596976128225375079184616465869275088833975377438").unwrap(), + U256::from_dec_str("18028472547304696309803026581736164843724278168110632635282700219721294267849").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("724941625340075448308940885419778921267046089963198424690563710257350467820").unwrap(), + U256::from_dec_str("19418815036545241911278056687101064762643664412732993043969007894248087117385").unwrap(), + ], + vec![ + U256::from_dec_str("13249414494230793056410904135885722890271124096600389432878053498484425858770").unwrap(), + U256::from_dec_str("21762806144353143011028620465453743506764842517668851190776375592288870325215").unwrap(), + ], + ], + vec![ + U256::from_dec_str("9206867270262791130308246301015463866896172966002943363908694359851632501217").unwrap(), + U256::from_dec_str("13679683495177263967294831832954860495137891909047512983345948806664713075553").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("13896934827344718021853288836918374118104295193491067840322643424358899121542").unwrap(), + U256::from_dec_str("8854052944916041632001392967979629780372345382861670282089777314383817716115").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("3601177773308419037453361001975316835601350296485805323140167568598797930642").unwrap(), + U256::from_dec_str("48851914275316782871445347689531673984580545598074561513165366823294923594").unwrap(), + ], + vec![ + U256::from_dec_str("4538012201084519544875007504928553564968897773565284770715803834936680149613").unwrap(), + U256::from_dec_str("3155968616270588886660033728776257587454508333510911411658919790925259116614").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("6521538659624675039700866061977650833785775087701556120926232218187885377774").unwrap(), + U256::from_dec_str("18707623749213430453109215145186606994638201653518117177006249287165414157706").unwrap(), + ], + vec![ + U256::from_dec_str("11743109857123024729794370527373948778820323338754388805090881243904381703330").unwrap(), + U256::from_dec_str("3577725017182890090279110701721773090147301853148322630192233820247926772155").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("10697077492206594361644026971284249101590705030465491131467731100150008255694").unwrap(), + U256::from_dec_str("1114380532795466865933623446272212800793315337032855536172932313989250445726").unwrap(), + ], + vec![ + U256::from_dec_str("11747915450686416011932172170367549011245903715607283230565719536126230133873").unwrap(), + U256::from_dec_str("1877153534214274703747923906347594924169181268669702005894131954432202950068").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("6294921440683861296812943370338888809368101163511446375226378176013676840633").unwrap(), + U256::from_dec_str("8766686502883018606879699065134987161183815270662618961653335871316040755302").unwrap(), + ], + vec![ + U256::from_dec_str("15422085976834841481597157129530660038025986735930069198619117556493669017719").unwrap(), + U256::from_dec_str("6824904336141021449652133306590775160232847673735850151493603664420102965477").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 5637188163546619750, + 4876642863872575056, + 11311886144936918135, + 2620236256196171805 + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_1000 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_1000 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_1000 Benchmarking failed", + ); + panic!("nconstraints_1000 Benchmarking failed"); + } + } + } + nconstraints_900000 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("19469224081137364911375441935428613758543844094780123177610680784796374565509").unwrap(), + U256::from_dec_str("2964109100176825277964902990593130655404587548088911907169158668561756482373").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("1804788596044451078391485097362341934563024367189115611320140606169017734442").unwrap(), + U256::from_dec_str("13075356869764013404490647878715830765050556805353047586243641659166972614506").unwrap(), + ], + vec![ + U256::from_dec_str("11510752280195741101381678478126680255679095252133774347633523263393718090827").unwrap(), + U256::from_dec_str("19917734624109913540474402939707087760514256808495299709893660593520804971329").unwrap(), + ], + ], + vec![ + U256::from_dec_str("17650234014776935476405426867265189573543251264844619398004397025922351000524").unwrap(), + U256::from_dec_str("13980409623437481166079302794215538337078177634480935418093274323345259996058").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("7204013913559348808806179272679133668079798990573619252699122941477292720367").unwrap(), + U256::from_dec_str("14448814309541293146746525253301533902449817953703436076734477345366335651547").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("12755354931522455226769415963087662012592248962914015697167303994293035888664").unwrap(), + U256::from_dec_str("19979994508677160041392994419804596139216500302977150541381981675855322022114").unwrap(), + ], + vec![ + U256::from_dec_str("3518578052095992035034011768990132253597152650327354182069223777691356587613").unwrap(), + U256::from_dec_str("1512363495951297845516866605291301480678745477544041997800458458709067854003").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("21483901865224554977407186643009006049964266844355020377697169106001216486465").unwrap(), + U256::from_dec_str("18122216236568402305988297032517775914181563813086813006164216689752246508886").unwrap(), + ], + vec![ + U256::from_dec_str("7100124544075226034251596932805277307734457677256004047412258693103409543678").unwrap(), + U256::from_dec_str("9484826513489508497326605298995346628011303684771342589708630141744196880174").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("4294809674390523555755416088340227038268056188806697061914357207030835445784").unwrap(), + U256::from_dec_str("12772882987652274474928251216882135157601158713560023135442912416889883375009").unwrap(), + ], + vec![ + U256::from_dec_str("5017814360156811257431228283078380210712481496173867244303167538680301406355").unwrap(), + U256::from_dec_str("5483986251263351055676143301589669624262947345327185314870128974364440001262").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("10485365056956235833573091505977794158366069646492853613385564319176805042067").unwrap(), + U256::from_dec_str("21560988819791135038184934219494970236802908435926324068683299817562907341696").unwrap(), + ], + vec![ + U256::from_dec_str("9274251274730510866039258353232655161206943117093211738883330925803202790098").unwrap(), + U256::from_dec_str("19994917632455570632082635510110118222993755636207706143729050502915579896735").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 10518156496175725870, + 8513656267880232886, + 1469451646407182009, + 3425508166019525724 + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_900000 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_900000 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_900000 Benchmarking failed", + ); + panic!("nconstraints_900000 Benchmarking failed"); + } + } + } + + nconstraints_30_input_10 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("344113499780097036133410144688544669449665038469801025061703634064197059916").unwrap(), + U256::from_dec_str("8339013355837829034186604529242237434382457535922383671882155606562413431689").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("6694199005832176626648387473003377778002164049654344388623160500074797775370").unwrap(), + U256::from_dec_str("6246558478856965861562784864034844546822126660127014237507763330640717221466").unwrap(), + ], + vec![ + U256::from_dec_str("456859418727494804887897697519797382313397623366843307513728588676215628797").unwrap(), + U256::from_dec_str("19972929684979882956825623277042855987039264105600158828132263230333203670106").unwrap(), + ], + ], + vec![ + U256::from_dec_str("8991876521515422964548874095107781976525191569601242691722207742733698821028").unwrap(), + U256::from_dec_str("17304897036279645989594099459944208131107988079437513579584585106093260802053").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("16587578668155053320776501244706909164198053583863284386206654068019392556543").unwrap(), + U256::from_dec_str("17489859882312386925030082840618136961844042944104008122175974338708995824981").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("8243058085082563940310351321464397410632520885003827137093771369586433446018").unwrap(), + U256::from_dec_str("1806964369040712598415691188975966807767394918682209427183228092832571919497").unwrap(), + ], + vec![ + U256::from_dec_str("5238575049648595236335310308987023404502439315997088611926714272919127054029").unwrap(), + U256::from_dec_str("10529242360048105445622302340100671863366518517961350431989359465371013288044").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("422118731661843716781379598081446048950684758761078928178953272944418614265").unwrap(), + U256::from_dec_str("8071137901873450516865398890359069534977349842235015782367912081100468370342").unwrap(), + ], + vec![ + U256::from_dec_str("6616051543776580097026224309598118359974125974677691608309070965923230091481").unwrap(), + U256::from_dec_str("3144026861846828201735234261898216197057552604232403108299101704912138104081").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("15967728838725285670062386536689775286816477877862913251436519988213464788203").unwrap(), + U256::from_dec_str("14482652023948193853731701210376245407114581664800773915003137369238699817066").unwrap(), + ], + vec![ + U256::from_dec_str("20222564526826997580988353930405539667760709452060576182511364617433825375503").unwrap(), + U256::from_dec_str("1855904408322765948314758770516591135802311025429227172106073057339165107921").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("2234398803815490360326379119253073021265347911436036657996997085101774002925").unwrap(), + U256::from_dec_str("10214773739303944856355679056757071889148916152665035343340628435407174724717").unwrap(), + ], + vec![ + U256::from_dec_str("21500623561133929663133180424780657403302270303706782392356903439186747104812").unwrap(), + U256::from_dec_str("19328419280811286038333929820672543691407985372391054082759992875889788951230").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 14321691860995553260, + 7152862679273281751, + 12752615512303817990, + 1576113262537949146 + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_10 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_30_input_10 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_10 Benchmarking failed", + ); + panic!("nconstraints_30_input_10 Benchmarking failed"); + } + } + } + nconstraints_30_input_100 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("3780487311936056381294564418675304364481973966802209296561160829797948105411").unwrap(), + U256::from_dec_str("12392254879980640223142009257910424254771509444451393927739643876401726307795").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("5169548117445173154024813698359426977000013771483410622256640533171985245380").unwrap(), + U256::from_dec_str("11220449603083268927036844276912830985523128428499468942581840512730495047625").unwrap(), + ], + vec![ + U256::from_dec_str("7617888807668014594076695037395251387521432502213194545531858961238344338860").unwrap(), + U256::from_dec_str("3206448605631210983027663221710912427383659852717855953276353488187250079459").unwrap(), + ], + ], + vec![ + U256::from_dec_str("17260938596020642923034443094579912726381749511890996943502017876149586484217").unwrap(), + U256::from_dec_str("973711408795313031099855712156150142641887502706075552254275664528776194028").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("4155898266631322214574856388057229131381603659142355428000239527171539910720").unwrap(), + U256::from_dec_str("15919304600573806746067202721026223664629992455130946331020176989460510062648").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("10559477888637541108523299513483158185288656601390229631277602982302056830264").unwrap(), + U256::from_dec_str("21518216923189214839507247102243744126930049565774641401859791113452178471842").unwrap(), + ], + vec![ + U256::from_dec_str("20524972206762616004058259260290957844870248494446046806278424843369643489182").unwrap(), + U256::from_dec_str("17430943082223119961631960086233630485654941075995072846024219998674392652581").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("4636362103930283526843587215716464395878300635435610009766312980459671398351").unwrap(), + U256::from_dec_str("15713999866924132629927290621261290205960872899800820372400263081232019214301").unwrap(), + ], + vec![ + U256::from_dec_str("274224283373606674211197218239218941312046485596075799302472837928822177016").unwrap(), + U256::from_dec_str("10693491445395060496723678108216498586881120243971297703830999940561952271629").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("9540601502504552621404908678855872975596983734893914263055690675850649191273").unwrap(), + U256::from_dec_str("10288168694112392204164781631687615725045294841966564539511156565183262528849").unwrap(), + ], + vec![ + U256::from_dec_str("16504160099082952601826232467479510151840980336862791499394346450083636791102").unwrap(), + U256::from_dec_str("9210167978306154509907086298616199856898787966613435045760659519455958969992").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("15812098394101742886061540987450559986219804469912805896076341688421241661621").unwrap(), + U256::from_dec_str("11920211969663783445335622417572072568292106489672989284415235777753260953099").unwrap(), + ], + vec![ + U256::from_dec_str("7061409000327933635430701054193661775345794014516696263402966093123651666364").unwrap(), + U256::from_dec_str("17078047162776906089011285464212202278306676406084693061907121919624683442357").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 9831528597301135316, + 11053911270256492840, + 14337707091878126846, + 772611368070892958 + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_100 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_30_input_100 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_100 Benchmarking failed", + ); + panic!("nconstraints_30_input_100 Benchmarking failed"); + } + } + } + nconstraints_30_input_1000 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("21424271595387505713049534900676381136649432939050012296331964885140120988520").unwrap(), + U256::from_dec_str("20488789316104689748479888121024139144355086386496471461763924485714534718686").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("8417699613540073682519718294821269056423071880647667978060348740795273915651").unwrap(), + U256::from_dec_str("4036859279888161250878359321718658739242283134835030699023268489309754993434").unwrap(), + ], + vec![ + U256::from_dec_str("16249800568747110450527363597274431407786919086057853194987169090454936230259").unwrap(), + U256::from_dec_str("15005851458712291005106538565823270955208428726378749297397203143137382225457").unwrap(), + ], + ], + vec![ + U256::from_dec_str("21239990703864671714190525785674088715931473556140655107585637961585812134589").unwrap(), + U256::from_dec_str("261928180985765917331919571442880380998408670702589931014636966043229919418").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("1657406292532781196449359079614579852690925607592278296574718289470803732053").unwrap(), + U256::from_dec_str("18213557747942747074556848145237207574111244905157024361329330629173034829885").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("5419856735820685908218319193906907396496344921642651266629131019868853843815").unwrap(), + U256::from_dec_str("14007905369450574044915098075029863272475910046750101274280969769181784166430").unwrap(), + ], + vec![ + U256::from_dec_str("182200131698860550444455761364918630551676350878779858078817264277300629723").unwrap(), + U256::from_dec_str("6050431818377820601319883600432739448105157482353041283628740094609821419656").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("14463567879100083166257564330995533094334991709675023767975192973144798919122").unwrap(), + U256::from_dec_str("6166287541473141918830331239835928582190744434356526822227225877844349692203").unwrap(), + ], + vec![ + U256::from_dec_str("12512843744533735346513506961399336936527367720771340395643503621530703342395").unwrap(), + U256::from_dec_str("8394818975982736201521422268641084055810886358791398607930311472872317386487").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("8757732756289429354419510422628896433407345473998310348115924113882282945326").unwrap(), + U256::from_dec_str("1610185885725147927651201796201713521257480620743342969197368887869230657180").unwrap(), + ], + vec![ + U256::from_dec_str("2834338214415807920713929739507915327763263469562351781747229949754640383374").unwrap(), + U256::from_dec_str("20761263923134391843554423575366232120525285729512411038267095810712916924016").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("16585432354609922217222548226453277630464695131710476183479619760311567992522").unwrap(), + U256::from_dec_str("5379258900528839934525784961038010961454863754298062530193947624450477797122").unwrap(), + ], + vec![ + U256::from_dec_str("16825349369326282879106301528709807467071985531593215317852699692046311881677").unwrap(), + U256::from_dec_str("10540450379202726868409867306854114915477889581096312866635875249145708179576").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 3008789406746563016, + 7061370202899273426, + 2191755323004339933, + 1005591455220622530 + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_1000 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_30_input_1000 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_1000 Benchmarking failed", + ); + panic!("nconstraints_30_input_1000 Benchmarking failed"); + } + } + } + nconstraints_30_input_5000 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("4760178114933307527976205229418881302833473087272893863010681924222436742436").unwrap(), + U256::from_dec_str("6555056836023646163359279772724076765411780318148657506988760187885700674215").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("9540205596737585525189386078607957630969059503165883907845238817662495399607").unwrap(), + U256::from_dec_str("21777913747079267536001051597001736802905779914683258171463923506869689358122").unwrap(), + ], + vec![ + U256::from_dec_str("7652162643714058076103867092157642519402862581818067281609790687905833151647").unwrap(), + U256::from_dec_str("5174136241284192352871549806655421810249317805219641765935618077180420544939").unwrap(), + ], + ], + vec![ + U256::from_dec_str("9633653417112713107386510132385608824105920168790226750481878454006412372444").unwrap(), + U256::from_dec_str("5600932933208824148570351176368803282808856587672889614186338874655752173453").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("20563201722283471489193032980811350162387466733119686723832100493505332037220").unwrap(), + U256::from_dec_str("458683337854426284881131074995322438618437423037306322290239745015633774839").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("802687519037697530569139206036966996588449135138601551566343295868421688400").unwrap(), + U256::from_dec_str("10902489968444563758310974921240106861656913905085710523025258522577834664814").unwrap(), + ], + vec![ + U256::from_dec_str("8163282908300075270434111132545381898266738500810094061899946027883982232155").unwrap(), + U256::from_dec_str("2879234862354419255322548813414679750617024208122660306082351289172177493856").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("12946416399098615767859440028401625777970463338055590127763655113029764523456").unwrap(), + U256::from_dec_str("19000556224902286061769815260124368973839417953399533885850283592096662743016").unwrap(), + ], + vec![ + U256::from_dec_str("16883066945921282046110808795753929362007100542422795769422243319629113077450").unwrap(), + U256::from_dec_str("3229017908221308993692674040951942449106283130433174678816420254626513367678").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("16459854676924169388774046538295013154707390397685062918225181412137603478923").unwrap(), + U256::from_dec_str("20996869365345436816737319903210535785982053153529758285286719146777762981985").unwrap(), + ], + vec![ + U256::from_dec_str("21446959969822179574296836241978980045198577120638747119902976563053247153220").unwrap(), + U256::from_dec_str("4716297282146551186330252875195511360280503254452482577157100992033023717484").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("2127664998061023131080125201643658604092063304061707222326237054428506173927").unwrap(), + U256::from_dec_str("13918137729545385379467184110597023571257121066683873930760549927318081992996").unwrap(), + ], + vec![ + U256::from_dec_str("16560640526003408304721205785917894782070253870764339317137905014294472374327").unwrap(), + U256::from_dec_str("19394535992291030838186763750684977819230291410826312937425829210188321257228").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 13212982172557049181, + 17043673098390055166, + 13971391527459105160, + 1729491887349651790, + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_5000 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_30_input_5000 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_5000 Benchmarking failed", + ); + panic!("nconstraints_30_input_5000 Benchmarking failed"); + } + } + } + nconstraints_30_input_10000 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("20201588552006483041582128307591335561381558661958982754827324334159524114833").unwrap(), + U256::from_dec_str("17768889616334897699714190449991059857597665579001510168911964966707846254013").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("831427914683469755258685737297441858923030844026909228595596228891513784401").unwrap(), + U256::from_dec_str("17358733390631981546461856303504163975689822422160671163593908204299387350560").unwrap(), + ], + vec![ + U256::from_dec_str("12673178383954759426828314411760863182427996098705680584931403917390222262168").unwrap(), + U256::from_dec_str("12056092533572380482681874959737292916971452073896642753405050795241584080793").unwrap(), + ], + ], + vec![ + U256::from_dec_str("11086630979744216291689656728938462056245402184490217943698398792953833540899").unwrap(), + U256::from_dec_str("6981043472993913602669753829495794560155248771335035866541870305230603679484").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("10088605449330278081588905225706913827985798761474642054412607299987851491561").unwrap(), + U256::from_dec_str("12349112716571349951448807635426375878752472531266562453302627732729311140226").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("11234930657858483584603353214391341220392609835907149947974795594440445721655").unwrap(), + U256::from_dec_str("1047093079337214465686469751128183347143657884406521365857439579470759333731").unwrap(), + ], + vec![ + U256::from_dec_str("15864899975231343872664645828141071246029692141564279838230890638453916423742").unwrap(), + U256::from_dec_str("12053277475368564348616897081746431255423835262329161057768339971384736640081").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("20662189442791195318296211376162761628558291902545582141646463139520777475283").unwrap(), + U256::from_dec_str("9279465006661849499753241364514057268552316193158700659184124742215268752791").unwrap(), + ], + vec![ + U256::from_dec_str("17033606864312833588672465768726096906720807717470346504048425104291392352898").unwrap(), + U256::from_dec_str("15319242533246792039334613039385600689133248724151496600840914674340560979641").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("3303817333656562581428241644233610206796391323593261940899405821542387319372").unwrap(), + U256::from_dec_str("12434486975702473910116656089923156849733601159782506519440013280731025013736").unwrap(), + ], + vec![ + U256::from_dec_str("9561232329300105849651786447909752108987569955850131116304832039966768267007").unwrap(), + U256::from_dec_str("18486557213071145739422364713271115450952939790314495487369777335095317193174").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("5864321703423906069527768678401445332135246771872328360194332677453860634867").unwrap(), + U256::from_dec_str("3305620141441221125469209629518919979790470359050105194093502369856652644459").unwrap(), + ], + vec![ + U256::from_dec_str("1810088252629429255118238329671475280643793553294287131634484491846973310510").unwrap(), + U256::from_dec_str("20707970746663158481851347112547705553728126185220754421254503093218351233120").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 11033755416221607095, + 14172640425079373737, + 17268699570210893519, + 2451003838444787962, + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_10000 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_30_input_10000 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_10000 Benchmarking failed", + ); + panic!("nconstraints_30_input_10000 Benchmarking failed"); + + } + } + } + nconstraints_30_input_90000 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("7949275001087845673352113652992317737416671749823042856819742064958185730665").unwrap(), + U256::from_dec_str("5891863541401068443747112095836743353338477825995666306081231182884954636005").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("12960565378826264234747222392568347150301360486418725511109506548813034322775").unwrap(), + U256::from_dec_str("6924824876048701587380679111548259437770370772320848338373383587483809707515").unwrap(), + ], + vec![ + U256::from_dec_str("21689747160304810742710652756166876177223750769696622871469266436845305438116").unwrap(), + U256::from_dec_str("14167066926549192557125941689316913820167617731059401320567819691908586156039").unwrap(), + ], + ], + vec![ + U256::from_dec_str("19186797317064887099470636752510606772753033946198593325337771098325482447274").unwrap(), + U256::from_dec_str("3350186543680262034371474397706130211690310055235028696466009478959025709845").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("6828794497030502754628523747507406719479438181845328406281207577196379759609").unwrap(), + U256::from_dec_str("5561027388439947090438746111225212164455366280326670821700904471009784329896").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("1648517694167305339737563900225685665396551354808983529387892872646841040850").unwrap(), + U256::from_dec_str("15406833006990307743521713564090315343374212223020060642984366610793788667116").unwrap(), + ], + vec![ + U256::from_dec_str("14591594646846027404699868040454897990147675572067174007423843530180728597612").unwrap(), + U256::from_dec_str("2940958434778941597191243007999700895445672570190450648227198352981565653913").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("7676142418543194845482248509044991512324196983308812731866772308356979871307").unwrap(), + U256::from_dec_str("21511013842679919895947796523736214038726875927496967606596253311081756690725").unwrap(), + ], + vec![ + U256::from_dec_str("4652378032872178978450279958290699982888059033676566152376150880744787185780").unwrap(), + U256::from_dec_str("467504210088082002071026778234767679654059202832780062786965483300786044530").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("20744282071154891204049714936088748576694067059171789505913191933597423689555").unwrap(), + U256::from_dec_str("12596866572762256583276410876169296807308160857887657727882625055041251553242").unwrap(), + ], + vec![ + U256::from_dec_str("3588798969790877834321031026222278845206273301850566393834657489341158616535").unwrap(), + U256::from_dec_str("19268326464935908053037454129640878232926568425004490855381855273084219557079").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("10928515506460596401961934744263657631726985113185854450754018401146226707446").unwrap(), + U256::from_dec_str("1043421123157233618994554398894819122012315878788274412803269234825060696656").unwrap(), + ], + vec![ + U256::from_dec_str("21802758012415709270812560952687831790545411568500639317690833457802568775035").unwrap(), + U256::from_dec_str("8926874931677263335476856545765471099163606107894025045476086328360781102193").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 2553457387449696641, + 815105491620421980, + 17800546104409657428, + 2866567216183504159, + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_90000 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_30_input_90000 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_90000 Benchmarking failed", + ); + panic!("nconstraints_30_input_90000 Benchmarking failed"); + } + } + } + nconstraints_30_input_200000 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("19903885251949679146607224162906437591286076549652044731739108226015926915860").unwrap(), + U256::from_dec_str("11870922578907159231760438847634888925027596611865086487008358810346509550746").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("7572350741301793140585595336451242554319145556316993930579910816773197602180").unwrap(), + U256::from_dec_str("16166630091911008518878343585755669995589761813810965163203815419554661335912").unwrap(), + ], + vec![ + U256::from_dec_str("10479558631339350148140324543423297113164179377516410954282474094862685762111").unwrap(), + U256::from_dec_str("1538599836393367534859442557225095989831507256094436416355361165563840234277").unwrap(), + ], + ], + vec![ + U256::from_dec_str("18566368172831132986640612657510108843544042128267080758083569019690510537842").unwrap(), + U256::from_dec_str("14637144036179606956000163117625168358523245864386632910728645092984303842870").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("3388366987275268645608688601800038483480506575351380219459271970783548315310").unwrap(), + U256::from_dec_str("10139982329791419477606385196757134153200700293861474061701578521738893563314").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("17293003127353596916845398615566872053529832484770184120881889494052646686398").unwrap(), + U256::from_dec_str("3746742577904007471872553744363212404516454459540143078991207693255568088158").unwrap(), + ], + vec![ + U256::from_dec_str("18996426015092705424501193523094438770040629737761363033585766320236602756452").unwrap(), + U256::from_dec_str("5993252813486169444483155589566709251331252167093428959716521680127596688663").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("86221489590459042456285770827248107701675460052532768290239949641616327672").unwrap(), + U256::from_dec_str("21618235778373592971185937996314200926578828337383413751502402964191761009384").unwrap(), + ], + vec![ + U256::from_dec_str("10453895050472290645179709462208119639593757329666114205922088367970822668124").unwrap(), + U256::from_dec_str("16924749634830145681809164670725933237166438445526123149706427927968513710893").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("20506347836984398194650179863264269358088067779451739307543701941138658771117").unwrap(), + U256::from_dec_str("15256122081275324863091225387225218399888282841698960666742408225921079848693").unwrap(), + ], + vec![ + U256::from_dec_str("7881380592415293900063452944037916715621668238658562838630198037249553436647").unwrap(), + U256::from_dec_str("6003465274284900873747728448177380007802003937728590930467990944623586277089").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("5531662187275540864474040102019845108669876235687831703751327129559212127084").unwrap(), + U256::from_dec_str("11455786949456856409363436892267690994602451302132959153447251790964376014822").unwrap(), + ], + vec![ + U256::from_dec_str("17221728819314881853232886080533000381382340762620795831983019279828981481257").unwrap(), + U256::from_dec_str("19341881794793455210912817199750586531241336493382870655971958667936340901503").unwrap(), + ] + ] + ); + + let valid_input: Vec = vec![u64s_to_u256(vec![ + 17510768071209558285, + 11281672863963944712, + 17936011136389338927, + 2683423138755332222, + ])]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_200000 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "nconstraints_30_input_200000 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "nconstraints_30_input_200000 Benchmarking failed", + ); + panic!("nconstraints_30_input_200000 Benchmarking failed"); + } + } + } + + sum_10 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("4479438672593572194843316486259284641920166054544576564310150763796220593742").unwrap(), + U256::from_dec_str("5717857931841301866217201485541887040818093727574311517591849036289507799141").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("438102211713357984070931589322877643391719193099221891191956755149301376056").unwrap(), + U256::from_dec_str("14696299438400225528910058565202329177181471318954607581306780544413371767738").unwrap(), + ], + vec![ + U256::from_dec_str("18723112929967827488252389384208353884816003870032279933823625467146809072448").unwrap(), + U256::from_dec_str("781225142569358922067919798403956593420009838230922093237868933021043854113").unwrap(), + ], + ], + vec![ + U256::from_dec_str("10481213903673023503381125372528754955378591812884098928519623211332171467098").unwrap(), + U256::from_dec_str("15098195705682978185145469811146985310923026878303775073727891846327587112885").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("10600514820627226711889163536575359330497844540484876797299835164575096986123").unwrap(), + U256::from_dec_str("8955505242614929800342716899005854501255692108538633212406728467939250778259").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("11358515176167160981846987587695931342878788452018419590778128561277894807040").unwrap(), + U256::from_dec_str("7367100375568995524851051084377016949291621141008718892167611998460177966556").unwrap(), + ], + vec![ + U256::from_dec_str("9986374126991936592889887298811366506288970021158383914729072242552712258999").unwrap(), + U256::from_dec_str("5917047061876555575617149777207682047359711575786648519096749890796145313142").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("12470512550870605078154922234115021580073605821744497867586706681115325377951").unwrap(), + U256::from_dec_str("3964373607930903502336465614571930627592350216968107805643078708599943392195").unwrap(), + ], + vec![ + U256::from_dec_str("9054619931591683490625148848351137928205510101241639415537408964292455344707").unwrap(), + U256::from_dec_str("14433710971468466044075036729227299898791551573181475688890434779549865103322").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("13008751738470482081156013535203222043379316308698376931322848604706786065862").unwrap(), + U256::from_dec_str("3415558414191757405655644967374577939532374518318643852418890898323033638525").unwrap(), + ], + vec![ + U256::from_dec_str("2104722493853714523712648261788727756558190509825976396834309269877977849365").unwrap(), + U256::from_dec_str("6877732520157662584755946842350755740172704606349660337522459938993730313391").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("17691779713798847872985546462247707503645016076661816616388979822201176829753").unwrap(), + U256::from_dec_str("14451231434311244057691431183198403713720423327382654964068207207079455187712").unwrap(), + ], + vec![ + U256::from_dec_str("13620414910695185146987530463229819484652710069270717148541433045978322585419").unwrap(), + U256::from_dec_str("10875872907505029426874795808985164080699672034676409959252328566889297105865").unwrap(), + ] + ] + ); + + let valid_input = vec![ + U256::from_dec_str("55").unwrap() + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sum_10 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sum_10 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sum_10 Benchmarking failed", + ); + panic!("sum_10 Benchmarking failed"); + } + } + } + sum_50 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("3114941071688532747454764921300681791980888248199392522675009157778549895455").unwrap(), + U256::from_dec_str("6816680925124829082835883802586391663161606011222680818599486084577544527516").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("15037393792780247314317740287895838240941967969445981241792818111317913065010").unwrap(), + U256::from_dec_str("3834028682995799272226496422556310257938795862629020590068471611902272764146").unwrap(), + ], + vec![ + U256::from_dec_str("4023883034822047449129381158539093978377425715903419218696272130851521242085").unwrap(), + U256::from_dec_str("13058906875228264286034925941047330220503025517973111955115072416984072943122").unwrap(), + ], + ], + vec![ + U256::from_dec_str("5344888056894889487007260648469199417556856955544355154291642477677322944786").unwrap(), + U256::from_dec_str("19843194668352645797068691966948915569058668700830773246420232986019393210063").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("19257923683733118221652593587810195852599358412856281104090957905722976964370").unwrap(), + U256::from_dec_str("19519729727735873999148754136012144616045305047716967685280834855818506563720").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("4418606700813566482216037680863387214037640478555893901955308344977554198718").unwrap(), + U256::from_dec_str("18046767849922558936185002168253454007598159984067380537392936220227127228867").unwrap(), + ], + vec![ + U256::from_dec_str("100725403545603844224319783153051757027683253433977048289134569498829183303").unwrap(), + U256::from_dec_str("9785321212288652698655727476617710557399711491394256119637648908536562741634").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("7184324332054694882815451883063466258810341506246659357034202660488015984306").unwrap(), + U256::from_dec_str("14398081398842334723334363407187040569418119441776629783632309768037771007327").unwrap(), + ], + vec![ + U256::from_dec_str("17277213124622419955089087696435667358779233792945822269342368397066818801481").unwrap(), + U256::from_dec_str("19811781065417531456401229702422997450338397507283920558741452740912313583930").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("1627724482578854283892192357407161928314687375966263116172485631707694669812").unwrap(), + U256::from_dec_str("6839802000376483025048211234449253336394632788399066904541666906747650234382").unwrap(), + ], + vec![ + U256::from_dec_str("17974577137954059751166162247265070307968439813726452160113109110701162631938").unwrap(), + U256::from_dec_str("21289972529626386698860098501676961527414208445147370800462053148477683157991").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("20284064245383237908740484779775789109386762825985839657586769414934584661714").unwrap(), + U256::from_dec_str("17363934481847560975462360104367791101351872886050159351690589725380050257409").unwrap(), + ], + vec![ + U256::from_dec_str("3904403738619431633601997032597659843284744078768864151280168218762434423692").unwrap(), + U256::from_dec_str("4413868989856264583489102855186788724178233679332360263809134874064797750675").unwrap(), + ] + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1275").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sum_50 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sum_50 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sum_50 Benchmarking failed", + ); + panic!("sum_50 Benchmarking failed"); + } + } + } + + sum_5000 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("2104134032972066019913571175532882184351637942839921828138208604817397790978").unwrap(), + U256::from_dec_str("12625149522977248086293073767826715132905823679345516244316272790389621024575").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("18955718237898317556602416465218566057031982163829528123671300051574728240883").unwrap(), + U256::from_dec_str("18075306515520608621953959878874546391551215874677138383864573851396832159644").unwrap(), + ], + vec![ + U256::from_dec_str("3166476742865671627115278436666969186969644878053983393309132722947819232105").unwrap(), + U256::from_dec_str("8051049247607109861344268872842958063551670273736053865524986958976361214062").unwrap(), + ], + ], + vec![ + U256::from_dec_str("4814291763265323888812051590287571407031542635142019809665068757723218701627").unwrap(), + U256::from_dec_str("17930948070313125851452005455953009375012074818817251382455220462443054837203").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("19624232987744880202266197753309961915632611879850947888541508003701736644214").unwrap(), + U256::from_dec_str("5019843555387010050200067558096501184079196549422645876015184268981691000261").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("5150307298606577026396875555180704696345763655981810466632357002439129266461").unwrap(), + U256::from_dec_str("3020656302335648031712857271727816386298675153130933709481311850060508289333").unwrap(), + ], + vec![ + U256::from_dec_str("19547576195358452722114991449875886954598568010341500952076854329553571219720").unwrap(), + U256::from_dec_str("3895331072082263654317901227968966808293407907751128382134753194859731114729").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("5792479463369352075979003547777370241697788651005116088867026457677720533395").unwrap(), + U256::from_dec_str("16882159064341957118950974052606760693554763076237663579029547802558086431378").unwrap(), + ], + vec![ + U256::from_dec_str("15201299876801474331768851307298179430198466709727112330042020251492139993850").unwrap(), + U256::from_dec_str("893863620414771464835789333501093176356026692988850717670551586498757709875").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("165136411129701665870237237981894748637834826722462614973940945603783242464").unwrap(), + U256::from_dec_str("10766657827945181878791518932726777890925519579254084496220957371082172349194").unwrap(), + ], + vec![ + U256::from_dec_str("1813485593016293809685571822392302147347136682526622353828238069063634409991").unwrap(), + U256::from_dec_str("12730118542350484957903782401323352413406115135420607527656226977122246298735").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("19450458898299554306247087083239008884256452312356497246598109368644839627523").unwrap(), + U256::from_dec_str("123992241310851816418828784530061727329258706748227789362318537744292975333").unwrap(), + ], + vec![ + U256::from_dec_str("1650700423026830428199086201346242616543834285406293983963791012821269466913").unwrap(), + U256::from_dec_str("3152920600939501404817148774751227981988970987313622659392580888754616114976").unwrap(), + ] + ] + ); + + let valid_input = vec![ + U256::from_dec_str("12502500").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sum_5000 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sum_5000 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sum_5000 Benchmarking failed", + ); + panic!("sum_5000 Benchmarking failed"); + } + } + } + + sum_50000 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("10521560297681522924956535552101557954055377883537271587209095331672512231293").unwrap(), + U256::from_dec_str("3686654512637749683446869119197341068039068905923579159423036344564025864377").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("4890395955490088627121586512165392468998481877071173820388882318632254821251").unwrap(), + U256::from_dec_str("9885243823600363166628220433820250724586324090253611358758770212725684204135").unwrap(), + ], + vec![ + U256::from_dec_str("9651185291553128823215307092565172143818838202635271809942597163630971976482").unwrap(), + U256::from_dec_str("7457264071531012293581639749136580536924886204589417402009399054127419592993").unwrap(), + ], + ], + vec![ + U256::from_dec_str("2627345354605748142976160304028628661480987375506843588233396593542954599122").unwrap(), + U256::from_dec_str("8681729968580301984067665769277363721394455178806371130831646417737890294377").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("7421321362170719195081023585470135389432297716397232604489422086989398701183").unwrap(), + U256::from_dec_str("4072026971341416803293623026670767879574289631340879941991921870784524426920").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("2973474839676012411019522612887674225146102238495561333683790233803898072056").unwrap(), + U256::from_dec_str("4756088420398356546587372215087817373004751038308642279979561650652947628544").unwrap(), + ], + vec![ + U256::from_dec_str("18134483811751652906456539288278265005968212485396038963550793901997203165973").unwrap(), + U256::from_dec_str("19733531274857979315351276512779996430041767061694237978460875113100798536651").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("1470135418689977789083190292952479192678178451735632796795673595352524120366").unwrap(), + U256::from_dec_str("5512330648930976997879473235916847191061423400686751865867764833860608466852").unwrap(), + ], + vec![ + U256::from_dec_str("8727385532414213805687214017949229267547242769169729533774216518510791901252").unwrap(), + U256::from_dec_str("6002526157648728322271067956991922780742552704883496238917574496345518669191").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("20953112965721952332699311075873353918826966291896395544882354080425788226212").unwrap(), + U256::from_dec_str("9244986330211753947979669564454335484807935852348100319901614192766392809174").unwrap(), + ], + vec![ + U256::from_dec_str("14633091132354386243825187195737842488061561784614981035737595152471541943810").unwrap(), + U256::from_dec_str("18226447293937452659919522397971158104569327938800893595903771586125572293911").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("12814717307556312189651039282215441805578074271611267777533714458773278844960").unwrap(), + U256::from_dec_str("7186820657304904476047212967487229874520184333187156276378594443001564484591").unwrap(), + ], + vec![ + U256::from_dec_str("555198418426478766253895845611805598077310216839822834188225932135183360314").unwrap(), + U256::from_dec_str("13253206399154373951823381980703846825450333469684895600618793136364702673992").unwrap(), + ] + ] + ); + + let valid_input = vec![U256::from_dec_str("1250025000").unwrap()]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "Benchmarking call end.", + // ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sum_50000 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "output result {:?}", + // output + // ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sum_50000 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sum_50000 Benchmarking failed", + ); + panic!("sum_50000 Benchmarking failed"); + } + } + } + + sumout_1 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("9938350861216112811054231203277972699126921197659464974935544809385001807185").unwrap(), + U256::from_dec_str("20754348601909610501217030084772328592382611181274973942452539895656099027177").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("5515305015868084342629690395946038238674727665234420855311483453081429329162").unwrap(), + U256::from_dec_str("17446537483455495191309223490656602496508158001423723415129290719905124468748").unwrap(), + ], + vec![ + U256::from_dec_str("3930386611358464774146562361387598962026666990617968852149397208747098046424").unwrap(), + U256::from_dec_str("12749664200607251956437072816920531804207920954797765500171403273087430585686").unwrap(), + ], + ], + vec![ + U256::from_dec_str("19560759376029246774770917762129576352981383276741459039515891857991305382724").unwrap(), + U256::from_dec_str("15734770292021565005778827149409535166727027683377260372189150049608646364563").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("21733217796115117340664094616124062556432735361619337933379922909843902055515").unwrap(), + U256::from_dec_str("11458528445138916020920755047732691641150418138517915174130099425004410419388").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("1528892777992101851174077814499016728285240514808795953470350987666406934834").unwrap(), + U256::from_dec_str("15719121553978478977205161897674358216198301946293493012613276233509561742855").unwrap(), + ], + vec![ + U256::from_dec_str("11348304938307062180350959111763404727439270384731375816552220511782794870928").unwrap(), + U256::from_dec_str("7425062298693286516955806409965528686336065862277124413414678440080583191331").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("2804875110900945674713475978302264950571804196556173252173183478206581329693").unwrap(), + U256::from_dec_str("21248149018328674674239251862093725699159113249722538926825249085881448126937").unwrap(), + ], + vec![ + U256::from_dec_str("11937905968906797411243920288058802112704397972843813290927323952904789450154").unwrap(), + U256::from_dec_str("11583994651687877961370144800492703053197084517566628648623282684591065755611").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("6948345332843670535874384951250604863187455917521854956702988343215236877699").unwrap(), + U256::from_dec_str("7592227853391758702072244811620141194222566425322898305556974168308138901071").unwrap(), + ], + vec![ + U256::from_dec_str("20320075749881446343183062003450485857646019655198241442555760885804303255899").unwrap(), + U256::from_dec_str("16287761203840607067547903820157586575039034353110142941200011092583966755993").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("5903727580143985844443655542650980356290410430996215778341658075199847464323").unwrap(), + U256::from_dec_str("11996884259430469116666694100434422195076194078215478638845899818616578458076").unwrap(), + ], + vec![ + U256::from_dec_str("7085337881114239321879072118312865301523763704430159554418691955396215633039").unwrap(), + U256::from_dec_str("1480130379115126141544726883503597589909960712327226527274861716229740605644").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_1 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_1 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_1 Benchmarking failed", + ); + panic!("sumout_1 Benchmarking failed"); + } + } + } + + sumout_3 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("16886990047698791021397211555946902052303558083480918437568754609520399637420").unwrap(), + U256::from_dec_str("2158666036923715472550204975056204244361247562519274259158726699413361975377").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("21825895835348066771949343990501317097894843683430512250115671134066620251631").unwrap(), + U256::from_dec_str("4466621631021858506469772043982203005266775866614490870641688212518524595581").unwrap(), + ], + vec![ + U256::from_dec_str("4176035282152177060631306859647233493053656458958851103499068538408191035948").unwrap(), + U256::from_dec_str("11478054618053509184726472858088324642813538303220488990534337782294436141900").unwrap(), + ], + ], + vec![ + U256::from_dec_str("2783215660066684652951960961708568160262083911582630687913502540009978493094").unwrap(), + U256::from_dec_str("12293216536420324710913866412884718473844766370712205111375513783367059491745").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("5173033808064965357658509659910492294930152276344605525901535639502011399348").unwrap(), + U256::from_dec_str("17068737078093325914601548755287000154671449528138414861362494877844369116679").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("18546422218544016845270499276237522358419081403760538321534730027231631447721").unwrap(), + U256::from_dec_str("7810445849810537796619946419860277733990747614871399330031502459697394450024").unwrap(), + ], + vec![ + U256::from_dec_str("1170639424349054655683720291779988770761452909673727094673081217226173989816").unwrap(), + U256::from_dec_str("9412518718720962495243722595927760663661173673000956950863625218254861399884").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("2200736122860885030116625882728423481103104963926248602047366582063573350368").unwrap(), + U256::from_dec_str("10144419795729765523122504674541920919692895267022159856625676910310683074572").unwrap(), + ], + vec![ + U256::from_dec_str("13390729254545550118668755621583864033913527349600040291864450051082409115353").unwrap(), + U256::from_dec_str("10049685629671638387934361525360217384621934210702130547016579632581199513700").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("19667103121024340857751329572172914473199256004525176516911283862315503618923").unwrap(), + U256::from_dec_str("17096246661332763117514187398699870735557867602087681563046129321059799057215").unwrap(), + ], + vec![ + U256::from_dec_str("5747946728261847324885781741547355414535058240068054018513487219209938622249").unwrap(), + U256::from_dec_str("20967849068573472545470716505852386189926392787722866540330567432920833499864").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("10845237408084729771758679531905348867405129151866839173812886431855390540097").unwrap(), + U256::from_dec_str("1703707016089191110685983076484608595856556399796329016216676789467749613552").unwrap(), + ], + vec![ + U256::from_dec_str("6110149777882922151130458750708717975247447215574560066901560999540213459036").unwrap(), + U256::from_dec_str("2604335473336229760265035630255446069244978528812036061612414998445480891974").unwrap(), + ], + vec![ + U256::from_dec_str("17335232688503638164872257108646124236545159761624108797282027627835697028104").unwrap(), + U256::from_dec_str("8949820120400561503263628231115650124871194346512209521952934432568756809020").unwrap(), + ], + vec![ + U256::from_dec_str("17472945225672873683007250170922636087596020485883147904995489212967632436245").unwrap(), + U256::from_dec_str("3061009963934218559141330300326228190658110279298003565222855302662460452130").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("6").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_3 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_3 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_3 Benchmarking failed", + ); + panic!("sumout_3 Benchmarking failed"); + } + } + } + + sumout_5 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("10843709274069701798511921250280301584693334300670909217788413041083651717163").unwrap(), + U256::from_dec_str("16984929187729614385413559875801633684939267739432542404983191429879545973363").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("734148988538591964874068908106884716790741858016853636848093036568317136975").unwrap(), + U256::from_dec_str("19009101126100851400074367739886512661512111552427522714684639750197874542269").unwrap(), + ], + vec![ + U256::from_dec_str("17592060285412708307279524116763043954397813345633635123760549183251104162936").unwrap(), + U256::from_dec_str("13889506181636214857793531048122114805475801077448416250517876148460169211100").unwrap(), + ], + ], + vec![ + U256::from_dec_str("14232563060686721866158930720630875371569684145608628878932337428224050961095").unwrap(), + U256::from_dec_str("1153379304505972153074194911346366079704012789387132395115115570476601062069").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("14602929204623575899704572853140632308492709111903618875822489562329338716600").unwrap(), + U256::from_dec_str("1689586738876602514816831803381017781452340558398178586457594640291347324251").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("5472399972818221760148387617622606184408186046073893949062037156069912958420").unwrap(), + U256::from_dec_str("15088758066943253549000189946806726744988559838853537684885055598950377383100").unwrap(), + ], + vec![ + U256::from_dec_str("20965140394004681264140187314264751937007442823435473099253896953347314157448").unwrap(), + U256::from_dec_str("6060690771018416217128945435034565801294536828990641996243103214693154087328").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("21263140729235433474630918705483709183043987469144755035836936799756516942174").unwrap(), + U256::from_dec_str("15454285754854480671888484669874181801887589102853817499490458030152705038393").unwrap(), + ], + vec![ + U256::from_dec_str("131865583299313362102439649370460452157962165364517843475166565097979328681").unwrap(), + U256::from_dec_str("3031199517487834223134891339647304484515505296778183327653617685889942730653").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("3468906430674013119693695928268572867728233724074466649670021386689854137425").unwrap(), + U256::from_dec_str("7152580803122005503226572138561796511745831544828490575855116764117124258005").unwrap(), + ], + vec![ + U256::from_dec_str("11838997786679875543165785538783421655549584031892121869365192734986828433584").unwrap(), + U256::from_dec_str("9326037833969675641798059567930300590354374810107157670596201469638516559516").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("18012654367772022563720142058930749289295704020857186339096955550145993927017").unwrap(), + U256::from_dec_str("1820834164495870618274456212936566261697357111580171595080158790515959828160").unwrap(), + ], + vec![ + U256::from_dec_str("14564921752272533367499159134818448151761069174539749712526942006044013367624").unwrap(), + U256::from_dec_str("21424771264673466693648639329731655135896471263362765164636863696917694576743").unwrap(), + ], + vec![ + U256::from_dec_str("475727869657896018962474075772680190259478188474158088185455044188053740464").unwrap(), + U256::from_dec_str("14410774738558525043590957367040603027587866740036883757867616381286145538306").unwrap(), + ], + vec![ + U256::from_dec_str("11122269591667799379645221047239470153918191911025387915741500657620168268073").unwrap(), + U256::from_dec_str("17658889114158552675967451148822309152599407578222142601435191444872800075124").unwrap(), + ], + vec![ + U256::from_dec_str("10247277070171001623223120619585458877815606242596599730030571392627204008518").unwrap(), + U256::from_dec_str("8479449182628070681609638314620998919468112761035511418595900534618900240479").unwrap(), + ], + vec![ + U256::from_dec_str("1962015739865113713712043429590435981426176192245833450140313755224798839430").unwrap(), + U256::from_dec_str("16205122197955925140750583202721983405250616309734059872813415529671902218508").unwrap(), + ] + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("6").unwrap(), + U256::from_dec_str("10").unwrap(), + U256::from_dec_str("15").unwrap() + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_5 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_5 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_5 Benchmarking failed", + ); + panic!("sumout_5 Benchmarking failed"); + } + } + } + + sumout_8 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("20881676737166493582717361049990209142091151560277146607338080001356130551563").unwrap(), + U256::from_dec_str("18685148182132563281318375875896798947216249273522126721154367752167069271966").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("19805017985803942911996819094597598814225347516143362171828062466401419556425").unwrap(), + U256::from_dec_str("6454257483855613540563513163965581345545044507035534598690370868179178950555").unwrap(), + ], + vec![ + U256::from_dec_str("6029759526221488701419339807738355794494802551955780707582495359517196927109").unwrap(), + U256::from_dec_str("14267537981552092649796532473776382038697314253728184857929706479499924660588").unwrap(), + ], + ], + vec![ + U256::from_dec_str("9594194445262469071793565488528689703162142686015495470197658864675667005764").unwrap(), + U256::from_dec_str("12806173576837505234722625501460681990985569361840943288163429373057791635174").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("16843199197487561646169134476888510727371602451967711834418709891625862192118").unwrap(), + U256::from_dec_str("4982834246914059407767022322452524619121175829432542760151885667226965908175").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("13537923638822567297513803074712167738585661835781036936983516715534090948855").unwrap(), + U256::from_dec_str("11214527989489337965037448828413554959537012329709327451546605605029975329833").unwrap(), + ], + vec![ + U256::from_dec_str("4462141743449864304650718313134032562107623852111180981714224584326923063811").unwrap(), + U256::from_dec_str("8593795430336743569036551388690578138795757924676449205217387344751477578392").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("17309166272661014787434443764307400135052663428379855697446417017021332297530").unwrap(), + U256::from_dec_str("5496023192794917920401339916944184963784198502465903489239967703087855023608").unwrap(), + ], + vec![ + U256::from_dec_str("18916827587111283766401091943196651682285539340427490406407460155259456790394").unwrap(), + U256::from_dec_str("12299438544618647185398496571464375186770593791424093069019355848143426272476").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("17783472651095992230194984959634523916458279184006542713077780177849417194806").unwrap(), + U256::from_dec_str("4836569650671318166980489785623247713000662692959335424089941395104953246823").unwrap(), + ], + vec![ + U256::from_dec_str("5208397036236600320774363534257475251244044365748886930563031073914567820528").unwrap(), + U256::from_dec_str("19055050817214474907565862351314552256205984947772618507442964780728061953573").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("4958353703564853797480558824501374493866572548677008630806682009679433646955").unwrap(), + U256::from_dec_str("11291693312464961842059331703592439948750550091724954216017767042000996236264").unwrap(), + ], + vec![ + U256::from_dec_str("12498275799103181792627863878557495829009523362285107656610654372282690766119").unwrap(), + U256::from_dec_str("4660953423300268019590006016093722402476152146326204206929515385340767022285").unwrap(), + ], + vec![ + U256::from_dec_str("7138500762518060350238754675766385436116813573098550938636446616835446824939").unwrap(), + U256::from_dec_str("10593558873947627445673570470975584735484733850711765231108539595431195202419").unwrap(), + ], + vec![ + U256::from_dec_str("5128578074800121244687450741397033494076458406794772068903912438713735124312").unwrap(), + U256::from_dec_str("12739298773375695368884515558611087780028515164769718103051887568287014868554").unwrap(), + ], + vec![ + U256::from_dec_str("14208333732881243428572299578791263825282606806313226027225601452663343234467").unwrap(), + U256::from_dec_str("11697572475523427738804655258597612653697756472591022126910520054756212281641").unwrap(), + ], + vec![ + U256::from_dec_str("12947417320200513077005132775929421525296222658070514082956015435086603716201").unwrap(), + U256::from_dec_str("10603870931188623347190243514602488220386876361489556318755549006254763084062").unwrap(), + ], + vec![ + U256::from_dec_str("16387770851924831042551337157942839466998720794986734312705189727537868513301").unwrap(), + U256::from_dec_str("21530634239892293824934800960052121252877550002298146977275883229302441879110").unwrap(), + ], + vec![ + U256::from_dec_str("13802739621009348580166301250636211668066199382162533891337095173708507625183").unwrap(), + U256::from_dec_str("7390549673741696710038465132307739993957511234849566067102331114963870977526").unwrap(), + ], + vec![ + U256::from_dec_str("7619444939038530089326050845035495508541658656202842508270208357152287148678").unwrap(), + U256::from_dec_str("6500310581417507359356071153065385786035787026399006593758019508960807973327").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("6").unwrap(), + U256::from_dec_str("10").unwrap(), + U256::from_dec_str("15").unwrap(), + U256::from_dec_str("21").unwrap(), + U256::from_dec_str("28").unwrap(), + U256::from_dec_str("36").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_8 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_8 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_8 Benchmarking failed", + ); + panic!("sumout_8 Benchmarking failed"); + } + } + } + + sumout_10 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("8095347977558970795244894306973905848904001838702896366752039759486143590655").unwrap(), + U256::from_dec_str("11389786227461730181613149052445453595828636283243249470864002334968553081173").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("21708613222549995537668812978970219933649440225134255022725303703626994194813").unwrap(), + U256::from_dec_str("239188211415377402375320392238806616016565549618403346265681937965053169431").unwrap(), + ], + vec![ + U256::from_dec_str("3239905157092125823769350435491033426008439939030717819312650649959874173134").unwrap(), + U256::from_dec_str("12052232966415578751823016823727256388291367828304994281169873551977365031626").unwrap(), + ], + ], + vec![ + U256::from_dec_str("897402773553083836675111568099716002998450791951489272035491280385895453675").unwrap(), + U256::from_dec_str("4302991846298387183398271555952452477837006359717803162778715536752182672022").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("1008042868469261437465824462555835872984405918513720852248805969522549317398").unwrap(), + U256::from_dec_str("17948956462462396838284127242383169953057095846419418150844950289307977478505").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("8551104548742012199265803926546530567117656701099183084826067603858509033959").unwrap(), + U256::from_dec_str("18033160402793654659203629055551676044915660275765706303943849950983851388359").unwrap(), + ], + vec![ + U256::from_dec_str("18666245592989525932086991882662677749245174145376158182567864777290703859953").unwrap(), + U256::from_dec_str("12739445590586817042423266191782746191509898418710009323864773881753277149266").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("2331829126412868358771801117979852694196692966771691214227043519819366059412").unwrap(), + U256::from_dec_str("19888979373549023610391803146710987007008930621488156737270769648673859621478").unwrap(), + ], + vec![ + U256::from_dec_str("2453673301402362948623253085750603643389422628968377872756565691580988083845").unwrap(), + U256::from_dec_str("9663445074525460783023482351534650548924461390941888390004047901572505652613").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("16927652518569561664756655584955863290280627934729335681190762313953209291004").unwrap(), + U256::from_dec_str("4932558367420707526402578793947314151706672793656462574202517097413681336095").unwrap(), + ], + vec![ + U256::from_dec_str("2634665158965720057724065638899982698588247847852682145611641155204230491999").unwrap(), + U256::from_dec_str("9690377563892165618821474298831099678985125870872292050827811231043721368626").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("15646752321283466165334982599725570177394246403813099805195136296761241527233").unwrap(), + U256::from_dec_str("2673660939947951312370015187331632544726348142660533215912073160631461110194").unwrap(), + ], + vec![ + U256::from_dec_str("8795725431636628672881798189389564709124948886181390178455547202534111009338").unwrap(), + U256::from_dec_str("4110538773071852744620136310168055865424844624884280749230423420272832655948").unwrap(), + ], + vec![ + U256::from_dec_str("1831722434614555360769800136025735307898058715006643917013942103396575104215").unwrap(), + U256::from_dec_str("19989387745164304450269343019866869726210315559728705694008015771363654418682").unwrap(), + ], + vec![ + U256::from_dec_str("10862696719365997074854505211779324198035920467781370644724921446857917651996").unwrap(), + U256::from_dec_str("9116798754108731679801642195848458981493300338319414129478047681468689383121").unwrap(), + ], + vec![ + U256::from_dec_str("16768252193135174475066659836349285218577351670934937518606124353068436732280").unwrap(), + U256::from_dec_str("13373738945795732208212519161819821211235233264106510550098917898260605099707").unwrap(), + ], + vec![ + U256::from_dec_str("542836645169683970941273656817512961230019569896206162978989160115050828365").unwrap(), + U256::from_dec_str("3342534425975518224378168738779764102272719874861318177064435130732411210368").unwrap(), + ], + vec![ + U256::from_dec_str("1770766751918227923442808905725672958134690651505108229474581836615986300515").unwrap(), + U256::from_dec_str("21053352455656543786046861160862658391653611956434282730527309466510916590010").unwrap(), + ], + vec![ + U256::from_dec_str("20880233474430230226643725074209261213944122688335980068588310045451961241696").unwrap(), + U256::from_dec_str("8791463445716605276609109968668430420344826553389688804713588795902347288143").unwrap(), + ], + vec![ + U256::from_dec_str("18577375943106027695484211293909818336439163081296645089367052818189591231338").unwrap(), + U256::from_dec_str("4321732139643796718169445123275382387645361160952863834396437890748602330532").unwrap(), + ], + vec![ + U256::from_dec_str("10314948068545990837002165860394752996164087839142117273228424101259185001002").unwrap(), + U256::from_dec_str("1219317476656503163020791040029674985228288088100785556071334850164078598664").unwrap(), + ], + vec![ + U256::from_dec_str("20369783784101349031638736538393623333643160768611915809859932035797922480026").unwrap(), + U256::from_dec_str("2022155339791641519218630090672540669148716363586469003730495586402216125347").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("6").unwrap(), + U256::from_dec_str("10").unwrap(), + U256::from_dec_str("15").unwrap(), + U256::from_dec_str("21").unwrap(), + U256::from_dec_str("28").unwrap(), + U256::from_dec_str("36").unwrap(), + U256::from_dec_str("45").unwrap(), + U256::from_dec_str("55").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_10 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_10 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_10 Benchmarking failed", + ); + panic!("sumout_10 Benchmarking failed"); + } + } + } + + sumout_12 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("10678216327021239791495061437747847264659254646405410835995870885562189659878").unwrap(), + U256::from_dec_str("8761704370667248778922819575959420459857647618994282299958428953088561107560").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("8321848050333625644069000415252127116589656568901903629556956574360865016809").unwrap(), + U256::from_dec_str("8384658520212855102478260838149819693091725582498835147548352582021949594963").unwrap(), + ], + vec![ + U256::from_dec_str("3770359937661059505252608927767095077492661514400658547012520648582203048408").unwrap(), + U256::from_dec_str("3529784532113968623662330699908137485954980022129653872444397209141826251473").unwrap(), + ], + ], + vec![ + U256::from_dec_str("4705370747374071844930946489229229872881908444966715664904386641107882480824").unwrap(), + U256::from_dec_str("19986445778680556370923606923016458353128173727636088941150671422181521841587").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("10908812779208764458926225885786000177375281860565170285671641496279275861828").unwrap(), + U256::from_dec_str("9799857308176907495837560301836136037191379657982632569243527710538263747953").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("8875574684981713823643201920386676384608102436522842095334134617286263764542").unwrap(), + U256::from_dec_str("6479740794118221987496646366125424954976260650207607249416083588160064029713").unwrap(), + ], + vec![ + U256::from_dec_str("2000063549109574433659751301145359407962925053546745695255853892415998211427").unwrap(), + U256::from_dec_str("8978561107432458649913523321794599249451491250594440475529904908089104723622").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("300802291087457914851925428899689384077331048328269093618223108664964823570").unwrap(), + U256::from_dec_str("8865288388013568285490817864856410066558523665602904501832397747932479098531").unwrap(), + ], + vec![ + U256::from_dec_str("19869995418496215898062302965642426582779874214462186317706024702601899014194").unwrap(), + U256::from_dec_str("13390306745571857664751285542582216134343088779623754549999133942932770241738").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("4865530596920678143514720246031070564475186170621062271332162290940892835646").unwrap(), + U256::from_dec_str("425558782916879613747479872909542286212413009319811627068712669719204459009").unwrap(), + ], + vec![ + U256::from_dec_str("14280364779325396808134659809671863728861497766987810166986747587937753155420").unwrap(), + U256::from_dec_str("10157821355317239779823773394681666569085014825500396192845621348313614416302").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("5077257330623675885939934768370950104582038333816470525140085934362181966137").unwrap(), + U256::from_dec_str("21590736165200670756412215987782110683410511192188292195822616418371654753741").unwrap(), + ], + vec![ + U256::from_dec_str("18280467089374114886419816344796237013631762412466882786964276277982883666042").unwrap(), + U256::from_dec_str("11485344019443762604807444303195364775881039088908610566033356938937497764373").unwrap(), + ], + vec![ + U256::from_dec_str("1751181504701297498660939287755176392070958106184310143186418668952529701336").unwrap(), + U256::from_dec_str("18736932220693579046179817485414749648152355566594839961039608036135808206151").unwrap(), + ], + vec![ + U256::from_dec_str("21312152220282516002927156143098977719015192971046736078567907261902527789628").unwrap(), + U256::from_dec_str("10860773398015071182683502891538197212844225511698561100014964817267559412040").unwrap(), + ], + vec![ + U256::from_dec_str("19213317000677932000832764919824843611437100907614316132834763294564357679030").unwrap(), + U256::from_dec_str("13111222029963575410995049632780974434271987081267940693386298389237806957098").unwrap(), + ], + vec![ + U256::from_dec_str("3443742642228361401389419381310437614798303534754415153009098249760587588145").unwrap(), + U256::from_dec_str("7744789485747118631461059019849731351689596466532055389408736826440805536735").unwrap(), + ], + vec![ + U256::from_dec_str("7435039988569923075244353313547948053391148527555628591292741199024066970135").unwrap(), + U256::from_dec_str("11046311630463377170355961221617143843117652341179127685539086936254925519686").unwrap(), + ], + vec![ + U256::from_dec_str("15297665691078029562294174705734310900359658439705626350781557084124323125519").unwrap(), + U256::from_dec_str("1364806105271580183714977095246233959855350281838839613346051539860853034390").unwrap(), + ], + vec![ + U256::from_dec_str("16182913767360895651204241660486317958300561196841976764409472315424042489856").unwrap(), + U256::from_dec_str("16339286891979828690592962765027450964989749947359765283073535710465615599250").unwrap(), + ], + vec![ + U256::from_dec_str("21575807155821147451222063394016891163053568165439964049101545653944062898132").unwrap(), + U256::from_dec_str("12371960356859909936672076205340736555848052976513199823807067061233917890308").unwrap(), + ], + vec![ + U256::from_dec_str("8990730410639111775085854283714024130596570124701374392253236961070523441877").unwrap(), + U256::from_dec_str("19255521192585577283930550804749005294045120462318692755332022063761472178542").unwrap(), + ], + vec![ + U256::from_dec_str("13320084394492248060490191350301804238250075203939012239448020526455826338619").unwrap(), + U256::from_dec_str("14257121049773316510902540165944619764221000278529377562530357678201148349783").unwrap(), + ], + vec![ + U256::from_dec_str("10413866546283584888554122264730221359972621491764741530663968262596943342816").unwrap(), + U256::from_dec_str("6517317702577541907505416253741115772092764156468351641670910298537704748423").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("6").unwrap(), + U256::from_dec_str("10").unwrap(), + U256::from_dec_str("15").unwrap(), + U256::from_dec_str("21").unwrap(), + U256::from_dec_str("28").unwrap(), + U256::from_dec_str("36").unwrap(), + U256::from_dec_str("45").unwrap(), + U256::from_dec_str("55").unwrap(), + U256::from_dec_str("66").unwrap(), + U256::from_dec_str("78").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_12 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_12 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_12 Benchmarking failed", + ); + panic!("sumout_12 Benchmarking failed"); + } + } + } + + sumout_15 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("21585823022431357826313674931621886543236834982289246714992743286376977868419").unwrap(), + U256::from_dec_str("7586678945863927211661133741820075312545324139326102654404133129309244972746").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("17555814517186373100161784981688729927129395923544443054321966341581129282393").unwrap(), + U256::from_dec_str("7282547604111412630488355620323254420866246961778488838010455131596810507996").unwrap(), + ], + vec![ + U256::from_dec_str("20713205203394977430100275064206656162423873472847285768042185373389150331759").unwrap(), + U256::from_dec_str("21594434550845851185653620887682118555994201709039016918315905233204134362395").unwrap(), + ], + ], + vec![ + U256::from_dec_str("9553527308364266671450755468661721124726046549095186915848897612832666669104").unwrap(), + U256::from_dec_str("11201734029982017624737447275065436309338979180962200791637778279686032883214").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("3216230770444528088776158534242932327068728121815873071849223010607020335058").unwrap(), + U256::from_dec_str("21035809065301821627526137231507537292096888122223808691041174759761119220267").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("3117446826555143230699140819891988283299523756237412166668770967385826469061").unwrap(), + U256::from_dec_str("1106011150835632885010646871826845378592629967358666497747945481466306112631").unwrap(), + ], + vec![ + U256::from_dec_str("2031803257794032494221338998687539109995321195789701372872082220755008700935").unwrap(), + U256::from_dec_str("11356081879090717733075995723613325531791197494523954848147361327178076996398").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("18501235594532758685356617643293397665990404990535859450562994349740531359954").unwrap(), + U256::from_dec_str("6064697307908680945151400145510311630157828610555420079802490329525473148112").unwrap(), + ], + vec![ + U256::from_dec_str("7588288119916448725682829538677035363474240351868137059873143928863164784498").unwrap(), + U256::from_dec_str("9274782715817123279177582291910200696665013934498334039985344489430227846656").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("1371652079761960603156000555240109860059987026059613009913618544836739152585").unwrap(), + U256::from_dec_str("16438218313867099055033729216771189397229055480760839479410444015762186153011").unwrap(), + ], + vec![ + U256::from_dec_str("21625074976737722082451218446149574583326591404236641360262678817113664694657").unwrap(), + U256::from_dec_str("20796091416200429030650333330639080121294047317030102213022681141542267122695").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("2269623709920728903617646620096243620327949366550222548011870028242497613358").unwrap(), + U256::from_dec_str("1721591364215678281087769539296348528917077738930021482596272432159152444992").unwrap(), + ], + vec![ + U256::from_dec_str("4351290528334741701086467877839775176289883245427946235071571814919796918896").unwrap(), + U256::from_dec_str("4623623087098123792032780719067218809631814301015875737326472476776737187664").unwrap(), + ], + vec![ + U256::from_dec_str("10252611518525171358643906944080590081835551889067213413963176637715118491735").unwrap(), + U256::from_dec_str("12808501284953465818004421681457302335036426618905271633262458529689968964126").unwrap(), + ], + vec![ + U256::from_dec_str("10981451002832697773062138382859126275926702959532767987336745018160655315751").unwrap(), + U256::from_dec_str("9013927030633677625778473876432702183373603209076101904574814352400708922379").unwrap(), + ], + vec![ + U256::from_dec_str("20570333858794685470455854052142258100074980426834489402096708371481795292792").unwrap(), + U256::from_dec_str("15956512164458091255235753566653194130138151604902408378082844639163963683640").unwrap(), + ], + vec![ + U256::from_dec_str("1810920619373659655004366626576702325696132807184568159455273357389553192281").unwrap(), + U256::from_dec_str("1003480095719919700122990934105236095705355474829745254732375849367589900011").unwrap(), + ], + vec![ + U256::from_dec_str("13039615164171221481521921362114175385649000627043496255793789378858554035982").unwrap(), + U256::from_dec_str("17510910511311660067327571445074639404525503060298062838447037718941394979779").unwrap(), + ], + vec![ + U256::from_dec_str("14165329950765673430990332163153038866908713915209946170837286178877146886660").unwrap(), + U256::from_dec_str("20793339422175421707121785907356839672588761368373996623737044948407075380863").unwrap(), + ], + vec![ + U256::from_dec_str("3883256103961824093488903468324246690649140067919691822154370105123302528628").unwrap(), + U256::from_dec_str("7561475158831403196993480443820632892645092082726176558327718750568963291037").unwrap(), + ], + vec![ + U256::from_dec_str("409664433526832013116877287300401090775361274457633011032558918365352310607").unwrap(), + U256::from_dec_str("17915319827370112847684027302775847360731246969152629190102908994479804002536").unwrap(), + ], + vec![ + U256::from_dec_str("8783158326340533223560056224761519419016551580825409101025477639190392573598").unwrap(), + U256::from_dec_str("13707722239341829918696323583233367883921076402405851150543609078213603790929").unwrap(), + ], + vec![ + U256::from_dec_str("20473370039043622683429816021606510529102905509776081241485577312164955536715").unwrap(), + U256::from_dec_str("10758908262111334689282452504541297068601729063936562246389590828664826425253").unwrap(), + ], + vec![ + U256::from_dec_str("1475500216206520471930942390519271535125544856677111800223296044790407084884").unwrap(), + U256::from_dec_str("11779748037669787286041766573080352957811656930851243042004933736078318402770").unwrap(), + ], + vec![ + U256::from_dec_str("13598685577793421380004205729308386952260129613827073513489648865810711589158").unwrap(), + U256::from_dec_str("8828420191868575584209720851114347878775413131164313846108918081819270797245").unwrap(), + ], + vec![ + U256::from_dec_str("5841283600010020706817581126281272248796034770291297306880281256297906914129").unwrap(), + U256::from_dec_str("19573442695439575558179849102246406448222304178063434531164484895634034938076").unwrap(), + ], + vec![ + U256::from_dec_str("12732593393130810020796334300053525912829502041711447313821913815961692050846").unwrap(), + U256::from_dec_str("2396355716633209699405102047603034959746626203843654407433538259302908360443").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("6").unwrap(), + U256::from_dec_str("10").unwrap(), + U256::from_dec_str("15").unwrap(), + U256::from_dec_str("21").unwrap(), + U256::from_dec_str("28").unwrap(), + U256::from_dec_str("36").unwrap(), + U256::from_dec_str("45").unwrap(), + U256::from_dec_str("55").unwrap(), + U256::from_dec_str("66").unwrap(), + U256::from_dec_str("78").unwrap(), + U256::from_dec_str("91").unwrap(), + U256::from_dec_str("105").unwrap(), + U256::from_dec_str("120").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_15 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_15 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_15 Benchmarking failed", + ); + panic!("sumout_15 Benchmarking failed"); + } + } + } + + sumout_18 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("12430633769581102247540296520133403875606526791119053988338140734241680888772").unwrap(), + U256::from_dec_str("18442332250316996812297811822409136992315114037253390339439613098875601509891").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("8769812720201850845212552423116339332017173636860658639095486287960968364628").unwrap(), + U256::from_dec_str("15679609225338281006396442534228723562221249428725922637917135773932321194569").unwrap(), + ], + vec![ + U256::from_dec_str("11736822938524029545900531415301990557371724695717091442770706694108764792897").unwrap(), + U256::from_dec_str("14276131700804161157283912487255205591674223192147331953987891031341492138831").unwrap(), + ], + ], + vec![ + U256::from_dec_str("13829860464295019021916660157613562204483787530756857271489430053870068539213").unwrap(), + U256::from_dec_str("2635154643612779766721540915999489277398619320264472919611172655006207593243").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("11478354889186703145064785718789051075161412405402409375958203264983577174612").unwrap(), + U256::from_dec_str("2051932981799192988614815520842778215358192513999820653139553771063993577502").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("19202672763976837199930038746574488489616398769933191173401842283930856630824").unwrap(), + U256::from_dec_str("9894585412193132052039710787371205702047848152467990282623721538452088473643").unwrap(), + ], + vec![ + U256::from_dec_str("11087012751377729871020942087037603184858545608921665053341734432443613964736").unwrap(), + U256::from_dec_str("19920592886298080734865733588618209252746933681013350273253589451940373444177").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("3442170070232630048373467858370187550597693105970967239471088845868856625578").unwrap(), + U256::from_dec_str("2565836555349760764341846699730262037514609346007897474387212424068759288925").unwrap(), + ], + vec![ + U256::from_dec_str("9177399628115629455311170363743761185656955089341861651556728182077007742962").unwrap(), + U256::from_dec_str("8978098454385577234885149545555358562524532626359474543660036795706680306193").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("3475249974036476162964977391934788659886943458806724530569597219135120562284").unwrap(), + U256::from_dec_str("5909974155820403611803060790871333693814260546794228782122506894217269077189").unwrap(), + ], + vec![ + U256::from_dec_str("8948147707464445512770554781127804344587029394518818985316769045847167306053").unwrap(), + U256::from_dec_str("6244220639119464514520028052853849971703107458448799275761796309223160549660").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("2066389909367768648597251810241027238345950972070643168750070171403496171911").unwrap(), + U256::from_dec_str("1898304115952366298651129001635333706379006960765262098012458123450995159651").unwrap(), + ], + vec![ + U256::from_dec_str("1856555603107176523301771843124578764710746111740718726027487402075434689409").unwrap(), + U256::from_dec_str("7410693559992655229357237250636084977735760442337432185456859934632425894132").unwrap(), + ], + vec![ + U256::from_dec_str("17947286896053445598360953488679420610443470034968632274205506527392450039725").unwrap(), + U256::from_dec_str("3895334080718582330725304074745412588636689677985273210895763904111201321640").unwrap(), + ], + vec![ + U256::from_dec_str("21416214099488461436673890273348837879747513591241316002695561057333083776292").unwrap(), + U256::from_dec_str("3391691542348081290104434304460012299076546080317713666198018566085844483904").unwrap(), + ], + vec![ + U256::from_dec_str("5831865841542264981997258578340410586666887289198813310234035199414406992287").unwrap(), + U256::from_dec_str("541152292220907791488763854655135017975093511835597661057761318298652196836").unwrap(), + ], + vec![ + U256::from_dec_str("5056168195537204983120415283750457101925458655675783189653370539259027807168").unwrap(), + U256::from_dec_str("11956502234641567117145556474094025233261632560009796443598718512204491926824").unwrap(), + ], + vec![ + U256::from_dec_str("6001795269485013587505281910832139630835802223081148889043717533427764920854").unwrap(), + U256::from_dec_str("4228015156236533342169460797257057970676666487255154758089286838763712626409").unwrap(), + ], + vec![ + U256::from_dec_str("5462314927338346325491378900451830239683587227473550602000626797213724740299").unwrap(), + U256::from_dec_str("1884219370385302317855636369662856824751120927325767389612486204220720900912").unwrap(), + ], + vec![ + U256::from_dec_str("13243039687919994991813543240226795294935323461312147727968488200651708291457").unwrap(), + U256::from_dec_str("827035014682483050709645177362885116745935024256222539550691237849700735839").unwrap(), + ], + vec![ + U256::from_dec_str("15681975845101161355157873836131193921807006515040811534580021927544498786807").unwrap(), + U256::from_dec_str("18756207560876955742174557757015375223394082477254380529240274611994283460010").unwrap(), + ], + vec![ + U256::from_dec_str("1882705712389915779003978943973188953955260555599932161800577389240520357270").unwrap(), + U256::from_dec_str("8629850575835595094144763041260818362612673534288612613928346317196841467522").unwrap(), + ], + vec![ + U256::from_dec_str("8745855082804994819863529631763084442816205249584071058941190555898569479735").unwrap(), + U256::from_dec_str("21692253036198249194141883338115917121473268018207126949013452222295505497687").unwrap(), + ], + vec![ + U256::from_dec_str("12613094626743071120691866963796778649837681616812682051563400684414421533813").unwrap(), + U256::from_dec_str("9365490776656343962433114014307365201522923168991847888677225365929586030792").unwrap(), + ], + vec![ + U256::from_dec_str("6793880159203088817715392452604750348453297413441771558492674201855922113128").unwrap(), + U256::from_dec_str("14346139603312465753236789574853960983726518372342712328180962073472090606196").unwrap(), + ], + vec![ + U256::from_dec_str("12253978157854975741926086916623300218115958594798658756062517256213069901319").unwrap(), + U256::from_dec_str("15755875237340037763639033271530197989745016797836395000137836295436129566278").unwrap(), + ], + vec![ + U256::from_dec_str("17526046055364152839416951169028421866813866182183381491456998835227689276379").unwrap(), + U256::from_dec_str("8841542110539524297880983325365406606216349430596688342346193657692690166816").unwrap(), + ], + vec![ + U256::from_dec_str("18615347970012612210861525771234905658961350491594352447044050613860219550724").unwrap(), + U256::from_dec_str("3923619697613397146786407151934132719962859996691619643410472870976985170973").unwrap(), + ], + vec![ + U256::from_dec_str("20291060583560144641358065825340025080860431713628862915256408411377719001439").unwrap(), + U256::from_dec_str("17123445630419458544438131056773390642498133859695306119353438106606840478651").unwrap(), + ], + vec![ + U256::from_dec_str("4202847509845861205906637237139552898497275001434929028982440441966918234993").unwrap(), + U256::from_dec_str("10019675637336603739195974439962186867185262170660507535822968246476463670570").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("6").unwrap(), + U256::from_dec_str("10").unwrap(), + U256::from_dec_str("15").unwrap(), + U256::from_dec_str("21").unwrap(), + U256::from_dec_str("28").unwrap(), + U256::from_dec_str("36").unwrap(), + U256::from_dec_str("45").unwrap(), + U256::from_dec_str("55").unwrap(), + U256::from_dec_str("66").unwrap(), + U256::from_dec_str("78").unwrap(), + U256::from_dec_str("91").unwrap(), + U256::from_dec_str("105").unwrap(), + U256::from_dec_str("120").unwrap(), + U256::from_dec_str("136").unwrap(), + U256::from_dec_str("153").unwrap(), + U256::from_dec_str("171").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_18 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_18 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_18 Benchmarking failed", + ); + panic!("sumout_18 Benchmarking failed"); + } + } + } + + sumout_20 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("5656680928965688826993118194012753618765968357565979972595276559147873694083").unwrap(), + U256::from_dec_str("6967549426192095910922952274984550698556833242157857540292539138373310729143").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("19268885367267656136131197855524200613191251527598109247559449729103347917426").unwrap(), + U256::from_dec_str("13276555837892122843601384924562081175658016150684783638795380360267979518059").unwrap(), + ], + vec![ + U256::from_dec_str("6192395283135706284507684938197927443456404304371530286126690358787918110065").unwrap(), + U256::from_dec_str("8819009190264908298811100900277161411847764736308179893794014638324292594780").unwrap(), + ], + ], + vec![ + U256::from_dec_str("12737674974511230996771863495830727745486180187120990738854988060882540937222").unwrap(), + U256::from_dec_str("17139125343511579901747204746002442189775589547519308944117697554234845166515").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("244263057245854881181695352829624456418211798865192445082991456290482557985").unwrap(), + U256::from_dec_str("11379591029981368411890266449113199799040076029174714233656465956470810325768").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("21682669782412056972659921333433470180823921348801871274366645367524620903864").unwrap(), + U256::from_dec_str("2455009268298884604476741290429694617356204701265455596321899599145219280549").unwrap(), + ], + vec![ + U256::from_dec_str("21125883925383156333929232848711525380172926056014142857886611755830225500203").unwrap(), + U256::from_dec_str("15135796545808937165305203902401320696776563359425008931719414027175268786847").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("15450920303903437518361455913102265455988608824135846597836221037214352737619").unwrap(), + U256::from_dec_str("11439120571496221085972693042194450422532276411899764622108255930379779573186").unwrap(), + ], + vec![ + U256::from_dec_str("5504373244182826481954471057557555369791621799450298835807839203848086857375").unwrap(), + U256::from_dec_str("5801334494957666066246189629199512612886312175942824799309062312586542544118").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("1141374384314887705660896617887241019152129114063489281405071135888366753641").unwrap(), + U256::from_dec_str("13076370956699658631269582407826656960323339094757103831961309662392298659347").unwrap(), + ], + vec![ + U256::from_dec_str("4426949087394010699249325505509668334533507346720007620471403313387916351148").unwrap(), + U256::from_dec_str("4708947509252113613324407090303358949370926839796559574786305350757928334665").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("7357683365595790287993998127975259977742608220801091434413870585009415257676").unwrap(), + U256::from_dec_str("1506871282350279588306866242730945049104836644264089499533750872901945500369").unwrap(), + ], + vec![ + U256::from_dec_str("17603107985343948702246104170283386613575028902039517361540799399845966575171").unwrap(), + U256::from_dec_str("18820643961153442592821124056307287292205523842039764422947098696032617853855").unwrap(), + ], + vec![ + U256::from_dec_str("17650798421825975173386758567164281203076719989952311509598797371365178680199").unwrap(), + U256::from_dec_str("17890175687403291785665866239824911374421216792676533545119802637975578402883").unwrap(), + ], + vec![ + U256::from_dec_str("16455874793994696207521701175245486604558008503740725889172000827379626158043").unwrap(), + U256::from_dec_str("14031822690471685955088571269493319864920100659777524458853309643802282343571").unwrap(), + ], + vec![ + U256::from_dec_str("20217336577454114538708064936313780793013155591226224224827483353091280187207").unwrap(), + U256::from_dec_str("7274595912406355919980207840714132002561348049707935735401310529040588077044").unwrap(), + ], + vec![ + U256::from_dec_str("21481014700554264388848521790017731722166888066694391737960816015477266386487").unwrap(), + U256::from_dec_str("17455044584700880292255973227977239165349932901603612566533923980353194321813").unwrap(), + ], + vec![ + U256::from_dec_str("21397911766364883257937607904549984527882328767474455543633946325088982450338").unwrap(), + U256::from_dec_str("8473738210819751426980400124613437104723530057983009606149842528359834537276").unwrap(), + ], + vec![ + U256::from_dec_str("17581651979137517837372735764325843253645494664157105398993836978138260652408").unwrap(), + U256::from_dec_str("17769300675471550881080026982937776951432530235743530865543166960549108293804").unwrap(), + ], + vec![ + U256::from_dec_str("3642823531932009942227226738288531842509469524513016172644199939718550077569").unwrap(), + U256::from_dec_str("17432723582900147732334867408509412616629549151824191911587120144347800943104").unwrap(), + ], + vec![ + U256::from_dec_str("12421919210235701164201409268688646230307360862186347052760389576025389595076").unwrap(), + U256::from_dec_str("18330339236406203807629192609438039320235594597301963978705179812699763588479").unwrap(), + ], + vec![ + U256::from_dec_str("19947323889374706457771950555677486901830894290183470381305433037498145547023").unwrap(), + U256::from_dec_str("5203650088207812959138372874327437440900018099517864797228477559056193893752").unwrap(), + ], + vec![ + U256::from_dec_str("4255951379517667170373780028202354788803406813972719150978785542172116669531").unwrap(), + U256::from_dec_str("14451136209830519398067981987488499900976834426547453885610521940106213984929").unwrap(), + ], + vec![ + U256::from_dec_str("3925629517135871256290787439634621941614062463495442837265339103765138337761").unwrap(), + U256::from_dec_str("2497491815757381945749671166420308545458065641820045413388573704927695241813").unwrap(), + ], + vec![ + U256::from_dec_str("21466120707849646160137487346724407872042410344830040590993945475592511746214").unwrap(), + U256::from_dec_str("3045215934664432127908841075160905018526084085596312155808606706810118424050").unwrap(), + ], + vec![ + U256::from_dec_str("17180695787385241592651918696972083237984540030182966929320858606796263773636").unwrap(), + U256::from_dec_str("2049214809205333765116872668089154986377762659390367408031763978502033709374").unwrap(), + ], + vec![ + U256::from_dec_str("4774299874040054677277833517513219583032845720635034514759165863256091223071").unwrap(), + U256::from_dec_str("2817429278103215029312280393926618707332349894417886654266983777338602669217").unwrap(), + ], + vec![ + U256::from_dec_str("11849511390994459187777805386685940997731436566748603872125066265609444105290").unwrap(), + U256::from_dec_str("15749060430488318934192185845451610512322384322770593887198388744891795166876").unwrap(), + ], + vec![ + U256::from_dec_str("6816330773235217141791322362184115309193655994447714036407608955587670289691").unwrap(), + U256::from_dec_str("6202757244116766574486999165436015492276224399898135936516804984343474464324").unwrap(), + ], + vec![ + U256::from_dec_str("4472916876847760069533088181774934171702146143581240908666459515397433940327").unwrap(), + U256::from_dec_str("16847088658324790629288327397928655196248049022361853173150753668961227880157").unwrap(), + ], + vec![ + U256::from_dec_str("4704407312269183027827709279804690513392733846890090565911802030907318348957").unwrap(), + U256::from_dec_str("12023785273031858079896145099534749991123742716328675854453794204222375745635").unwrap(), + ], + vec![ + U256::from_dec_str("14489517201954926339160541383066537697773411650355771620316229200747554266343").unwrap(), + U256::from_dec_str("1201374487316207220705666090779729243474012798987516363690861140880166104963").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("6").unwrap(), + U256::from_dec_str("10").unwrap(), + U256::from_dec_str("15").unwrap(), + U256::from_dec_str("21").unwrap(), + U256::from_dec_str("28").unwrap(), + U256::from_dec_str("36").unwrap(), + U256::from_dec_str("45").unwrap(), + U256::from_dec_str("55").unwrap(), + U256::from_dec_str("66").unwrap(), + U256::from_dec_str("78").unwrap(), + U256::from_dec_str("91").unwrap(), + U256::from_dec_str("105").unwrap(), + U256::from_dec_str("120").unwrap(), + U256::from_dec_str("136").unwrap(), + U256::from_dec_str("153").unwrap(), + U256::from_dec_str("171").unwrap(), + U256::from_dec_str("190").unwrap(), + U256::from_dec_str("210").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_20 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_20 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_20 Benchmarking failed", + ); + panic!("sumout_20 Benchmarking failed"); + } + } + } + + sumout_50 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("13827879866301415538857432999218866982628860414954597546568484592640037099744").unwrap(), + U256::from_dec_str("14551999579990087654454739665634365604997695433710312891076467259913934388803").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("15771353158313563683613152088814408294817138752077129512988787477344110757188").unwrap(), + U256::from_dec_str("14399279855844834913268182033927156273557513850691671069599176570477483195735").unwrap(), + ], + vec![ + U256::from_dec_str("12275212562972350055374119845928748810285249001807183087376345867226594250614").unwrap(), + U256::from_dec_str("13756757166577921760248781523737155114632832632168220989358664582399059540764").unwrap(), + ], + ], + vec![ + U256::from_dec_str("7744904145895296256394657338969049284442931947677085357490462223272611262824").unwrap(), + U256::from_dec_str("6220983930078260337427503798082895905560328943244814949511556092413235993784").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("6115335040929689045763833235655184287313807320983573556493260194789528971686").unwrap(), + U256::from_dec_str("6166532138119800856613629046632439223273859498423658929523110122960131290393").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("16072185984981940759925604108298758265427751820417866991432783389012340676920").unwrap(), + U256::from_dec_str("12038526475382871968757930147404918510943224535062619233972655078048128772207").unwrap(), + ], + vec![ + U256::from_dec_str("3357579678449381536683529270370009397075211562688187149111391775074561165741").unwrap(), + U256::from_dec_str("18242626048326784141288643701409962774080323384992795292954067136702849374522").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("8666829685645767563314329202552522059811973795622694031857713490395410267737").unwrap(), + U256::from_dec_str("11859365458670977483026426220940789952575696888959917148983915658234029017108").unwrap(), + ], + vec![ + U256::from_dec_str("14130230782411277014762522839402392302490685104885373749038912991243039063851").unwrap(), + U256::from_dec_str("8372970790028263146112897121060860570673044309366330703937159104057494533039").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("17810070930649725073550928999479437396879560471136036549038763141608403698246").unwrap(), + U256::from_dec_str("5892003699669605510258891634989426469331530174006810427612794736057219035068").unwrap(), + ], + vec![ + U256::from_dec_str("17627382974715312497434404825093389646496261744940225730753163482625180535264").unwrap(), + U256::from_dec_str("8810117541294897071211549144170262855239024685766481396194935888376586571442").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("657738098560847380495053334619058455958793334766494917034230275292791995444").unwrap(), + U256::from_dec_str("532105491296268554235023930179690358089560316352213261084871842896383948711").unwrap(), + ], + vec![ + U256::from_dec_str("1097662479221345957152012749497455033885787513971827778405858673808706126572").unwrap(), + U256::from_dec_str("2447207493658220005172443593380979137893421348377510383419810991856073882654").unwrap(), + ], + vec![ + U256::from_dec_str("14987702786869929603736432978965272287140970095658077826321786680678257701539").unwrap(), + U256::from_dec_str("6623830625206727823787295668755924167882248998617207072323403593721086329595").unwrap(), + ], + vec![ + U256::from_dec_str("16083000893807119940364492004763007744340588623320271607738723759855697960706").unwrap(), + U256::from_dec_str("14441879876890467114234414051431347036645300127848755680103166207990794576758").unwrap(), + ], + vec![ + U256::from_dec_str("15731029203716777672456183943350227025919210853689017608162251677628010445863").unwrap(), + U256::from_dec_str("3243323103776869275672187227239319642124956814578013158853719229338650062946").unwrap(), + ], + vec![ + U256::from_dec_str("11507951232495383993382480534635046047566127951931310314719985521726794994855").unwrap(), + U256::from_dec_str("16521537108350445831368232156819046644534933711158400995311389097851953323826").unwrap(), + ], + vec![ + U256::from_dec_str("14900110644751936433863090329189868498744457501863570858210025530486652384145").unwrap(), + U256::from_dec_str("14359597649211951395870532227205969995295738578955836733248597883152057352152").unwrap(), + ], + vec![ + U256::from_dec_str("16088110181600531322538582358406898104352202099807306598784290518774717043236").unwrap(), + U256::from_dec_str("1939008393245671182845407198815819570976145968765277955677921816083337658264").unwrap(), + ], + vec![ + U256::from_dec_str("1716154303829123720378392190766578286599416024855264465881476079904832192454").unwrap(), + U256::from_dec_str("15136578653408806943816555010155427299402698229965663640184024060430500322706").unwrap(), + ], + vec![ + U256::from_dec_str("21607870289382776942440929696746256287606813134801627227394120993907081115482").unwrap(), + U256::from_dec_str("15216673476758896215159140003517149726322470027268268399303559990796350851668").unwrap(), + ], + vec![ + U256::from_dec_str("3470717514306671402640704490357575134271293191039101496626686232282200916588").unwrap(), + U256::from_dec_str("1644143157682464475771925146618463012305479502919125062639366962721572466038").unwrap(), + ], + vec![ + U256::from_dec_str("14141951040433426732708898160256492540100390122590931176192871614825767567823").unwrap(), + U256::from_dec_str("14970870554510027003883479850485276956804732428074135837976610927084756596698").unwrap(), + ], + vec![ + U256::from_dec_str("6757052599412251823187168407425869720480978223208220243035283923157486962640").unwrap(), + U256::from_dec_str("19998998568187199475005177265892129077143217765879194219305910411258469180208").unwrap(), + ], + vec![ + U256::from_dec_str("20881696828098941844228741422556682968632634770060670451389297054104176440621").unwrap(), + U256::from_dec_str("13608889661472160976940462761860587603342008277901142604062787628433773176010").unwrap(), + ], + vec![ + U256::from_dec_str("7213318721268961019485708544153236686954566374506720345579959324834177101641").unwrap(), + U256::from_dec_str("19592958466387187227162933705639453686422518128902348109190215207992371486918").unwrap(), + ], + vec![ + U256::from_dec_str("11492956236335799028306792618137865677945795549817827579564445070141572466907").unwrap(), + U256::from_dec_str("16711820022758729063513408191192188870792118206420418650892132773179116683557").unwrap(), + ], + vec![ + U256::from_dec_str("20945069163147606665108872405227233214878505928402156102335106047734925593215").unwrap(), + U256::from_dec_str("1423987675745181080834644795321752693594601107027563001974881039188492021171").unwrap(), + ], + vec![ + U256::from_dec_str("15891267199767390072540329971020389290472310562561860106988736756158294968407").unwrap(), + U256::from_dec_str("2267503153642457690523865861608670312822668575934691972853239401502939363062").unwrap(), + ], + vec![ + U256::from_dec_str("7474594013463066171479789286133270044299000414563424286960176499673549013911").unwrap(), + U256::from_dec_str("8122674047183480331694645349931807273093092753341828673326730648947527889665").unwrap(), + ], + vec![ + U256::from_dec_str("10257111743245921777033251489771345706287334159675215734672219144502175080691").unwrap(), + U256::from_dec_str("9949970303925511520216099354542476962005374285896059168560924362910911093080").unwrap(), + ], + vec![ + U256::from_dec_str("19537041589568134851029831433550253908067307517024871465298468340397396673864").unwrap(), + U256::from_dec_str("16858223705695697450984778594276887015292986391267341267776294917186229957278").unwrap(), + ], + vec![ + U256::from_dec_str("15246698552087261534042715485066570376107106051211884589703176775025917332690").unwrap(), + U256::from_dec_str("10750598760851770035286468210307770266777083135480137548147767265257368199367").unwrap(), + ], + vec![ + U256::from_dec_str("20630242320426959800851643081479738249548329066422905492655846397008060618115").unwrap(), + U256::from_dec_str("16326371293493241977282281258423453788627821631429026408337594541860635510205").unwrap(), + ], + vec![ + U256::from_dec_str("9259379886124890427913666590932019503885682624879306600117835935139457180688").unwrap(), + U256::from_dec_str("11581379817981971916924055685584021099145296077431456350129178254038600126989").unwrap(), + ], + vec![ + U256::from_dec_str("6611770750163234216247925941306289769928406522729441385143389903289545931187").unwrap(), + U256::from_dec_str("16388238514629781365495798832142666963626297616941516091917404053288951061020").unwrap(), + ], + vec![ + U256::from_dec_str("16643609599328489508845877463250216488035062509642391199018340115352661317445").unwrap(), + U256::from_dec_str("19287928770096457485364071157830517856406460763445755502553439072821026326160").unwrap(), + ], + vec![ + U256::from_dec_str("16668268135822983565074541614143405097045096145537034830204790679728078054636").unwrap(), + U256::from_dec_str("1066083751611943963019573342152116287954637626803138791681744825116321882626").unwrap(), + ], + vec![ + U256::from_dec_str("17564263958855568483001610697806473789956400903711217865830758776454673450601").unwrap(), + U256::from_dec_str("4296134423505578747039658012410131620047948001497680469667933158152933142610").unwrap(), + ], + vec![ + U256::from_dec_str("504256330700931929914991961911525033003353677755203482879812398706411650385").unwrap(), + U256::from_dec_str("20984100739676535922476274553914885299249152392042051753547982635038546311916").unwrap(), + ], + vec![ + U256::from_dec_str("3869421570438658969494179519379461979744673196979406788310235907475541151866").unwrap(), + U256::from_dec_str("10384783961201503389960224508131172245984891572889398757617253808540561858064").unwrap(), + ], + vec![ + U256::from_dec_str("7122215811122822268507423970767532589760454224609641145825381146476966978386").unwrap(), + U256::from_dec_str("18629120702848018429623470369106570770627862115848413285088767540695603529504").unwrap(), + ], + vec![ + U256::from_dec_str("17761362406558450236735871511552593182707619093161051811749087853668432576447").unwrap(), + U256::from_dec_str("19034593786971827440873811266124476710852272184042594489649531393766747348571").unwrap(), + ], + vec![ + U256::from_dec_str("15804166932378673108559283693463783257192568677741795632273990124666564682412").unwrap(), + U256::from_dec_str("11551825304007398963235970620449268090281036794735216055254821775490144519805").unwrap(), + ], + vec![ + U256::from_dec_str("21646450176753271316838399881606539827387849682556972105696360925302077438232").unwrap(), + U256::from_dec_str("2511076513821207007348582223879937756955220822617888786870823449323773645256").unwrap(), + ], + vec![ + U256::from_dec_str("16904410309855743683736810330775505669696719943988498514719208857633212308605").unwrap(), + U256::from_dec_str("21324333522424177499994582360198666554142246038524559672999661787897876060143").unwrap(), + ], + vec![ + U256::from_dec_str("16945490191295215569999901067842377598942481617410852961564362274204107146706").unwrap(), + U256::from_dec_str("18314156748004089222492732633319765815006654008818903454759444358188055539728").unwrap(), + ], + vec![ + U256::from_dec_str("16917767336476454814446678739488168052806439126778827398781629030350151857387").unwrap(), + U256::from_dec_str("11342172614570752746108213362461158451964820583854525536745594715060784857536").unwrap(), + ], + vec![ + U256::from_dec_str("19655214901040692360358163384134838077837280723734255140594660062110580656545").unwrap(), + U256::from_dec_str("3362419428602909135476998407729641861009514940918624516093829774638749378477").unwrap(), + ], + vec![ + U256::from_dec_str("10068364657928239999688712782881075590100091150035478948591571494298540064040").unwrap(), + U256::from_dec_str("3925841392732674526382167900635378545357933312779748980213399765561568501954").unwrap(), + ], + vec![ + U256::from_dec_str("7859837372449593447197076679734892380978595170122834233920177020113058884162").unwrap(), + U256::from_dec_str("15267327488914432697481346031072906103448848928991578280835939381635251283161").unwrap(), + ], + vec![ + U256::from_dec_str("17820543025474357991914589452937303503868675134182823718184408612418457106496").unwrap(), + U256::from_dec_str("4080173097768027859462877326409054600046050536583611074603903692960179295306").unwrap(), + ], + vec![ + U256::from_dec_str("7222395274549846905402287163598280036522206923543195587339746656511726156757").unwrap(), + U256::from_dec_str("17997737062514751282939534276628529489984717427968026247212791392586232604551").unwrap(), + ], + vec![ + U256::from_dec_str("1711582578037897629120492811026654304279972642865731976334484807734905010624").unwrap(), + U256::from_dec_str("11417750330605984209119442624747765360816092826690016986275336228747618648201").unwrap(), + ], + vec![ + U256::from_dec_str("5091961738279253769908069837603749933382976381492972380907447338157526366714").unwrap(), + U256::from_dec_str("2098634419436065415091734819109653428284310850731241021115434822766452990108").unwrap(), + ], + vec![ + U256::from_dec_str("12771630983152860380958654612308310234837340761565253596054160793193407831416").unwrap(), + U256::from_dec_str("9149694848418949644717518759058810074518704169947141770421799720539197666625").unwrap(), + ], + vec![ + U256::from_dec_str("9918837719060277739930324221392324331275666891900263953129450726331466863134").unwrap(), + U256::from_dec_str("13829770172279463687649225699345042056345548299961998544225247740202252340439").unwrap(), + ], + vec![ + U256::from_dec_str("21556772538865001220884467378626718237742195027485835738020776901730681324637").unwrap(), + U256::from_dec_str("19778672038763116743630250909961650038370256095030032529759391735347222925746").unwrap(), + ], + vec![ + U256::from_dec_str("14856861307423975278581613005761934562358117742422665247736527476263653360349").unwrap(), + U256::from_dec_str("1867918246775206089638452481671058455990990896563653326270871198890663017878").unwrap(), + ], + vec![ + U256::from_dec_str("7358292501557376813334144315791019321478041455375833895705472993641179430655").unwrap(), + U256::from_dec_str("19639382277696759182661917452231356435729059958722755277286321238745721897653").unwrap(), + ], + vec![ + U256::from_dec_str("5776957264346829457305929424782026635416082038398352721156570341141914144551").unwrap(), + U256::from_dec_str("15767534494868786069535421819233640712284308687242022324923974165520151035749").unwrap(), + ], + vec![ + U256::from_dec_str("15314810752842818694345949990176494977521994584277889144518086930381852217499").unwrap(), + U256::from_dec_str("7856791107683021983787028049162290107091787348782025165222243877660987556554").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("6").unwrap(), + U256::from_dec_str("10").unwrap(), + U256::from_dec_str("15").unwrap(), + U256::from_dec_str("21").unwrap(), + U256::from_dec_str("28").unwrap(), + U256::from_dec_str("36").unwrap(), + U256::from_dec_str("45").unwrap(), + U256::from_dec_str("55").unwrap(), + U256::from_dec_str("66").unwrap(), + U256::from_dec_str("78").unwrap(), + U256::from_dec_str("91").unwrap(), + U256::from_dec_str("105").unwrap(), + U256::from_dec_str("120").unwrap(), + U256::from_dec_str("136").unwrap(), + U256::from_dec_str("153").unwrap(), + U256::from_dec_str("171").unwrap(), + U256::from_dec_str("190").unwrap(), + U256::from_dec_str("210").unwrap(), + U256::from_dec_str("231").unwrap(), + U256::from_dec_str("253").unwrap(), + U256::from_dec_str("276").unwrap(), + U256::from_dec_str("300").unwrap(), + U256::from_dec_str("325").unwrap(), + U256::from_dec_str("351").unwrap(), + U256::from_dec_str("378").unwrap(), + U256::from_dec_str("406").unwrap(), + U256::from_dec_str("435").unwrap(), + U256::from_dec_str("465").unwrap(), + U256::from_dec_str("496").unwrap(), + U256::from_dec_str("528").unwrap(), + U256::from_dec_str("561").unwrap(), + U256::from_dec_str("595").unwrap(), + U256::from_dec_str("630").unwrap(), + U256::from_dec_str("666").unwrap(), + U256::from_dec_str("703").unwrap(), + U256::from_dec_str("741").unwrap(), + U256::from_dec_str("780").unwrap(), + U256::from_dec_str("820").unwrap(), + U256::from_dec_str("861").unwrap(), + U256::from_dec_str("903").unwrap(), + U256::from_dec_str("946").unwrap(), + U256::from_dec_str("990").unwrap(), + U256::from_dec_str("1035").unwrap(), + U256::from_dec_str("1081").unwrap(), + U256::from_dec_str("1128").unwrap(), + U256::from_dec_str("1176").unwrap(), + U256::from_dec_str("1225").unwrap(), + U256::from_dec_str("1275").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_50 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "sumout_50 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "sumout_50 Benchmarking failed", + ); + panic!("sumout_50 Benchmarking failed"); + } + } + } + + fib_3 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("3132971325870222259639561706189758098287244657388649414392529352718303714530").unwrap(), + U256::from_dec_str("6507826058647329464322284230325703133591122928282742834699944707019156258809").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("17772115053309497146137293588980018321863662294867005210136855479605214186180").unwrap(), + U256::from_dec_str("10038179076166881173143876188899696762808386040833545597371587600563515084302").unwrap(), + ], + vec![ + U256::from_dec_str("84866774058471735936350793806054983511272962266883047883471400112941191037").unwrap(), + U256::from_dec_str("5568809559395193198199152670834662954559187185156161953287752106001302001344").unwrap(), + ], + ], + vec![ + U256::from_dec_str("8880668092662582662151749297267512620096355234087050144351597799319681896574").unwrap(), + U256::from_dec_str("11528980930108519143107616915390840029128779349741456778024327951728523777236").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("11973149780461845670977457832614205154706068463789633369928681722573108265443").unwrap(), + U256::from_dec_str("560154769206684285089883239395400651095151098880172398808069275901669863769").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("13756428714932434595021589136752822391122965542123120193354239911120469699709").unwrap(), + U256::from_dec_str("120112527160047884703620942006841978570569214359122057960251258287184219697").unwrap(), + ], + vec![ + U256::from_dec_str("13463898713692437806260449684498030384996189360575139011629743781467141790304").unwrap(), + U256::from_dec_str("1194002625152303589071335639210384071235225241955701801770234611166742017055").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("11139054187995416626739127332337577172136803991433018900962790056334353344291").unwrap(), + U256::from_dec_str("6070725161016897987520708628733735347166393581684474326320014699046060380622").unwrap(), + ], + vec![ + U256::from_dec_str("19209700656348280109959147287216993350201779451119908883346282260552870356387").unwrap(), + U256::from_dec_str("17266437688499472585954564896738180051466183385397662700252060765908415760821").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("8518978947911781334617073974199814521245393345576825252918283414965139226281").unwrap(), + U256::from_dec_str("1919930890570357741377145521418378700589359366071674476012553393210299710266").unwrap(), + ], + vec![ + U256::from_dec_str("20518172778897855607538153208553426015126061748797486778622889113076225553601").unwrap(), + U256::from_dec_str("4341433561739154626175616238599696777704881435167300120740573786688737320206").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("6257454378471671954508216959821760138899506248862124107543881832751496243381").unwrap(), + U256::from_dec_str("849484394494738364726633009377512849646844450581834914681550559373523098955").unwrap(), + ], + vec![ + U256::from_dec_str("13065948243673575219205285761966669534222259117764240672025250386712503766186").unwrap(), + U256::from_dec_str("14256307983349064955937850546866094921248521794981704681964738514708851084548").unwrap(), + ], + vec![ + U256::from_dec_str("11615738609008198513128136474869049796581791264774401388480327383708701220818").unwrap(), + U256::from_dec_str("17975851278557099428627721105403634331615370696748419056473417067984791293951").unwrap(), + ], + vec![ + U256::from_dec_str("17708563515128206907836464584450502652129276662274674459408979775646454697813").unwrap(), + U256::from_dec_str("19932771729628827926695230158177139025768662902055116478576202138537488865502").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("2").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "fib_3 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "fib_3 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "fib_3 Benchmarking failed", + ); + panic!("fib_3 Benchmarking failed"); + } + } + } + + fib_5 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("7107575577163000349795659359956168176171101387530780151824981638484262486978").unwrap(), + U256::from_dec_str("897133249212133391804343723156610138182460716033738784908100029698973225852").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("170389711510642910317680110863332628397432593441060800544776128980970914252").unwrap(), + U256::from_dec_str("6920395653366563258534283590246960198394308227032492249037643353403270317045").unwrap(), + ], + vec![ + U256::from_dec_str("8480799764075268077172001588258796963309752386101311077889514097122873239882").unwrap(), + U256::from_dec_str("12451695893898630503865218111936486188627157726164511249977202673656946431620").unwrap(), + ], + ], + vec![ + U256::from_dec_str("21597992290581954545776627017098028702839071011677341576724377506987149993751").unwrap(), + U256::from_dec_str("19053567793179926208306730705211711754174669587802570078364147255403467780151").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("2357887722618418674206341083287923328601312919804823733855833233026791743663").unwrap(), + U256::from_dec_str("975374039805822885844240552519100209502334213678144709852000084502893973008").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("16280105556148393779575170892506606219120071731060039616507494801779121328832").unwrap(), + U256::from_dec_str("20950039635055833909912134692658157347220364503511282528956587902894228703712").unwrap(), + ], + vec![ + U256::from_dec_str("7993964715201116449357589101743367175186265961068472625342038948672634732296").unwrap(), + U256::from_dec_str("11099581941940578041819214468757040086707821891633617156886035885244647996327").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("12636329372753298988357489028292457750683260728540316442371004560814413226626").unwrap(), + U256::from_dec_str("4045455970628132355106370857917185793087210373549168231277818312754971612807").unwrap(), + ], + vec![ + U256::from_dec_str("1300344419079427628501727843429767670124424070337281261058615696156550837549").unwrap(), + U256::from_dec_str("2174525330618542624943912040794362533422023824780024477106228987295196169137").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("21390433795647917247027254319423864113578346839713218763993047007421497228495").unwrap(), + U256::from_dec_str("21661918443945562352764731942118046974455095191616778616511655172171711481914").unwrap(), + ], + vec![ + U256::from_dec_str("6520633594028678038498884349163102469806602416433112898771095987637595066617").unwrap(), + U256::from_dec_str("19663631449513124110735458456019142408282532497123847160755982598286201463717").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("18657381897074200796904415404231863341895995632749476893629144717257679103963").unwrap(), + U256::from_dec_str("8345650724109397616811518344854358214988563616857860428608140138066962138957").unwrap(), + ], + vec![ + U256::from_dec_str("6080713600081003917101685986497728921078282571010625261265667442187252662937").unwrap(), + U256::from_dec_str("513944790500250868640338307249655484768530127653315385350721456220511760102").unwrap(), + ], + vec![ + U256::from_dec_str("16799415331247767599223181727867706342904206821513386749641266330877174898760").unwrap(), + U256::from_dec_str("19420916090388399599536229341092487229974297531937960707965143244382507176964").unwrap(), + ], + vec![ + U256::from_dec_str("13668334697827007947302996095199479530567641377939668790543641044451953957139").unwrap(), + U256::from_dec_str("12476894726233017534672279206882408584567103640359862711942440003398820167147").unwrap(), + ], + vec![ + U256::from_dec_str("13809977379539470670333778802717132743390915159675198170487848397796913472215").unwrap(), + U256::from_dec_str("5304572538397463768441415723346479145852763698142825603512106636952539776032").unwrap(), + ], + vec![ + U256::from_dec_str("701521285562685954268529162647895469084095604096437475664109908959446258033").unwrap(), + U256::from_dec_str("15172311417293466130771317503680468656450805959709148012902980907068100374524").unwrap(), + ] + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("2").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("5").unwrap() + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "fib_5 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "fib_5 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "fib_5 Benchmarking failed", + ); + panic!("fib_5 Benchmarking failed"); + } + } + } + + fib_10 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("15598002460690588437896426762633589755681380926526826007650911266155302746971").unwrap(), + U256::from_dec_str("14048781467582620915514707321102379170342351199203838720084613707384189246618").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("5701442717558059864094936857346939502743862376737227680931736705155409754850").unwrap(), + U256::from_dec_str("6705418082619681590489582801426443732890080590377224079621881818162843204595").unwrap(), + ], + vec![ + U256::from_dec_str("13279521252289501630047789160726986062397338623708136865134983184465749454165").unwrap(), + U256::from_dec_str("21033452491153645343877459007984264553702116582842254942279478167695403794865").unwrap(), + ], + ], + vec![ + U256::from_dec_str("4781563429922683357122820523637836932301917765582180198660942288815260302421").unwrap(), + U256::from_dec_str("14814729180207128675172446059166803635423524097383393305814823960659595806329").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("21128226372968921480959222733647870812725374627959087109938949205782449934509").unwrap(), + U256::from_dec_str("7018642648086750325301120070974798999557335793924792347011375693170409195098").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("10332150704003579947885996835615852693671986689983776582911110245805513692668").unwrap(), + U256::from_dec_str("1124448241753524378997499989602955777745777344553269747221648865489793488975").unwrap(), + ], + vec![ + U256::from_dec_str("18359851081925516932372626627155466137254869746456141360772489145074657585390").unwrap(), + U256::from_dec_str("2503686322149969597053196188893305621132468879410881045066232089347592198484").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("4816278985941566400895633011850808885261900890766698900964554024095285628690").unwrap(), + U256::from_dec_str("4481223810973703865132739390383257176145788880766036414318913695394582687416").unwrap(), + ], + vec![ + U256::from_dec_str("15603469913936514792797227253072839537192706677995431175913126336649422890069").unwrap(), + U256::from_dec_str("21864594615695298757460783973470516017964190218336035301988952994099300002552").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("21231927944393920243160099971507175021287196370917268996863763412686284403869").unwrap(), + U256::from_dec_str("11235057574641688951864488055161587538057015254360438255114278019066405496417").unwrap(), + ], + vec![ + U256::from_dec_str("13775234459674435911239591565261874307122702001326411862915067861775676454154").unwrap(), + U256::from_dec_str("16068368840115781322039412863465620735514071242596879769482158447800688468756").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("8946500491146824741411381190131650044873203574966470669798623284509235212225").unwrap(), + U256::from_dec_str("9207778656916363948673619648074334783746856414577233256897457918279555367126").unwrap(), + ], + vec![ + U256::from_dec_str("18229827395116865835955974167555190610618187087749776491709874843200696280698").unwrap(), + U256::from_dec_str("5354841661231629559124068306361245380218908391918092200894031389928119849378").unwrap(), + ], + vec![ + U256::from_dec_str("8406088130432915530837275071042043342847231172695656108751797564706756513873").unwrap(), + U256::from_dec_str("1692113603002985183084671804623810248784246597585146031631850722491435245828").unwrap(), + ], + vec![ + U256::from_dec_str("3781409869223206029979945624869146198489017871864132897653633688094104894010").unwrap(), + U256::from_dec_str("914649635961084769359381892125208118471978903853445450960187255648945554484").unwrap(), + ], + vec![ + U256::from_dec_str("4681412300653217556730318589043345985554894195960903393718460114249743089179").unwrap(), + U256::from_dec_str("21360858821457283911073676012703566640289750014744439028328185444091026027882").unwrap(), + ], + vec![ + U256::from_dec_str("20897966082308332377807565195025690308345926928964539367186230582160325134474").unwrap(), + U256::from_dec_str("9626498089212728094225083170299883982718296909352243901431927962362382218927").unwrap(), + ], + vec![ + U256::from_dec_str("14359853109533518444168562509201102039176753094698437798285771319619295861708").unwrap(), + U256::from_dec_str("90829535353937971257007177217967887697692463940020220682809349058293661638").unwrap(), + ], + vec![ + U256::from_dec_str("6493829119246187593593139749123040079754197652894022722457052662159433878735").unwrap(), + U256::from_dec_str("15262423895688782694421350413428209962260663475050857280745519572187099177290").unwrap(), + ], + vec![ + U256::from_dec_str("5720350053817277761103752188290987255397596237781800199881859365664717896938").unwrap(), + U256::from_dec_str("18530651271212069093450925444649953034166690271614200467237140911087116714410").unwrap(), + ], + vec![ + U256::from_dec_str("16749960532530207200560191146014575700596418430016017388393265928266457503270").unwrap(), + U256::from_dec_str("806706467165047542403196455896239214513895671141081869269826693258304989974").unwrap(), + ], + vec![ + U256::from_dec_str("5556621093836642227227787846531768876794773395668568501898035445111568303923").unwrap(), + U256::from_dec_str("16207931580028655113776293873436654483020022939317876762036644049054941054638").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("1").unwrap(), + U256::from_dec_str("2").unwrap(), + U256::from_dec_str("3").unwrap(), + U256::from_dec_str("5").unwrap(), + U256::from_dec_str("8").unwrap(), + U256::from_dec_str("13").unwrap(), + U256::from_dec_str("21").unwrap(), + U256::from_dec_str("34").unwrap(), + U256::from_dec_str("55").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "fib_10 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "fib_10 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "fib_10 Benchmarking failed", + ); + panic!("fib_10 Benchmarking failed"); + } + } + } + + copy_10 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("16390962836043729391713651706041034686233675080495652797663011252649219608453").unwrap(), + U256::from_dec_str("6865787639719296962717876412738042601880427078298243582467975656325852949218").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("17210141815814974498912537431655049857450919262672383343442093136850563838206").unwrap(), + U256::from_dec_str("12342441380929407693451343058085382102105226929110424541171233890701211265557").unwrap(), + ], + vec![ + U256::from_dec_str("14791256228758178288432683409274509098808992656590403960492149355352931241876").unwrap(), + U256::from_dec_str("9757744402966524420081791838465495321308702736965720459936221854562488721275").unwrap(), + ], + ], + vec![ + U256::from_dec_str("12074129776039590906909589024919710171422616332187991404856704813889669348927").unwrap(), + U256::from_dec_str("987324030858231431967082277102247672880769004615236440649645498996213854200").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("17240412344702891229776489031231066040782132824948269228246148252519138466366").unwrap(), + U256::from_dec_str("15893975335803942380118071522945358115037231080796902411459398036409803599182").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("1271417771372629644611717230761961857698909743161160107041194135970629739863").unwrap(), + U256::from_dec_str("4939081731814081619963862075681020612775752067767844815503719074388485924144").unwrap(), + ], + vec![ + U256::from_dec_str("15763747362287654829011432461657723100243353639302509576933192822234504950406").unwrap(), + U256::from_dec_str("10562112977940817988663571736399452005642324818400887824616415414761510289790").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("6840359036458076382079357592817160014882757907637013803537268679884532127606").unwrap(), + U256::from_dec_str("1346535467813261885766726379794214479097664664392345988272417354157960728671").unwrap(), + ], + vec![ + U256::from_dec_str("19427354612139857884342478002431397034023252622750272907992730527833498646839").unwrap(), + U256::from_dec_str("5337050117201999843103633899784755367092656102396877506066058827688289940046").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("20823611397282852479822978978685532830296682705009136373592940707301503646033").unwrap(), + U256::from_dec_str("7789186167969658306688153593800998736943152689699161855707311457653271858926").unwrap(), + ], + vec![ + U256::from_dec_str("5844206256345363695439174408404096072235672265143152167172459387708567781148").unwrap(), + U256::from_dec_str("235843202490932637756232553215192204134845956931540834734914009496237634184").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("20550659483735211121802551760554631025807244045676695123218122991238619501699").unwrap(), + U256::from_dec_str("11945951364844791529623571555332639031054156303670814242701717081599466357872").unwrap(), + ], + vec![ + U256::from_dec_str("654879587106775033263721472009262072007272314520227570335994171228983103986").unwrap(), + U256::from_dec_str("14361342781229557997760264881879944101650636599963169957537169085125448452547").unwrap(), + ], + vec![ + U256::from_dec_str("11133904625121643992823528155721740987974874506160472484890920541446857113467").unwrap(), + U256::from_dec_str("4436717642021319260725328966952365487651517574980287441477089608456027630542").unwrap(), + ], + vec![ + U256::from_dec_str("16685780983916865650387043033283449729899552702220387957248765192791587962503").unwrap(), + U256::from_dec_str("1956353155823917762807403460270916420225712366921387635794647149170454029020").unwrap(), + ], + vec![ + U256::from_dec_str("3167458143773351335886873071351828587468972050558968173198746552524979899343").unwrap(), + U256::from_dec_str("14706542627970265967501101570095076370616715291368867838796404315730798645263").unwrap(), + ], + vec![ + U256::from_dec_str("3169288635570110804535167586039046075463922680257787193769750793599418836937").unwrap(), + U256::from_dec_str("6027690424292016493627852337260456340093207521914688143324731183496975625359").unwrap(), + ], + vec![ + U256::from_dec_str("16745129804724758320492257405054914946034714396740595023799347270606765091207").unwrap(), + U256::from_dec_str("5179934402554548729647017662939357756072702074261387023337145559991485834818").unwrap(), + ], + vec![ + U256::from_dec_str("20612137209143666732486995940592065546560294302298353386853309983097185298163").unwrap(), + U256::from_dec_str("5861820384642620925499126057189223472137276803184996411582299498362694892662").unwrap(), + ], + vec![ + U256::from_dec_str("5151144014489768285719815999895590607805899943411423671520418528161058212389").unwrap(), + U256::from_dec_str("5021097391934366383971983202419604465348564028049147673972539360521330534532").unwrap(), + ], + vec![ + U256::from_dec_str("17919926668723224822853766036925499138771026625911650899155968406167299184157").unwrap(), + U256::from_dec_str("16822830740823282288084447970705913414694049222039026855174213870807229940846").unwrap(), + ], + vec![ + U256::from_dec_str("11506678974796799469204749431033361084874528449390062358406908850400100405067").unwrap(), + U256::from_dec_str("15362354576852649604151397236428588651091047930604360653191543795436089896761").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("10000").unwrap(), + U256::from_dec_str("10000").unwrap(), + U256::from_dec_str("10000").unwrap(), + U256::from_dec_str("10000").unwrap(), + U256::from_dec_str("10000").unwrap(), + U256::from_dec_str("10000").unwrap(), + U256::from_dec_str("10000").unwrap(), + U256::from_dec_str("10000").unwrap(), + U256::from_dec_str("10000").unwrap(), + U256::from_dec_str("10000").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "copy_10 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "copy_10 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "copy_10 Benchmarking failed", + ); + panic!("copy_10 Benchmarking failed"); + } + } + } + + copy_20 { + use frame_benchmarking::vec; + use sp_core::{H160, U256, H256}; + + let caller = "1000000000000000000000000000000000000666".parse::().unwrap(); + let contract_address = H160::from_low_u64_be(0x8888); + + let proof = Proof::new( + vec![ + U256::from_dec_str("2379977889230914820672594034039121593840586279251765411407892083495964290586").unwrap(), + U256::from_dec_str("19717766810117850874712820192154455597011669501170003294244878423890590018861").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("3973159193607304635677110039121846796616184019135954866315181300786429744636").unwrap(), + U256::from_dec_str("19738101583692327553695201324955632910514950057767721207797779165572562320591").unwrap(), + ], + vec![ + U256::from_dec_str("18009039990446914928726774542606020968862991368419340325967317177749500045223").unwrap(), + U256::from_dec_str("9293138879208966557577361306623499801334435975158650451755325697234789178182").unwrap(), + ], + ], + vec![ + U256::from_dec_str("206777167290693892804178251336642443297985114484409374966071658530105269696").unwrap(), + U256::from_dec_str("2267483584645623390884362686034664874106799646106704430718053204392987070526").unwrap(), + ] + ); + + let vk = VerifyingKeyComponents::new( + vec![ + U256::from_dec_str("18186832346943283968189021374987462202481085857954829692288945756447069609876").unwrap(), + U256::from_dec_str("5402524640789301913788019447399651923814806381669718491322583849494894802268").unwrap(), + ], + vec![ + vec![ + U256::from_dec_str("5528524380609293441422858282765117427241355019381336135853739470431762592324").unwrap(), + U256::from_dec_str("1508226221479911609651693048768866341319973826577926330664018889585487258525").unwrap(), + ], + vec![ + U256::from_dec_str("4028947148020159142728283348567876171081494727087452959443137954265098854797").unwrap(), + U256::from_dec_str("4215883472206722706123802147720262143796686837980046137743755262651347678843").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("18358409527104302643151877377191921884362264066571296795400828166440394581356").unwrap(), + U256::from_dec_str("16397242299165439412854345647920988068174648012394612865878728614273133142679").unwrap(), + ], + vec![ + U256::from_dec_str("17800981185981546727325645880080997001476675047091692601614288140235437092669").unwrap(), + U256::from_dec_str("18740407875764131523921983143028060498186857273067309944248989237432327688403").unwrap(), + ] + ], + vec![ + vec![ + U256::from_dec_str("665772934717175177777949524098312092352764855175335277424591571425164110495").unwrap(), + U256::from_dec_str("14100679580899773878692255597131271645919787770156674267632120179255213163919").unwrap(), + ], + vec![ + U256::from_dec_str("11550483577636357067438501129303480300849727408381097797290690228588830430753").unwrap(), + U256::from_dec_str("9393054484305485081338275095253982915344196959843349099876609724972300123416").unwrap(), + ], + ], + vec![ + vec![ + U256::from_dec_str("11935857310771353301113078485816547646734693035868999119793358992399371905384").unwrap(), + U256::from_dec_str("11076391388262632214871501512549398943625460082535158648764826100124319684977").unwrap(), + ], + vec![ + U256::from_dec_str("3710665449666757495807260984495481142659978308600359337780598549499120138938").unwrap(), + U256::from_dec_str("6839803279250166998041675738233682206460875086384455306323331018124376381750").unwrap(), + ], + vec![ + U256::from_dec_str("4856493623582275736770069967742171908738373534012202112313355761651931717892").unwrap(), + U256::from_dec_str("7519753620411063893993038654245337200396081075176594821170650629333484307735").unwrap(), + ], + vec![ + U256::from_dec_str("3710770660542853524064560607689078015597423835131235506678560299694689990300").unwrap(), + U256::from_dec_str("5614292083398031256628051490208894298153846073526157332595481788509741490501").unwrap(), + ], + vec![ + U256::from_dec_str("20078380866648795629722839999599227955238325032514828038799728064893941679517").unwrap(), + U256::from_dec_str("20119759053067063735852536902576059766817546016509338827246433947870754928064").unwrap(), + ], + vec![ + U256::from_dec_str("21534411071117043370935210470042510482349669599514544586993218380262317946766").unwrap(), + U256::from_dec_str("3732652593424164815218097269577235093879112219070020480532471157884566435575").unwrap(), + ], + vec![ + U256::from_dec_str("914202501664188624437217460875067356655116871746027158611430275383721262460").unwrap(), + U256::from_dec_str("4705734910142038706008803835426807351430196670983074725174783743408516772252").unwrap(), + ], + vec![ + U256::from_dec_str("13269671382861063801742656963590767807574299083001338650656571090411520374435").unwrap(), + U256::from_dec_str("9384491173431647196874286778881722649539037427812437964731971759984118937933").unwrap(), + ], + vec![ + U256::from_dec_str("13125729058979703434326838390930436241715053680615211947758998735780663742234").unwrap(), + U256::from_dec_str("18251916520687748821686727257519897597261855663648932489281707717905152117467").unwrap(), + ], + vec![ + U256::from_dec_str("17344976452759912859216359556893576140899470724959684738889968775015869557197").unwrap(), + U256::from_dec_str("6389133661768713273368557048511335405494395213461472689525395186324704423376").unwrap(), + ], + vec![ + U256::from_dec_str("6654285101199080658766691402142671572613283476585253631584625231199984295297").unwrap(), + U256::from_dec_str("8781098977168486108004226572214388660098607817298006388220592119281389247107").unwrap(), + ], + vec![ + U256::from_dec_str("6222451681253934476137669768565736742025192662359478248756258775339796690138").unwrap(), + U256::from_dec_str("10135462584425053010794649955169082355399546688339847053640822820061877996779").unwrap(), + ], + vec![ + U256::from_dec_str("9001863072157687892542090021143207450374263146576957968961232315660797205691").unwrap(), + U256::from_dec_str("15485950372480454815754011467338385709915066127940363063996809472444868794768").unwrap(), + ], + vec![ + U256::from_dec_str("13854609252443964014253500266170779699772110475010273610098934711691037018431").unwrap(), + U256::from_dec_str("20183951798722484000813923295692960832600657304539510159073478598858845049884").unwrap(), + ], + vec![ + U256::from_dec_str("5009149762864565156931790177584262364524677499527751998450184844302995178615").unwrap(), + U256::from_dec_str("13593924634624192524816933676404605700054878909664226093265862736105894857387").unwrap(), + ], + vec![ + U256::from_dec_str("3235679020196617835617599419401376052093999618129660419896130076627172691776").unwrap(), + U256::from_dec_str("3672945914965606232288988588985362074692638978894414972844938524443558943294").unwrap(), + ], + vec![ + U256::from_dec_str("19997430478065411692446626965613571768401892436308376031777419505234898610525").unwrap(), + U256::from_dec_str("19496028539659666741307055192005464165365294110953457722351854025470690326368").unwrap(), + ], + vec![ + U256::from_dec_str("1126032053729725776969471166249327076697801974223436266234319829936142994428").unwrap(), + U256::from_dec_str("1936782966048939191038918746223733360522372518808305064770434481582538990769").unwrap(), + ], + vec![ + U256::from_dec_str("13322112226503241766242224434970603478241980167632482340846160572506467551993").unwrap(), + U256::from_dec_str("8183177369271153094538982832407066557058612152657745323415828015061401611878").unwrap(), + ], + vec![ + U256::from_dec_str("20914993233890112480061138799883565180987813697290385292901393950679298583773").unwrap(), + U256::from_dec_str("2158104559326662347973637565816542707843557115605024872122369365555774497928").unwrap(), + ], + vec![ + U256::from_dec_str("17919815233747636707024612684230423799222935350810031519005389277454122478732").unwrap(), + U256::from_dec_str("11388966857843853598028901823801313703810538258166813391542959146274971387057").unwrap(), + ], + ] + ); + + let valid_input = vec![ + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + U256::from_dec_str("100000").unwrap(), + ]; + + let verifying_key = VerifyingKey::new(proof, vk, valid_input); + + let zk_verifier = ZKPrecompileVerifier::new( + H256::from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..32]), + verifying_key + ); + + let encoded_call = zk_verifier.generate_benchmarking_parameters(); + + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + }:{ + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "copy_20 output result {:?} used_gas: {:?}", + output, + used_gas, + ); + assert!(output.len() >= 32, "The contract did not return true"); + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + // log::info!( + // target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + // "copy_20 Verification result {result:?}", + // ); + assert_eq!(result, U256::one(), "The contract did not return true"); + }, + Err(e) => { + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "copy_20 Benchmarking failed", + ); + panic!("copy_20 Benchmarking failed"); + } + } + } + +} +impl_benchmark_test_suite!( + Pallet, + crate::zk_precompile_gas_estimation::tests::new_test_ext(), + crate::zk_precompile_gas_estimation::mock::Test +); diff --git a/runtime/runtime-common/src/zk_precompile_gas_estimation/mock.rs b/runtime/runtime-common/src/zk_precompile_gas_estimation/mock.rs new file mode 100644 index 00000000..7a8c28b6 --- /dev/null +++ b/runtime/runtime-common/src/zk_precompile_gas_estimation/mock.rs @@ -0,0 +1,151 @@ +use fp_evm::{IsPrecompileResult, PrecompileHandle}; +use frame_support::{construct_runtime, parameter_types, weights::Weight}; +use pallet_evm::{ + EnsureAddressNever, EnsureAddressRoot, IdentityAddressMapping, Precompile, PrecompileResult, + PrecompileSet, +}; +use pallet_evm_precompile_zk_groth16_verify::ZKGroth16Verify; +use sp_core::{ConstU32, ConstU64, H160, H256, U256}; +use sp_runtime::{ + generic, + traits::{BlakeTwo256, IdentityLookup}, +}; +use sp_std::marker::PhantomData; + +#[cfg(not(feature = "brooklyn"))] +pub const CHAIN_ID: u64 = 8886u64; +#[cfg(feature = "brooklyn")] +pub const CHAIN_ID: u64 = 888866u64; + +pub type AccountId = H160; +pub type Balance = u64; +pub type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; +pub type Block = frame_system::mocking::MockBlock; + +parameter_types! { + pub const BlockHashCount: u64 = 250; + pub BlockWeights: frame_system::limits::BlockWeights = + frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, 0)); +} +impl frame_system::Config for Test { + type RuntimeEvent = RuntimeEvent; + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = H160; + type Lookup = IdentityLookup; + type Header = generic::Header; + type BlockHashCount = BlockHashCount; + type DbWeight = (); + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = ConstU32<16>; +} +parameter_types! { + pub const MinimumPeriod: u64 = 5; +} + +impl pallet_timestamp::Config for Test { + type Moment = u64; + type OnTimestampSet = (); + type MinimumPeriod = MinimumPeriod; + type WeightInfo = (); +} + +impl pallet_balances::Config for Test { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); + type Balance = Balance; + type DustRemoval = (); + type ExistentialDeposit = ConstU64<2>; + type AccountStore = System; + type ReserveIdentifier = (); + type MaxLocks = (); + type MaxReserves = (); +} +const BLOCK_GAS_LIMIT: u64 = 150_000_000; + +parameter_types! { + pub const MockPrecompiles: MockPrecompileSet = + MockPrecompileSet(PhantomData); + pub const WeightPerGas: Weight = Weight::from_parts(1, 0); + pub BlockGasLimit: U256 = U256::from(BLOCK_GAS_LIMIT); + pub ChainId: u64 = CHAIN_ID; +} + +impl pallet_evm::Config for Test { + type FeeCalculator = (); + type GasWeightMapping = pallet_evm::FixedGasWeightMapping; + type WeightPerGas = WeightPerGas; + + type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; + type CallOrigin = EnsureAddressRoot; + + type WithdrawOrigin = EnsureAddressNever; + type AddressMapping = IdentityAddressMapping; + type Currency = Balances; + + type RuntimeEvent = RuntimeEvent; + type PrecompilesType = MockPrecompileSet; + type PrecompilesValue = MockPrecompiles; + type ChainId = ChainId; + type BlockGasLimit = BlockGasLimit; + type Runner = pallet_evm::runner::stack::Runner; + type OnChargeTransaction = (); + type OnCreate = (); + type FindAuthor = (); + type Timestamp = Timestamp; + type WeightInfo = (); +} + +impl crate::zk_precompile_gas_estimation::Config for Test {} + +// Configure a mock runtime to test the pallet. +construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system, + Balances: pallet_balances, + Timestamp: pallet_timestamp, + Evm: pallet_evm, + } +); + +#[derive(Debug, Clone, Copy)] +pub struct MockPrecompileSet(PhantomData); + +impl PrecompileSet for MockPrecompileSet +where + R: pallet_evm::Config, + ZKGroth16Verify: Precompile, +{ + fn execute(&self, handle: &mut impl PrecompileHandle) -> Option { + println!("handle.code_address() = {:?}", handle.code_address()); + match handle.code_address() { + a if a == H160::from_low_u64_be(0x8888) => Some(ZKGroth16Verify::execute(handle)), + _ => None, + } + } + + fn is_precompile(&self, address: H160, _gas: u64) -> IsPrecompileResult { + IsPrecompileResult::Answer { + is_precompile: address == H160::from_low_u64_be(0x8888), + extra_cost: 0, + } + } +} diff --git a/runtime/runtime-common/src/zk_precompile_gas_estimation/mod.rs b/runtime/runtime-common/src/zk_precompile_gas_estimation/mod.rs new file mode 100644 index 00000000..765e6206 --- /dev/null +++ b/runtime/runtime-common/src/zk_precompile_gas_estimation/mod.rs @@ -0,0 +1,39 @@ +#[cfg(feature = "runtime-benchmarks")] +pub mod benchmarking; +#[cfg(test)] +mod mock; +#[cfg(test)] +mod tests; + +pub use pallet::*; +use sp_core::U256; +use sp_std::vec::Vec; + +pub fn u64s_to_u256(values: Vec) -> U256 { + let mut result = U256::zero(); + for (i, value) in values.into_iter().enumerate().take(4) { + let shift = i * 64; + result |= U256::from(value) << shift; + } + log::info!( + target: "runtime::runtime-common::zk_precompile_gas_estimation::benchmarking", + "u64s_to_u256 result {:?}", + result + ); + result +} + +#[frame_support::pallet] +pub mod pallet { + #[pallet::pallet] + #[pallet::without_storage_info] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config + pallet_evm::Config {} + + #[pallet::error] + pub enum Error {} + + impl Pallet {} +} diff --git a/runtime/runtime-common/src/zk_precompile_gas_estimation/tests.rs b/runtime/runtime-common/src/zk_precompile_gas_estimation/tests.rs new file mode 100644 index 00000000..f20d7035 --- /dev/null +++ b/runtime/runtime-common/src/zk_precompile_gas_estimation/tests.rs @@ -0,0 +1,223 @@ +use super::*; +use crate::zk_precompile_gas_estimation::mock::*; +use ethabi::Token; +use fp_evm::GenesisAccount; +use frame_support::traits::GenesisBuild; +use pallet_evm::{GenesisConfig, Runner}; +use sp_core::{H160, U256}; +use std::{collections::BTreeMap, str::FromStr}; + +pub fn new_test_ext() -> sp_io::TestExternalities { + let mut t = frame_system::GenesisConfig::default() + .build_storage::() + .unwrap(); + let mut accounts = BTreeMap::new(); + accounts.insert( + H160::from_str("1000000000000000000000000000000000000001").unwrap(), + GenesisAccount { + nonce: U256::from(1), + balance: U256::max_value(), + storage: Default::default(), + code: vec![ + 0x00, // STOP + ], + }, + ); + accounts.insert( + H160::from_str("1000000000000000000000000000000000000002").unwrap(), + GenesisAccount { + nonce: U256::from(1), + balance: U256::max_value(), + storage: Default::default(), + code: vec![ + 0xff, // INVALID + ], + }, + ); + accounts.insert( + H160::default(), // root + GenesisAccount { + nonce: U256::from(1), + balance: U256::max_value(), + storage: Default::default(), + code: vec![], + }, + ); + accounts.insert( + H160::from_str("1000000000000000000000000000000000000666").unwrap(), + GenesisAccount { + nonce: U256::from(1), + balance: U256::max_value(), + storage: Default::default(), + code: vec![], // No code, this is an EOA + }, + ); + accounts.insert( + // H160 address of Alice dev account + // Derived from SS58 (42 prefix) address + // SS58: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY + // hex: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d + // Using the full hex key, truncating to the first 20 bytes (the first 40 hex chars) + H160::from_str("d43593c715fdd31c61141abd04a99fd6822c8558") + .expect("internal H160 is valid; qed"), + fp_evm::GenesisAccount { + balance: U256::from_str("0xffffffffffffffffffffffffffffffff") + .expect("internal U256 is valid; qed"), + code: Default::default(), + nonce: Default::default(), + storage: Default::default(), + }, + ); + + pallet_balances::GenesisConfig:: { + // Create the block author account with some balance. + balances: vec![( + H160::from_str("0x1234500000000000000000000000000000000000").unwrap(), + 12345, + )], + } + .assimilate_storage(&mut t) + .expect("Pallet balances storage can be assimilated"); + GenesisBuild::::assimilate_storage(&GenesisConfig { accounts }, &mut t).unwrap(); + t.into() +} + +#[test] +fn test_zk_precompile_gas_estimation() { + new_test_ext().execute_with(|| { + let caller = "d43593c715fdd31c61141abd04a99fd6822c8558".parse::().unwrap(); + + let contract_address = H160::from_low_u64_be(0x8888); + + let proof_a = vec![ + U256::from_dec_str("344113499780097036133410144688544669449665038469801025061703634064197059916").unwrap(), + U256::from_dec_str("8339013355837829034186604529242237434382457535922383671882155606562413431689").unwrap(), + ]; + + let proof_b = vec![ + vec![ + U256::from_dec_str("6694199005832176626648387473003377778002164049654344388623160500074797775370").unwrap(), + U256::from_dec_str("6246558478856965861562784864034844546822126660127014237507763330640717221466").unwrap(), + ], + vec![ + U256::from_dec_str("456859418727494804887897697519797382313397623366843307513728588676215628797").unwrap(), + U256::from_dec_str("19972929684979882956825623277042855987039264105600158828132263230333203670106").unwrap(), + ], + ]; + + let proof_c = vec![ + U256::from_dec_str("8991876521515422964548874095107781976525191569601242691722207742733698821028").unwrap(), + U256::from_dec_str("17304897036279645989594099459944208131107988079437513579584585106093260802053").unwrap(), + ]; + + let vk_alpha = vec![ + U256::from_dec_str("16587578668155053320776501244706909164198053583863284386206654068019392556543").unwrap(), + U256::from_dec_str("17489859882312386925030082840618136961844042944104008122175974338708995824981").unwrap(), + ]; + + let vk_beta = vec![ + vec![ + U256::from_dec_str("8243058085082563940310351321464397410632520885003827137093771369586433446018").unwrap(), + U256::from_dec_str("1806964369040712598415691188975966807767394918682209427183228092832571919497").unwrap(), + ], + vec![ + U256::from_dec_str("5238575049648595236335310308987023404502439315997088611926714272919127054029").unwrap(), + U256::from_dec_str("10529242360048105445622302340100671863366518517961350431989359465371013288044").unwrap(), + ], + ]; + + let vk_gamma = vec![ + vec![ + U256::from_dec_str("422118731661843716781379598081446048950684758761078928178953272944418614265").unwrap(), + U256::from_dec_str("8071137901873450516865398890359069534977349842235015782367912081100468370342").unwrap(), + ], + vec![ + U256::from_dec_str("6616051543776580097026224309598118359974125974677691608309070965923230091481").unwrap(), + U256::from_dec_str("3144026861846828201735234261898216197057552604232403108299101704912138104081").unwrap(), + ], + ]; + + let vk_delta = vec![ + vec![ + U256::from_dec_str("15967728838725285670062386536689775286816477877862913251436519988213464788203").unwrap(), + U256::from_dec_str("14482652023948193853731701210376245407114581664800773915003137369238699817066").unwrap(), + ], + vec![ + U256::from_dec_str("20222564526826997580988353930405539667760709452060576182511364617433825375503").unwrap(), + U256::from_dec_str("1855904408322765948314758770516591135802311025429227172106073057339165107921").unwrap(), + ] + ]; + + let vk_ic = vec![ + vec![ + U256::from_dec_str("2234398803815490360326379119253073021265347911436036657996997085101774002925").unwrap(), + U256::from_dec_str("10214773739303944856355679056757071889148916152665035343340628435407174724717").unwrap(), + ], + vec![ + U256::from_dec_str("21500623561133929663133180424780657403302270303706782392356903439186747104812").unwrap(), + U256::from_dec_str("19328419280811286038333929820672543691407985372391054082759992875889788951230").unwrap(), + ] + ]; + + // let valid_input = vec![u64s_to_u256(vec![1250025000])]; + let valid_input = vec![u64s_to_u256(vec![ + 14321691860995553260, + 7152862679273281751, + 12752615512303817990, + 1576113262537949146, + ])]; + + let mut encoded_call = vec![0u8; 4]; + encoded_call[0..4].copy_from_slice(&sp_io::hashing::keccak_256(b"verify(uint256[2],uint256[2][2],uint256[2],uint256[2],uint256[2][2],uint256[2][2],uint256[2][2],uint256[2][],uint256[])")[0..4]); + println!("encoded_call: {:?}", encoded_call); + let parameters = ethabi::encode(&[ + Token::FixedArray(proof_a.into_iter().map(Token::Uint).collect()), + Token::FixedArray(proof_b.into_iter().map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())).collect()), + Token::FixedArray(proof_c.into_iter().map(Token::Uint).collect()), + Token::FixedArray(vk_alpha.into_iter().map(Token::Uint).collect()), + Token::FixedArray(vk_beta.into_iter().map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())).collect()), + Token::FixedArray(vk_gamma.into_iter().map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())).collect()), + Token::FixedArray(vk_delta.into_iter().map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())).collect()), + Token::Array(vk_ic.into_iter().map(|inner| Token::FixedArray(inner.into_iter().map(Token::Uint).collect())).collect()), + Token::Array(valid_input.into_iter().map(Token::Uint).collect()), + ]); + println!("parameters: {:?}", parameters); + encoded_call.extend(parameters); + let gas_limit_call = 1000000; + let value = U256::default(); + let is_transactional = true; + let validate = true; + let call_runner_results = ::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)), + None, + Vec::new(), + is_transactional, + validate, + ::config(), + ); + match call_runner_results { + Ok(info) => { + let output = info.value; + let used_gas = info.used_gas; + println!("output result {output:?} used gas: {used_gas:?}"); + if output.len() >= 32 { + let mut result_bytes = [0u8; 32]; + result_bytes.copy_from_slice(&output[output.len() - 32..]); + let result = U256::from_big_endian(&result_bytes); + println!("Verification result {result:?}"); + assert_eq!(result, U256::one(), "The contract did not return true"); + } + }, + Err(e) => { + println!("Error: {:?}", e); + assert!(false); + } + } + }); +} diff --git a/runtime/sydney/Cargo.toml b/runtime/sydney/Cargo.toml index 27bd6756..2d2be4e9 100644 --- a/runtime/sydney/Cargo.toml +++ b/runtime/sydney/Cargo.toml @@ -189,6 +189,13 @@ runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", + "pallet-hotfix-sufficients/runtime-benchmarks", + "pallet-ranked-collective/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-society/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "runtime-common/runtime-benchmarks", ] diff --git a/runtime/sydney/src/lib.rs b/runtime/sydney/src/lib.rs index acb33fd1..2b217f5b 100644 --- a/runtime/sydney/src/lib.rs +++ b/runtime/sydney/src/lib.rs @@ -58,6 +58,7 @@ use pallet_grandpa::{fg_primitives, AuthorityList as GrandpaAuthorityList}; use pallet_session::historical::{self as pallet_session_historical}; use pallet_transaction_payment::CurrencyAdapter; use pos::{currency, session_payout}; +use runtime_common::zk_precompile_gas_estimation; // A few exports that help ease life for downstream crates. pub use frame_support::{ @@ -163,6 +164,7 @@ pub type OptionalSignedExtension = ( pub type OptionalSignedExtension = (pallet_transaction_payment::ChargeTransactionPayment,); pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, @@ -370,6 +372,11 @@ parameter_types! { // For weight estimation, we assume that the most locks on an individual account will be 50. // This number may need to be adjusted in the future if this assumption no longer holds true. pub const MaxLocks: u32 = 50; + + // The minimum balance that an account must have in order to be kept alive on-chain. + // This value is used by the Balances pallet to determine if an account should be + // kept alive or if it should be reaped to free up storage space. + pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; } impl pallet_balances::Config for Runtime { @@ -378,7 +385,7 @@ impl pallet_balances::Config for Runtime { type DustRemoval = (); /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128; + type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = pallet_balances::weights::SubstrateWeight; type MaxLocks = MaxLocks; @@ -441,6 +448,8 @@ impl pallet_preimage::Config for Runtime { type ByteDeposit = PreimageByteDeposit; } +impl zk_precompile_gas_estimation::Config for Runtime {} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime where @@ -493,6 +502,7 @@ construct_runtime!( // GGX pallets CurrencyManager: currency, SessionPayout: session_payout, + ZKPrecompileGasEstimation: zk_precompile_gas_estimation, AccountFilter: account_filter, // Wasm contracts @@ -574,7 +584,13 @@ extern crate frame_benchmarking; #[cfg(feature = "runtime-benchmarks")] mod benches { - define_benchmarks!([pallet_evm, EVM]); + define_benchmarks!( + [pallet_evm, EVM] + [ + zk_precompile_gas_estimation, + ZKPrecompileGasEstimation + ] + ); } use fp_rpc::TransactionStatus; @@ -940,6 +956,7 @@ impl_runtime_apis! { add_benchmark!(params, batches, pallet_evm, PalletEvmBench::); add_benchmark!(params, batches, pallet_hotfix_sufficients, PalletHotfixSufficients::); + add_benchmark!(params, batches, zk_precompile_gas_estimation, ZKPrecompileGasEstimation); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } Ok(batches)