From ae19bbcd7fd8184107f174df03fc85def0227216 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 22 Nov 2023 17:19:01 +0100 Subject: [PATCH 01/11] A0-3520: Run deploy to devnet daily at Midnight (#1503) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description We should run deploy-to-devnet.yml workflow in aleph-node as frequently as possible, but not on every commit to main so as to have at least a few hours of this environment stability. The reason we want this is that some devs use dev.azero.dev which has Devnet as the default chain connected to, so humans can spot some errors before the release with more probability. Remark: Devnet will be deprecated in 2024 when features are rolled out, yet behavior would be similiar: there would be a long running feturenet updated every 24 hours from aleph-node main etc; till now then I'll change Devnet to be deployed every night from aleph-node main ## Type of change Please delete options that are not relevant. - New feature (non-breaking change which adds functionality) --- .github/workflows/deploy-to-devnet.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy-to-devnet.yml b/.github/workflows/deploy-to-devnet.yml index 33a235e143..90d40b75ba 100644 --- a/.github/workflows/deploy-to-devnet.yml +++ b/.github/workflows/deploy-to-devnet.yml @@ -9,6 +9,8 @@ name: Deploy to Devnet on: workflow_dispatch: + schedule: + - cron: '00 00 * * *' concurrency: group: ${{ github.ref }}-${{ github.workflow }} From 84a810ecf26b72e7c24c79e20ab283612a6091ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Thu, 23 Nov 2023 06:54:16 +0100 Subject: [PATCH 02/11] A0-3518: Purge chain-extension: backend 1/2 (#1502) # Description Great fun continued. Since OBCE is no longer maintained, we have to rework the extension from the very ground. To avoid huge diff, I divided the work into couple of separate changes. This (second) PR: - brings back simplified backend part (i.e. the actual handler for extensions); simplified, because still without proper checks, weighting and tests - brings back the extension to the runtime ## Type of change Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) # Checklist: - I have added tests - I have made neccessary updates to the Infrastructure - I have made corresponding changes to the existing documentation - I have created new documentation --- .../_build-production-node-and-runtime.yml | 6 + .../_build-test-node-and-runtime.yml | 8 +- .../_unit-tests-and-static-checks.yml | 3 +- Cargo.lock | 323 +- baby-liminal-extension/Cargo.lock | 5038 +++++++++++++++-- baby-liminal-extension/Cargo.toml | 30 +- baby-liminal-extension/Makefile | 4 + baby-liminal-extension/src/args.rs | 32 + .../src/backend/environment.rs | 70 + .../src/backend/executor.rs | 46 + baby-liminal-extension/src/backend/mod.rs | 85 + baby-liminal-extension/src/lib.rs | 21 +- .../tests/utils/environment.rs | 3 +- baby-liminal-extension/tests/utils/mod.rs | 2 +- bin/runtime/Cargo.toml | 3 +- bin/runtime/src/lib.rs | 3 + 16 files changed, 4963 insertions(+), 714 deletions(-) create mode 100644 baby-liminal-extension/src/args.rs create mode 100644 baby-liminal-extension/src/backend/environment.rs create mode 100644 baby-liminal-extension/src/backend/executor.rs create mode 100644 baby-liminal-extension/src/backend/mod.rs diff --git a/.github/workflows/_build-production-node-and-runtime.yml b/.github/workflows/_build-production-node-and-runtime.yml index c22cf753c5..99316dc5c6 100644 --- a/.github/workflows/_build-production-node-and-runtime.yml +++ b/.github/workflows/_build-production-node-and-runtime.yml @@ -29,6 +29,12 @@ jobs: - name: Build production binary and runtime run: cargo build --profile production -p aleph-node + - name: Ensure liminal symbols are not present + run: | + nm --demangle=rust target/production/aleph-node | grep -q liminal \ + && { echo "Liminal symbols are present"; exit 1; } \ + || echo "Liminal symbols are not present" + - name: Upload release binary to GH artifacts uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/_build-test-node-and-runtime.yml b/.github/workflows/_build-test-node-and-runtime.yml index 49ad04916a..98bbcbdf01 100644 --- a/.github/workflows/_build-test-node-and-runtime.yml +++ b/.github/workflows/_build-test-node-and-runtime.yml @@ -29,7 +29,13 @@ jobs: - name: Build test binary and runtime run: | cargo build --release -p aleph-node \ - --features "short_session enable_treasury_proposals only_legacy" + --features "short_session enable_treasury_proposals only_legacy" + + - name: Ensure liminal symbols are not present + run: | + nm --demangle=rust target/production/aleph-node | grep -q liminal \ + && { echo "Liminal symbols are present"; exit 1; } \ + || echo "Liminal symbols are not present" - name: Upload test binary to GH Artifacts uses: actions/upload-artifact@v3 diff --git a/.github/workflows/_unit-tests-and-static-checks.yml b/.github/workflows/_unit-tests-and-static-checks.yml index 4f75c46914..d7b3429e71 100644 --- a/.github/workflows/_unit-tests-and-static-checks.yml +++ b/.github/workflows/_unit-tests-and-static-checks.yml @@ -48,4 +48,5 @@ jobs: args: -- --skip clique_network - name: Run tests for baby liminal chain extension - run: cd baby-liminal-extension && make test-frontend + working-directory: baby-liminal-extension + run: make clippy && make test-frontend diff --git a/Cargo.lock b/Cargo.lock index 456abb571b..9957f3d25d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -775,24 +775,10 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "ark-scale" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51bd73bb6ddb72630987d37fa963e99196896c0d0ea81b7c894567e74a2f83af" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", - "parity-scale-codec", - "scale-info", -] - [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" dependencies = [ "ark-ec", "ark-ff", @@ -852,7 +838,7 @@ dependencies = [ [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" dependencies = [ "ark-ff", "ark-serialize", @@ -1054,6 +1040,15 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "baby-liminal-extension" version = "0.1.0" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-baby-liminal", + "pallet-contracts", + "parity-scale-codec", + "sp-std", +] [[package]] name = "backtrace" @@ -1073,13 +1068,12 @@ dependencies = [ [[package]] name = "bandersnatch_vrfs" version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" dependencies = [ "ark-bls12-381", "ark-ec", "ark-ed-on-bls12-381-bandersnatch", "ark-ff", - "ark-scale 0.0.11", "ark-serialize", "ark-std", "dleq_vrf", @@ -1643,7 +1637,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +source = "git+https://github.com/w3f/ring-proof?rev=8657210#86572101f4210647984ab4efedba6b3fcc890895" dependencies = [ "ark-ec", "ark-ff", @@ -1652,6 +1646,7 @@ dependencies = [ "ark-std", "fflonk", "merlin 3.0.0", + "rand_chacha 0.3.1", ] [[package]] @@ -2339,9 +2334,9 @@ dependencies = [ [[package]] name = "directories" -version = "4.0.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ "dirs-sys", ] @@ -2358,13 +2353,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2392,11 +2388,11 @@ dependencies = [ [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" dependencies = [ "ark-ec", "ark-ff", - "ark-scale 0.0.10", + "ark-scale", "ark-secret-scalar", "ark-serialize", "ark-std", @@ -2924,7 +2920,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", ] @@ -2947,7 +2943,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support", "frame-support-procedural", @@ -2972,7 +2968,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "Inflector", "array-bytes", @@ -3020,7 +3016,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3031,7 +3027,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3048,7 +3044,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support", "frame-system", @@ -3078,7 +3074,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-recursion", "futures", @@ -3100,7 +3096,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "aquamarine", "bitflags 1.3.2", @@ -3140,7 +3136,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "Inflector", "cfg-expr", @@ -3158,7 +3154,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3170,7 +3166,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "proc-macro2", "quote", @@ -3180,7 +3176,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "cfg-if", "frame-support", @@ -3199,7 +3195,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "sp-api", @@ -3208,7 +3204,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support", "parity-scale-codec", @@ -5642,6 +5638,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[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" @@ -5686,7 +5688,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support", "frame-system", @@ -5703,7 +5705,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support", "frame-system", @@ -5717,7 +5719,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-benchmarking", "frame-support", @@ -5757,7 +5759,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-benchmarking", "frame-support", @@ -5794,7 +5796,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "bitflags 1.3.2", "environmental", @@ -5823,7 +5825,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "24.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -5836,7 +5838,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "proc-macro2", "quote", @@ -5869,7 +5871,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5885,7 +5887,7 @@ dependencies = [ [[package]] name = "pallet-insecure-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support", "frame-system", @@ -5899,7 +5901,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-benchmarking", "frame-support", @@ -5915,7 +5917,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support", "frame-system", @@ -5934,7 +5936,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -5945,7 +5947,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "docify", "frame-support", @@ -5962,7 +5964,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support", "frame-system", @@ -5984,7 +5986,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6006,8 +6008,9 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -6021,8 +6024,9 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -6040,7 +6044,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-support", "frame-system", @@ -6056,7 +6060,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6072,7 +6076,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6084,7 +6088,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-benchmarking", "frame-support", @@ -6101,7 +6105,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-benchmarking", "frame-support", @@ -6117,7 +6121,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-benchmarking", "frame-support", @@ -7097,13 +7101,14 @@ dependencies = [ [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +source = "git+https://github.com/w3f/ring-proof?rev=8657210#86572101f4210647984ab4efedba6b3fcc890895" dependencies = [ "ark-ec", "ark-ff", "ark-poly", "ark-serialize", "ark-std", + "blake2", "common", "fflonk", "merlin 3.0.0", @@ -7425,7 +7430,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "log", "sp-core", @@ -7436,7 +7441,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "futures", "futures-timer", @@ -7459,7 +7464,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7474,7 +7479,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -7493,7 +7498,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7504,7 +7509,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "chrono", @@ -7543,7 +7548,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "fnv", "futures", @@ -7563,13 +7568,14 @@ dependencies = [ "sp-state-machine", "sp-statement-store", "sp-storage", + "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "hash-db", "kvdb", @@ -7595,7 +7601,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "futures", @@ -7620,7 +7626,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "futures", @@ -7649,7 +7655,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "futures", @@ -7672,7 +7678,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -7694,7 +7700,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -7706,7 +7712,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "anyhow", "cfg-if", @@ -7723,7 +7729,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "ansi_term", "futures", @@ -7739,7 +7745,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "parking_lot 0.12.1", @@ -7753,7 +7759,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "async-channel", @@ -7794,7 +7800,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-channel", "cid", @@ -7814,7 +7820,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -7831,7 +7837,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "async-channel", @@ -7852,7 +7858,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "async-channel", @@ -7886,7 +7892,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "futures", @@ -7904,7 +7910,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "bytes", @@ -7938,7 +7944,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7947,7 +7953,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "futures", "jsonrpsee", @@ -7978,7 +7984,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7997,7 +8003,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "http", "jsonrpsee", @@ -8012,7 +8018,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "futures", @@ -8040,7 +8046,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "directories", @@ -8104,7 +8110,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "log", "parity-scale-codec", @@ -8115,7 +8121,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "futures", "libc", @@ -8134,7 +8140,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "chrono", "futures", @@ -8153,7 +8159,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "ansi_term", "atty", @@ -8182,7 +8188,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8193,7 +8199,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "futures", @@ -8219,7 +8225,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "futures", @@ -8235,7 +8241,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-channel", "futures", @@ -8746,7 +8752,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "hash-db", "log", @@ -8767,7 +8773,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "Inflector", "blake2", @@ -8781,7 +8787,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "scale-info", @@ -8794,7 +8800,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "integer-sqrt", "num-traits", @@ -8808,7 +8814,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "sp-api", "sp-inherents", @@ -8819,7 +8825,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "futures", "log", @@ -8837,7 +8843,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "futures", @@ -8852,7 +8858,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "parity-scale-codec", @@ -8869,7 +8875,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "parity-scale-codec", @@ -8888,7 +8894,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "finality-grandpa", "log", @@ -8906,7 +8912,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "scale-info", @@ -8918,10 +8924,9 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", - "arrayvec 0.7.4", "bandersnatch_vrfs", "bitflags 1.3.2", "blake2", @@ -8965,7 +8970,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "blake2b_simd", "byteorder", @@ -8978,7 +8983,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "quote", "sp-core-hashing", @@ -8988,7 +8993,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -8997,7 +9002,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "proc-macro2", "quote", @@ -9007,7 +9012,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "environmental", "parity-scale-codec", @@ -9018,7 +9023,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.1.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "serde_json", "sp-api", @@ -9029,7 +9034,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9043,7 +9048,7 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "bytes", "ed25519-dalek", @@ -9067,7 +9072,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "lazy_static", "sp-core", @@ -9078,7 +9083,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -9090,7 +9095,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "thiserror", "zstd 0.12.4", @@ -9099,7 +9104,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -9110,7 +9115,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "scale-info", @@ -9124,7 +9129,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "sp-api", "sp-core", @@ -9134,7 +9139,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "backtrace", "lazy_static", @@ -9144,7 +9149,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "rustc-hash", "serde", @@ -9154,7 +9159,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "either", "hash256-std-hasher", @@ -9176,7 +9181,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -9194,7 +9199,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "Inflector", "proc-macro-crate", @@ -9206,7 +9211,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "scale-info", @@ -9221,7 +9226,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9235,7 +9240,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "hash-db", "log", @@ -9256,7 +9261,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "aes-gcm 0.10.3", "curve25519-dalek 4.1.1", @@ -9280,12 +9285,12 @@ dependencies = [ [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9298,7 +9303,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "parity-scale-codec", @@ -9311,7 +9316,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "sp-std", @@ -9323,7 +9328,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "sp-api", "sp-runtime", @@ -9332,7 +9337,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "parity-scale-codec", @@ -9347,7 +9352,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "ahash 0.8.6", "hash-db", @@ -9370,7 +9375,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9387,7 +9392,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -9398,7 +9403,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -9411,7 +9416,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "parity-scale-codec", "scale-info", @@ -9603,12 +9608,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -9627,7 +9632,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "hyper", "log", @@ -9639,7 +9644,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "jsonrpsee", @@ -9652,7 +9657,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "async-trait", @@ -9678,7 +9683,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "array-bytes", "frame-executive", @@ -9721,7 +9726,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "futures", "sc-block-builder", @@ -9739,7 +9744,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "ansi_term", "build-helper", @@ -10275,9 +10280,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -10350,7 +10355,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.1.0#1ee59f0f2dd25b94a16cb6eea1e0844c9351f5e6" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ "async-trait", "clap", diff --git a/baby-liminal-extension/Cargo.lock b/baby-liminal-extension/Cargo.lock index e13aa09831..d11d11afeb 100644 --- a/baby-liminal-extension/Cargo.lock +++ b/baby-liminal-extension/Cargo.lock @@ -3,281 +3,377 @@ version = 3 [[package]] -name = "aho-corasick" -version = "1.1.2" +name = "Inflector" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" dependencies = [ - "memchr", + "lazy_static", + "regex", ] [[package]] -name = "array-init" -version = "2.1.0" +name = "addr2line" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli 0.27.3", +] [[package]] -name = "arrayref" -version = "0.3.7" +name = "addr2line" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli 0.28.0", +] [[package]] -name = "arrayvec" -version = "0.7.4" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "autocfg" -version = "1.1.0" +name = "aead" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "baby-liminal-extension" -version = "0.1.0" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ - "ink", - "parity-scale-codec", - "scale-info", + "crypto-common", + "generic-array 0.14.7", ] [[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "bitvec" -version = "1.0.1" +name = "ahash" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "funty", - "radium", - "tap", - "wyz", + "getrandom 0.2.11", + "once_cell", + "version_check", ] [[package]] -name = "blake2" -version = "0.10.6" +name = "ahash" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ - "digest", + "cfg-if", + "getrandom 0.2.11", + "once_cell", + "version_check", + "zerocopy", ] [[package]] -name = "block-buffer" -version = "0.10.4" +name = "aho-corasick" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ - "generic-array", + "memchr", ] [[package]] -name = "byte-slice-cast" -version = "1.2.2" +name = "android-tzdata" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] -name = "cc" -version = "1.0.83" +name = "android_system_properties" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ "libc", ] [[package]] -name = "cfg-if" -version = "1.0.0" +name = "ansi_term" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] [[package]] -name = "cpufeatures" -version = "0.2.11" +name = "anyhow" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" dependencies = [ - "libc", + "num-traits", ] [[package]] -name = "crypto-common" -version = "0.1.6" +name = "aquamarine" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" dependencies = [ - "generic-array", - "typenum", + "include_dir", + "itertools", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "darling" -version = "0.14.4" +name = "ark-bls12-377" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ - "darling_core", - "darling_macro", + "ark-ec", + "ark-ff", + "ark-std", ] [[package]] -name = "darling_core" -version = "0.14.4" +name = "ark-bls12-381" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", ] [[package]] -name = "darling_macro" -version = "0.14.4" +name = "ark-bn254" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", + "ark-ec", + "ark-ff", + "ark-std", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "ark-bw6-761" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", ] [[package]] -name = "digest" -version = "0.10.7" +name = "ark-crypto-primitives" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" dependencies = [ - "block-buffer", - "crypto-common", - "subtle", + "ark-ec", + "ark-ff", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "blake2", + "derivative", + "digest 0.10.7", + "sha2 0.10.8", ] [[package]] -name = "either" -version = "1.9.0" +name = "ark-ec" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] [[package]] -name = "env_logger" -version = "0.10.0" +name = "ark-ed-on-bls12-377" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", ] [[package]] -name = "equivalent" -version = "1.0.1" +name = "ark-ed-on-bls12-381" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "ba6d678bb98a7e4f825bd4e332e93ac4f5a114ce2e3340dee4d7dc1c7ab5b323" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", +] [[package]] -name = "errno" -version = "0.3.6" +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" dependencies = [ - "libc", - "windows-sys", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", ] [[package]] -name = "fnv" -version = "1.0.7" +name = "ark-ed-on-bn254" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "71892f265d01650e34988a546b37ea1d2ba1da162a639597a03d1550f26004d8" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-std", +] [[package]] -name = "funty" -version = "2.0.0" +name = "ark-ff" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] [[package]] -name = "generic-array" -version = "0.14.7" +name = "ark-ff-asm" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "typenum", - "version_check", + "quote", + "syn 1.0.109", ] [[package]] -name = "hashbrown" -version = "0.14.2" +name = "ark-ff-macros" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] -name = "heck" -version = "0.4.1" +name = "ark-poly" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] [[package]] -name = "hermit-abi" -version = "0.3.3" +name = "ark-relations" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" +dependencies = [ + "ark-ff", + "ark-std", + "tracing", + "tracing-subscriber", +] [[package]] -name = "humantime" -version = "2.1.0" +name = "ark-scale" +version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", +] [[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +name = "ark-secret-scalar" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "ark-transcript", + "digest 0.10.7", + "rand_core 0.6.4", + "zeroize", +] [[package]] -name = "impl-serde" -version = "0.4.0" +name = "ark-serialize" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ - "serde", + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", ] [[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" +name = "ark-serialize-derive" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ "proc-macro2", "quote", @@ -285,672 +381,4383 @@ dependencies = [ ] [[package]] -name = "indexmap" -version = "2.1.0" +name = "ark-snark" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" dependencies = [ - "equivalent", - "hashbrown", + "ark-ff", + "ark-relations", + "ark-serialize", + "ark-std", ] [[package]] -name = "ink" -version = "4.3.0" +name = "ark-std" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9fd4f77d66c94aa7f27a7cf41cd2edbc2229afe34ec475c3f32b6e8fdf561a0" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ - "derive_more", - "ink_env", - "ink_macro", - "ink_metadata", - "ink_prelude", - "ink_primitives", - "ink_storage", - "parity-scale-codec", + "num-traits", + "rand 0.8.5", ] [[package]] -name = "ink_allocator" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870914970470fd77a3f42d3c5d1918b562817af127fd063ee8b1d9fbf59aa1fe" +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" dependencies = [ - "cfg-if", + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", ] [[package]] -name = "ink_codegen" -version = "4.3.0" +name = "array-bytes" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22d79057b2565df31a10af6510a44b161093f110c5f9c22ad02c20af9cea4c29" -dependencies = [ - "blake2", - "derive_more", - "either", - "env_logger", - "heck", - "impl-serde", - "ink_ir", - "ink_primitives", - "itertools", - "log", - "parity-scale-codec", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn 2.0.39", -] +checksum = "de17a919934ad8c5cc99a1a74de4e2dab95d6121a8f27f94755ff525b630382c" [[package]] -name = "ink_engine" +name = "array-init" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "async-trait" +version = "0.1.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "baby-liminal-extension" +version = "0.1.0" +dependencies = [ + "frame-support", + "frame-system", + "ink", + "log", + "pallet-baby-liminal", + "pallet-contracts", + "parity-scale-codec", + "scale-info", + "sp-std", +] + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line 0.21.0", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object 0.32.1", + "rustc-demangle", +] + +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.1" +source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-serialize", + "ark-std", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "ring", + "sha2 0.10.8", + "zeroize", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "blst" +version = "0.3.10" +source = "git+https://github.com/EspressoSystems/blst.git?branch=no-std#faefc7fcb21864aaf4f6f443636ce8924108fcbd" +dependencies = [ + "cc", + "glob", + "zeroize", +] + +[[package]] +name = "bounded-collections" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-expr" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" +dependencies = [ + "smallvec", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + +[[package]] +name = "chrono" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "windows-targets 0.48.5", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=8657210#86572101f4210647984ab4efedba6b3fcc890895" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "const-oid" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" + +[[package]] +name = "const-random" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.11", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "cpp_demangle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +dependencies = [ + "libc", +] + +[[package]] +name = "cranelift-entity" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" +dependencies = [ + "serde", +] + +[[package]] +name = "crc-any" +version = "2.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "774646b687f63643eb0f4bf13dc263cb581c8c9e57973b6ddf78bda3994d88df" + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "crypto_box" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd26c32de5307fd08aac445a75c43472b14559d5dccdfba8022dbcd075838ebc" +dependencies = [ + "aead", + "chacha20", + "chacha20poly1305", + "salsa20", + "x25519-dalek", + "xsalsa20poly1305", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive-syn-parse" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + +[[package]] +name = "docify" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" +dependencies = [ + "common-path", + "derive-syn-parse", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.39", + "termcolor", + "toml", + "walkdir", +] + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dyn-clonable" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4" +dependencies = [ + "dyn-clonable-impl", + "dyn-clone", +] + +[[package]] +name = "dyn-clonable-impl" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "dyn-clone" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519", + "sha2 0.10.8", + "subtle", +] + +[[package]] +name = "ed25519-zebra" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +dependencies = [ + "curve25519-dalek 3.2.0", + "hashbrown 0.12.3", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array 0.14.7", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "env_logger" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "espresso-systems-common" +version = "0.4.0" +source = "git+https://github.com/espressosystems/espresso-systems-common?tag=0.4.0#5abd890f79014a86db31286e1f3a529f161e69de" + +[[package]] +name = "expander" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" +dependencies = [ + "blake2", + "fs-err", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#1beb0585e1c8488956fac7f05da061f9b41e8948" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "frame-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support", + "frame-support-procedural", + "frame-system", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "static_assertions", +] + +[[package]] +name = "frame-metadata" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "frame-support" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "aquamarine", + "bitflags 1.3.2", + "docify", + "environmental", + "frame-metadata", + "frame-support-procedural", + "impl-trait-for-tuples", + "k256", + "log", + "macro_magic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "serde_json", + "smallvec", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-core-hashing-proc-macro", + "sp-debug-derive", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-metadata-ir", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-weights", + "static_assertions", + "tt-call", +] + +[[package]] +name = "frame-support-procedural" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "Inflector", + "cfg-expr", + "derive-syn-parse", + "expander", + "frame-support-procedural-tools", + "itertools", + "macro_magic", + "proc-macro-warning", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support-procedural-tools-derive", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "frame-support-procedural-tools-derive" +version = "3.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "frame-system" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "cfg-if", + "frame-support", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", + "sp-weights", +] + +[[package]] +name = "fs-err" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" + +[[package]] +name = "futures-executor" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" + +[[package]] +name = "futures-macro" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "futures-sink" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" + +[[package]] +name = "futures-task" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" + +[[package]] +name = "futures-util" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +dependencies = [ + "fallible-iterator", + "indexmap 1.9.3", + "stable_deref_trait", +] + +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "hash-db" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", +] + +[[package]] +name = "hashbrown" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +dependencies = [ + "crypto-mac 0.11.1", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array 0.14.7", + "hmac 0.8.1", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "iana-time-zone" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.2", +] + +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + +[[package]] +name = "ink" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9fd4f77d66c94aa7f27a7cf41cd2edbc2229afe34ec475c3f32b6e8fdf561a0" +dependencies = [ + "derive_more", + "ink_env", + "ink_macro", + "ink_metadata", + "ink_prelude", + "ink_primitives", + "ink_storage", + "parity-scale-codec", +] + +[[package]] +name = "ink_allocator" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "870914970470fd77a3f42d3c5d1918b562817af127fd063ee8b1d9fbf59aa1fe" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_codegen" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22d79057b2565df31a10af6510a44b161093f110c5f9c22ad02c20af9cea4c29" +dependencies = [ + "blake2", + "derive_more", + "either", + "env_logger", + "heck", + "impl-serde", + "ink_ir", + "ink_primitives", + "itertools", + "log", + "parity-scale-codec", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.39", +] + +[[package]] +name = "ink_engine" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "722ec3a5eb557124b001c60ff8f961079f6d566af643edea579f152b15822fe5" +dependencies = [ + "blake2", + "derive_more", + "ink_primitives", + "parity-scale-codec", + "secp256k1 0.27.0", + "sha2 0.10.8", + "sha3", +] + +[[package]] +name = "ink_env" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "584e73bc0982f6f1a067bb63ebc75262f6dc54ed2a17060efa73eaba84dc9308" +dependencies = [ + "arrayref", + "blake2", + "cfg-if", + "derive_more", + "ink_allocator", + "ink_engine", + "ink_prelude", + "ink_primitives", + "ink_storage_traits", + "num-traits", + "parity-scale-codec", + "paste", + "rlibc", + "scale-decode", + "scale-encode", + "scale-info", + "secp256k1 0.27.0", + "sha2 0.10.8", + "sha3", + "static_assertions", +] + +[[package]] +name = "ink_ir" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b529c941518e8f450395fab9fe8ebba0a7acbb18778fc7e0a87f6248286ec72" +dependencies = [ + "blake2", + "either", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "ink_macro" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8579576c995ca9baa032584beca19155cbd63b6739570aa9da4d35a0415f4be8" +dependencies = [ + "ink_codegen", + "ink_ir", + "ink_primitives", + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.39", + "synstructure", +] + +[[package]] +name = "ink_metadata" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fddff95ce3e01f42002fdaf96edda691dbccb08c9ae76d7101daa1fa634e601" +dependencies = [ + "derive_more", + "impl-serde", + "ink_prelude", + "ink_primitives", + "scale-info", + "serde", +] + +[[package]] +name = "ink_prelude" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8cfdf91d2b442f08efb34dd3780fd6fbd3d033f63b42f62684fe47534948ef6" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ink_primitives" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6414bcad12ebf0c3abbbb192a09e4d06e22f662cf3e19545204e1b0684be12a1" +dependencies = [ + "derive_more", + "ink_prelude", + "parity-scale-codec", + "scale-decode", + "scale-encode", + "scale-info", + "xxhash-rust", +] + +[[package]] +name = "ink_storage" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd728409de235de0489f71ee2d1beb320613fdb50dda9fa1c564825f4ad06daa" +dependencies = [ + "array-init", + "cfg-if", + "derive_more", + "ink_env", + "ink_metadata", + "ink_prelude", + "ink_primitives", + "ink_storage_traits", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ink_storage_traits" version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722ec3a5eb557124b001c60ff8f961079f6d566af643edea579f152b15822fe5" +checksum = "a8dcb50f70377ac35c28d63b06383a0a3cbb79542ea4cdc5b00e3e2b3de4a549" +dependencies = [ + "ink_metadata", + "ink_prelude", + "ink_primitives", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi", + "rustix 0.38.21", + "windows-sys 0.48.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "jf-plonk" +version = "0.3.0" +source = "git+https://github.com/Cardinal-Cryptography/jellyfish?branch=substrate-compatible#6d4548574d79062a5fc3f760cdaa35a50c842cdf" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "displaydoc", + "downcast-rs", + "dyn-clone", + "espresso-systems-common", + "hashbrown 0.13.2", + "itertools", + "jf-primitives", + "jf-relation", + "jf-utils", + "merlin 3.0.0", + "num-bigint", + "rand_chacha 0.3.1", + "serde", + "sha3", + "tagged-base64", +] + +[[package]] +name = "jf-primitives" +version = "0.3.0" +source = "git+https://github.com/Cardinal-Cryptography/jellyfish?branch=substrate-compatible#6d4548574d79062a5fc3f760cdaa35a50c842cdf" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-bn254", + "ark-bw6-761", + "ark-crypto-primitives", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-381", + "ark-ed-on-bn254", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "blst", + "crypto_box", + "derivative", + "digest 0.10.7", + "displaydoc", + "espresso-systems-common", + "generic-array 0.14.7", + "itertools", + "jf-relation", + "jf-utils", + "merlin 3.0.0", + "num-bigint", + "num-traits", + "rand_chacha 0.3.1", + "serde", + "sha2 0.10.8", + "sha3", + "tagged-base64", + "typenum", + "zeroize", +] + +[[package]] +name = "jf-relation" +version = "0.3.0" +source = "git+https://github.com/Cardinal-Cryptography/jellyfish?branch=substrate-compatible#6d4548574d79062a5fc3f760cdaa35a50c842cdf" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-bn254", + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "displaydoc", + "downcast-rs", + "dyn-clone", + "hashbrown 0.13.2", + "jf-utils", + "num-bigint", + "rand_chacha 0.3.1", +] + +[[package]] +name = "jf-utils" +version = "0.3.0" +source = "git+https://github.com/Cardinal-Cryptography/jellyfish?branch=substrate-compatible#6d4548574d79062a5fc3f760cdaa35a50c842cdf" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "serde", + "sha2 0.10.8", + "tagged-base64", +] + +[[package]] +name = "js-sys" +version = "0.3.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.8", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libsecp256k1" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +dependencies = [ + "arrayref", + "base64", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linregress" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" +dependencies = [ + "nalgebra", +] + +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + +[[package]] +name = "linux-raw-sys" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + +[[package]] +name = "macro_magic" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "macro_magic_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "macro_magic_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "memfd" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" +dependencies = [ + "rustix 0.38.21", +] + +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memory-db" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" +dependencies = [ + "hash-db", +] + +[[package]] +name = "merlin" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "nalgebra" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", +] + +[[package]] +name = "nalgebra-macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec 0.7.4", + "itoa", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.30.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +dependencies = [ + "crc32fast", + "hashbrown 0.13.2", + "indexmap 1.9.3", + "memchr", +] + +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "pallet-baby-liminal" +version = "0.1.0" +dependencies = [ + "ark-bls12-381", + "ark-serialize", + "frame-benchmarking", + "frame-support", + "frame-system", + "jf-plonk", + "log", + "parity-scale-codec", + "scale-info", + "sp-std", +] + +[[package]] +name = "pallet-balances" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-contracts" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "bitflags 1.3.2", + "environmental", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-balances", + "pallet-contracts-primitives", + "pallet-contracts-proc-macro", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "serde", + "smallvec", + "sp-api", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "wasm-instrument", + "wasmi", +] + +[[package]] +name = "pallet-contracts-primitives" +version = "24.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "bitflags 1.3.2", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", + "sp-weights", +] + +[[package]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +dependencies = [ + "arrayvec 0.7.4", + "bitvec", + "byte-slice-cast", + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +dependencies = [ + "crypto-mac 0.11.1", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "platforms" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-serde", + "scale-info", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-warning" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "proc-macro2" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.11", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "ref-cast" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + +[[package]] +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=8657210#86572101f4210647984ab4efedba6b3fcc890895" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "blake2", + "common", + "fflonk", + "merlin 3.0.0", +] + +[[package]] +name = "rlibc" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe" + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.36.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", +] + +[[package]] +name = "rustix" +version = "0.38.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys 0.4.11", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "safe_arch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-bits" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "036575c29af9b6e4866ffb7fa055dbf623fe7a9cc159b33786de6013a6969d89" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "scale-decode" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7789f5728e4e954aaa20cadcc370b99096fb8645fca3c9333ace44bb18f30095" +dependencies = [ + "derive_more", + "parity-scale-codec", + "scale-bits", + "scale-decode-derive", + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-decode-derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scale-encode" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d70cb4b29360105483fac1ed567ff95d65224a14dd275b6303ed0a654c78de5" +dependencies = [ + "derive_more", + "parity-scale-codec", + "scale-encode-derive", + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-encode-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scale-info" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +dependencies = [ + "bitvec", + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", + "serde", +] + +[[package]] +name = "scale-info-derive" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "schnellru" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +dependencies = [ + "ahash 0.8.6", + "cfg-if", + "hashbrown 0.13.2", +] + +[[package]] +name = "schnorrkel" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "curve25519-dalek 2.1.3", + "getrandom 0.1.16", + "merlin 2.0.1", + "rand 0.7.3", + "rand_core 0.5.1", + "sha2 0.8.2", + "subtle", + "zeroize", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +dependencies = [ + "secp256k1-sys 0.6.1", +] + +[[package]] +name = "secp256k1" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "secp256k1-sys 0.8.1", +] + +[[package]] +name = "secp256k1-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +dependencies = [ + "cc", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + +[[package]] +name = "serde" +version = "1.0.192" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.192" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +dependencies = [ + "serde", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "simba" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" + +[[package]] +name = "snafu" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" +dependencies = [ + "backtrace", + "doc-comment", + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sp-api" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro", + "sp-core", + "sp-externalities", + "sp-metadata-ir", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-version", + "thiserror", +] + +[[package]] +name = "sp-api-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "Inflector", + "blake2", + "expander", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "sp-application-crypto" +version = "23.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-std", +] + +[[package]] +name = "sp-arithmetic" +version = "16.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ - "blake2", - "derive_more", - "ink_primitives", + "integer-sqrt", + "num-traits", "parity-scale-codec", - "secp256k1", - "sha2", - "sha3", + "scale-info", + "serde", + "sp-std", + "static_assertions", ] [[package]] -name = "ink_env" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "584e73bc0982f6f1a067bb63ebc75262f6dc54ed2a17060efa73eaba84dc9308" +name = "sp-core" +version = "21.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ - "arrayref", + "array-bytes", + "bandersnatch_vrfs", + "bitflags 1.3.2", "blake2", - "cfg-if", - "derive_more", - "ink_allocator", - "ink_engine", - "ink_prelude", - "ink_primitives", - "ink_storage_traits", - "num-traits", + "bounded-collections", + "bs58", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db", + "hash256-std-hasher", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin 2.0.1", "parity-scale-codec", + "parking_lot", "paste", - "rlibc", - "scale-decode", - "scale-encode", + "primitive-types", + "rand 0.8.5", + "regex", "scale-info", - "secp256k1", - "sha2", + "schnorrkel", + "secp256k1 0.24.3", + "secrecy", + "serde", + "sp-core-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tiny-bip39", + "tracing", + "zeroize", +] + +[[package]] +name = "sp-core-hashing" +version = "9.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.8", "sha3", - "static_assertions", + "twox-hash", ] [[package]] -name = "ink_ir" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b529c941518e8f450395fab9fe8ebba0a7acbb18778fc7e0a87f6248286ec72" +name = "sp-core-hashing-proc-macro" +version = "9.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "quote", + "sp-core-hashing", + "syn 2.0.39", +] + +[[package]] +name = "sp-debug-derive" +version = "8.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "sp-externalities" +version = "0.19.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.1.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "serde_json", + "sp-api", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-inherents" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", + "thiserror", +] + +[[package]] +name = "sp-io" +version = "23.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "bytes", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "rustversion", + "secp256k1 0.24.3", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-keystore" +version = "0.27.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "parity-scale-codec", + "parking_lot", + "sp-core", + "sp-externalities", + "thiserror", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.1.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std", +] + +[[package]] +name = "sp-panic-handler" +version = "8.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + +[[package]] +name = "sp-runtime" +version = "24.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ - "blake2", "either", - "itertools", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-weights", +] + +[[package]] +name = "sp-runtime-interface" +version = "17.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "11.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "Inflector", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.39", ] [[package]] -name = "ink_macro" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8579576c995ca9baa032584beca19155cbd63b6739570aa9da4d35a0415f4be8" +name = "sp-staking" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-state-machine" +version = "0.28.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "parking_lot", + "rand 0.8.5", + "smallvec", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std", + "sp-trie", + "thiserror", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" + +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-tracing" +version = "10.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "parity-scale-codec", + "sp-std", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-trie" +version = "22.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "ahash 0.8.6", + "hash-db", + "hashbrown 0.13.2", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot", + "scale-info", + "schnellru", + "sp-core", + "sp-std", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-version" +version = "22.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-core-hashing-proc-macro", + "sp-runtime", + "sp-std", + "sp-version-proc-macro", + "thiserror", +] + +[[package]] +name = "sp-version-proc-macro" +version = "8.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" dependencies = [ - "ink_codegen", - "ink_ir", - "ink_primitives", "parity-scale-codec", "proc-macro2", "quote", "syn 2.0.39", - "synstructure", ] [[package]] -name = "ink_metadata" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fddff95ce3e01f42002fdaf96edda691dbccb08c9ae76d7101daa1fa634e601" +name = "sp-wasm-interface" +version = "14.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std", + "wasmtime", +] + +[[package]] +name = "sp-weights" +version = "20.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "ss58-registry" +version = "1.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "substrate-bip39" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" +dependencies = [ + "hmac 0.11.0", + "pbkdf2 0.8.0", + "schnorrkel", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", + "unicode-xid", +] + +[[package]] +name = "tagged-base64" +version = "0.3.1" +source = "git+https://github.com/EspressoSystems/tagged-base64?rev=9207d39#9207d39ba7a9c11801511a7077ea4330b6173e44" dependencies = [ - "derive_more", - "impl-serde", - "ink_prelude", - "ink_primitives", - "scale-info", + "ark-serialize", + "ark-std", + "base64", + "crc-any", "serde", + "snafu", + "tagged-base64-macros", ] [[package]] -name = "ink_prelude" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8cfdf91d2b442f08efb34dd3780fd6fbd3d033f63b42f62684fe47534948ef6" +name = "tagged-base64-macros" +version = "0.3.1" +source = "git+https://github.com/EspressoSystems/tagged-base64?rev=9207d39#9207d39ba7a9c11801511a7077ea4330b6173e44" dependencies = [ - "cfg-if", + "quote", + "syn 1.0.109", ] [[package]] -name = "ink_primitives" -version = "4.3.0" +name = "tap" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6414bcad12ebf0c3abbbb192a09e4d06e22f662cf3e19545204e1b0684be12a1" -dependencies = [ - "derive_more", - "ink_prelude", - "parity-scale-codec", - "scale-decode", - "scale-encode", - "scale-info", - "xxhash-rust", -] +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] -name = "ink_storage" -version = "4.3.0" +name = "target-lexicon" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd728409de235de0489f71ee2d1beb320613fdb50dda9fa1c564825f4ad06daa" -dependencies = [ - "array-init", - "cfg-if", - "derive_more", - "ink_env", - "ink_metadata", - "ink_prelude", - "ink_primitives", - "ink_storage_traits", - "parity-scale-codec", - "scale-info", -] +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] -name = "ink_storage_traits" -version = "4.3.0" +name = "termcolor" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8dcb50f70377ac35c28d63b06383a0a3cbb79542ea4cdc5b00e3e2b3de4a549" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ - "ink_metadata", - "ink_prelude", - "ink_primitives", - "parity-scale-codec", - "scale-info", + "winapi-util", ] [[package]] -name = "is-terminal" -version = "0.4.9" +name = "thiserror" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ - "hermit-abi", - "rustix", - "windows-sys", + "thiserror-impl", ] [[package]] -name = "itertools" -version = "0.10.5" +name = "thiserror-impl" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ - "either", + "proc-macro2", + "quote", + "syn 2.0.39", ] [[package]] -name = "itoa" -version = "1.0.9" +name = "thread_local" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] [[package]] -name = "keccak" -version = "0.1.4" +name = "tiny-bip39" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" dependencies = [ - "cpufeatures", + "anyhow", + "hmac 0.12.1", + "once_cell", + "pbkdf2 0.11.0", + "rand 0.8.5", + "rustc-hash", + "sha2 0.10.8", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", ] [[package]] -name = "libc" -version = "0.2.150" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] [[package]] -name = "linux-raw-sys" -version = "0.4.11" +name = "tinyvec" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] [[package]] -name = "log" -version = "0.4.20" +name = "tinyvec_macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] -name = "memchr" -version = "2.6.4" +name = "toml" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] [[package]] -name = "num-traits" -version = "0.2.17" +name = "toml_datetime" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ - "autocfg", + "serde", ] [[package]] -name = "once_cell" -version = "1.18.0" +name = "toml_edit" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] [[package]] -name = "parity-scale-codec" -version = "3.6.5" +name = "tracing" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", + "pin-project-lite", + "tracing-attributes", + "tracing-core", ] [[package]] -name = "parity-scale-codec-derive" -version = "3.6.5" +name = "tracing-attributes" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" +name = "tracing-core" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", - "toml_edit", + "valuable", ] [[package]] -name = "proc-macro2" -version = "1.0.69" +name = "tracing-log" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "unicode-ident", + "log", + "once_cell", + "tracing-core", ] [[package]] -name = "quote" -version = "1.0.33" +name = "tracing-serde" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" dependencies = [ - "proc-macro2", + "serde", + "tracing-core", ] [[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "regex" -version = "1.10.2" +name = "tracing-subscriber" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", + "ansi_term", + "chrono", + "lazy_static", + "matchers", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", ] [[package]] -name = "regex-automata" -version = "0.4.3" +name = "trie-db" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "hash-db", + "hashbrown 0.13.2", + "log", + "rustc-hex", + "smallvec", ] [[package]] -name = "regex-syntax" -version = "0.8.2" +name = "trie-root" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" +dependencies = [ + "hash-db", +] [[package]] -name = "rlibc" -version = "1.0.0" +name = "tt-call" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe" +checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" [[package]] -name = "rustix" -version = "0.38.21" +name = "twox-hash" +version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", + "cfg-if", + "digest 0.10.7", + "rand 0.8.5", + "static_assertions", ] [[package]] -name = "ryu" -version = "1.0.15" +name = "typenum" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] -name = "scale-bits" -version = "0.4.0" +name = "uint" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "036575c29af9b6e4866ffb7fa055dbf623fe7a9cc159b33786de6013a6969d89" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ - "parity-scale-codec", - "scale-info", + "byteorder", + "crunchy", + "hex", + "static_assertions", ] [[package]] -name = "scale-decode" -version = "0.9.0" +name = "unicode-bidi" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7789f5728e4e954aaa20cadcc370b99096fb8645fca3c9333ace44bb18f30095" -dependencies = [ - "derive_more", - "parity-scale-codec", - "scale-bits", - "scale-decode-derive", - "scale-info", - "smallvec", -] +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] -name = "scale-decode-derive" -version = "0.9.0" +name = "unicode-ident" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47" -dependencies = [ - "darling", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "scale-encode" -version = "0.5.0" +name = "unicode-normalization" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d70cb4b29360105483fac1ed567ff95d65224a14dd275b6303ed0a654c78de5" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ - "derive_more", - "parity-scale-codec", - "scale-encode-derive", - "scale-info", - "smallvec", + "tinyvec", ] [[package]] -name = "scale-encode-derive" -version = "0.5.0" +name = "unicode-xid" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "darling", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", + "crypto-common", + "subtle", ] [[package]] -name = "scale-info" -version = "2.10.0" +name = "url" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ - "bitvec", - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", - "serde", + "form_urlencoded", + "idna", + "percent-encoding", ] [[package]] -name = "scale-info-derive" -version = "2.10.0" +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] -name = "secp256k1" -version = "0.27.0" +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" -dependencies = [ - "secp256k1-sys", -] +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "secp256k1-sys" -version = "0.8.1" +name = "walkdir" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ - "cc", + "same-file", + "winapi-util", ] [[package]] -name = "serde" -version = "1.0.192" +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ - "serde_derive", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] -name = "serde_derive" -version = "1.0.192" +name = "wasm-bindgen-backend" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ + "bumpalo", + "log", + "once_cell", "proc-macro2", "quote", "syn 2.0.39", + "wasm-bindgen-shared", ] [[package]] -name = "serde_json" -version = "1.0.108" +name = "wasm-bindgen-macro" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ - "itoa", - "ryu", - "serde", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "sha2" -version = "0.10.8" +name = "wasm-bindgen-macro-support" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ - "cfg-if", - "cpufeatures", - "digest", + "proc-macro2", + "quote", + "syn 2.0.39", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] -name = "sha3" -version = "0.10.8" +name = "wasm-bindgen-shared" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest", - "keccak", -] +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] -name = "smallvec" -version = "1.11.1" +name = "wasm-instrument" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "2a47ecb37b9734d1085eaa5ae1a81e60801fd8c28d4cabdd8aedb982021918bc" +dependencies = [ + "parity-wasm", +] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "wasmi" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "1f341edb80021141d4ae6468cbeefc50798716a347d4085c3811900049ea8945" +dependencies = [ + "smallvec", + "spin", + "wasmi_arena", + "wasmi_core", + "wasmparser-nostd", +] [[package]] -name = "strsim" -version = "0.10.0" +name = "wasmi_arena" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" [[package]] -name = "subtle" -version = "2.4.1" +name = "wasmi_core" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" +dependencies = [ + "downcast-rs", + "libm", + "num-traits", + "paste", +] [[package]] -name = "syn" -version = "1.0.109" +name = "wasmparser" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "indexmap 1.9.3", + "url", ] [[package]] -name = "syn" -version = "2.0.39" +name = "wasmparser-nostd" +version = "0.100.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "indexmap-nostd", ] [[package]] -name = "synstructure" -version = "0.13.0" +name = "wasmtime" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", - "unicode-xid", + "anyhow", + "bincode", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "object 0.30.4", + "once_cell", + "paste", + "psm", + "serde", + "target-lexicon", + "wasmparser", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-runtime", + "windows-sys 0.45.0", ] [[package]] -name = "tap" -version = "1.0.1" +name = "wasmtime-asm-macros" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" +dependencies = [ + "cfg-if", +] [[package]] -name = "termcolor" -version = "1.3.0" +name = "wasmtime-environ" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ - "winapi-util", + "anyhow", + "cranelift-entity", + "gimli 0.27.3", + "indexmap 1.9.3", + "log", + "object 0.30.4", + "serde", + "target-lexicon", + "thiserror", + "wasmparser", + "wasmtime-types", ] [[package]] -name = "toml_datetime" -version = "0.6.5" +name = "wasmtime-jit" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" +dependencies = [ + "addr2line 0.19.0", + "anyhow", + "bincode", + "cfg-if", + "cpp_demangle", + "gimli 0.27.3", + "log", + "object 0.30.4", + "rustc-demangle", + "serde", + "target-lexicon", + "wasmtime-environ", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", + "windows-sys 0.45.0", +] [[package]] -name = "toml_edit" -version = "0.19.15" +name = "wasmtime-jit-debug" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "indexmap", - "toml_datetime", - "winnow", + "once_cell", ] [[package]] -name = "typenum" -version = "1.17.0" +name = "wasmtime-jit-icache-coherence" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.45.0", +] [[package]] -name = "unicode-ident" -version = "1.0.12" +name = "wasmtime-runtime" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "mach", + "memfd", + "memoffset", + "paste", + "rand 0.8.5", + "rustix 0.36.17", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-jit-debug", + "windows-sys 0.45.0", +] [[package]] -name = "unicode-xid" -version = "0.2.4" +name = "wasmtime-types" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" +dependencies = [ + "cranelift-entity", + "serde", + "thiserror", + "wasmparser", +] [[package]] -name = "version_check" -version = "0.9.4" +name = "wide" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" +dependencies = [ + "bytemuck", + "safe_arch", +] [[package]] name = "winapi" @@ -983,13 +4790,46 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -998,51 +4838,93 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -1067,8 +4949,72 @@ dependencies = [ "tap", ] +[[package]] +name = "x25519-dalek" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" +dependencies = [ + "curve25519-dalek 3.2.0", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "xsalsa20poly1305" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02a6dad357567f81cd78ee75f7c61f1b30bb2fe4390be8fb7c69e2ac8dffb6c7" +dependencies = [ + "aead", + "poly1305", + "salsa20", + "subtle", + "zeroize", +] + [[package]] name = "xxhash-rust" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9828b178da53440fa9c766a3d2f73f7cf5d0ac1fe3980c1e5018d899fd19e07b" + +[[package]] +name = "zerocopy" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] diff --git a/baby-liminal-extension/Cargo.toml b/baby-liminal-extension/Cargo.toml index ee3cbd7f2f..617bef803a 100644 --- a/baby-liminal-extension/Cargo.toml +++ b/baby-liminal-extension/Cargo.toml @@ -8,27 +8,53 @@ repository = "https://github.com/aleph-zero-foundation/aleph-node" license = "Apache-2.0" [dependencies] +# Common dependencies: +scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } + +# Frontend dependencies: + ink = { version = "4.3.0", default-features = false, optional = true } -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"], optional = true } scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true } +# Backend dependencies: + +log = { version = "0.4", default-features = false, optional = true } + +frame-support = { git = "https://github.com/Cardinal-Cryptography/polkadot-sdk.git", branch = "aleph-v1.2.0", default-features = false, optional = true } +frame-system = { git = "https://github.com/Cardinal-Cryptography/polkadot-sdk.git", branch = "aleph-v1.2.0", default-features = false, optional = true } +pallet-contracts = { git = "https://github.com/Cardinal-Cryptography/polkadot-sdk.git", branch = "aleph-v1.2.0", default-features = false, optional = true } +sp-std = { git = "https://github.com/Cardinal-Cryptography/polkadot-sdk.git", branch = "aleph-v1.2.0", default-features = false, optional = true } + +pallet-baby-liminal = { path = "../pallets/baby-liminal", default-features = false, optional = true } + [features] # This is an artificial feature that is used by 3rd party crates in macro expansions. std = [] # `runtime` and `runtime-std` features are dedicated to the runtime crate. They bring the backend part of the extension. runtime = [ + "log", + "frame-support", + "frame-system", + "pallet-contracts", + "sp-std", + "pallet-baby-liminal", ] runtime-std = [ "runtime", "std", + "scale/std", + "frame-support/std", + "frame-system/std", + "pallet-contracts/std", + "sp-std/std", + "pallet-baby-liminal/std", ] # `ink` and `ink-std` features are dedicated to the ink! part of the extension. They bring the smart contract part of # the extension. ink = [ "dep:ink", - "scale", ] ink-std = [ "ink", diff --git a/baby-liminal-extension/Makefile b/baby-liminal-extension/Makefile index bbc9667358..5ddbfab775 100644 --- a/baby-liminal-extension/Makefile +++ b/baby-liminal-extension/Makefile @@ -9,6 +9,10 @@ lint: ## Check linting rules cargo +nightly fmt --all --check || exit 1 cargo +nightly fmt --all --check $(AT_TEST_CONTRACT) || exit 1 +clippy: ## Run clippy + cargo clippy --no-deps --features ink-std -- -D warnings || exit 1 + cargo clippy --no-deps --features runtime-std -- -D warnings || exit 1 + clean: ## Clean all build files cargo clean cargo clean $(AT_TEST_CONTRACT) diff --git a/baby-liminal-extension/src/args.rs b/baby-liminal-extension/src/args.rs new file mode 100644 index 0000000000..f0135e3ee4 --- /dev/null +++ b/baby-liminal-extension/src/args.rs @@ -0,0 +1,32 @@ +//! Module gathering all the chain extension arguments. They can be used in the smart contract for a +//! proper argument encoding. On the runtime side, they can be used for decoding the arguments. + +#[cfg(feature = "ink")] +use {crate::VerificationKeyIdentifier, ink::prelude::vec::Vec, ink::primitives::AccountId}; +#[cfg(feature = "runtime")] +use { + frame_support::sp_runtime::AccountId32 as AccountId, + pallet_baby_liminal::VerificationKeyIdentifier, sp_std::vec::Vec, +}; + +/// A struct describing layout for the `store_key` chain extension. +#[derive(Clone, Debug, PartialEq, Eq, scale::Encode, scale::Decode)] +pub struct StoreKeyArgs { + /// The account ID of the key depositor. + pub depositor: AccountId, + /// The identifier of the key. + pub identifier: VerificationKeyIdentifier, + /// The key itself. + pub key: Vec, +} + +/// A struct describing layout for the `verify` chain extension. +#[derive(Clone, Debug, PartialEq, Eq, scale::Encode, scale::Decode)] +pub struct VerifyArgs { + /// The identifier of the verification key. + pub verification_key_identifier: VerificationKeyIdentifier, + /// The proof. + pub proof: Vec, + /// The public input. + pub public_input: Vec, +} diff --git a/baby-liminal-extension/src/backend/environment.rs b/baby-liminal-extension/src/backend/environment.rs new file mode 100644 index 0000000000..bf78a551b8 --- /dev/null +++ b/baby-liminal-extension/src/backend/environment.rs @@ -0,0 +1,70 @@ +use frame_support::{sp_runtime::DispatchError, weights::Weight}; +use pallet_contracts::chain_extension::{ + BufInBufOutState, ChargedAmount, Environment as SubstrateEnvironment, Ext, +}; +use scale::Decode; +use sp_std::vec::Vec; + +use super::ByteCount; + +/// Abstraction around `pallet_contracts::chain_extension::Environment`. Makes testing easier. +/// +/// Gathers all the methods that are used by `BabyLiminalChainExtension`. For now, all operations +/// are performed in the `BufInBufOut` mode, so we don't have to take care of other modes. +#[allow(missing_docs)] // Every method is already documented in `pallet_contracts::chain_extension`. +pub trait Environment { + /// A type returned by `charge_weight` and passed to `adjust_weight`. + /// + /// The original type `ChargedAmount` has only a private constructor and thus we have to + /// abstract it as well to make testing it possible. + type ChargedAmount; + + fn in_len(&self) -> ByteCount; + fn read(&self, max_len: u32) -> Result, DispatchError>; + // It has to be `mut`, because there's a leftover in pallet contracts. + fn read_as_unbounded(&mut self, len: u32) -> Result; + // It has to be `mut`, because there's a leftover in pallet contracts. + fn write( + &mut self, + buffer: &[u8], + allow_skip: bool, + weight_per_byte: Option, + ) -> Result<(), DispatchError>; + + fn charge_weight(&mut self, amount: Weight) -> Result; + fn adjust_weight(&mut self, charged: Self::ChargedAmount, actual_weight: Weight); +} + +/// Transparent delegation. +impl Environment for SubstrateEnvironment<'_, '_, E, BufInBufOutState> { + type ChargedAmount = ChargedAmount; + + fn in_len(&self) -> ByteCount { + self.in_len() + } + + fn read(&self, max_len: u32) -> Result, DispatchError> { + self.read(max_len) + } + + fn read_as_unbounded(&mut self, len: u32) -> Result { + self.read_as_unbounded(len) + } + + fn write( + &mut self, + buffer: &[u8], + allow_skip: bool, + weight_per_byte: Option, + ) -> Result<(), DispatchError> { + self.write(buffer, allow_skip, weight_per_byte) + } + + fn charge_weight(&mut self, amount: Weight) -> Result { + self.charge_weight(amount) + } + + fn adjust_weight(&mut self, charged: Self::ChargedAmount, actual_weight: Weight) { + self.adjust_weight(charged, actual_weight) + } +} diff --git a/baby-liminal-extension/src/backend/executor.rs b/baby-liminal-extension/src/backend/executor.rs new file mode 100644 index 0000000000..4dab451f76 --- /dev/null +++ b/baby-liminal-extension/src/backend/executor.rs @@ -0,0 +1,46 @@ +use frame_support::{pallet_prelude::Weight, sp_runtime::AccountId32}; +use frame_system::Config as SystemConfig; +use pallet_baby_liminal::{Config as BabyLiminalConfig, Error as PalletError, Pallet}; +use pallet_contracts::Config as ContractsConfig; + +use crate::args::{StoreKeyArgs, VerifyArgs}; + +/// Minimal runtime configuration required by the chain extension executor. +pub trait MinimalRuntime: SystemConfig + BabyLiminalConfig + ContractsConfig {} +impl MinimalRuntime for R {} + +/// Generalized pallet executor, that can be mocked for testing purposes. +pub trait BackendExecutor { + /// The pallet's error enum is generic. For most purposes however, it doesn't matter what type + /// will be passed there. Normally, `Runtime` will be the generic argument, but in the testing + /// context it will be enough to instantiate it with `()`. + type ErrorGenericType; + + fn store_key(args: StoreKeyArgs) -> Result<(), PalletError>; + + fn verify( + args: VerifyArgs, + ) -> Result<(), (PalletError, Option)>; +} + +/// Default implementation for the chain extension mechanics. +impl BackendExecutor for Runtime +where + ::RuntimeOrigin: From>, +{ + type ErrorGenericType = Runtime; + + fn store_key(args: StoreKeyArgs) -> Result<(), PalletError> { + Pallet::::bare_store_key(Some(args.depositor).into(), args.identifier, args.key) + } + + fn verify( + args: VerifyArgs, + ) -> Result<(), (PalletError, Option)> { + Pallet::::bare_verify( + args.verification_key_identifier, + args.proof, + args.public_input, + ) + } +} diff --git a/baby-liminal-extension/src/backend/mod.rs b/baby-liminal-extension/src/backend/mod.rs new file mode 100644 index 0000000000..562827dec2 --- /dev/null +++ b/baby-liminal-extension/src/backend/mod.rs @@ -0,0 +1,85 @@ +use environment::Environment as EnvironmentT; +use executor::BackendExecutor as BackendExecutorT; +use frame_support::{pallet_prelude::DispatchError, sp_runtime::AccountId32}; +use frame_system::Config as SystemConfig; +use log::error; +use pallet_contracts::chain_extension::{ + ChainExtension, Environment as SubstrateEnvironment, Ext, InitState, + Result as ChainExtensionResult, RetVal, +}; +use sp_std::marker::PhantomData; + +use crate::{ + backend::executor::MinimalRuntime, + extension_ids::{STORE_KEY_EXT_ID, VERIFY_EXT_ID}, + status_codes::{STORE_KEY_SUCCESS, VERIFY_SUCCESS}, +}; + +mod environment; +mod executor; + +type ByteCount = u32; + +/// The actual implementation of the chain extension. This is the code on the runtime side that will +/// be executed when the chain extension is called. +pub struct BabyLiminalChainExtension { + _config: PhantomData, +} + +impl Default for BabyLiminalChainExtension { + fn default() -> Self { + Self { + _config: PhantomData, + } + } +} + +impl ChainExtension for BabyLiminalChainExtension +where + ::RuntimeOrigin: From>, +{ + fn call>( + &mut self, + env: SubstrateEnvironment, + ) -> ChainExtensionResult { + let func_id = env.func_id() as u32; + + match func_id { + STORE_KEY_EXT_ID => Self::store_key::(env.buf_in_buf_out()), + VERIFY_EXT_ID => Self::verify::(env.buf_in_buf_out()), + _ => { + error!("Called an unregistered `func_id`: {func_id}"); + Err(DispatchError::Other("Called an unregistered `func_id`")) + } + } + } +} + +impl BabyLiminalChainExtension +where + ::RuntimeOrigin: From>, +{ + /// Handle `store_key` chain extension call. + pub fn store_key( + mut env: Environment, + ) -> ChainExtensionResult { + // todo: charge weight, validate args, handle errors + let args = env.read_as_unbounded(env.in_len())?; + BackendExecutor::store_key(args) + .map_err(|_| ()) + .expect("`store_key` failed; this should be handled more gently"); + Ok(RetVal::Converging(STORE_KEY_SUCCESS)) + } + + /// Handle `verify` chain extension call. + pub fn verify( + mut env: Environment, + ) -> ChainExtensionResult { + // todo: charge weight, validate args, handle errors + let args = env.read_as_unbounded(env.in_len())?; + BackendExecutor::verify(args) + .map_err(|_| ()) + .expect("`verify` failed; this should be handled more gently"); + Ok(RetVal::Converging(VERIFY_SUCCESS)) + } +} diff --git a/baby-liminal-extension/src/lib.rs b/baby-liminal-extension/src/lib.rs index 364f3ce966..b9b990c15c 100644 --- a/baby-liminal-extension/src/lib.rs +++ b/baby-liminal-extension/src/lib.rs @@ -11,13 +11,30 @@ #[cfg(all(feature = "ink", feature = "runtime"))] compile_error!("Features `ink` and `runtime` are mutually exclusive and cannot be used together"); +// ------ Common stuff ----------------------------------------------------------------------------- + +pub mod args; pub mod extension_ids; -#[cfg(feature = "ink")] -pub mod frontend; pub mod status_codes; +// ------ Frontend stuff --------------------------------------------------------------------------- + +#[cfg(feature = "ink")] +mod frontend; + #[cfg(feature = "ink")] pub use frontend::{BabyLiminalError, BabyLiminalExtension, Environment}; /// Copied from `pallet_baby_liminal`. +#[cfg(feature = "ink")] pub type VerificationKeyIdentifier = [u8; 8]; + +// ------ Backend stuff ---------------------------------------------------------------------------- + +#[cfg(feature = "runtime")] +mod backend; + +#[cfg(feature = "runtime")] +pub use backend::BabyLiminalChainExtension; +#[cfg(feature = "runtime")] +pub use pallet_baby_liminal::VerificationKeyIdentifier; diff --git a/baby-liminal-extension/tests/utils/environment.rs b/baby-liminal-extension/tests/utils/environment.rs index 90cfd25464..dad3cead53 100644 --- a/baby-liminal-extension/tests/utils/environment.rs +++ b/baby-liminal-extension/tests/utils/environment.rs @@ -7,7 +7,8 @@ use std::{ }; use baby_liminal_extension::{ - executor::Executor, substrate::ByteCount, BabyLiminalExtension, VerificationKeyIdentifier, + backend_executor::Executor, substrate::ByteCount, BabyLiminalExtension, + VerificationKeyIdentifier, }; use obce::substrate::{ frame_support::weights::Weight, sp_runtime::AccountId32, ChainExtensionEnvironment, diff --git a/baby-liminal-extension/tests/utils/mod.rs b/baby-liminal-extension/tests/utils/mod.rs index db4c6bb5ca..966afbbe43 100644 --- a/baby-liminal-extension/tests/utils/mod.rs +++ b/baby-liminal-extension/tests/utils/mod.rs @@ -2,7 +2,7 @@ use std::sync::mpsc::Receiver; use aleph_runtime::Runtime; use baby_liminal_extension::{ - executor::Executor, + backend_executor::Executor, substrate::{weight_of_store_key, Extension}, BabyLiminalExtension, VerificationKeyIdentifier, }; diff --git a/bin/runtime/Cargo.toml b/bin/runtime/Cargo.toml index e595682a7c..22abde2386 100644 --- a/bin/runtime/Cargo.toml +++ b/bin/runtime/Cargo.toml @@ -157,7 +157,7 @@ runtime-benchmarks = [ # Liminal-related features liminal = [ - #"baby-liminal-extension", + "baby-liminal-extension", "pallet-baby-liminal", "sp-io/disable_oom", "sp-io/disable_panic_handler" @@ -165,6 +165,7 @@ liminal = [ liminal-std = [ "liminal", "std", + "baby-liminal-extension/runtime-std", "pallet-baby-liminal/std", ] liminal-try-runtime = [ diff --git a/bin/runtime/src/lib.rs b/bin/runtime/src/lib.rs index 629f4c2922..f40d5e6b05 100644 --- a/bin/runtime/src/lib.rs +++ b/bin/runtime/src/lib.rs @@ -714,6 +714,9 @@ impl pallet_contracts::Config for Runtime { type CallFilter = Nothing; type WeightPrice = pallet_transaction_payment::Pallet; type WeightInfo = pallet_contracts::weights::SubstrateWeight; + #[cfg(feature = "liminal")] + type ChainExtension = baby_liminal_extension::BabyLiminalChainExtension; + #[cfg(not(feature = "liminal"))] type ChainExtension = (); type Schedule = Schedule; type CallStack = [pallet_contracts::Frame; 16]; From dc05bd6f62623a4b07ab71a29cc43be13621d9ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Fri, 24 Nov 2023 14:37:06 +0100 Subject: [PATCH 03/11] A0-3518: Resurrect chain extension: 2/3 (#1504) # Description Yet another PR, but it is not the end! This time, I'm bringing back backend testing. Since the chain extension mechanics are entangled with runtime and pallet contract, we have to provide mocked environment, which results in a lot of lovely code with unstable features. They were introduced because all the main calls (`store_key` and `verify`) are invoked as **static** methods of `Runtime`. Therefore, it makes testing different behaviors highly inconvenient (since we cannot change the mock behavior depending on any variable). Being able to introduce enums into generics gives us the possibility of concise defining scenarios. To keep PRs smaller, I left charging weight and validating input for the next time. ## Type of change - Bug fix (non-breaking change which fixes an issue) # Checklist: - I have added tests - I have made neccessary updates to the Infrastructure - I have made corresponding changes to the existing documentation - I have created new documentation --- .../_unit-tests-and-static-checks.yml | 12 +- baby-liminal-extension/Cargo.lock | 999 +++++++++++++++++- baby-liminal-extension/Cargo.toml | 4 + baby-liminal-extension/Makefile | 8 +- .../src/backend/environment.rs | 6 - baby-liminal-extension/src/backend/mod.rs | 35 +- baby-liminal-extension/src/backend/tests.rs | 103 ++ .../src/backend/tests/arguments.rs | 33 + .../src/backend/tests/environment.rs | 118 +++ .../src/backend/tests/executor.rs | 70 ++ baby-liminal-extension/src/lib.rs | 7 + baby-liminal-extension/tests/substrate.rs | 175 --- .../tests/utils/environment.rs | 324 ------ baby-liminal-extension/tests/utils/mod.rs | 117 -- 14 files changed, 1352 insertions(+), 659 deletions(-) create mode 100644 baby-liminal-extension/src/backend/tests.rs create mode 100644 baby-liminal-extension/src/backend/tests/arguments.rs create mode 100644 baby-liminal-extension/src/backend/tests/environment.rs create mode 100644 baby-liminal-extension/src/backend/tests/executor.rs delete mode 100644 baby-liminal-extension/tests/substrate.rs delete mode 100644 baby-liminal-extension/tests/utils/environment.rs delete mode 100644 baby-liminal-extension/tests/utils/mod.rs diff --git a/.github/workflows/_unit-tests-and-static-checks.yml b/.github/workflows/_unit-tests-and-static-checks.yml index d7b3429e71..986c64cad5 100644 --- a/.github/workflows/_unit-tests-and-static-checks.yml +++ b/.github/workflows/_unit-tests-and-static-checks.yml @@ -28,6 +28,10 @@ jobs: command: clippy args: --all-targets -- --no-deps -D warnings + - name: Run clippy for baby liminal chain extension + working-directory: baby-liminal-extension + run: make clippy + unit-tests: name: Run unit tests runs-on: [self-hosted, Linux, X64, large] @@ -47,6 +51,12 @@ jobs: command: test args: -- --skip clique_network + - name: Install Nightly Rust Toolchain (for unstable features in tests) + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v4 + with: + channel: nightly-2023-05-22-unknown-linux-gnu + targets: wasm32-unknown-unknown + - name: Run tests for baby liminal chain extension working-directory: baby-liminal-extension - run: make clippy && make test-frontend + run: make test diff --git a/baby-liminal-extension/Cargo.lock b/baby-liminal-extension/Cargo.lock index d11d11afeb..2207b69ec5 100644 --- a/baby-liminal-extension/Cargo.lock +++ b/baby-liminal-extension/Cargo.lock @@ -79,6 +79,60 @@ dependencies = [ "memchr", ] +[[package]] +name = "aleph-runtime" +version = "0.13.0+dev" +dependencies = [ + "baby-liminal-extension", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "pallet-aleph", + "pallet-aura", + "pallet-authorship", + "pallet-baby-liminal", + "pallet-balances", + "pallet-committee-management", + "pallet-contracts", + "pallet-contracts-primitives", + "pallet-elections", + "pallet-identity", + "pallet-insecure-randomness-collective-flip", + "pallet-multisig", + "pallet-nomination-pools", + "pallet-nomination-pools-runtime-api", + "pallet-scheduler", + "pallet-session", + "pallet-staking", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "parity-scale-codec", + "primitives", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -277,7 +331,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version", + "rustc_version 0.4.0", "zeroize", ] @@ -466,6 +520,7 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" name = "baby-liminal-extension" version = "0.1.0" dependencies = [ + "aleph-runtime", "frame-support", "frame-system", "ink", @@ -654,6 +709,15 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "build-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f" +dependencies = [ + "semver 0.6.0", +] + [[package]] name = "bumpalo" version = "3.14.0" @@ -690,12 +754,45 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.20", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cc" version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ + "jobserver", "libc", ] @@ -761,6 +858,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "common" version = "0.1.0" @@ -964,7 +1071,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "platforms", - "rustc_version", + "rustc_version 0.4.0", "subtle", ] @@ -979,6 +1086,50 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "cxx" +version = "1.0.110" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7129e341034ecb940c9072817cd9007974ea696844fc4dd582dc1653a7fbe2e8" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.110" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a24f3f5f8eed71936f21e570436f024f5c2e25628f7496aa7ccd03b90109d5" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn 2.0.39", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.110" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06fdd177fc61050d63f67f5bd6351fac6ab5526694ea8e359cd9cd3b75857f44" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.110" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "darling" version = "0.14.4" @@ -1255,6 +1406,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "enumflags2" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" +dependencies = [ + "enumflags2_derive", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "env_logger" version = "0.10.0" @@ -1320,6 +1491,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + [[package]] name = "ff" version = "0.13.0" @@ -1349,6 +1526,18 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" +[[package]] +name = "filetime" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "windows-sys 0.48.0", +] + [[package]] name = "fixed-hash" version = "0.8.0" @@ -1401,6 +1590,52 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "frame-election-provider-solution-type" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "frame-election-provider-support" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-election-provider-solution-type", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-npos-elections", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "frame-executive" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support", + "frame-system", + "frame-try-runtime", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", +] + [[package]] name = "frame-metadata" version = "16.0.0" @@ -1512,6 +1747,27 @@ dependencies = [ "sp-weights", ] +[[package]] +name = "frame-system-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "parity-scale-codec", + "sp-api", +] + +[[package]] +name = "frame-try-runtime" +version = "0.10.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "fs-err" version = "2.11.0" @@ -2263,6 +2519,15 @@ dependencies = [ "tagged-base64", ] +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.65" @@ -2360,6 +2625,15 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "link-cplusplus" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" +dependencies = [ + "cc", +] + [[package]] name = "linregress" version = "0.5.3" @@ -2681,6 +2955,52 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "pallet-aleph" +version = "0.6.0" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-session", + "parity-scale-codec", + "primitives", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-aura" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-consensus-aura", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-authorship" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-baby-liminal" version = "0.1.0" @@ -2712,6 +3032,28 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-committee-management" +version = "0.2.0" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "pallet-staking", + "pallets-support", + "parity-scale-codec", + "primitives", + "rand 0.8.5", + "rand_pcg", + "scale-info", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "pallet-contracts" version = "4.0.0-dev" @@ -2765,27 +3107,307 @@ dependencies = [ ] [[package]] -name = "parity-scale-codec" -version = "3.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" -dependencies = [ - "arrayvec 0.7.4", - "bitvec", - "byte-slice-cast", - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +name = "pallet-elections" +version = "0.6.0" dependencies = [ - "proc-macro-crate", + "frame-election-provider-support", + "frame-support", + "frame-system", + "pallet-authorship", + "pallet-balances", + "pallet-staking", + "pallets-support", + "parity-scale-codec", + "primitives", + "rand 0.8.5", + "rand_pcg", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-identity" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "enumflags2", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-insecure-randomness-collective-flip" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-multisig" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-nomination-pools" +version = "1.0.0" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", + "sp-tracing", +] + +[[package]] +name = "pallet-nomination-pools-runtime-api" +version = "1.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "pallet-nomination-pools", + "parity-scale-codec", + "sp-api", + "sp-std", +] + +[[package]] +name = "pallet-scheduler" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "docify", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + +[[package]] +name = "pallet-session" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-trie", +] + +[[package]] +name = "pallet-staking" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "scale-info", + "serde", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-sudo" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-timestamp" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-storage", + "sp-timestamp", +] + +[[package]] +name = "pallet-transaction-payment" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-transaction-payment-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "pallet-transaction-payment", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "pallet-treasury" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-utility" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-vesting" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallets-support" +version = "0.1.4" +dependencies = [ + "frame-support", + "sp-std", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +dependencies = [ + "arrayvec 0.7.4", + "bitvec", + "byte-slice-cast", + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +dependencies = [ + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -2815,7 +3437,7 @@ checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -2872,6 +3494,12 @@ dependencies = [ "spki", ] +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + [[package]] name = "platforms" version = "3.2.0" @@ -2908,6 +3536,22 @@ dependencies = [ "uint", ] +[[package]] +name = "primitives" +version = "0.8.1" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-consensus-aura", + "sp-core", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -3057,12 +3701,30 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_pcg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rawpointer" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -3186,13 +3848,22 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver", + "semver 1.0.20", ] [[package]] @@ -3234,6 +3905,15 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +[[package]] +name = "safe-mix" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" +dependencies = [ + "rustc_version 0.2.3", +] + [[package]] name = "safe_arch" version = "0.7.1" @@ -3385,6 +4065,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scratch" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" + [[package]] name = "sec1" version = "0.7.3" @@ -3444,11 +4130,38 @@ dependencies = [ "zeroize", ] +[[package]] +name = "semver" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" @@ -3668,6 +4381,46 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-block-builder" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.10.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-std", + "sp-timestamp", +] + [[package]] name = "sp-core" version = "21.0.0" @@ -3819,6 +4572,15 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-maybe-compressed-blob" +version = "4.1.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "thiserror", + "zstd", +] + [[package]] name = "sp-metadata-ir" version = "0.1.0" @@ -3830,6 +4592,30 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-npos-elections" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-offchain" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "sp-api", + "sp-core", + "sp-runtime", +] + [[package]] name = "sp-panic-handler" version = "8.0.0" @@ -3892,6 +4678,21 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "sp-session" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "sp-staking" version = "4.0.0-dev" @@ -3945,6 +4746,19 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-timestamp" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents", + "sp-runtime", + "sp-std", + "thiserror", +] + [[package]] name = "sp-tracing" version = "10.0.0" @@ -3957,6 +4771,15 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "sp-transaction-pool" +version = "4.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "sp-api", + "sp-runtime", +] + [[package]] name = "sp-trie" version = "22.0.0" @@ -4085,6 +4908,28 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + [[package]] name = "substrate-bip39" version = "0.4.5" @@ -4098,6 +4943,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "substrate-wasm-builder" +version = "5.0.0-dev" +source = "git+https://github.com/Cardinal-Cryptography/polkadot-sdk.git?branch=aleph-v1.2.0#d9bb021ae2f7d752e1739e72294facf1b5dd2838" +dependencies = [ + "ansi_term", + "build-helper", + "cargo_metadata", + "filetime", + "parity-wasm", + "sp-maybe-compressed-blob", + "strum", + "tempfile", + "toml", + "walkdir", + "wasm-opt", +] + [[package]] name = "subtle" version = "2.4.1" @@ -4173,6 +5036,19 @@ version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" +[[package]] +name = "tempfile" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall 0.4.1", + "rustix 0.38.21", + "windows-sys 0.48.0", +] + [[package]] name = "termcolor" version = "1.3.0" @@ -4443,6 +5319,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + [[package]] name = "unicode-xid" version = "0.2.4" @@ -4567,6 +5449,46 @@ dependencies = [ "parity-wasm", ] +[[package]] +name = "wasm-opt" +version = "0.114.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" +dependencies = [ + "anyhow", + "libc", + "strum", + "strum_macros", + "tempfile", + "thiserror", + "wasm-opt-cxx-sys", + "wasm-opt-sys", +] + +[[package]] +name = "wasm-opt-cxx-sys" +version = "0.114.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" +dependencies = [ + "anyhow", + "cxx", + "cxx-build", + "wasm-opt-sys", +] + +[[package]] +name = "wasm-opt-sys" +version = "0.114.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" +dependencies = [ + "anyhow", + "cc", + "cxx", + "cxx-build", +] + [[package]] name = "wasmi" version = "0.31.0" @@ -5018,3 +5940,32 @@ dependencies = [ "quote", "syn 2.0.39", ] + +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/baby-liminal-extension/Cargo.toml b/baby-liminal-extension/Cargo.toml index 617bef803a..8ef47d9bb2 100644 --- a/baby-liminal-extension/Cargo.toml +++ b/baby-liminal-extension/Cargo.toml @@ -9,6 +9,7 @@ license = "Apache-2.0" [dependencies] # Common dependencies: + scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } # Frontend dependencies: @@ -27,6 +28,9 @@ sp-std = { git = "https://github.com/Cardinal-Cryptography/polkadot-sdk.git", br pallet-baby-liminal = { path = "../pallets/baby-liminal", default-features = false, optional = true } +[dev-dependencies] +aleph-runtime = { path = "../bin/runtime", features = ["liminal"] } + [features] # This is an artificial feature that is used by 3rd party crates in macro expansions. std = [] diff --git a/baby-liminal-extension/Makefile b/baby-liminal-extension/Makefile index 5ddbfab775..559c9a0eaf 100644 --- a/baby-liminal-extension/Makefile +++ b/baby-liminal-extension/Makefile @@ -1,10 +1,16 @@ -.PHONY: test-frontend lint clean help +.PHONY: test test-frontend test-backend lint clippy clean help AT_TEST_CONTRACT = --manifest-path test_contract/Cargo.toml +TEST_TOOLCHAIN = nightly-2023-05-22-unknown-linux-gnu + +test: test-frontend test-backend ## Run all tests test-frontend: ## Run frontend tests cargo test --release $(AT_TEST_CONTRACT) || exit 1 +test-backend: ## Run backend tests + cargo +$(TEST_TOOLCHAIN) test --release --features runtime-std || exit 1 + lint: ## Check linting rules cargo +nightly fmt --all --check || exit 1 cargo +nightly fmt --all --check $(AT_TEST_CONTRACT) || exit 1 diff --git a/baby-liminal-extension/src/backend/environment.rs b/baby-liminal-extension/src/backend/environment.rs index bf78a551b8..d4b4bdf393 100644 --- a/baby-liminal-extension/src/backend/environment.rs +++ b/baby-liminal-extension/src/backend/environment.rs @@ -3,7 +3,6 @@ use pallet_contracts::chain_extension::{ BufInBufOutState, ChargedAmount, Environment as SubstrateEnvironment, Ext, }; use scale::Decode; -use sp_std::vec::Vec; use super::ByteCount; @@ -20,7 +19,6 @@ pub trait Environment { type ChargedAmount; fn in_len(&self) -> ByteCount; - fn read(&self, max_len: u32) -> Result, DispatchError>; // It has to be `mut`, because there's a leftover in pallet contracts. fn read_as_unbounded(&mut self, len: u32) -> Result; // It has to be `mut`, because there's a leftover in pallet contracts. @@ -43,10 +41,6 @@ impl Environment for SubstrateEnvironment<'_, '_, E, BufInBufOutState> { self.in_len() } - fn read(&self, max_len: u32) -> Result, DispatchError> { - self.read(max_len) - } - fn read_as_unbounded(&mut self, len: u32) -> Result { self.read_as_unbounded(len) } diff --git a/baby-liminal-extension/src/backend/mod.rs b/baby-liminal-extension/src/backend/mod.rs index 562827dec2..f76fdc20d7 100644 --- a/baby-liminal-extension/src/backend/mod.rs +++ b/baby-liminal-extension/src/backend/mod.rs @@ -3,6 +3,7 @@ use executor::BackendExecutor as BackendExecutorT; use frame_support::{pallet_prelude::DispatchError, sp_runtime::AccountId32}; use frame_system::Config as SystemConfig; use log::error; +use pallet_baby_liminal::Error::*; use pallet_contracts::chain_extension::{ ChainExtension, Environment as SubstrateEnvironment, Ext, InitState, Result as ChainExtensionResult, RetVal, @@ -12,11 +13,13 @@ use sp_std::marker::PhantomData; use crate::{ backend::executor::MinimalRuntime, extension_ids::{STORE_KEY_EXT_ID, VERIFY_EXT_ID}, - status_codes::{STORE_KEY_SUCCESS, VERIFY_SUCCESS}, + status_codes::*, }; mod environment; mod executor; +#[cfg(test)] +mod tests; type ByteCount = u32; @@ -63,23 +66,33 @@ where pub fn store_key( mut env: Environment, ) -> ChainExtensionResult { - // todo: charge weight, validate args, handle errors + // todo: charge weight, validate args let args = env.read_as_unbounded(env.in_len())?; - BackendExecutor::store_key(args) - .map_err(|_| ()) - .expect("`store_key` failed; this should be handled more gently"); - Ok(RetVal::Converging(STORE_KEY_SUCCESS)) + let status = match BackendExecutor::store_key(args) { + Ok(()) => STORE_KEY_SUCCESS, + Err(VerificationKeyTooLong) => STORE_KEY_TOO_LONG_KEY, + Err(IdentifierAlreadyInUse) => STORE_KEY_IDENTIFIER_IN_USE, + Err(_) => STORE_KEY_ERROR_UNKNOWN, + }; + Ok(RetVal::Converging(status)) } /// Handle `verify` chain extension call. pub fn verify( mut env: Environment, ) -> ChainExtensionResult { - // todo: charge weight, validate args, handle errors + // todo: charge weight, validate args let args = env.read_as_unbounded(env.in_len())?; - BackendExecutor::verify(args) - .map_err(|_| ()) - .expect("`verify` failed; this should be handled more gently"); - Ok(RetVal::Converging(VERIFY_SUCCESS)) + let status = match BackendExecutor::verify(args) { + Ok(()) => VERIFY_SUCCESS, + Err((DeserializingProofFailed, _)) => VERIFY_DESERIALIZING_PROOF_FAIL, + Err((DeserializingPublicInputFailed, _)) => VERIFY_DESERIALIZING_INPUT_FAIL, + Err((UnknownVerificationKeyIdentifier, _)) => VERIFY_UNKNOWN_IDENTIFIER, + Err((DeserializingVerificationKeyFailed, _)) => VERIFY_DESERIALIZING_KEY_FAIL, + Err((VerificationFailed, _)) => VERIFY_VERIFICATION_FAIL, + Err((IncorrectProof, _)) => VERIFY_INCORRECT_PROOF, + Err(_) => STORE_KEY_ERROR_UNKNOWN, + }; + Ok(RetVal::Converging(status)) } } diff --git a/baby-liminal-extension/src/backend/tests.rs b/baby-liminal-extension/src/backend/tests.rs new file mode 100644 index 0000000000..e504cd9cfe --- /dev/null +++ b/baby-liminal-extension/src/backend/tests.rs @@ -0,0 +1,103 @@ +mod arguments; +mod environment; +mod executor; + +use aleph_runtime::Runtime as AlephRuntime; +use pallet_baby_liminal::Error::*; +use pallet_contracts::chain_extension::{ChainExtension, RetVal}; + +use crate::{ + backend::{ + executor::BackendExecutor, + tests::{ + arguments::{store_key_args, verify_args}, + environment::{MockedEnvironment, StandardMode, StoreKeyMode, VerifyMode}, + executor::{StoreKeyErrorer, StoreKeyOkayer, VerifyErrorer, VerifyOkayer}, + }, + }, + status_codes::*, + BabyLiminalChainExtension, +}; + +fn simulate_store_key(expected_ret_val: u32) { + let env = MockedEnvironment::::new(store_key_args()); + let result = BabyLiminalChainExtension::::store_key::(env); + assert!(matches!(result, Ok(RetVal::Converging(ret_val)) if ret_val == expected_ret_val)); +} + +fn simulate_verify(expected_ret_val: u32) { + let env = MockedEnvironment::::new(verify_args()); + let result = BabyLiminalChainExtension::::verify::(env); + assert!(matches!(result, Ok(RetVal::Converging(ret_val)) if ret_val == expected_ret_val)); +} + +#[test] +fn extension_is_enabled() { + assert!(BabyLiminalChainExtension::::enabled()) +} + +#[test] +#[allow(non_snake_case)] +fn store_key__positive_scenario() { + simulate_store_key::(STORE_KEY_SUCCESS) +} + +#[test] +#[allow(non_snake_case)] +fn store_key__pallet_says_too_long_vk() { + simulate_store_key::>(STORE_KEY_TOO_LONG_KEY) +} + +#[test] +#[allow(non_snake_case)] +fn store_key__pallet_says_identifier_in_use() { + simulate_store_key::>(STORE_KEY_IDENTIFIER_IN_USE) +} + +#[test] +#[allow(non_snake_case)] +fn verify__positive_scenario() { + simulate_verify::(VERIFY_SUCCESS) +} + +#[test] +#[allow(non_snake_case)] +fn verify__pallet_says_proof_deserialization_failed() { + simulate_verify::>(VERIFY_DESERIALIZING_PROOF_FAIL) +} + +#[test] +#[allow(non_snake_case)] +fn verify__pallet_says_input_deserialization_failed() { + simulate_verify::>( + VERIFY_DESERIALIZING_INPUT_FAIL, + ) +} + +#[test] +#[allow(non_snake_case)] +fn verify__pallet_says_no_such_vk() { + simulate_verify::>( + VERIFY_UNKNOWN_IDENTIFIER, + ) +} + +#[test] +#[allow(non_snake_case)] +fn verify__pallet_says_vk_deserialization_failed() { + simulate_verify::>( + VERIFY_DESERIALIZING_KEY_FAIL, + ) +} + +#[test] +#[allow(non_snake_case)] +fn verify__pallet_says_verification_failed() { + simulate_verify::>(VERIFY_VERIFICATION_FAIL) +} + +#[test] +#[allow(non_snake_case)] +fn verify__pallet_says_incorrect_proof() { + simulate_verify::>(VERIFY_INCORRECT_PROOF) +} diff --git a/baby-liminal-extension/src/backend/tests/arguments.rs b/baby-liminal-extension/src/backend/tests/arguments.rs new file mode 100644 index 0000000000..889ea3dc23 --- /dev/null +++ b/baby-liminal-extension/src/backend/tests/arguments.rs @@ -0,0 +1,33 @@ +use frame_support::sp_runtime::AccountId32; +use scale::Encode; + +use crate::{ + args::{StoreKeyArgs, VerifyArgs}, + VerificationKeyIdentifier, +}; + +const DEPOSITOR: [u8; 32] = [1; 32]; +const IDENTIFIER: VerificationKeyIdentifier = [41; 8]; +const VK: [u8; 2] = [4, 1]; +const PROOF: [u8; 20] = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4]; +const INPUT: [u8; 11] = [0, 5, 7, 7, 2, 1, 5, 6, 6, 4, 9]; + +/// Returns encoded arguments to `store_key` chain extension call. +pub fn store_key_args() -> Vec { + StoreKeyArgs { + depositor: AccountId32::new(DEPOSITOR), + identifier: IDENTIFIER, + key: VK.to_vec(), + } + .encode() +} + +/// Returns encoded arguments to `verify` chain extension call. +pub fn verify_args() -> Vec { + VerifyArgs { + verification_key_identifier: IDENTIFIER, + proof: PROOF.to_vec(), + public_input: INPUT.to_vec(), + } + .encode() +} diff --git a/baby-liminal-extension/src/backend/tests/environment.rs b/baby-liminal-extension/src/backend/tests/environment.rs new file mode 100644 index 0000000000..599bf6bc18 --- /dev/null +++ b/baby-liminal-extension/src/backend/tests/environment.rs @@ -0,0 +1,118 @@ +#![allow(dead_code)] + +use std::marker::PhantomData; + +use frame_support::{pallet_prelude::Weight, sp_runtime::DispatchError}; +use scale::Decode; + +use crate::backend::{environment::Environment, ByteCount}; + +/// Trait serving as a type-level flag indicating which method we are testing. +pub trait FunctionMode {} +/// We are testing `store_key`. +pub enum StoreKeyMode {} +impl FunctionMode for StoreKeyMode {} +/// We are testing `verify`. +pub enum VerifyMode {} +impl FunctionMode for VerifyMode {} + +/// Trait serving as a type-level flag indicating how reading input from a contract should be done. +pub trait ReadingMode {} +/// Reading fails – we won't be able to read a single byte. +pub enum CorruptedMode {} +impl ReadingMode for CorruptedMode {} +/// Reading succeeds – we will read everything. +pub enum StandardMode {} +impl ReadingMode for StandardMode {} + +/// We will implement reading for every `ReadingMode`. However, there is no other way than such +/// `_Read` trait to tell Rust compiler that in fact, for every `RM` in `MockedEnvironment<_, RM>` +/// there will be such function. +trait _Read { + fn _read(&self, max_len: ByteCount) -> Result, DispatchError>; +} + +/// A testing implementation for `crate::backend::environment::Environment`. +pub struct MockedEnvironment { + /// An optional callback to be invoked just before (failing to) read. `Some(_)` only if + /// `RM = CorruptedMode`. + on_read: Option>, + + /// How many bytes are there waiting to be read. + in_len: ByteCount, + + /// `Some(_)` iff `RM = StandardMode`. + content: Option>, + + _phantom: PhantomData<(FM, RM)>, +} + +/// Creating environment with corrupted reading. +impl MockedEnvironment { + pub fn new(in_len: ByteCount, on_read: Option>) -> Self { + Self { + on_read, + in_len, + content: None, + _phantom: Default::default(), + } + } +} + +/// Corrupted reading with possible additional callback invoked. +impl _Read for MockedEnvironment { + fn _read(&self, _max_len: ByteCount) -> Result, DispatchError> { + self.on_read.as_ref().map(|action| action()); + Err(DispatchError::Other("Some error")) + } +} + +/// Creating environment with correct reading of `content`. +impl MockedEnvironment { + pub fn new(content: Vec) -> Self { + Self { + on_read: None, + in_len: content.len() as ByteCount, + content: Some(content), + _phantom: Default::default(), + } + } +} + +/// Successful reading. +impl _Read for MockedEnvironment { + fn _read(&self, max_len: ByteCount) -> Result, DispatchError> { + let content = self.content.as_ref().unwrap(); + if max_len > self.in_len { + Ok(content.clone()) + } else { + Ok(content[..max_len as usize].to_vec()) + } + } +} + +impl Environment for MockedEnvironment +where + MockedEnvironment: _Read, +{ + type ChargedAmount = Weight; + + fn in_len(&self) -> ByteCount { + self.in_len + } + + fn read_as_unbounded(&mut self, len: u32) -> Result { + self._read(len) + .map(|bytes| Decode::decode(&mut &bytes[..]).expect("Decoding should succeed")) + } + + fn write(&mut self, _: &[u8], _: bool, _: Option) -> Result<(), DispatchError> { + todo!() + } + + fn charge_weight(&mut self, amount: Weight) -> Result { + Ok(amount) + } + + fn adjust_weight(&mut self, _: Weight, _: Weight) {} +} diff --git a/baby-liminal-extension/src/backend/tests/executor.rs b/baby-liminal-extension/src/backend/tests/executor.rs new file mode 100644 index 0000000000..55e06c397e --- /dev/null +++ b/baby-liminal-extension/src/backend/tests/executor.rs @@ -0,0 +1,70 @@ +#![allow(dead_code)] + +use frame_support::pallet_prelude::Weight; +use pallet_baby_liminal::Error as PalletError; + +use crate::{ + args::{StoreKeyArgs, VerifyArgs}, + backend::executor::BackendExecutor, +}; + +/// Describes how the `Executor` should behave when one of its methods is called. +#[derive(Clone, Eq, PartialEq)] +pub enum Responder { + /// Twist and shout. + Panicker, + /// Return `Ok(())`. + Okayer, + /// Return `Err(Error)`. + Errorer(PalletError<()>), +} + +/// Auxiliary method to construct type argument. +/// +/// Due to "`struct/enum construction is not supported in generic constants`". +pub const fn make_errorer>() -> Responder { + Responder::Errorer(ERROR) +} + +/// A testing counterpart for `Runtime`. +/// +/// `STORE_KEY_RESPONDER` instructs how to behave then `store_key` is called. +/// `VERIFY_RESPONDER` instructs how to behave then `verify` is called. +pub struct MockedExecutor; + +/// Executor that will scream for every associated method. +pub type Panicker = MockedExecutor<{ Responder::Panicker }, { Responder::Panicker }>; + +/// Executor that will return `Ok(())` for `store_key` and scream for `verify`. +pub type StoreKeyOkayer = MockedExecutor<{ Responder::Okayer }, { Responder::Panicker }>; +/// Executor that will return `Ok(())` for `verify` and scream for `store_key`. +pub type VerifyOkayer = MockedExecutor<{ Responder::Panicker }, { Responder::Okayer }>; + +/// Executor that will return `Err(ERROR)` for `store_key` and scream for `verify`. +pub type StoreKeyErrorer> = + MockedExecutor<{ make_errorer::() }, { Responder::Panicker }>; +/// Executor that will return `Err(ERROR)` for `verify` and scream for `store_key`. +pub type VerifyErrorer> = + MockedExecutor<{ Responder::Panicker }, { make_errorer::() }>; + +impl BackendExecutor + for MockedExecutor +{ + type ErrorGenericType = (); + + fn store_key(_: StoreKeyArgs) -> Result<(), PalletError<()>> { + match STORE_KEY_RESPONDER { + Responder::Panicker => panic!("Function `store_key` shouldn't have been executed"), + Responder::Okayer => Ok(()), + Responder::Errorer(e) => Err(e), + } + } + + fn verify(_: VerifyArgs) -> Result<(), (PalletError<()>, Option)> { + match VERIFY_RESPONDER { + Responder::Panicker => panic!("Function `verify` shouldn't have been executed"), + Responder::Okayer => Ok(()), + Responder::Errorer(e) => Err((e, None)), + } + } +} diff --git a/baby-liminal-extension/src/lib.rs b/baby-liminal-extension/src/lib.rs index b9b990c15c..5feda1106d 100644 --- a/baby-liminal-extension/src/lib.rs +++ b/baby-liminal-extension/src/lib.rs @@ -5,12 +5,19 @@ #![cfg_attr(not(feature = "std"), no_std)] #![deny(missing_docs)] +// For testing purposes, we need to enable some unstable features. +#![cfg_attr(test, allow(incomplete_features))] +#![cfg_attr(test, feature(adt_const_params))] +#![cfg_attr(test, feature(generic_const_exprs))] // Rust features are additive, so this is the only way we can ensure that only one of these is // enabled. #[cfg(all(feature = "ink", feature = "runtime"))] compile_error!("Features `ink` and `runtime` are mutually exclusive and cannot be used together"); +#[cfg(not(any(feature = "ink", feature = "runtime")))] +compile_error!("Either `ink` or `runtime` feature must be enabled (or their `-std` extensions)"); + // ------ Common stuff ----------------------------------------------------------------------------- pub mod args; diff --git a/baby-liminal-extension/tests/substrate.rs b/baby-liminal-extension/tests/substrate.rs deleted file mode 100644 index bf65b7447c..0000000000 --- a/baby-liminal-extension/tests/substrate.rs +++ /dev/null @@ -1,175 +0,0 @@ -#![cfg_attr(test, allow(incomplete_features))] -#![cfg_attr(test, feature(adt_const_params))] -#![cfg_attr(test, feature(generic_const_exprs))] - -mod utils; - -use aleph_runtime::Runtime; -use baby_liminal_extension::{ - substrate::{weight_of_store_key, Extension}, - BABY_LIMINAL_STORE_KEY_IDENTIFIER_IN_USE, BABY_LIMINAL_STORE_KEY_TOO_LONG_KEY, - BABY_LIMINAL_VERIFY_DESERIALIZING_INPUT_FAIL, BABY_LIMINAL_VERIFY_DESERIALIZING_KEY_FAIL, - BABY_LIMINAL_VERIFY_DESERIALIZING_PROOF_FAIL, BABY_LIMINAL_VERIFY_INCORRECT_PROOF, - BABY_LIMINAL_VERIFY_UNKNOWN_IDENTIFIER, BABY_LIMINAL_VERIFY_VERIFICATION_FAIL, -}; -use obce::substrate::{pallet_contracts::chain_extension::RetVal, CallableChainExtension}; -use pallet_baby_liminal::{Config as BabyLiminalConfig, Error, VerificationError, WeightInfo}; -use utils::{ - charged, simulate_store_key, simulate_verify, store_key_args, verify_args, CorruptedMode, - MockedEnvironment, Responder, RevertibleWeight, StoreKeyErrorer, StoreKeyOkayer, VerifyErrorer, - VerifyOkayer, ADJUSTED_WEIGHT, STORE_KEY_ID, VERIFY_ID, -}; - -#[test] -#[allow(non_snake_case)] -fn store_key__charges_before_reading() { - let (env, charging_listener) = MockedEnvironment::< - STORE_KEY_ID, - CorruptedMode, - { Responder::Panicker }, - { Responder::Panicker }, - >::new(41, None); - - let key_length = env.approx_key_len(); - - let result = >::call(&mut Extension, env); - - assert!(matches!(result, Err(_))); - assert_eq!( - charged(charging_listener), - weight_of_store_key::(key_length).into() - ); -} - -#[test] -#[allow(non_snake_case)] -fn store_key__too_much_to_read() { - let (env, charging_listener) = MockedEnvironment::< - STORE_KEY_ID, - CorruptedMode, - { Responder::Panicker }, - { Responder::Panicker }, - >::new( - u32::MAX, - Some(Box::new(|| panic!("Shouldn't read anything at all"))), - ); - - let result = >::call(&mut Extension, env); - - assert!(matches!( - result, - Ok(RetVal::Converging(BABY_LIMINAL_STORE_KEY_TOO_LONG_KEY)) - )); - assert_eq!(charged(charging_listener), RevertibleWeight::ZERO); -} - -#[test] -#[allow(non_snake_case)] -fn store_key__pallet_says_too_long_vk() { - simulate_store_key( - StoreKeyErrorer::<{ Error::VerificationKeyTooLong }>::new(store_key_args()), - BABY_LIMINAL_STORE_KEY_TOO_LONG_KEY, - ) -} - -#[test] -#[allow(non_snake_case)] -fn store_key__pallet_says_identifier_in_use() { - simulate_store_key( - StoreKeyErrorer::<{ Error::IdentifierAlreadyInUse }>::new(store_key_args()), - BABY_LIMINAL_STORE_KEY_IDENTIFIER_IN_USE, - ) -} - -#[test] -#[allow(non_snake_case)] -fn store_key__positive_scenario() { - simulate_store_key(StoreKeyOkayer::new(store_key_args()), 0) -} - -#[test] -#[allow(non_snake_case)] -fn verify__charges_before_reading() { - let (env, charging_listener) = MockedEnvironment::< - VERIFY_ID, - CorruptedMode, - { Responder::Panicker }, - { Responder::Panicker }, - >::new(41, None); - - let result = >::call(&mut Extension, env); - - assert!(matches!(result, Err(_))); - assert_eq!( - charged(charging_listener), - <::WeightInfo as WeightInfo>::verify().into() - ); -} - -#[test] -#[allow(non_snake_case)] -fn verify__pallet_says_proof_deserialization_failed() { - simulate_verify::<_, { Some(ADJUSTED_WEIGHT) }, { BABY_LIMINAL_VERIFY_DESERIALIZING_PROOF_FAIL }>( - VerifyErrorer::<{ Error::DeserializingProofFailed }, { Some(ADJUSTED_WEIGHT) }>::new( - verify_args(), - ), - ) -} - -#[test] -#[allow(non_snake_case)] -fn verify__pallet_says_input_deserialization_failed() { - simulate_verify::<_, { Some(ADJUSTED_WEIGHT) }, { BABY_LIMINAL_VERIFY_DESERIALIZING_INPUT_FAIL }>( - VerifyErrorer::<{ Error::DeserializingPublicInputFailed }, { Some(ADJUSTED_WEIGHT) }>::new( - verify_args(), - ), - ) -} - -#[test] -#[allow(non_snake_case)] -fn verify__pallet_says_no_such_vk() { - simulate_verify::<_, { Some(ADJUSTED_WEIGHT) }, { BABY_LIMINAL_VERIFY_UNKNOWN_IDENTIFIER }>( - VerifyErrorer::<{ Error::UnknownVerificationKeyIdentifier }, { Some(ADJUSTED_WEIGHT) }>::new( - verify_args(), - ), - ) -} - -#[test] -#[allow(non_snake_case)] -fn verify__pallet_says_vk_deserialization_failed() { - simulate_verify::<_, { Some(ADJUSTED_WEIGHT) }, { BABY_LIMINAL_VERIFY_DESERIALIZING_KEY_FAIL }>( - VerifyErrorer::<{ Error::DeserializingVerificationKeyFailed }, { Some(ADJUSTED_WEIGHT) }>::new( - verify_args(), - ), - ) -} - -#[test] -#[allow(non_snake_case)] -fn verify__pallet_says_verification_failed() { - simulate_verify::<_, { None }, { BABY_LIMINAL_VERIFY_VERIFICATION_FAIL }>(VerifyErrorer::< - { Error::VerificationFailed(VerificationError::MalformedVerifyingKey) }, - { None }, - >::new( - verify_args() - )) -} - -#[test] -#[allow(non_snake_case)] -fn verify__pallet_says_incorrect_proof() { - simulate_verify::<_, { None }, { BABY_LIMINAL_VERIFY_INCORRECT_PROOF }>(VerifyErrorer::< - { Error::IncorrectProof }, - { None }, - >::new( - verify_args() - )) -} - -#[test] -#[allow(non_snake_case)] -fn verify__positive_scenario() { - simulate_verify::<_, { None }, 0>(VerifyOkayer::new(verify_args())) -} diff --git a/baby-liminal-extension/tests/utils/environment.rs b/baby-liminal-extension/tests/utils/environment.rs deleted file mode 100644 index dad3cead53..0000000000 --- a/baby-liminal-extension/tests/utils/environment.rs +++ /dev/null @@ -1,324 +0,0 @@ -use std::{ - iter::Sum, - marker::PhantomData, - mem::size_of, - ops::Neg, - sync::mpsc::{channel, Receiver, Sender}, -}; - -use baby_liminal_extension::{ - backend_executor::Executor, substrate::ByteCount, BabyLiminalExtension, - VerificationKeyIdentifier, -}; -use obce::substrate::{ - frame_support::weights::Weight, sp_runtime::AccountId32, ChainExtensionEnvironment, - CriticalError, -}; -use pallet_baby_liminal::Error; - -use crate::utils::{STORE_KEY_ID, VERIFY_ID}; - -/// In order to compute final fee (after all adjustments) sometimes we will have to subtract -/// weights. -#[derive(Debug, PartialEq, Eq)] -pub struct RevertibleWeight(i64); - -impl RevertibleWeight { - fn neg(weight: Weight) -> Self { - RevertibleWeight((weight.ref_time() as i64).neg()) - } - - pub const ZERO: RevertibleWeight = RevertibleWeight(0); -} - -impl From for RevertibleWeight { - fn from(w: Weight) -> Self { - RevertibleWeight(w.ref_time() as i64) - } -} - -impl Sum for RevertibleWeight { - fn sum>(iter: I) -> Self { - RevertibleWeight(iter.map(|rw| rw.0).sum()) - } -} - -/// Trait serving as a type-level flag indicating how reading input from a contract should be done. -pub trait ReadingMode {} -/// Reading fails - we won't be able to read a single byte. -pub enum CorruptedMode {} -impl ReadingMode for CorruptedMode {} -/// Reading succeeds - we will read everything. -pub enum StandardMode {} -impl ReadingMode for StandardMode {} - -/// Describes how the environment should behave when one of pallet methods are called. -#[derive(Clone, Eq, PartialEq)] -pub enum Responder { - /// Twist and shout. - Panicker, - /// Return `Ok(())`. - Okayer, - /// Return `Err(Error)`. - Errorer(Error<()>, Option), -} - -/// We will implement reading for every `ReadingMode`. However, there is no other way than such -/// `_Read` trait to tell Rust compiler that in fact, for every `RM` in `MockedEnvironment<_, RM>` -/// there will be such function. -trait _Read { - fn _read(&self, len: ByteCount) -> Result; -} - -/// Testing counterpart for `pallet_baby_liminal::chain_extension::Environment`. -pub struct MockedEnvironment< - const METHOD: u16, - RM: ReadingMode, - const STORE_KEY_RESPONDER: Responder, - const VERIFY_RESPONDER: Responder, -> { - /// Channel to report all charges. - /// - /// We have to save charges outside this object, because it is consumed by the main call. - charging_channel: Sender, - - /// `Some(_)` only if `RM = CorruptedMode`. - /// - /// An optional callback to be invoked just before (failing to) read. - on_read: Option>, - /// `Some(_)` iff `RM = StandardMode`. - content: Option>, - - /// How many bytes are there waiting to be read. - in_len: ByteCount, - - _phantom: PhantomData, -} - -/// Creating environment with corrupted reading. -impl< - const METHOD: u16, - const STORE_KEY_RESPONDER: Responder, - const VERIFY_RESPONDER: Responder, - > MockedEnvironment -{ - pub fn new( - in_len: ByteCount, - on_read: Option>, - ) -> (Self, Receiver) { - let (sender, receiver) = channel(); - ( - Self { - charging_channel: sender, - on_read, - content: None, - in_len, - _phantom: Default::default(), - }, - receiver, - ) - } -} - -/// Corrupted reading with possible additional callback invoked. -impl< - const METHOD: u16, - const STORE_KEY_RESPONDER: Responder, - const VERIFY_RESPONDER: Responder, - > _Read for MockedEnvironment -{ - fn _read(&self, _: ByteCount) -> Result { - if let Some(action) = self.on_read.as_ref() { - action() - } - Err(CriticalError::Other("Some error")) - } -} - -/// Creating environment with correct reading of `content`. -impl< - const METHOD: u16, - const STORE_KEY_RESPONDER: Responder, - const VERIFY_RESPONDER: Responder, - > MockedEnvironment -{ - pub fn new(content: Vec) -> (Self, Receiver) { - let (sender, receiver) = channel(); - ( - Self { - charging_channel: sender, - on_read: None, - in_len: content.len() as ByteCount, - content: Some(content), - _phantom: Default::default(), - }, - receiver, - ) - } -} - -/// Successful reading -impl< - const METHOD: u16, - const STORE_KEY_RESPONDER: Responder, - const VERIFY_RESPONDER: Responder, - > _Read for MockedEnvironment -{ - fn _read(&self, len: ByteCount) -> Result { - let content = self.content.as_ref().unwrap(); - if len > self.in_len { - Ok(U::decode(&mut &content[..]).unwrap()) - } else { - Ok(U::decode(&mut &content[..len as usize]).unwrap()) - } - } -} - -/// In case we are testing `pallet_baby_liminal::store_key`, we might want to approximate how long is the -/// verifying key. -/// -/// The returned value will be an upperbound - it will be the sum of the whole key encoding -/// (including its length). -impl - MockedEnvironment -{ - pub fn approx_key_len(&self) -> ByteCount { - self.in_len - .checked_sub(size_of::() as ByteCount) - .unwrap() - } -} - -impl< - const METHOD: u16, - RM: ReadingMode, - const STORE_KEY_RESPONDER: Responder, - const VERIFY_RESPONDER: Responder, - E, - T, - > ChainExtensionEnvironment - for MockedEnvironment -where - MockedEnvironment: _Read, -{ - type ChargedAmount = Weight; - - fn func_id(&self) -> u16 { - METHOD - } - - fn ext_id(&self) -> u16 { - obce::id!(BabyLiminalExtension) - } - - fn in_len(&self) -> ByteCount { - self.in_len - } - - fn read(&self, _: u32) -> Result, CriticalError> { - todo!() - } - - fn read_into(&self, _: &mut &mut [u8]) -> Result<(), CriticalError> { - todo!() - } - - fn read_as(&mut self) -> Result { - todo!() - } - - fn read_as_unbounded(&mut self, len: ByteCount) -> Result { - self._read(len) - } - - fn write(&mut self, _: &[u8], _: bool, _: Option) -> Result<(), CriticalError> { - Ok(()) - } - - fn ext(&mut self) -> &mut E { - todo!() - } - - fn charge_weight(&mut self, amount: Weight) -> Result { - self.charging_channel.send(amount.into()).unwrap(); - Ok(amount) - } - - fn adjust_weight(&mut self, charged: Weight, actual_weight: Weight) { - self.charging_channel - .send(RevertibleWeight::neg(charged - actual_weight)) - .unwrap(); - } -} - -/// Auxiliary method to construct type argument. -/// -/// Due to "`struct/enum construction is not supported in generic constants`". -pub const fn make_errorer, const WEIGHT: Option>() -> Responder { - Responder::Errorer( - ERROR, - match WEIGHT { - None => None, - Some(w) => Some(Weight::from_ref_time(w)), - }, - ) -} - -/// Executor that will return `Ok(())` for `store_key` and scream for `verify`. -pub type StoreKeyOkayer = - MockedEnvironment; -/// Executor that will return `Ok(())` for `verify` and scream for `store_key`. -pub type VerifyOkayer = - MockedEnvironment; - -pub const NO_WEIGHT: Option = None; - -/// Executor that will return `Err(ERROR)` for `store_key` and scream for `verify`. -pub type StoreKeyErrorer> = MockedEnvironment< - STORE_KEY_ID, - StandardMode, - { make_errorer::() }, - { Responder::Panicker }, ->; -/// Executor that will return `Err(ERROR)` for `verify` and scream for `store_key`. -pub type VerifyErrorer, const WEIGHT: Option> = MockedEnvironment< - VERIFY_ID, - StandardMode, - { Responder::Panicker }, - { make_errorer::() }, ->; - -impl< - T, - RM: ReadingMode, - const METHOD: u16, - const STORE_KEY_RESPONDER: Responder, - const VERIFY_RESPONDER: Responder, - > Executor for MockedEnvironment -{ - type ErrorGenericType = (); - - fn store_key( - _: AccountId32, - _: VerificationKeyIdentifier, - _: Vec, - ) -> Result<(), Error> { - match STORE_KEY_RESPONDER { - Responder::Panicker => panic!("Function `store_key` shouldn't have been executed"), - Responder::Okayer => Ok(()), - Responder::Errorer(e, _) => Err(e), - } - } - - fn verify( - _: VerificationKeyIdentifier, - _: Vec, - _: Vec, - ) -> Result<(), (Error, Option)> { - match VERIFY_RESPONDER { - Responder::Panicker => panic!("Function `verify` shouldn't have been executed"), - Responder::Okayer => Ok(()), - Responder::Errorer(e, w) => Err((e, w)), - } - } -} diff --git a/baby-liminal-extension/tests/utils/mod.rs b/baby-liminal-extension/tests/utils/mod.rs deleted file mode 100644 index 966afbbe43..0000000000 --- a/baby-liminal-extension/tests/utils/mod.rs +++ /dev/null @@ -1,117 +0,0 @@ -use std::sync::mpsc::Receiver; - -use aleph_runtime::Runtime; -use baby_liminal_extension::{ - backend_executor::Executor, - substrate::{weight_of_store_key, Extension}, - BabyLiminalExtension, VerificationKeyIdentifier, -}; -use obce::substrate::{ - frame_support::weights::Weight, pallet_contracts::chain_extension::RetVal, - sp_runtime::AccountId32, CallableChainExtension, ChainExtensionEnvironment, -}; -use scale::{Decode, Encode}; - -mod environment; - -pub use environment::{ - CorruptedMode, MockedEnvironment, Responder, RevertibleWeight, StandardMode, StoreKeyErrorer, - StoreKeyOkayer, VerifyErrorer, VerifyOkayer, -}; -use pallet_baby_liminal::{Config as BabyLiminalConfig, WeightInfo}; - -pub const STORE_KEY_ID: u16 = obce::id!(BabyLiminalExtension::store_key); -pub const VERIFY_ID: u16 = obce::id!(BabyLiminalExtension::verify); - -const IDENTIFIER: VerificationKeyIdentifier = [1, 7, 2, 9, 1, 7, 2, 9]; -const VK: [u8; 2] = [4, 1]; -const PROOF: [u8; 20] = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4]; -const INPUT: [u8; 11] = [0, 5, 7, 7, 2, 1, 5, 6, 6, 4, 9]; - -/// Struct to be decoded from a byte slice passed from the contract. -/// -/// Notice, that contract can pass these arguments one by one, not necessarily as such struct. Only -/// the order of values is important. -/// -/// It cannot be `MaxEncodedLen` due to `Vec<_>` and thus `Environment::read_as` cannot be used. -#[derive(Decode, Encode)] -struct StoreKeyArgs { - pub origin: AccountId32, - pub identifier: VerificationKeyIdentifier, - pub key: Vec, -} - -/// Struct to be decoded from a byte slice passed from the contract. -/// -/// Notice, that contract can pass these arguments one by one, not necessarily as such struct. Only -/// the order of values is important. -/// -/// It cannot be `MaxEncodedLen` due to `Vec<_>` and thus `Environment::read_as` cannot be used. -#[derive(Decode, Encode)] -struct VerifyArgs { - pub identifier: VerificationKeyIdentifier, - pub proof: Vec, - pub input: Vec, -} - -/// Returns encoded arguments to `store_key`. -pub fn store_key_args() -> Vec { - StoreKeyArgs { - origin: AccountId32::from([0; 32]), - identifier: IDENTIFIER, - key: VK.to_vec(), - } - .encode() -} - -/// Returns encoded arguments to `verify`. -pub fn verify_args() -> Vec { - VerifyArgs { - identifier: IDENTIFIER, - proof: PROOF.to_vec(), - input: INPUT.to_vec(), - } - .encode() -} - -/// Fetches all charges and computes the final fee. -pub fn charged(charging_listener: Receiver) -> RevertibleWeight { - charging_listener.into_iter().sum() -} - -pub fn simulate_store_key( - (env, charging_listener): (Env, Receiver), - expected_ret_val: u32, -) where - Env: ChainExtensionEnvironment<(), Runtime> + Executor, -{ - let result = >::call(&mut Extension, env); - - assert!(matches!(result, Ok(RetVal::Converging(ret_val)) if ret_val == expected_ret_val)); - assert_eq!( - charged(charging_listener), - weight_of_store_key::(VK.len() as u32).into() - ); -} - -pub const ADJUSTED_WEIGHT: u64 = 1729; - -// Unfortunately, due to the `unconstrained generic constant` error, `ACTUAL_WEIGHT` will have to be -// passed twice for failure tests (once to `VerifyErrorer` and second time as a separate value). -pub fn simulate_verify, const EXPECTED_RET_VAL: u32>( - (env, charging_listener): (Env, Receiver), -) where - Env: ChainExtensionEnvironment<(), Runtime> + Executor, -{ - let result = >::call(&mut Extension, env); - - assert!(matches!(result, Ok(RetVal::Converging(ret_val)) if ret_val == EXPECTED_RET_VAL)); - - let expected_charge = ACTUAL_WEIGHT.unwrap_or_else(|| { - <::WeightInfo as WeightInfo>::verify().ref_time() - }); - assert_eq!( - charged(charging_listener), - Weight::from_ref_time(expected_charge).into() - ); -} From 9055e42cac81b73c9137c7527370c102bac5398f Mon Sep 17 00:00:00 2001 From: timorleph <145755355+timorleph@users.noreply.github.com> Date: Mon, 27 Nov 2023 12:34:27 +0100 Subject: [PATCH 04/11] A0-3550: Better constants for libp2p message sizes (#1509) # Description Sync messages can be bigger, so increased the constant for them. Also moved some code around to lower the likelyhood of making this code in the future. I also found some old compatibility code while going through this, so I removed in on the way, it's definitely not needed any more. ## Type of change - Bug fix (non-breaking change which fixes an issue) # Checklist: - I have made corresponding changes to the existing documentation - I have created new documentation --- finality-aleph/src/lib.rs | 16 ++++++++++------ finality-aleph/src/network/session/mod.rs | 6 ++++++ finality-aleph/src/network/substrate.rs | 19 ++----------------- finality-aleph/src/sync/data.rs | 4 ++++ finality-aleph/src/sync/mod.rs | 1 + 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/finality-aleph/src/lib.rs b/finality-aleph/src/lib.rs index 5602cbe408..138988cfa9 100644 --- a/finality-aleph/src/lib.rs +++ b/finality-aleph/src/lib.rs @@ -34,8 +34,9 @@ use crate::{ aggregation::{CurrentRmcNetworkData, LegacyRmcNetworkData}, block::UnverifiedHeader, compatibility::{Version, Versioned}, - network::data::split::Split, + network::{data::split::Split, session::MAX_MESSAGE_SIZE as MAX_AUTHENTICATION_MESSAGE_SIZE}, session::{SessionBoundaries, SessionBoundaryInfo, SessionId}, + sync::MAX_MESSAGE_SIZE as MAX_BLOCK_SYNC_MESSAGE_SIZE, VersionedTryFromError::{ExpectedNewGotOld, ExpectedOldGotNew}, }; @@ -81,6 +82,13 @@ pub use crate::{ /// Constant defining how often components of finality-aleph should report their state const STATUS_REPORT_INTERVAL: Duration = Duration::from_secs(20); +fn max_message_size(protocol: Protocol) -> u64 { + match protocol { + Protocol::Authentication => MAX_AUTHENTICATION_MESSAGE_SIZE, + Protocol::BlockSync => MAX_BLOCK_SYNC_MESSAGE_SIZE, + } +} + /// Returns a NonDefaultSetConfig for the specified protocol. pub fn peers_set_config( naming: ProtocolNaming, @@ -88,11 +96,7 @@ pub fn peers_set_config( ) -> sc_network::config::NonDefaultSetConfig { let mut config = sc_network::config::NonDefaultSetConfig::new( naming.protocol_name(&protocol), - // max_notification_size should be larger than the maximum possible honest message size (in bytes). - // Max size of alert is UNIT_SIZE * MAX_UNITS_IN_ALERT ~ 100 * 5000 = 50000 bytes - // Max size of parents response UNIT_SIZE * N_MEMBERS ~ 100 * N_MEMBERS - // When adding other (large) message types we need to make sure this limit is fine. - 1024 * 1024, + max_message_size(protocol), ); config.set_config = sc_network::config::SetConfig::default(); diff --git a/finality-aleph/src/network/session/mod.rs b/finality-aleph/src/network/session/mod.rs index f0d43b7955..81298e775b 100644 --- a/finality-aleph/src/network/session/mod.rs +++ b/finality-aleph/src/network/session/mod.rs @@ -34,6 +34,12 @@ pub use handler::tests::authentication; pub use handler::{Handler as SessionHandler, HandlerError as SessionHandlerError}; pub use service::{Config as ConnectionManagerConfig, ManagerError, Service as ConnectionManager}; +/// The maximum size an authentication can have and be accepted. +/// This leaves a generous margin of error, as the signature is 64 bytes, +/// the public key of the peer is 32 bytes, a single IP/DNS address +/// at most ~260 and no one should need more than a couple of these. +pub const MAX_MESSAGE_SIZE: u64 = 1024 * 1024; + /// Data validators use to authenticate themselves for a single session /// and disseminate their addresses. #[derive(Clone, Debug, PartialEq, Eq, Hash, Encode, Decode)] diff --git a/finality-aleph/src/network/substrate.rs b/finality-aleph/src/network/substrate.rs index f2c185cd38..e1d9cb6280 100644 --- a/finality-aleph/src/network/substrate.rs +++ b/finality-aleph/src/network/substrate.rs @@ -22,10 +22,6 @@ use crate::network::gossip::{Event, EventStream, NetworkSender, Protocol, RawNet /// authentications. const AUTHENTICATION_PROTOCOL_NAME: &str = "/auth/0"; -/// Legacy name of the network protocol used by Aleph Zero to disseminate validator -/// authentications. Might be removed after some updates. -const LEGACY_AUTHENTICATION_PROTOCOL_NAME: &str = "/aleph/1"; - /// Name of the network protocol used by Aleph Zero to synchronize the block state. const BLOCK_SYNC_PROTOCOL_NAME: &str = "/sync/0"; @@ -33,7 +29,6 @@ const BLOCK_SYNC_PROTOCOL_NAME: &str = "/sync/0"; #[derive(Clone)] pub struct ProtocolNaming { authentication_name: ProtocolName, - authentication_fallback_names: Vec, block_sync_name: ProtocolName, protocols_by_name: HashMap, } @@ -45,17 +40,11 @@ impl ProtocolNaming { format!("{chain_prefix}{AUTHENTICATION_PROTOCOL_NAME}").into(); let mut protocols_by_name = HashMap::new(); protocols_by_name.insert(authentication_name.clone(), Protocol::Authentication); - let authentication_fallback_names: Vec = - vec![LEGACY_AUTHENTICATION_PROTOCOL_NAME.into()]; - for protocol_name in &authentication_fallback_names { - protocols_by_name.insert(protocol_name.clone(), Protocol::Authentication); - } let block_sync_name: ProtocolName = format!("{chain_prefix}{BLOCK_SYNC_PROTOCOL_NAME}").into(); protocols_by_name.insert(block_sync_name.clone(), Protocol::BlockSync); ProtocolNaming { authentication_name, - authentication_fallback_names, block_sync_name, protocols_by_name, } @@ -71,12 +60,8 @@ impl ProtocolNaming { } /// Returns the fallback names of the protocol. - pub fn fallback_protocol_names(&self, protocol: &Protocol) -> Vec { - use Protocol::*; - match protocol { - Authentication => self.authentication_fallback_names.clone(), - _ => Vec::new(), - } + pub fn fallback_protocol_names(&self, _protocol: &Protocol) -> Vec { + Vec::new() } /// Attempts to convert the protocol name to a protocol. diff --git a/finality-aleph/src/sync/data.rs b/finality-aleph/src/sync/data.rs index 31ed245fee..8c152c11ab 100644 --- a/finality-aleph/src/sync/data.rs +++ b/finality-aleph/src/sync/data.rs @@ -348,6 +348,10 @@ type ByteCount = u32; // Maximum block size is 5mb so we have spare for at least 3 blocks. pub const MAX_SYNC_MESSAGE_SIZE: u32 = 15 * 1024 * 1024 + 1024; const_assert!(MAX_SYNC_MESSAGE_SIZE > 3 * MAX_BLOCK_SIZE); +/// The toal maximal message size that should be accepted, slighly +/// larger than the above to include the version plus some wiggle-room. +pub const MAX_MESSAGE_SIZE: u64 = 16 * 1024 * 1024; +const_assert!(MAX_MESSAGE_SIZE > MAX_SYNC_MESSAGE_SIZE as u64 + 128); fn encode_with_version(version: Version, payload: &[u8]) -> Vec { let size = payload.len().try_into().unwrap_or(ByteCount::MAX); diff --git a/finality-aleph/src/sync/mod.rs b/finality-aleph/src/sync/mod.rs index 5e4e4c90d5..797abcab72 100644 --- a/finality-aleph/src/sync/mod.rs +++ b/finality-aleph/src/sync/mod.rs @@ -19,6 +19,7 @@ mod task_queue; mod tasks; mod ticker; +pub use data::MAX_MESSAGE_SIZE; pub use handler::DatabaseIO; pub use service::{Service, IO}; From f20809592e25e078b65a53f57e2f05d7d14c7391 Mon Sep 17 00:00:00 2001 From: timorleph <145755355+timorleph@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:24:35 +0100 Subject: [PATCH 05/11] A0-3562: Slightly better logging in sync and gossip network (#1510) # Description Logs! ## Type of change Logs! # Checklist: - logs - logs - l0g5 - Iogs - lololgs - lo~~gs --- finality-aleph/src/network/gossip/service.rs | 36 ++++++++++++++------ finality-aleph/src/sync/service.rs | 18 ++++++++-- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/finality-aleph/src/network/gossip/service.rs b/finality-aleph/src/network/gossip/service.rs index f73d4c1c93..5509d2c0c5 100644 --- a/finality-aleph/src/network/gossip/service.rs +++ b/finality-aleph/src/network/gossip/service.rs @@ -301,23 +301,29 @@ impl Service { } fn send_authentication_data(&mut self, data: AD, peer_id: N::PeerId) { + trace!( + target: LOG_TARGET, + "Sending authentication data to peer {:?}.", + peer_id, + ); if let Err(e) = self.send_to_authentication_peer(data, peer_id.clone()) { - trace!( + debug!( target: LOG_TARGET, - "Failed to send to peer{:?}, {:?}", - peer_id, - e + "Failed to send to peer{:?}, {:?}", peer_id, e ); } } fn send_block_sync_data(&mut self, data: BSD, peer_id: N::PeerId) { + trace!( + target: LOG_TARGET, + "Sending block sync data to peer {:?}.", + peer_id, + ); if let Err(e) = self.send_to_block_sync_peer(data, peer_id.clone()) { - trace!( + debug!( target: LOG_TARGET, - "Failed to send to peer{:?}, {:?}", - peer_id, - e + "Failed to send to peer{:?}, {:?}", peer_id, e ); } } @@ -345,10 +351,15 @@ impl Service { } fn send_to_random_authentication(&mut self, data: AD, peer_ids: HashSet) { + trace!( + target: LOG_TARGET, + "Sending authentication data to random peer among {:?}.", + peer_ids, + ); let peer_id = match self.random_peer(&peer_ids, Protocol::Authentication) { Some(peer_id) => peer_id.clone(), None => { - trace!( + debug!( target: LOG_TARGET, "Failed to send authentication message to random peer, no peers are available." ); @@ -359,10 +370,15 @@ impl Service { } fn send_to_random_block_sync(&mut self, data: BSD, peer_ids: HashSet) { + trace!( + target: LOG_TARGET, + "Sending block sync data to random peer among {:?}.", + peer_ids, + ); let peer_id = match self.random_peer(&peer_ids, Protocol::BlockSync) { Some(peer_id) => peer_id.clone(), None => { - trace!( + debug!( target: LOG_TARGET, "Failed to send block sync message to random peer, no peers are available." ); diff --git a/finality-aleph/src/sync/service.rs b/finality-aleph/src/sync/service.rs index 74e254c438..937bb5ae24 100644 --- a/finality-aleph/src/sync/service.rs +++ b/finality-aleph/src/sync/service.rs @@ -412,7 +412,11 @@ where target: LOG_TARGET, "Failed to handle sync state response from {:?}: {}.", peer, e ), - _ => {} + None => trace!( + target: LOG_TARGET, + "Handled state response from {:?}.", + peer + ), } if new_info { self.try_request_chain_extension(); @@ -479,7 +483,11 @@ where target: LOG_TARGET, "Failed to handle sync request response from {:?}: {}.", peer, e ), - _ => {} + None => trace!( + target: LOG_TARGET, + "Handled sync request response from {:?}.", + peer, + ), } self.process_equivocation_proofs(equivocation_proofs); if new_info { @@ -522,7 +530,11 @@ where } } Action::RequestBlock(header) => self.request_block(header.id()), - _ => {} + Action::Noop => trace!( + target: LOG_TARGET, + "Doing nothing in response to a request from {:?}.", + peer, + ), } } Err(e) => { From e2c1229b1b0e37ace2429f4c96082d2121cebee4 Mon Sep 17 00:00:00 2001 From: timorleph <145755355+timorleph@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:11:20 +0100 Subject: [PATCH 06/11] A0-3562: Mark ancestors of justifications as required (#1513) # Description This should have been the case already, but we missed it. Also added a unit test for this and some slightly better logs. ## Type of change - Bug fix (non-breaking change which fixes an issue) # Checklist: - I have added tests --- finality-aleph/src/sync/forest/mod.rs | 49 ++++++++++++++++++++++++++ finality-aleph/src/sync/handler/mod.rs | 20 +++++++---- 2 files changed, 62 insertions(+), 7 deletions(-) diff --git a/finality-aleph/src/sync/forest/mod.rs b/finality-aleph/src/sync/forest/mod.rs index 5d8ee79e7d..f9dc670b2d 100644 --- a/finality-aleph/src/sync/forest/mod.rs +++ b/finality-aleph/src/sync/forest/mod.rs @@ -442,6 +442,7 @@ where } let (id, parent_id) = self.process_header(&header)?; self.update_header(&header, None, false)?; + self.set_required(&parent_id); Ok(match self.get_mut(&id) { VertexHandleMut::Candidate(mut entry) => { let vertex = &mut entry.get_mut().vertex; @@ -971,6 +972,54 @@ mod tests { assert!(forest.importable(&grandchild.header().id())); } + #[test] + fn unimportant_parent_of_justification_importable() { + let (initial_header, mut forest) = setup(); + let first_child = initial_header.random_child(); + let peer_id = rand::random(); + assert!(forest + .update_header(&first_child, Some(peer_id), false) + .expect("header was correct")); + assert!(matches!( + forest.request_interest(&first_child.id()), + Uninterested + )); + match forest.extension_request() { + FavouriteBlock { know_most, .. } => { + assert!(know_most.contains(&peer_id)) + } + other_state => panic!("Expected favourite block, got {other_state:?}."), + } + assert!(forest.importable(&first_child.id())); + let second_child = initial_header.random_child(); + let other_peer_id = rand::random(); + assert!(forest + .update_header(&second_child, Some(other_peer_id), false) + .expect("header was correct")); + assert!(matches!( + forest.request_interest(&second_child.id()), + Uninterested + )); + match forest.extension_request() { + FavouriteBlock { know_most, .. } => { + assert!(know_most.contains(&peer_id)) + } + other_state => panic!("Expected favourite block, got {other_state:?}."), + } + assert!(forest.importable(&first_child.id())); + assert!(forest.importable(&second_child.id())); + forest + .update_body(&first_child) + .expect("header was correct"); + assert!(!forest.importable(&second_child.id())); + let justification = MockJustification::for_header(second_child.random_child()); + let peer_id = rand::random(); + assert!(forest + .update_justification(justification, Some(peer_id)) + .expect("header was correct")); + assert!(forest.importable(&second_child.id())); + } + #[test] fn ignores_genesis_justification() { let (_, mut forest) = setup(); diff --git a/finality-aleph/src/sync/handler/mod.rs b/finality-aleph/src/sync/handler/mod.rs index 0ea2be1883..65e4c22b35 100644 --- a/finality-aleph/src/sync/handler/mod.rs +++ b/finality-aleph/src/sync/handler/mod.rs @@ -287,8 +287,8 @@ where ForestInitialization(ForestInitializationError), RequestHandlerError(RequestHandlerError), MissingJustification, - BlockNotImportable, - HeaderNotRequired, + BlockNotImportable(BlockId), + HeaderNotRequired(BlockId), } impl Display for Error @@ -313,10 +313,16 @@ where f, "justification for the last block of a past session missing" ), - BlockNotImportable => { - write!(f, "cannot import a block that we do not consider required") + BlockNotImportable(id) => { + write!( + f, + "cannot import a block {} that we do not consider required", + id + ) + } + HeaderNotRequired(id) => { + write!(f, "header {} was not required, but it should have been", id) } - HeaderNotRequired => write!(f, "header was not required, but it should have been"), } } } @@ -686,7 +692,7 @@ where return ( new_highest, equivocation_proofs, - Some(Error::HeaderNotRequired), + Some(Error::HeaderNotRequired(h.id())), ); } } @@ -711,7 +717,7 @@ where return ( new_highest, equivocation_proofs, - Some(Error::BlockNotImportable), + Some(Error::BlockNotImportable(b.header().id())), ) } }; From 69cc26f6850a7101ce37ce8805c9ad0fb000cca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Tue, 28 Nov 2023 09:40:15 +0100 Subject: [PATCH 07/11] A0-3509: Test verify API as well (#1514) # Description Frontend contract test was missing call to the second method of the extension. This PR fills the gap. ## Type of change - Bug fix (non-breaking change which fixes an issue) --- baby-liminal-extension/test_contract/lib.rs | 31 ++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/baby-liminal-extension/test_contract/lib.rs b/baby-liminal-extension/test_contract/lib.rs index 783fd31600..27e2d0f8c9 100755 --- a/baby-liminal-extension/test_contract/lib.rs +++ b/baby-liminal-extension/test_contract/lib.rs @@ -14,12 +14,20 @@ mod test_contract { } #[ink(message)] - pub fn call_ce(&self) { + pub fn call_store_key(&self) { self.env() .extension() .store_key(self.env().caller(), [0; 8], vec![0; 32]) .unwrap(); } + + #[ink(message)] + pub fn call_verify(&self) { + self.env() + .extension() + .verify([0; 8], vec![0; 41], vec![0; 82]) + .unwrap(); + } } #[cfg(test)] @@ -39,12 +47,27 @@ mod test_contract { } } + struct MockedVerifyExtension; + impl ink::env::test::ChainExtension for MockedVerifyExtension { + fn func_id(&self) -> u32 { + baby_liminal_extension::extension_ids::VERIFY_EXT_ID + } + + fn call(&mut self, _: &[u8], _: &mut Vec) -> u32 { + baby_liminal_extension::status_codes::VERIFY_SUCCESS + } + } + #[ink::test] - fn it_works() { + fn store_key_works() { register_chain_extension(MockedStoreKeyExtension); + TestContract::new().call_store_key(); + } - let test_contract = TestContract::new(); - test_contract.call_ce(); + #[ink::test] + fn verify_works() { + register_chain_extension(MockedVerifyExtension); + TestContract::new().call_verify(); } } } From 1ac53479d6e5b918d3030efb0df3a8b85fc63f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Tue, 28 Nov 2023 13:20:40 +0100 Subject: [PATCH 08/11] A0-3518: Move `verify` weighting to the proper place (#1515) # Description Although we don't have benchmarks for jellyfish verifier (and thus the pallet charges 0 weight for verification), we should enrich `WeightInfo` trait with `verify` method that returns for now `0` and use it in both pallet and the extension. ## Type of change - Bug fix (non-breaking change which fixes an issue) --- pallets/baby-liminal/src/lib.rs | 2 +- pallets/baby-liminal/src/weights.rs | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pallets/baby-liminal/src/lib.rs b/pallets/baby-liminal/src/lib.rs index 1c670b2342..069c745151 100644 --- a/pallets/baby-liminal/src/lib.rs +++ b/pallets/baby-liminal/src/lib.rs @@ -277,7 +277,7 @@ pub mod pallet { /// system) /// - verifying procedure fails (e.g. incompatible verification key and proof) /// - proof is incorrect - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::verify())] #[pallet::call_index(3)] pub fn verify( _origin: OriginFor, diff --git a/pallets/baby-liminal/src/weights.rs b/pallets/baby-liminal/src/weights.rs index 92df505086..d65b8acd8c 100644 --- a/pallets/baby-liminal/src/weights.rs +++ b/pallets/baby-liminal/src/weights.rs @@ -31,6 +31,7 @@ pub trait WeightInfo { fn overwrite_equal_key(key_length: u32) -> Weight; fn overwrite_key(key_length: u32) -> Weight; fn delete_key(key_length: u32) -> Weight; + fn verify() -> Weight; } impl WeightInfo for I { @@ -49,14 +50,19 @@ impl WeightInfo for I { fn delete_key(key_length: u32) -> Weight { ::delete_key(key_length) } + + fn verify() -> Weight { + ::verify() + } } /// Benchmark results for pallet_baby_liminal. trait BenchmarkInfo { - fn store_key(l: u32, ) -> Weight; - fn overwrite_equal_key(l: u32, ) -> Weight; - fn overwrite_key(l: u32, ) -> Weight; - fn delete_key(l: u32, ) -> Weight; + fn store_key(l: u32, ) -> Weight; + fn overwrite_equal_key(l: u32, ) -> Weight; + fn overwrite_key(l: u32, ) -> Weight; + fn delete_key(l: u32, ) -> Weight; + fn verify() -> Weight; } /// Weights for pallet_baby_liminal using the Substrate node and recommended hardware. @@ -128,6 +134,10 @@ impl BenchmarkInfo for AlephWeight { .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + + fn verify() -> Weight { + Weight::zero() + } } // For backwards compatibility and tests @@ -198,4 +208,8 @@ impl BenchmarkInfo for () { .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + + fn verify() -> Weight { + Weight::zero() + } } From f0fbba50069f7e81b189d08e1cb76e3aaa3a0152 Mon Sep 17 00:00:00 2001 From: kostekIV <27210860+kostekIV@users.noreply.github.com> Date: Tue, 28 Nov 2023 15:25:36 +0100 Subject: [PATCH 09/11] A0-3548: fix config values (#1505) --- bin/runtime/src/lib.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/runtime/src/lib.rs b/bin/runtime/src/lib.rs index f40d5e6b05..eac0132943 100644 --- a/bin/runtime/src/lib.rs +++ b/bin/runtime/src/lib.rs @@ -217,11 +217,15 @@ impl pallet_authorship::Config for Runtime { parameter_types! { pub const ExistentialDeposit: u128 = 500 * PICO_AZERO; pub const MaxLocks: u32 = 50; + // We have only 2 reasons for holds - CodeUploadDeposit and StorageDeposit. + pub const MaxHolds: u32 = 2; + pub const MaxFreezes: u32 = 0; + pub const MaxReserves: u32 = 50; } impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; - type MaxReserves = (); + type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; /// The type for recording an account's balance. type Balance = Balance; @@ -232,8 +236,8 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type WeightInfo = pallet_balances::weights::SubstrateWeight; type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type MaxHolds = MaxHolds; + type MaxFreezes = MaxFreezes; type RuntimeHoldReason = RuntimeHoldReason; } From bae82df91c174215dd534226575e2922654174a9 Mon Sep 17 00:00:00 2001 From: lesniak43 Date: Tue, 28 Nov 2023 16:00:33 +0100 Subject: [PATCH 10/11] A0-3517: Verify headers later in `Handler::handle_state` (#1500) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description Headers verified only when needed, not too early. Fixed some logs. ## Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) # Checklist: - I have added tests --------- Co-authored-by: Damian Leśniak --- finality-aleph/src/block/mock/backend.rs | 30 ++-- finality-aleph/src/sync/handler/mod.rs | 210 +++++++++++++++++------ finality-aleph/src/sync/service.rs | 4 +- 3 files changed, 175 insertions(+), 69 deletions(-) diff --git a/finality-aleph/src/block/mock/backend.rs b/finality-aleph/src/block/mock/backend.rs index b2f15344c5..29dd144a83 100644 --- a/finality-aleph/src/block/mock/backend.rs +++ b/finality-aleph/src/block/mock/backend.rs @@ -16,7 +16,7 @@ use crate::{ }, nodes::VERIFIER_CACHE_SIZE, session::{SessionBoundaryInfo, SessionId}, - BlockId, + BlockId, BlockNumber, }; #[derive(Clone, Debug)] @@ -414,13 +414,8 @@ impl Display for VerifierError { } } -impl JustificationVerifier for Backend { - type Error = VerifierError; - - fn verify_justification( - &mut self, - justification: MockJustification, - ) -> Result { +impl Backend { + fn cached(&self, block_number: BlockNumber) -> Result<(), VerifierError> { let top_number = self .top_finalized() .expect("should be at least genesis") @@ -433,12 +428,24 @@ impl JustificationVerifier for Backend { .session_id_from_block_num(top_number); let justification_session = storage .session_boundary_info - .session_id_from_block_num(justification.header().id().number); - if justification_session.0 > current_session.0 + 1 + .session_id_from_block_num(block_number); + match justification_session.0 > current_session.0 + 1 || current_session.0 + 1 - justification_session.0 >= VERIFIER_CACHE_SIZE as u32 { - return Err(Self::Error::Session); + true => Err(VerifierError::Session), + false => Ok(()), } + } +} + +impl JustificationVerifier for Backend { + type Error = VerifierError; + + fn verify_justification( + &mut self, + justification: MockJustification, + ) -> Result { + self.cached(justification.header().id().number)?; match justification.is_correct { true => Ok(justification), false => Err(Self::Error::Justification), @@ -455,6 +462,7 @@ impl HeaderVerifier for Backend { header: MockHeader, _just_created: bool, ) -> Result, Self::Error> { + self.cached(header.id().number - 1)?; match (header.valid(), header.equivocated()) { (true, false) => Ok(VerifiedHeader { header, diff --git a/finality-aleph/src/sync/handler/mod.rs b/finality-aleph/src/sync/handler/mod.rs index 65e4c22b35..b6d3c068e5 100644 --- a/finality-aleph/src/sync/handler/mod.rs +++ b/finality-aleph/src/sync/handler/mod.rs @@ -485,14 +485,22 @@ where let VerifiedHeader { maybe_equivocation_proof, .. - } = self - .verifier - .verify_header(block.header().clone(), own_block) - .map_err(Error::HeaderVerifier)?; + } = self.verify_header(block.header().clone(), own_block)?; self.block_importer.import_block(block); Ok(maybe_equivocation_proof) } + fn verify_header( + &mut self, + header: UnverifiedHeaderFor, + just_created: bool, + ) -> Result, ::Error> + { + self.verifier + .verify_header(header, just_created) + .map_err(Error::HeaderVerifier) + } + /// Inform the handler that a block has been imported. pub fn block_imported( &mut self, @@ -530,10 +538,7 @@ where let VerifiedHeader { header, maybe_equivocation_proof, - } = self - .verifier - .verify_header(header.clone(), false) - .map_err(Error::HeaderVerifier)?; + } = self.verify_header(header.clone(), false)?; equivocation_proof = maybe_equivocation_proof; !self.forest.update_header(&header, None, true)? } @@ -667,11 +672,7 @@ where if self.forest.skippable(&h.id()) { continue; } - let h = match self - .verifier - .verify_header(h, false) - .map_err(Error::HeaderVerifier) - { + let h = match self.verify_header(h, false) { Ok(VerifiedHeader { header: h, maybe_equivocation_proof: Some(proof), @@ -750,6 +751,7 @@ where peer: I, ) -> Result, ::Error> { use Error::*; + let mut maybe_proof = None; let remote_top_number = state.top_justification().header().id().number(); let local_top = self.chain_status.top_finalized().map_err(ChainStatus)?; let local_top_number = local_top.header().id().number(); @@ -759,26 +761,35 @@ where let local_session = self .session_info .session_id_from_block_num(local_top_number); - let VerifiedHeader { - header, - maybe_equivocation_proof: maybe_proof, - } = self - .verifier - .verify_header(state.favourite_block(), false) - .map_err(Error::HeaderVerifier)?; let action = match local_session.0.checked_sub(remote_session.0) { // remote session number larger than ours, we can try to import the justification - None => HandleStateAction::maybe_extend( - self.handle_justification(state.top_justification(), Some(peer.clone()))? - || self.forest.update_header(&header, Some(peer), false)?, - ), + None => { + // let's start with the justification, + // as the header might be too far in the future + let higher_justification = + self.handle_justification(state.top_justification(), Some(peer.clone()))?; + let VerifiedHeader { + header, + maybe_equivocation_proof, + } = self.verify_header(state.favourite_block(), false)?; + maybe_proof = maybe_equivocation_proof; + let new_descendant = self.forest.update_header(&header, Some(peer), false)?; + HandleStateAction::maybe_extend(higher_justification || new_descendant) + } // same session Some(0) => match remote_top_number >= local_top_number { // remote top justification higher than ours, we can import the justification - true => HandleStateAction::maybe_extend( - self.handle_justification(state.top_justification(), Some(peer.clone()))? - || self.forest.update_header(&header, Some(peer), false)?, - ), + true => { + let VerifiedHeader { + header, + maybe_equivocation_proof, + } = self.verify_header(state.favourite_block(), false)?; + maybe_proof = maybe_equivocation_proof; + let higher_justification = + self.handle_justification(state.top_justification(), Some(peer.clone()))?; + let new_descendant = self.forest.update_header(&header, Some(peer), false)?; + HandleStateAction::maybe_extend(higher_justification || new_descendant) + } // remote top justification lower than ours, we can send a response false => HandleStateAction::response(local_top.into_unverified(), None), }, @@ -835,10 +846,7 @@ where let VerifiedHeader { header, maybe_equivocation_proof, - } = self - .verifier - .verify_header(header, false) - .map_err(Error::HeaderVerifier)?; + } = self.verify_header(header, false)?; let should_request = self.forest.update_header(&header, None, true)?; Ok((should_request, maybe_equivocation_proof)) @@ -1973,48 +1981,138 @@ mod tests { header.invalidate(); let state = State::new(MockJustification::for_header(header.clone()), header); match handler.handle_state(state, peer) { - Err(Error::HeaderVerifier(_)) => (), + Err(Error::JustificationVerifier(_)) => (), e => panic!("should return Verifier error, {e:?}"), }; } #[test] fn detects_equivocated_state() { - let (mut handler, mut backend, _keep, _genesis) = setup(); - let initial_state = handler.state().expect("state works"); - let top_justification = initial_state.top_justification(); - let mut favourite_block = initial_state.favourite_block(); - favourite_block.make_equivocated(); - let initial_state = State::new(top_justification, favourite_block.clone()); + fn equivocated_state(state: &State) -> State { + let top_justification = state.top_justification(); + let mut favourite_block = state.favourite_block(); + favourite_block.make_equivocated(); + State::new(top_justification, favourite_block.clone()) + } + + let (mut handler_a, mut backend_a, _keep, _genesis) = setup(); + let (mut handler_b, mut backend_b, _keep, _genesis) = setup(); + let peer = rand::random(); - let justifications: Vec = import_branch(&mut backend, 43) + + let headers: Vec = import_branch(&mut backend_a, 110); + for header in &headers { + backend_b.import_block(MockBlock::new(header.clone(), true)); + } + + let justifications: Vec = headers .into_iter() .map(MockJustification::for_header) .collect(); - let last_from_first_session = justifications[18].clone().into_unverified(); - let last_from_second_session = justifications[38].clone().into_unverified(); - for justification in justifications.into_iter() { - handler + let mut states = vec![]; + + for justification in justifications.iter() { + handler_a .block_imported(justification.header().clone()) .expect("importing in order"); - handler + handler_a .handle_justification(justification.clone().into_unverified(), Some(peer)) .expect("correct justification"); + states.push(handler_a.state().expect("state works")); } - match handler - .handle_state(initial_state, peer) + for justification in &justifications[..50] { + handler_b + .block_imported(justification.header().clone()) + .expect("importing in order"); + handler_b + .handle_justification(justification.clone().into_unverified(), Some(peer)) + .expect("correct justification"); + } + + match handler_b + .handle_state(equivocated_state(&states[10]), peer) .expect("correct justification") { (HandleStateAction::Response(NetworkData::StateBroadcastResponse( justification, maybe_justification, - )), Some(equivocation_proof)) => { - assert_eq!(justification, last_from_first_session); - assert_eq!(maybe_justification, Some(last_from_second_session)); - assert_eq!(equivocation_proof.0, favourite_block); + )), None) => { + assert_eq!(justification, justifications[18]); + assert_eq!(maybe_justification, Some(justifications[38].clone())); } - other_action => panic!("expected a response with justifications and equivocation proof, got {other_action:?}"), - } + other_action => panic!("expected a response with justifications and no equivocation proof, got {other_action:?}"), + }; + + match handler_b + .handle_state(equivocated_state(&states[35]), peer) + .expect("correct justification") + { + (HandleStateAction::Response(NetworkData::StateBroadcastResponse( + justification, + maybe_justification, + )), None) => { + assert_eq!(justification, justifications[38]); + assert_eq!(maybe_justification, Some(justifications[49].clone())); + } + other_action => panic!("expected a response with justifications and no equivocation proof, got {other_action:?}"), + }; + + match handler_b + .handle_state(equivocated_state(&states[48]), peer) + .expect("correct justification") + { + (HandleStateAction::Response(NetworkData::StateBroadcastResponse( + justification, + maybe_justification, + )), None) => { + assert_eq!(justification, justifications[49]); + assert_eq!(maybe_justification, None); + } + other_action => panic!("expected a response with justifications and no equivocation proof, got {other_action:?}"), + }; + + match handler_b + .handle_state(equivocated_state(&states[49]), peer) + .expect("correct justification") + { + (HandleStateAction::Noop, Some(equivocation_proof)) => { + assert_eq!( + equivocation_proof.0, + equivocated_state(&states[49]).favourite_block() + ); + } + other_action => panic!("expected Noop with equivocation proof, got {other_action:?}"), + }; + + match handler_b + .handle_state(equivocated_state(&states[50]), peer) + .expect("correct justification") + { + (HandleStateAction::ExtendChain, Some(equivocation_proof)) => { + assert_eq!( + equivocation_proof.0, + equivocated_state(&states[50]).favourite_block() + ); + } + other_action => { + panic!("expected ExtendChain with equivocation proof, got {other_action:?}") + } + }; + + match handler_b + .handle_state(equivocated_state(&states[65]), peer) + .expect("correct justification") + { + (HandleStateAction::ExtendChain, Some(equivocation_proof)) => { + assert_eq!( + equivocation_proof.0, + equivocated_state(&states[65]).favourite_block() + ); + } + other_action => { + panic!("expected ExtendChain with equivocation proof, got {other_action:?}") + } + }; } fn setup_request_tests( @@ -2202,14 +2300,14 @@ mod tests { let lowest_id = BlockId::new_random(110); let request = Request::new( - MaybeHeader::Header(requested_header.clone()), + MaybeHeader::Id(requested_header.id()), LowestId(lowest_id), state, ); match handler.handle_request(request).expect("correct request") { - (Action::RequestBlock(MaybeHeader::Header(header)), None) => { - assert_eq!(header, requested_header) + (Action::RequestBlock(MaybeHeader::Id(block_id)), None) => { + assert_eq!(block_id, requested_header.id()) } other_action => panic!("expected a response with justifications, got {other_action:?}"), } diff --git a/finality-aleph/src/sync/service.rs b/finality-aleph/src/sync/service.rs index 937bb5ae24..baea741610 100644 --- a/finality-aleph/src/sync/service.rs +++ b/finality-aleph/src/sync/service.rs @@ -402,11 +402,11 @@ where match maybe_error { Some(HandlerError::JustificationVerifier(e)) => debug!( target: LOG_TARGET, - "Could not verify justification in sync state from {:?}: {}.", peer, e + "Could not verify justification in sync state response from {:?}: {}.", peer, e ), Some(HandlerError::HeaderVerifier(e)) => debug!( target: LOG_TARGET, - "Could not verify header in sync state from {:?}: {}.", peer, e + "Could not verify header in sync state response from {:?}: {}.", peer, e ), Some(e) => warn!( target: LOG_TARGET, From 496599b6f6bcd7848fa65457fd08d7b3e503069a Mon Sep 17 00:00:00 2001 From: woocash2 <59764862+woocash2@users.noreply.github.com> Date: Wed, 29 Nov 2023 08:36:08 +0100 Subject: [PATCH 11/11] A0-3015: Introduce AllBlockMetrics wrapper (#1511) # Description Introduce `AllBlockMetrics` which is a wrapper for different types of block metrics. Currently it only wraps `TimingBlockMetrics` but in future it will contain some other metrics. Adjustments made to `TimingBlockMetrics`: * from `report_block` and `report_block_if_not_present` created a single function of semantics equal to `report_block_if_not_present`, but named `report_block`. * Changed signature of `report_block(hash, timestamp, checkpoint)` to `report_block(hash, checkpoint)` - the timestamp can be inferred inside the function * Parameterized the struct with newly added `trait Clock` - there were some tests which checked behavior of `TimingBlockMetrics` when manipulating the times of newly appearing reports. After removing `timestamp` from `report_block` signature we needed to somehow be able to manipulate the times - thus parameterization. ## Type of change Please delete options that are not relevant. - New feature (non-breaking change which adds functionality) # Checklist: - I have made neccessary updates to the Infrastructure - I have made corresponding changes to the existing documentation - I have created new documentation --- bin/node/src/service.rs | 20 ++- finality-aleph/src/block/substrate/mod.rs | 14 +- finality-aleph/src/data_io/data_provider.rs | 18 +-- .../src/data_io/legacy/data_provider.rs | 14 +- finality-aleph/src/finalization.rs | 13 +- finality-aleph/src/import.rs | 14 +- finality-aleph/src/lib.rs | 4 +- finality-aleph/src/metrics/all_block.rs | 21 +++ finality-aleph/src/metrics/mod.rs | 4 +- finality-aleph/src/metrics/timing.rs | 147 +++++++++++------- .../src/party/manager/aggregator.rs | 12 +- finality-aleph/src/party/manager/mod.rs | 9 +- 12 files changed, 172 insertions(+), 118 deletions(-) create mode 100644 finality-aleph/src/metrics/all_block.rs diff --git a/bin/node/src/service.rs b/bin/node/src/service.rs index b5aa2d84f5..2c61b20b3c 100644 --- a/bin/node/src/service.rs +++ b/bin/node/src/service.rs @@ -7,10 +7,10 @@ use std::{ use aleph_runtime::{self, opaque::Block, RuntimeApi}; use finality_aleph::{ - run_validator_node, AlephBlockImport, AlephConfig, BlockImporter, Justification, - JustificationTranslator, MillisecsPerBlock, Protocol, ProtocolNaming, RateLimiterConfig, - RedirectingBlockImport, SessionPeriod, SubstrateChainStatus, SyncOracle, TimingBlockMetrics, - TracingBlockImport, ValidatorAddressCache, + run_validator_node, AlephBlockImport, AlephConfig, AllBlockMetrics, BlockImporter, + DefaultClock, Justification, JustificationTranslator, MillisecsPerBlock, Protocol, + ProtocolNaming, RateLimiterConfig, RedirectingBlockImport, SessionPeriod, SubstrateChainStatus, + SyncOracle, TimingBlockMetrics, TracingBlockImport, ValidatorAddressCache, }; use futures::channel::mpsc; use log::warn; @@ -92,7 +92,7 @@ pub fn new_partial( mpsc::UnboundedSender, mpsc::UnboundedReceiver, Option, - TimingBlockMetrics, + AllBlockMetrics, ), >, ServiceError, @@ -136,13 +136,17 @@ pub fn new_partial( client.clone(), ); - let metrics = match TimingBlockMetrics::new(config.prometheus_registry()) { - Ok(metrics) => metrics, + let timing_metrics = match TimingBlockMetrics::new(config.prometheus_registry(), DefaultClock) { + Ok(timing_metrics) => timing_metrics, Err(e) => { - warn!("Failed to register Prometheus metrics: {:?}.", e); + warn!( + "Failed to register Prometheus block timing metrics: {:?}.", + e + ); TimingBlockMetrics::noop() } }; + let metrics = AllBlockMetrics::new(timing_metrics); let (justification_tx, justification_rx) = mpsc::unbounded(); let tracing_block_import = TracingBlockImport::new(client.clone(), metrics.clone()); diff --git a/finality-aleph/src/block/substrate/mod.rs b/finality-aleph/src/block/substrate/mod.rs index 8f80c2b90b..dff06267f2 100644 --- a/finality-aleph/src/block/substrate/mod.rs +++ b/finality-aleph/src/block/substrate/mod.rs @@ -1,5 +1,3 @@ -use std::time::Instant; - use sc_consensus::import_queue::{ImportQueueService, IncomingBlock}; use sp_consensus::BlockOrigin; use sp_runtime::traits::{CheckedSub, Header as _, One}; @@ -7,7 +5,7 @@ use sp_runtime::traits::{CheckedSub, Header as _, One}; use crate::{ aleph_primitives::{Block, Header}, block::{Block as BlockT, BlockId, BlockImport, Header as HeaderT, UnverifiedHeader}, - metrics::Checkpoint, + metrics::{AllBlockMetrics, Checkpoint}, TimingBlockMetrics, }; @@ -61,17 +59,18 @@ impl HeaderT for Header { /// Wrapper around the trait object that we get from Substrate. pub struct BlockImporter { importer: Box>, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, } impl BlockImporter { pub fn new(importer: Box>) -> Self { Self { importer, - metrics: TimingBlockMetrics::Noop, + metrics: AllBlockMetrics::new(TimingBlockMetrics::Noop), } } - pub fn attach_metrics(&mut self, metrics: TimingBlockMetrics) { + + pub fn attach_metrics(&mut self, metrics: AllBlockMetrics) { self.metrics = metrics; } } @@ -92,8 +91,7 @@ impl BlockImport for BlockImporter { import_existing: false, state: None, }; - self.metrics - .report_block_if_not_present(hash, Instant::now(), Checkpoint::Importing); + self.metrics.report_block(hash, Checkpoint::Importing); self.importer.import_blocks(origin, vec![incoming_block]); } } diff --git a/finality-aleph/src/data_io/data_provider.rs b/finality-aleph/src/data_io/data_provider.rs index 70c2e8d3cd..d53e0ecb25 100644 --- a/finality-aleph/src/data_io/data_provider.rs +++ b/finality-aleph/src/data_io/data_provider.rs @@ -14,9 +14,9 @@ use crate::{ aleph_primitives::{BlockHash, BlockNumber}, block::UnverifiedHeader, data_io::{proposal::UnvalidatedAlephProposal, AlephData, MAX_DATA_BRANCH_LEN}, - metrics::Checkpoint, + metrics::{AllBlockMetrics, Checkpoint}, party::manager::Runnable, - BlockId, SessionBoundaries, TimingBlockMetrics, + BlockId, SessionBoundaries, }; // Reduce block header to the level given by num, by traversing down via parents. @@ -157,7 +157,7 @@ where client: Arc, session_boundaries: SessionBoundaries, config: ChainTrackerConfig, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, ) -> (Self, DataProvider) { let data_to_propose = Arc::new(Mutex::new(None)); ( @@ -318,7 +318,7 @@ where #[derive(Clone)] pub struct DataProvider { data_to_propose: Arc>>>, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, } // Honest nodes propose data in session `k` as follows: @@ -334,11 +334,8 @@ impl DataProvider { let data_to_propose = (*self.data_to_propose.lock()).take(); if let Some(data) = &data_to_propose { - self.metrics.report_block_if_not_present( - data.head_proposal.top_block().hash(), - std::time::Instant::now(), - Checkpoint::Proposed, - ); + self.metrics + .report_block(data.head_proposal.top_block().hash(), Checkpoint::Proposed); debug!(target: "aleph-data-store", "Outputting {:?} in get_data", data); }; @@ -358,6 +355,7 @@ mod tests { data_provider::{ChainTracker, ChainTrackerConfig}, DataProvider, MAX_DATA_BRANCH_LEN, }, + metrics::AllBlockMetrics, testing::{ client_chain_builder::ClientChainBuilder, mocks::{aleph_data_from_blocks, THeader, TestClientBuilder, TestClientBuilderExt}, @@ -393,7 +391,7 @@ mod tests { client, session_boundaries, config, - TimingBlockMetrics::noop(), + AllBlockMetrics::new(TimingBlockMetrics::noop()), ); let (exit_chain_tracker_tx, exit_chain_tracker_rx) = oneshot::channel(); diff --git a/finality-aleph/src/data_io/legacy/data_provider.rs b/finality-aleph/src/data_io/legacy/data_provider.rs index ae32a1d3e0..b97d319c7f 100644 --- a/finality-aleph/src/data_io/legacy/data_provider.rs +++ b/finality-aleph/src/data_io/legacy/data_provider.rs @@ -13,9 +13,9 @@ use sp_runtime::{ use crate::{ aleph_primitives::{BlockHash, BlockNumber}, data_io::legacy::{proposal::UnvalidatedAlephProposal, AlephData, MAX_DATA_BRANCH_LEN}, - metrics::Checkpoint, + metrics::{AllBlockMetrics, Checkpoint}, party::manager::Runnable, - BlockId, SessionBoundaries, TimingBlockMetrics, + BlockId, SessionBoundaries, }; // Reduce block header to the level given by num, by traversing down via parents. @@ -143,7 +143,7 @@ where client: Arc, session_boundaries: SessionBoundaries, config: ChainTrackerConfig, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, ) -> (Self, DataProvider) { let data_to_propose = Arc::new(Mutex::new(None)); ( @@ -309,7 +309,7 @@ where #[derive(Clone)] pub struct DataProvider { data_to_propose: Arc>>, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, } // Honest nodes propose data in session `k` as follows: @@ -325,9 +325,8 @@ impl DataProvider { let data_to_propose = (*self.data_to_propose.lock()).take(); if let Some(data) = &data_to_propose { - self.metrics.report_block_if_not_present( + self.metrics.report_block( *data.head_proposal.branch.last().unwrap(), - std::time::Instant::now(), Checkpoint::Proposed, ); debug!(target: "aleph-data-store", "Outputting {:?} in get_data", data); @@ -350,6 +349,7 @@ mod tests { test::aleph_data_from_blocks, DataProvider, MAX_DATA_BRANCH_LEN, }, + metrics::AllBlockMetrics, testing::{ client_chain_builder::ClientChainBuilder, mocks::{TestClientBuilder, TestClientBuilderExt}, @@ -385,7 +385,7 @@ mod tests { client, session_boundaries, config, - TimingBlockMetrics::noop(), + AllBlockMetrics::new(TimingBlockMetrics::noop()), ); let (exit_chain_tracker_tx, exit_chain_tracker_rx) = oneshot::channel(); diff --git a/finality-aleph/src/finalization.rs b/finality-aleph/src/finalization.rs index d54c207303..70adc492e5 100644 --- a/finality-aleph/src/finalization.rs +++ b/finality-aleph/src/finalization.rs @@ -1,5 +1,5 @@ use core::result::Result; -use std::{marker::PhantomData, sync::Arc, time::Instant}; +use std::{marker::PhantomData, sync::Arc}; use log::{debug, warn}; use sc_client_api::{Backend, Finalizer, HeaderBackend, LockImportRun}; @@ -11,8 +11,8 @@ use sp_runtime::{ use crate::{ aleph_primitives::{BlockHash, BlockNumber}, - metrics::Checkpoint, - BlockId, TimingBlockMetrics, + metrics::{AllBlockMetrics, Checkpoint}, + BlockId, }; pub trait BlockFinalizer { @@ -26,7 +26,7 @@ where C: HeaderBackend + LockImportRun + Finalizer, { client: Arc, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, phantom: PhantomData<(B, BE)>, } @@ -36,7 +36,7 @@ where BE: Backend, C: HeaderBackend + LockImportRun + Finalizer, { - pub(crate) fn new(client: Arc, metrics: TimingBlockMetrics) -> Self { + pub(crate) fn new(client: Arc, metrics: AllBlockMetrics) -> Self { AlephFinalizer { client, metrics, @@ -74,8 +74,7 @@ where match &update_res { Ok(_) => { debug!(target: "aleph-finality", "Successfully finalized block with hash {:?} and number {:?}. Current best: #{:?}.", hash, number, status.best_number); - self.metrics - .report_block(hash, Instant::now(), Checkpoint::Finalized); + self.metrics.report_block(hash, Checkpoint::Finalized); } Err(_) => { debug!(target: "aleph-finality", "Failed to finalize block with hash {:?} and number {:?}. Current best: #{:?}.", hash, number, status.best_number) diff --git a/finality-aleph/src/import.rs b/finality-aleph/src/import.rs index e4473a0231..673a1b96e1 100644 --- a/finality-aleph/src/import.rs +++ b/finality-aleph/src/import.rs @@ -1,7 +1,6 @@ use std::{ error::Error, fmt::{Debug, Display, Error as FmtError, Formatter}, - time::Instant, }; use futures::channel::mpsc::{self, TrySendError, UnboundedReceiver, UnboundedSender}; @@ -16,7 +15,7 @@ use crate::{ aleph_primitives::{Block, BlockHash, BlockNumber, ALEPH_ENGINE_ID}, block::substrate::{Justification, JustificationTranslator, TranslateError}, justification::{backwards_compatible_decode, DecodeError}, - metrics::{Checkpoint, TimingBlockMetrics}, + metrics::{AllBlockMetrics, Checkpoint}, BlockId, }; @@ -28,17 +27,18 @@ where I: BlockImport + Send + Sync, { inner: I, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, } impl TracingBlockImport where I: BlockImport + Send + Sync, { - pub fn new(inner: I, metrics: TimingBlockMetrics) -> Self { + pub fn new(inner: I, metrics: AllBlockMetrics) -> Self { TracingBlockImport { inner, metrics } } } + #[async_trait::async_trait] impl BlockImport for TracingBlockImport where @@ -60,14 +60,12 @@ where let post_hash = block.post_hash(); // Self-created blocks are imported without using the import queue, // so we need to report them here. - self.metrics - .report_block_if_not_present(post_hash, Instant::now(), Checkpoint::Importing); + self.metrics.report_block(post_hash, Checkpoint::Importing); let result = self.inner.import_block(block).await; if let Ok(ImportResult::Imported(_)) = &result { - self.metrics - .report_block(post_hash, Instant::now(), Checkpoint::Imported); + self.metrics.report_block(post_hash, Checkpoint::Imported); } result } diff --git a/finality-aleph/src/lib.rs b/finality-aleph/src/lib.rs index 138988cfa9..fa521f66f5 100644 --- a/finality-aleph/src/lib.rs +++ b/finality-aleph/src/lib.rs @@ -69,7 +69,7 @@ pub use crate::{ }, import::{AlephBlockImport, RedirectingBlockImport, TracingBlockImport}, justification::AlephJustification, - metrics::TimingBlockMetrics, + metrics::{AllBlockMetrics, DefaultClock, TimingBlockMetrics}, network::{ address_cache::{ValidatorAddressCache, ValidatorAddressingInfo}, Protocol, ProtocolNaming, @@ -261,7 +261,7 @@ pub struct AlephConfig { pub keystore: Arc, pub justification_rx: mpsc::UnboundedReceiver, pub block_rx: mpsc::UnboundedReceiver, - pub metrics: TimingBlockMetrics, + pub metrics: AllBlockMetrics, pub registry: Option, pub session_period: SessionPeriod, pub millisecs_per_block: MillisecsPerBlock, diff --git a/finality-aleph/src/metrics/all_block.rs b/finality-aleph/src/metrics/all_block.rs new file mode 100644 index 0000000000..fd4cc53ecd --- /dev/null +++ b/finality-aleph/src/metrics/all_block.rs @@ -0,0 +1,21 @@ +use primitives::BlockHash; + +use super::{timing::DefaultClock, Checkpoint}; +use crate::TimingBlockMetrics; + +/// Wrapper around various block-related metrics. +#[derive(Clone)] +pub struct AllBlockMetrics { + timing_metrics: TimingBlockMetrics, +} + +impl AllBlockMetrics { + pub fn new(timing_metrics: TimingBlockMetrics) -> Self { + AllBlockMetrics { timing_metrics } + } + + /// Triggers all contained block metrics. + pub fn report_block(&self, hash: BlockHash, checkpoint: Checkpoint) { + self.timing_metrics.report_block(hash, checkpoint); + } +} diff --git a/finality-aleph/src/metrics/mod.rs b/finality-aleph/src/metrics/mod.rs index ca25495d66..7475560f9e 100644 --- a/finality-aleph/src/metrics/mod.rs +++ b/finality-aleph/src/metrics/mod.rs @@ -1,6 +1,8 @@ +mod all_block; mod chain_state; mod timing; +pub use all_block::AllBlockMetrics; pub use chain_state::run_chain_state_metrics; -pub use timing::{Checkpoint, TimingBlockMetrics}; +pub use timing::{Checkpoint, DefaultClock, TimingBlockMetrics}; const LOG_TARGET: &str = "aleph-metrics"; diff --git a/finality-aleph/src/metrics/timing.rs b/finality-aleph/src/metrics/timing.rs index 74621f58b4..9540130d52 100644 --- a/finality-aleph/src/metrics/timing.rs +++ b/finality-aleph/src/metrics/timing.rs @@ -16,6 +16,18 @@ use substrate_prometheus_endpoint::{ use crate::{aleph_primitives::BlockHash, metrics::LOG_TARGET, Display}; +pub trait Clock { + fn now(&self) -> Instant; +} + +#[derive(Clone)] +pub struct DefaultClock; +impl Clock for DefaultClock { + fn now(&self) -> Instant { + Instant::now() + } +} + // How many entries (block hash + timestamp) we keep in memory per one checkpoint type. // Each entry takes 32B (Hash) + 16B (Instant), so a limit of 5000 gives ~234kB (per checkpoint). // Notice that some issues like finalization stall may lead to incomplete metrics @@ -23,17 +35,18 @@ use crate::{aleph_primitives::BlockHash, metrics::LOG_TARGET, Display}; const MAX_BLOCKS_PER_CHECKPOINT: usize = 5000; #[derive(Clone)] -pub enum TimingBlockMetrics { +pub enum TimingBlockMetrics { Prometheus { time_since_prev_checkpoint: HashMap, imported_to_finalized: Histogram, starts: Arc>>>, + clock: C, }, Noop, } -impl TimingBlockMetrics { - pub fn new(registry: Option<&Registry>) -> Result { +impl TimingBlockMetrics { + pub fn new(registry: Option<&Registry>, clock: C) -> Result { use Checkpoint::*; let keys = [Importing, Imported, Proposed, Ordered, Finalized]; let target_time_since_prev_checkpoint = HashMap::from([ @@ -46,7 +59,7 @@ impl TimingBlockMetrics { const BUCKETS_FACTOR: f64 = 1.5; let registry = match registry { - None => return Ok(Self::Noop), + None => return Ok(TimingBlockMetrics::Noop), Some(registry) => registry, }; @@ -77,7 +90,7 @@ impl TimingBlockMetrics { ); } - Ok(Self::Prometheus { + Ok(TimingBlockMetrics::Prometheus { time_since_prev_checkpoint, imported_to_finalized: register( Histogram::with_opts( @@ -96,59 +109,49 @@ impl TimingBlockMetrics { }) .collect(), )), + clock, }) } pub fn noop() -> Self { - Self::Noop + TimingBlockMetrics::Noop } - pub fn report_block_if_not_present( - &self, - hash: BlockHash, - checkpoint_time: Instant, - checkpoint_type: Checkpoint, - ) { - let starts = match self { + /// Reports a block at the given [`Checkpoint`] if it hasn't been done before. + pub fn report_block(&self, hash: BlockHash, checkpoint_type: Checkpoint) { + let (time_since_prev_checkpoint, imported_to_finalized, starts, clock) = match self { TimingBlockMetrics::Noop => return, - TimingBlockMetrics::Prometheus { starts, .. } => starts, + TimingBlockMetrics::Prometheus { + time_since_prev_checkpoint, + imported_to_finalized, + starts, + clock, + } => ( + time_since_prev_checkpoint, + imported_to_finalized, + starts, + clock, + ), }; - if !starts - .lock() + + let starts = &mut *starts.lock(); + let checkpoint_lru = starts .get_mut(&checkpoint_type) - .expect("All checkpoint types were initialized") - .contains(&hash) - { - self.report_block(hash, checkpoint_time, checkpoint_type); + .expect("All checkpoint types were initialized"); + if checkpoint_lru.contains(&hash) { + return; } - } - pub fn report_block( - &self, - hash: BlockHash, - checkpoint_time: Instant, - checkpoint_type: Checkpoint, - ) { + let checkpoint_time = clock.now(); trace!( target: LOG_TARGET, - "Reporting block stage: {:?} (hash: {:?}, at: {:?}", + "Reporting timing of block at stage: {:?} (hash: {:?}, time: {:?}", checkpoint_type, hash, checkpoint_time ); - let (time_since_prev_checkpoint, imported_to_finalized, starts) = match self { - TimingBlockMetrics::Noop => return, - TimingBlockMetrics::Prometheus { - time_since_prev_checkpoint, - imported_to_finalized, - starts, - } => (time_since_prev_checkpoint, imported_to_finalized, starts), - }; - let starts = &mut *starts.lock(); - starts.entry(checkpoint_type).and_modify(|starts| { - starts.put(hash, checkpoint_time); - }); + checkpoint_lru.put(hash, checkpoint_time); if let Some(prev_checkpoint_type) = checkpoint_type.prev() { if let Some(start) = starts @@ -173,6 +176,7 @@ impl TimingBlockMetrics { .observe(duration.as_secs_f64() * 1000.); } } + if checkpoint_type == Checkpoint::Finalized { if let Some(start) = starts .get_mut(&Checkpoint::Imported) @@ -263,26 +267,50 @@ fn exponential_buckets_two_sided( #[cfg(test)] mod tests { - use std::cmp::min; + use std::{cell::RefCell, cmp::min}; use Checkpoint::*; use super::*; - fn register_prometheus_metrics_with_dummy_registry() -> TimingBlockMetrics { - TimingBlockMetrics::new(Some(&Registry::new())).unwrap() + struct TestClock { + step: RefCell, + times: Vec, } - fn starts_for(m: &TimingBlockMetrics, c: Checkpoint) -> usize { + impl TestClock { + fn from_times(times: Vec) -> Self { + TestClock { + step: 0.into(), + times, + } + } + } + + impl Clock for TestClock { + fn now(&self) -> Instant { + let instant = self + .times + .get(*self.step.borrow()) + .expect("TestClock should be properly initialized"); + *self.step.borrow_mut() += 1; + *instant + } + } + + fn starts_for(m: &TimingBlockMetrics, c: Checkpoint) -> usize { match &m { TimingBlockMetrics::Prometheus { starts, .. } => starts.lock().get(&c).unwrap().len(), _ => 0, } } - fn check_reporting_with_memory_excess(metrics: &TimingBlockMetrics, checkpoint: Checkpoint) { + fn check_reporting_with_memory_excess( + metrics: &TimingBlockMetrics, + checkpoint: Checkpoint, + ) { for i in 1..(MAX_BLOCKS_PER_CHECKPOINT + 10) { - metrics.report_block(BlockHash::random(), Instant::now(), checkpoint); + metrics.report_block(BlockHash::random(), checkpoint); assert_eq!( min(i, MAX_BLOCKS_PER_CHECKPOINT), starts_for(metrics, checkpoint) @@ -292,43 +320,48 @@ mod tests { #[test] fn noop_metrics() { - let m = TimingBlockMetrics::noop(); - m.report_block(BlockHash::random(), Instant::now(), Ordered); + let m = TimingBlockMetrics::::noop(); + m.report_block(BlockHash::random(), Ordered); assert!(matches!(m, TimingBlockMetrics::Noop)); } #[test] fn should_keep_entries_up_to_defined_limit() { - let m = register_prometheus_metrics_with_dummy_registry(); + let m = TimingBlockMetrics::new(Some(&Registry::new()), DefaultClock).unwrap(); check_reporting_with_memory_excess(&m, Ordered); } #[test] fn should_manage_space_for_checkpoints_independently() { - let m = register_prometheus_metrics_with_dummy_registry(); + let m = TimingBlockMetrics::new(Some(&Registry::new()), DefaultClock).unwrap(); check_reporting_with_memory_excess(&m, Ordered); check_reporting_with_memory_excess(&m, Imported); } #[test] fn given_not_monotonic_clock_when_report_block_is_called_repeatedly_code_does_not_panic() { - let metrics = register_prometheus_metrics_with_dummy_registry(); let earlier_timestamp = Instant::now(); let later_timestamp = earlier_timestamp + Duration::new(0, 5); + let timestamps = vec![later_timestamp, earlier_timestamp]; + let test_clock = TestClock::from_times(timestamps); + let metrics = TimingBlockMetrics::new(Some(&Registry::new()), test_clock).unwrap(); + let hash = BlockHash::random(); - metrics.report_block(hash, later_timestamp, Proposed); - metrics.report_block(hash, earlier_timestamp, Ordered); + metrics.report_block(hash, Proposed); + metrics.report_block(hash, Ordered); } #[test] fn test_report_block_if_not_present() { - let metrics = register_prometheus_metrics_with_dummy_registry(); let earlier_timestamp = Instant::now(); let later_timestamp = earlier_timestamp + Duration::new(0, 5); - let hash = BlockHash::random(); + let timestamps = vec![earlier_timestamp, later_timestamp]; + let test_clock = TestClock::from_times(timestamps); + let metrics = TimingBlockMetrics::new(Some(&Registry::new()), test_clock).unwrap(); - metrics.report_block(hash, earlier_timestamp, Proposed); - metrics.report_block_if_not_present(hash, later_timestamp, Proposed); + let hash = BlockHash::random(); + metrics.report_block(hash, Proposed); + metrics.report_block(hash, Proposed); let timestamp = match &metrics { TimingBlockMetrics::Prometheus { starts, .. } => starts diff --git a/finality-aleph/src/party/manager/aggregator.rs b/finality-aleph/src/party/manager/aggregator.rs index 891b16601e..1404c043cc 100644 --- a/finality-aleph/src/party/manager/aggregator.rs +++ b/finality-aleph/src/party/manager/aggregator.rs @@ -16,7 +16,7 @@ use crate::{ block::substrate::{Justification, JustificationTranslator}, crypto::Signature, justification::AlephJustification, - metrics::Checkpoint, + metrics::{AllBlockMetrics, Checkpoint}, network::data::Network, party::{ manager::aggregator::AggregatorVersion::{Current, Legacy}, @@ -24,7 +24,7 @@ use crate::{ }, sync::JustificationSubmissions, BlockId, CurrentRmcNetworkData, Keychain, LegacyRmcNetworkData, SessionBoundaries, - TimingBlockMetrics, STATUS_REPORT_INTERVAL, + STATUS_REPORT_INTERVAL, }; /// IO channels used by the aggregator task. @@ -40,13 +40,13 @@ where async fn process_new_block_data( aggregator: &mut Aggregator<'_, CN, LN>, block: BlockId, - metrics: &TimingBlockMetrics, + metrics: &AllBlockMetrics, ) where CN: Network, LN: Network, { trace!(target: "aleph-party", "Received unit {:?} in aggregator.", block); - metrics.report_block(block.hash(), std::time::Instant::now(), Checkpoint::Ordered); + metrics.report_block(block.hash(), Checkpoint::Ordered); aggregator.start_aggregation(block.hash()).await; } @@ -88,7 +88,7 @@ async fn run_aggregator( io: IO, client: Arc, session_boundaries: &SessionBoundaries, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, mut exit_rx: oneshot::Receiver<()>, ) -> Result<(), ()> where @@ -175,7 +175,7 @@ pub fn task( client: Arc, io: IO, session_boundaries: SessionBoundaries, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, multikeychain: Keychain, version: AggregatorVersion, ) -> Task diff --git a/finality-aleph/src/party/manager/mod.rs b/finality-aleph/src/party/manager/mod.rs index 54025abf2b..880142292f 100644 --- a/finality-aleph/src/party/manager/mod.rs +++ b/finality-aleph/src/party/manager/mod.rs @@ -28,6 +28,7 @@ use crate::{ }, ChainTracker, DataStore, OrderedDataInterpreter, SubstrateChainInfoProvider, }, + metrics::AllBlockMetrics, mpsc, network::{ data::{ @@ -41,8 +42,8 @@ use crate::{ }, sync::JustificationSubmissions, AuthorityId, BlockId, CurrentRmcNetworkData, Keychain, LegacyRmcNetworkData, NodeIndex, - SessionBoundaries, SessionBoundaryInfo, SessionId, SessionPeriod, TimingBlockMetrics, - UnitCreationDelay, VersionedNetworkData, + SessionBoundaries, SessionBoundaryInfo, SessionId, SessionPeriod, UnitCreationDelay, + VersionedNetworkData, }; mod aggregator; @@ -115,7 +116,7 @@ where justifications_for_sync: JS, justification_translator: JustificationTranslator, block_requester: RB, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, spawn_handle: SpawnHandle, session_manager: SM, keystore: Arc, @@ -145,7 +146,7 @@ where justifications_for_sync: JS, justification_translator: JustificationTranslator, block_requester: RB, - metrics: TimingBlockMetrics, + metrics: AllBlockMetrics, spawn_handle: SpawnHandle, session_manager: SM, keystore: Arc,