From 8a02ee460973f5950ee3679f100eca29daf15205 Mon Sep 17 00:00:00 2001 From: Parth Desai Date: Mon, 22 Jan 2024 17:08:30 +0400 Subject: [PATCH] combining sdk and cli draft 1 --- .github/workflows/ci-tests.yml | 166 +- Cargo.lock | 7 - Cargo.toml | 4 +- sdk/.gitignore | 1 + sdk/CHANGELOG.md | 32 + sdk/Cargo.lock | 13815 ++++++++++++++++ sdk/Cargo.toml | 120 + sdk/LICENSE.md | 674 + sdk/README.md | 55 + sdk/clippy.toml | 1 + sdk/dsn/Cargo.toml | 30 + sdk/dsn/src/builder.rs | 356 + sdk/dsn/src/lib.rs | 22 + sdk/dsn/src/local_provider_record_utils.rs | 31 + sdk/examples/complete.rs | 84 + sdk/examples/mini-farmer.rs | 206 + sdk/examples/simple.rs | 40 + sdk/examples/sync.rs | 108 + sdk/farmer/Cargo.toml | 44 + sdk/farmer/build.rs | 5 + sdk/farmer/src/lib.rs | 1114 ++ sdk/node/Cargo.toml | 76 + sdk/node/src/builder.rs | 169 + sdk/node/src/chain_spec.rs | 500 + sdk/node/src/domains/builder.rs | 462 + sdk/node/src/domains/domain.rs | 49 + .../src/domains/domain_instance_starter.rs | 162 + sdk/node/src/domains/domain_node.rs | 11 + sdk/node/src/domains/evm_chain_spec.rs | 238 + .../domains/evm_domain_executor_dispatch.rs | 19 + sdk/node/src/domains/mod.rs | 7 + sdk/node/src/domains/utils.rs | 14 + sdk/node/src/lib.rs | 926 ++ sdk/rust-toolchain.toml | 5 + sdk/rustfmt.toml | 12 + sdk/src/lib.rs | 47 + sdk/substrate/Cargo.toml | 30 + sdk/substrate/build.rs | 5 + sdk/substrate/src/lib.rs | 452 + sdk/substrate/src/types.rs | 222 + sdk/tests/integration/common.rs | 184 + sdk/tests/integration/domains.rs | 34 + sdk/tests/integration/farmer.rs | 138 + sdk/tests/integration/main.rs | 19 + sdk/tests/integration/node.rs | 205 + sdk/traits/Cargo.toml | 20 + sdk/traits/src/lib.rs | 47 + sdk/utils/Cargo.toml | 46 + sdk/utils/src/lib.rs | 998 ++ 49 files changed, 21970 insertions(+), 42 deletions(-) create mode 100644 sdk/.gitignore create mode 100644 sdk/CHANGELOG.md create mode 100644 sdk/Cargo.lock create mode 100644 sdk/Cargo.toml create mode 100644 sdk/LICENSE.md create mode 100644 sdk/README.md create mode 100644 sdk/clippy.toml create mode 100644 sdk/dsn/Cargo.toml create mode 100644 sdk/dsn/src/builder.rs create mode 100644 sdk/dsn/src/lib.rs create mode 100644 sdk/dsn/src/local_provider_record_utils.rs create mode 100644 sdk/examples/complete.rs create mode 100644 sdk/examples/mini-farmer.rs create mode 100644 sdk/examples/simple.rs create mode 100644 sdk/examples/sync.rs create mode 100644 sdk/farmer/Cargo.toml create mode 100644 sdk/farmer/build.rs create mode 100644 sdk/farmer/src/lib.rs create mode 100644 sdk/node/Cargo.toml create mode 100644 sdk/node/src/builder.rs create mode 100644 sdk/node/src/chain_spec.rs create mode 100644 sdk/node/src/domains/builder.rs create mode 100644 sdk/node/src/domains/domain.rs create mode 100644 sdk/node/src/domains/domain_instance_starter.rs create mode 100644 sdk/node/src/domains/domain_node.rs create mode 100644 sdk/node/src/domains/evm_chain_spec.rs create mode 100644 sdk/node/src/domains/evm_domain_executor_dispatch.rs create mode 100644 sdk/node/src/domains/mod.rs create mode 100644 sdk/node/src/domains/utils.rs create mode 100644 sdk/node/src/lib.rs create mode 100644 sdk/rust-toolchain.toml create mode 100644 sdk/rustfmt.toml create mode 100644 sdk/src/lib.rs create mode 100644 sdk/substrate/Cargo.toml create mode 100644 sdk/substrate/build.rs create mode 100644 sdk/substrate/src/lib.rs create mode 100644 sdk/substrate/src/types.rs create mode 100644 sdk/tests/integration/common.rs create mode 100644 sdk/tests/integration/domains.rs create mode 100644 sdk/tests/integration/farmer.rs create mode 100644 sdk/tests/integration/main.rs create mode 100644 sdk/tests/integration/node.rs create mode 100644 sdk/traits/Cargo.toml create mode 100644 sdk/traits/src/lib.rs create mode 100644 sdk/utils/Cargo.toml create mode 100644 sdk/utils/src/lib.rs diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index a808113a..ed5e4ba0 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -1,14 +1,10 @@ -name: "ci tests" - +name: Rust checks and tests on: - push: - branches: - - main - paths-ignore: - - "**.md" pull_request: paths-ignore: - "**.md" + - ".gitignore" + workflow_dispatch: inputs: test-macos-and-windows: @@ -16,21 +12,34 @@ on: required: true default: false type: boolean - merge_group: - types: [checks_requested] + +concurrency: + group: push-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true env: # Not needed in CI, should make things a bit faster CARGO_INCREMENTAL: 0 CARGO_TERM_COLOR: always - # Build smaller artifacts to avoid running out of space in CI - # TODO: Try to remove once https://github.com/paritytech/substrate/issues/11538 is resolved - RUSTFLAGS: -C strip=symbols -C opt-level=s - # Remove unnecessary WASM build artefacts - WASM_BUILD_CLEAN_TARGET: 1 + MAX_TARGET_SIZE: 1024 # MB + # TODO: AES flag is such that we have decent performance on ARMv8, remove once `aes` crate bumps MSRV to at least + # 1.61: https://github.com/RustCrypto/block-ciphers/issues/373 + RUSTFLAGS: -C strip=symbols -C opt-level=s --cfg aes_armv8 jobs: - clippy-fmt-test: + fmt: + runs-on: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || 'ubuntu-22.04') }} + steps: + - name: git checkout + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + + - name: cargo fmt + uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1 + with: + command: fmt + args: --all -- --check + + clippy: strategy: fail-fast: false matrix: @@ -45,15 +54,14 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Checkout - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0 + - name: git checkout + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 # On macOS, we need a proper Clang version, not Apple's custom version without wasm32 support - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@8852e4d5c58653ed05135c0a5d949d9c2febcb00 # v1.6.1 with: version: "15.0" - if: runner.os == 'macOS' - name: Install Protoc uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0 @@ -69,35 +77,129 @@ jobs: - name: Remove msys64 run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse if: runner.os == 'Windows' - # May not exist on self-hosted runners continue-on-error: true - - name: cargo fmt - uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1 + - name: Configure cache + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # @v3.3.2 with: - command: fmt - args: --all -- --check + path: | + ~/.cargo/registry + ~/.cargo/bin + ~/.cargo/git + key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }} + restore-keys: | + ${{ runner.os }}-${{ runner.arch }}-cargo- - - name: cargo test - uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1 - with: - command: test + - name: Clean unused crate source checkouts and git repo checkouts + run: cargo cache - - name: cargo clippy --locked (Linux & Windows) - uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7 + - name: cargo clippy (Linux & Windows) + uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # v1.0.7 with: token: ${{ secrets.GITHUB_TOKEN }} args: --locked --all-targets -- -D warnings if: runner.os != 'macOS' - - name: cargo clippy --locked (macOS) + - name: cargo clippy (MacOS) uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7 with: token: ${{ secrets.GITHUB_TOKEN }} - args: --locked --all-targets --no-default-features -- -D warnings + args: --locked --no-default-features -- -D warnings if: runner.os == 'macOS' + - name: Clean unused artifacts + run: cargo sweep --maxsize ${{ env.MAX_TARGET_SIZE }} + + test: + strategy: + matrix: + os: ${{ fromJson(github.repository_owner == 'subspace' && '[["self-hosted", "ubuntu-20.04-x86-64"], ["self-hosted", "macos-12-arm64"], ["self-hosted", "windows-server-2022-x86-64"]]' || '["ubuntu-20.04", "macos-12", "windows-2022"]') }} + run-all: + - ${{ inputs.test-macos-and-windows || github.ref == 'refs/heads/master' }} + exclude: # exclude macos-12 and window-2022 when the condition is false + - run-all: false + os: macos-12 + - run-all: false + os: windows-2022 + + runs-on: ${{ matrix.os }} + + steps: + - name: git checkout + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + + # On macOS, we need a proper Clang version, not Apple's custom version without wasm32 support + - name: Install LLVM and Clang + uses: KyleMayes/install-llvm-action@8852e4d5c58653ed05135c0a5d949d9c2febcb00 # v1.6.1 + with: + version: "15.0" + if: runner.os == 'macOS' + + - name: Install Protoc + uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + # Needed for hwloc + - name: Install automake (macOS) + run: brew install automake + if: runner.os == 'macOS' + + # Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll + - name: Remove msys64 + run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse + if: runner.os == 'Windows' + continue-on-error: true + + - name: Add cache + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # @v3.3.2 + if: runner.os != 'Windows' + with: + path: | + ~/.cargo/registry + ~/.cargo/bin + ~/.cargo/git + target + key: test-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: test-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }} + + - name: Install utils for caching + if: runner.os != 'Windows' + run: | + test -x ~/.cargo/bin/cargo-sweep || cargo install cargo-sweep + test -x ~/.cargo/bin/cargo-cache || cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache + + - name: Clean unused crate source checkouts and git repo checkouts + if: runner.os != 'Windows' + run: cargo cache + + - name: Build and run tests (linux & windows) + run: cd sdk && cargo test --locked --release -- --test-threads=1 --nocapture && cd .. && cargo test --locked --release -- --test-threads=1 --nocapture + if: runner.os != 'macOS' + + - name: Build and run tests (macOS) + run: cd sdk && cargo test --locked --release --no-default-features -- --test-threads=1 --nocapture && cd .. && cargo test --locked --release --no-default-features -- --test-threads=1 --nocapture + if: runner.os == 'macOS' + + - name: Clean unused artifacts + if: runner.os != 'Windows' + run: cargo sweep --maxsize ${{ env.MAX_TARGET_SIZE }} + + docs: + runs-on: ubuntu-22.04 + steps: + - name: git checkout + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + + - name: Install Protoc + uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure cache + uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 + - name: Check Documentation - run: cargo doc --locked --all --no-deps + run: cargo doc --locked --no-deps --lib env: RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links" diff --git a/Cargo.lock b/Cargo.lock index fb99703e..0e4b5f0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10180,7 +10180,6 @@ dependencies = [ [[package]] name = "sdk-dsn" version = "0.1.0" -source = "git+https://github.com/subspace/subspace-sdk?rev=000c6c774f3dd995e783d6d78d1d59669540b454#000c6c774f3dd995e783d6d78d1d59669540b454" dependencies = [ "anyhow", "derivative", @@ -10204,7 +10203,6 @@ dependencies = [ [[package]] name = "sdk-farmer" version = "0.1.0" -source = "git+https://github.com/subspace/subspace-sdk?rev=000c6c774f3dd995e783d6d78d1d59669540b454#000c6c774f3dd995e783d6d78d1d59669540b454" dependencies = [ "anyhow", "async-trait", @@ -10238,7 +10236,6 @@ dependencies = [ [[package]] name = "sdk-node" version = "0.1.0" -source = "git+https://github.com/subspace/subspace-sdk?rev=000c6c774f3dd995e783d6d78d1d59669540b454#000c6c774f3dd995e783d6d78d1d59669540b454" dependencies = [ "anyhow", "backoff", @@ -10305,7 +10302,6 @@ dependencies = [ [[package]] name = "sdk-substrate" version = "0.1.0" -source = "git+https://github.com/subspace/subspace-sdk?rev=000c6c774f3dd995e783d6d78d1d59669540b454#000c6c774f3dd995e783d6d78d1d59669540b454" dependencies = [ "bytesize", "derivative", @@ -10329,7 +10325,6 @@ dependencies = [ [[package]] name = "sdk-traits" version = "0.1.0" -source = "git+https://github.com/subspace/subspace-sdk?rev=000c6c774f3dd995e783d6d78d1d59669540b454#000c6c774f3dd995e783d6d78d1d59669540b454" dependencies = [ "async-trait", "parking_lot 0.12.1", @@ -10343,7 +10338,6 @@ dependencies = [ [[package]] name = "sdk-utils" version = "0.1.0" -source = "git+https://github.com/subspace/subspace-sdk?rev=000c6c774f3dd995e783d6d78d1d59669540b454#000c6c774f3dd995e783d6d78d1d59669540b454" dependencies = [ "anyhow", "async-trait", @@ -12023,7 +12017,6 @@ dependencies = [ [[package]] name = "subspace-sdk" version = "0.1.0" -source = "git+https://github.com/subspace/subspace-sdk?rev=000c6c774f3dd995e783d6d78d1d59669540b454#000c6c774f3dd995e783d6d78d1d59669540b454" dependencies = [ "sdk-dsn", "sdk-farmer", diff --git a/Cargo.toml b/Cargo.toml index ca9edf9f..b3e69d36 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ single-instance = "0.3.3" sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", features = ["full_crypto"] } strum = "0.24.1" strum_macros = "0.24.3" -subspace-sdk = { git = "https://github.com/subspace/subspace-sdk", rev = "000c6c774f3dd995e783d6d78d1d59669540b454", default-features = false } +subspace-sdk = { path = "./sdk", default-features = false } thiserror = "1" tokio = { version = "1.34.0", features = ["macros", "rt-multi-thread", "tracing", "signal"] } toml = "0.7" @@ -111,7 +111,6 @@ httparse = { opt-level = 3 } integer-sqrt = { opt-level = 3 } k256 = { opt-level = 3 } keccak = { opt-level = 3 } -libm = { opt-level = 3 } libsecp256k1 = { opt-level = 3 } libz-sys = { opt-level = 3 } mio = { opt-level = 3 } @@ -132,7 +131,6 @@ subspace-core-primitives = { opt-level = 3 } subspace-archiving = { opt-level = 3 } twox-hash = { opt-level = 3 } uint = { opt-level = 3 } -wasmi = { opt-level = 3 } x25519-dalek = { opt-level = 3 } yamux = { opt-level = 3 } zeroize = { opt-level = 3 } diff --git a/sdk/.gitignore b/sdk/.gitignore new file mode 100644 index 00000000..ea8c4bf7 --- /dev/null +++ b/sdk/.gitignore @@ -0,0 +1 @@ +/target diff --git a/sdk/CHANGELOG.md b/sdk/CHANGELOG.md new file mode 100644 index 00000000..d446ed38 --- /dev/null +++ b/sdk/CHANGELOG.md @@ -0,0 +1,32 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- Added initial support for farmer + - Starting + - Farming + - Getting info + - Getting events + - Receiving new solutions + - Receiving updates on plotting progress + - Closing + - Wiping state + +- Added initial node support + - Starting + - Syncing + - Getting info + - Getting events + - Receiving new blocks + - Receiving updates on plotting progress + - Extensive customization + - Support different chain specs + - Closing + - Wiping state diff --git a/sdk/Cargo.lock b/sdk/Cargo.lock new file mode 100644 index 00000000..516e5025 --- /dev/null +++ b/sdk/Cargo.lock @@ -0,0 +1,13815 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "actix-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" +dependencies = [ + "bitflags 1.3.2", + "bytes", + "futures-core", + "futures-sink", + "memchr", + "pin-project-lite 0.2.13", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "actix-http" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92ef85799cba03f76e4f7c10f533e66d87c9a7e7055f3391f09000ad8351bc9" +dependencies = [ + "actix-codec", + "actix-rt", + "actix-service", + "actix-utils", + "ahash 0.8.6", + "base64 0.21.5", + "bitflags 2.4.1", + "brotli", + "bytes", + "bytestring", + "derive_more", + "encoding_rs", + "flate2", + "futures-core", + "h2", + "http", + "httparse", + "httpdate", + "itoa", + "language-tags", + "local-channel", + "mime", + "percent-encoding", + "pin-project-lite 0.2.13", + "rand 0.8.5", + "sha1", + "smallvec", + "tokio", + "tokio-util", + "tracing", + "zstd 0.12.4", +] + +[[package]] +name = "actix-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" +dependencies = [ + "quote", + "syn 2.0.39", +] + +[[package]] +name = "actix-router" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799" +dependencies = [ + "bytestring", + "http", + "regex", + "serde", + "tracing", +] + +[[package]] +name = "actix-rt" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" +dependencies = [ + "futures-core", + "tokio", +] + +[[package]] +name = "actix-server" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" +dependencies = [ + "actix-rt", + "actix-service", + "actix-utils", + "futures-core", + "futures-util", + "mio", + "socket2 0.5.5", + "tokio", + "tracing", +] + +[[package]] +name = "actix-service" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" +dependencies = [ + "futures-core", + "paste", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "actix-utils" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" +dependencies = [ + "local-waker", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "actix-web" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4a5b5e29603ca8c94a77c65cf874718ceb60292c5a5c3e5f4ace041af462b9" +dependencies = [ + "actix-codec", + "actix-http", + "actix-macros", + "actix-router", + "actix-rt", + "actix-server", + "actix-service", + "actix-utils", + "actix-web-codegen", + "ahash 0.8.6", + "bytes", + "bytestring", + "cfg-if", + "cookie", + "derive_more", + "encoding_rs", + "futures-core", + "futures-util", + "itoa", + "language-tags", + "log", + "mime", + "once_cell", + "pin-project-lite 0.2.13", + "regex", + "serde", + "serde_json", + "serde_urlencoded", + "smallvec", + "socket2 0.5.5", + "time", + "url", +] + +[[package]] +name = "actix-web-codegen" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" +dependencies = [ + "actix-router", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli 0.27.3", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli 0.28.0", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", +] + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array 0.14.7", +] + +[[package]] +name = "aes" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" +dependencies = [ + "aes-soft", + "aesni", + "cipher 0.2.5", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher 0.3.0", + "cpufeatures", + "opaque-debug 0.3.0", +] + +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +dependencies = [ + "aead 0.4.3", + "aes 0.7.5", + "cipher 0.3.0", + "ctr 0.8.0", + "ghash 0.4.4", + "subtle", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead 0.5.2", + "aes 0.8.3", + "cipher 0.4.4", + "ctr 0.9.2", + "ghash 0.5.0", + "subtle", +] + +[[package]] +name = "aes-soft" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + +[[package]] +name = "aesni" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + +[[package]] +name = "ahash" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom 0.2.11", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "getrandom 0.2.11", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anstream" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" + +[[package]] +name = "anstyle-parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "aquamarine" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" +dependencies = [ + "include_dir", + "itertools", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +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 = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-scale" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", +] + +[[package]] +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 = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] + +[[package]] +name = "array-bytes" +version = "6.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de17a919934ad8c5cc99a1a74de4e2dab95d6121a8f27f94755ff525b630382c" + +[[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 = "asn1-rs" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" +dependencies = [ + "asn1-rs-derive 0.1.0", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive 0.4.0", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite", + "log", + "parking", + "polling", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-oneshot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec7c75bcbcb0139e9177f30692fd617405ca4e0c27802e128d53171f7042e2c" +dependencies = [ + "futures-micro", +] + +[[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 = "asynchronous-codec" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" +dependencies = [ + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "asynchronous-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" +dependencies = [ + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "atomic" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" + +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "attohttpc" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" +dependencies = [ + "http", + "log", + "url", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "auto_impl" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "autotools" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef8da1805e028a172334c3b680f93e71126f2327622faef2ec3d893c0a4ad77" +dependencies = [ + "cc", +] + +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite 0.2.13", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "futures-core", + "getrandom 0.2.11", + "instant", + "pin-project-lite 0.2.13", + "rand 0.8.5", + "tokio", +] + +[[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 0.1.0", + "sha2 0.10.8", + "zeroize", +] + +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base58" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "beef" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" +dependencies = [ + "serde", +] + +[[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 = "blake2s_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "constant_time_eq", +] + +[[package]] +name = "blake3" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "cc", + "cfg-if", + "constant_time_eq", + "rayon", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding 0.1.5", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 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-modes" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" +dependencies = [ + "block-padding 0.2.1", + "cipher 0.2.5", +] + +[[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 = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "blst" +version = "0.3.11" +source = "git+https://github.com/supranational/blst.git#badb7f9ab4b8f14ee491b30ce33ab3867154ec89" +dependencies = [ + "cc", + "glob", + "threadpool", + "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 = "brotli" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bstr" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +dependencies = [ + "memchr", + "serde", +] + +[[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" +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" +dependencies = [ + "serde", +] + +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" + +[[package]] +name = "bytesize-serde" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86d1eb2fd2668859e9785b99700c66b7ea9fdeda35d99f95827a4e5493440178" +dependencies = [ + "bytesize", + "serde", +] + +[[package]] +name = "bytestring" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" +dependencies = [ + "bytes", +] + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" +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 = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.0.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f8e7c90afad890484a21653d08b6e209ae34770fb5ee298f9c699fcc1e5c856" +dependencies = [ + "libc", +] + +[[package]] +name = "ccm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" +dependencies = [ + "aead 0.3.2", + "cipher 0.2.5", + "subtle", +] + +[[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 = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead 0.5.2", + "chacha20", + "cipher 0.4.4", + "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", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.48.5", +] + +[[package]] +name = "ciborium" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" + +[[package]] +name = "ciborium-ll" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "cid" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" +dependencies = [ + "core2", + "multibase", + "multihash 0.17.0", + "serde", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array 0.14.7", +] + +[[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 = "clap" +version = "4.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "clap_lex" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" + +[[package]] +name = "cmake" +version = "0.1.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +dependencies = [ + "cc", +] + +[[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 = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[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 = "concurrent-queue" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console-api" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2895653b4d9f1538a83970077cb01dfc77a4810524e51a110944688e916b18e" +dependencies = [ + "prost", + "prost-types", + "tonic", + "tracing-core", +] + +[[package]] +name = "console-subscriber" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4cf42660ac07fcebed809cfe561dd8730bcd35b075215e6479c516bcd0d11cb" +dependencies = [ + "console-api", + "crossbeam-channel", + "crossbeam-utils", + "futures", + "hdrhistogram", + "humantime", + "prost-types", + "serde", + "serde_json", + "thread_local", + "tokio", + "tokio-stream", + "tonic", + "tracing", + "tracing-core", + "tracing-subscriber 0.3.18", +] + +[[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 = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cookie" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + +[[package]] +name = "core_affinity" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622892f5635ce1fc38c8f16dfc938553ed64af482edb5e150bf4caedbfcb2304" +dependencies = [ + "libc", + "num_cpus", + "winapi", +] + +[[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-bforest" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" +dependencies = [ + "cranelift-entity", +] + +[[package]] +name = "cranelift-codegen" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" +dependencies = [ + "bumpalo", + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-entity", + "cranelift-isle", + "gimli 0.27.3", + "hashbrown 0.13.2", + "log", + "regalloc2", + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cranelift-codegen-meta" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" +dependencies = [ + "cranelift-codegen-shared", +] + +[[package]] +name = "cranelift-codegen-shared" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" + +[[package]] +name = "cranelift-entity" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" +dependencies = [ + "serde", +] + +[[package]] +name = "cranelift-frontend" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" +dependencies = [ + "cranelift-codegen", + "log", + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cranelift-isle" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" + +[[package]] +name = "cranelift-native" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" +dependencies = [ + "cranelift-codegen", + "libc", + "target-lexicon", +] + +[[package]] +name = "cranelift-wasm" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" +dependencies = [ + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "itertools", + "log", + "smallvec", + "wasmparser", + "wasmtime-types", +] + +[[package]] +name = "crc" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "futures", + "is-terminal", + "itertools", + "num-traits", + "once_cell", + "oorandom", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools", +] + +[[package]] +name = "critical-section" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" + +[[package]] +name = "cross-domain-message-gossip" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "futures", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-network", + "sc-network-gossip", + "sc-transaction-pool-api", + "sc-utils", + "sp-blockchain", + "sp-core", + "sp-messenger", + "sp-runtime", + "tracing", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.0", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +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.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28f85c3514d2a6e64160359b45a3918c3b4178bcbf4ae5d03ab2d02e521c479a" +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 = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher 0.3.0", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "cty" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" + +[[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", + "zeroize", +] + +[[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 = "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" +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 = "data-encoding" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" + +[[package]] +name = "data-encoding-macro" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +dependencies = [ + "data-encoding", + "syn 1.0.109", +] + +[[package]] +name = "der" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[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 = "der-parser" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" +dependencies = [ + "asn1-rs 0.3.1", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs 0.5.2", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +dependencies = [ + "powerfmt", +] + +[[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_builder" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +dependencies = [ + "derive_builder_macro 0.11.2", +] + +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro 0.12.0", +] + +[[package]] +name = "derive_builder_core" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +dependencies = [ + "derive_builder_core 0.11.2", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core 0.12.0", + "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 = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", +] + +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + +[[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 = "directories" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "directories-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[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 = "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 0.7.8", + "walkdir", +] + +[[package]] +name = "domain-block-builder" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "parity-scale-codec", + "sc-client-api", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "tracing", +] + +[[package]] +name = "domain-block-preprocessor" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-trait", + "domain-runtime-primitives", + "parity-scale-codec", + "sc-client-api", + "sc-executor", + "sc-executor-common", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-domains", + "sp-executive", + "sp-inherents", + "sp-messenger", + "sp-runtime", + "sp-state-machine", + "sp-timestamp", + "subspace-core-primitives", + "subspace-runtime-primitives", + "tracing", +] + +[[package]] +name = "domain-client-consensus-relay-chain" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-trait", + "sc-consensus", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "domain-client-message-relayer" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-channel", + "cross-domain-message-gossip", + "futures", + "parity-scale-codec", + "sc-client-api", + "sc-state-db", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-domains", + "sp-messenger", + "sp-runtime", + "tracing", +] + +[[package]] +name = "domain-client-operator" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "domain-block-builder", + "domain-block-preprocessor", + "domain-runtime-primitives", + "futures", + "futures-timer", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-consensus", + "sc-transaction-pool", + "sc-transaction-pool-api", + "sc-utils", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-slots", + "sp-core", + "sp-domain-digests", + "sp-domains", + "sp-domains-fraud-proof", + "sp-inherents", + "sp-keystore", + "sp-messenger", + "sp-runtime", + "sp-state-machine", + "sp-transaction-pool", + "sp-trie", + "sp-weights", + "subspace-core-primitives", + "subspace-runtime-primitives", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "domain-client-subnet-gossip" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "futures", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-utils", + "sp-core", + "sp-domains", + "sp-runtime", + "subspace-runtime-primitives", + "tracing", +] + +[[package]] +name = "domain-eth-service" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "clap", + "domain-runtime-primitives", + "domain-service", + "fc-consensus", + "fc-db", + "fc-mapping-sync", + "fc-rpc", + "fc-rpc-core", + "fc-storage", + "fp-rpc", + "futures", + "jsonrpsee", + "pallet-transaction-payment-rpc", + "sc-client-api", + "sc-executor", + "sc-network-sync", + "sc-rpc", + "sc-service", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core", + "sp-inherents", + "sp-runtime", + "substrate-frame-rpc-system", +] + +[[package]] +name = "domain-pallet-executive" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-executive", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", +] + +[[package]] +name = "domain-runtime-primitives" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", + "sp-weights", + "subspace-core-primitives", + "subspace-runtime-primitives", +] + +[[package]] +name = "domain-service" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-trait", + "cross-domain-message-gossip", + "domain-block-preprocessor", + "domain-client-consensus-relay-chain", + "domain-client-message-relayer", + "domain-client-operator", + "domain-client-subnet-gossip", + "domain-runtime-primitives", + "futures", + "jsonrpsee", + "log", + "pallet-transaction-payment-rpc", + "parity-scale-codec", + "sc-chain-spec", + "sc-client-api", + "sc-consensus", + "sc-executor", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-network-transactions", + "sc-rpc", + "sc-rpc-api", + "sc-rpc-spec-v2", + "sc-service", + "sc-telemetry", + "sc-transaction-pool", + "sc-transaction-pool-api", + "sc-utils", + "serde", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-slots", + "sp-core", + "sp-domains", + "sp-domains-fraud-proof", + "sp-messenger", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-transaction-pool", + "subspace-core-primitives", + "subspace-runtime-primitives", + "substrate-build-script-utils", + "substrate-frame-rpc-system", + "substrate-prometheus-endpoint", + "tracing", +] + +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[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.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +dependencies = [ + "der 0.7.8", + "digest 0.10.7", + "elliptic-curve 0.13.6", + "rfc6979 0.4.0", + "signature 2.1.0", + "spki 0.7.2", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.1.0", +] + +[[package]] +name = "ed25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +dependencies = [ + "curve25519-dalek 4.1.1", + "ed25519", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "zeroize", +] + +[[package]] +name = "ed25519-zebra" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +dependencies = [ + "curve25519-dalek 3.2.0", + "hashbrown 0.12.3", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "elliptic-curve" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +dependencies = [ + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest 0.10.7", + "ff 0.12.1", + "generic-array 0.14.7", + "group 0.12.1", + "hkdf", + "pem-rfc7468", + "pkcs8 0.9.0", + "rand_core 0.6.4", + "sec1 0.3.0", + "subtle", + "zeroize", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" +dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.4", + "digest 0.10.7", + "ff 0.13.0", + "generic-array 0.14.7", + "group 0.13.0", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "sec1 0.7.3", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-as-inner" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "env_logger" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +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 = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a89fb87a9e103f71b903b80b670200b54cc67a07578f070681f1fffb7396fb7" +dependencies = [ + "bytes", + "ethereum-types", + "hash-db 0.15.2", + "hash256-std-hasher", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "sha3", + "triehash", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener-primitives" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5384093b4255393cc8c42f0fc3dd4f19977ad3b1025f968257854895a993028c" +dependencies = [ + "nohash-hasher", + "parking_lot 0.11.2", + "smallvec", +] + +[[package]] +name = "evm" +version = "0.39.1" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +dependencies = [ + "auto_impl", + "environmental", + "ethereum", + "evm-core", + "evm-gasometer", + "evm-runtime", + "log", + "parity-scale-codec", + "primitive-types", + "rlp", + "scale-info", + "serde", + "sha3", +] + +[[package]] +name = "evm-core" +version = "0.39.0" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "scale-info", + "serde", +] + +[[package]] +name = "evm-domain-runtime" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "domain-pallet-executive", + "domain-runtime-primitives", + "fp-account", + "fp-rpc", + "fp-self-contained", + "frame-support", + "frame-system", + "frame-system-rpc-runtime-api", + "pallet-balances", + "pallet-base-fee", + "pallet-domain-id", + "pallet-ethereum", + "pallet-evm", + "pallet-evm-chain-id", + "pallet-evm-precompile-modexp", + "pallet-evm-precompile-sha3fips", + "pallet-evm-precompile-simple", + "pallet-messenger", + "pallet-operator-rewards", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-transporter", + "parity-scale-codec", + "sc-executor", + "scale-info", + "sp-api", + "sp-block-builder", + "sp-core", + "sp-domains", + "sp-inherents", + "sp-messenger", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "subspace-core-primitives", + "subspace-runtime-primitives", + "substrate-wasm-builder", +] + +[[package]] +name = "evm-gasometer" +version = "0.39.0" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +dependencies = [ + "environmental", + "evm-core", + "evm-runtime", + "primitive-types", +] + +[[package]] +name = "evm-runtime" +version = "0.39.0" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" +dependencies = [ + "auto_impl", + "environmental", + "evm-core", + "primitive-types", + "sha3", +] + +[[package]] +name = "exit-future" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" +dependencies = [ + "futures", +] + +[[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 = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "fc-api" +version = "1.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "async-trait", + "fp-storage", + "parity-scale-codec", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "fc-consensus" +version = "2.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "async-trait", + "fp-consensus", + "fp-rpc", + "sc-consensus", + "sp-api", + "sp-block-builder", + "sp-consensus", + "sp-runtime", + "thiserror", +] + +[[package]] +name = "fc-db" +version = "2.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "async-trait", + "fc-api", + "fp-storage", + "log", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-db", + "sp-blockchain", + "sp-core", + "sp-database", + "sp-runtime", +] + +[[package]] +name = "fc-mapping-sync" +version = "2.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "fc-db", + "fc-storage", + "fp-consensus", + "fp-rpc", + "futures", + "futures-timer", + "log", + "parking_lot 0.12.1", + "sc-client-api", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-runtime", +] + +[[package]] +name = "fc-rpc" +version = "2.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "ethereum", + "ethereum-types", + "evm", + "fc-api", + "fc-mapping-sync", + "fc-rpc-core", + "fc-storage", + "fp-evm", + "fp-rpc", + "fp-storage", + "futures", + "hex", + "jsonrpsee", + "libsecp256k1", + "log", + "pallet-evm", + "parity-scale-codec", + "prometheus", + "rand 0.8.5", + "rlp", + "sc-client-api", + "sc-consensus-aura", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-rpc", + "sc-service", + "sc-transaction-pool", + "sc-transaction-pool-api", + "sc-utils", + "schnellru", + "serde", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-timestamp", + "substrate-prometheus-endpoint", + "thiserror", + "tokio", +] + +[[package]] +name = "fc-rpc-core" +version = "1.1.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "ethereum", + "ethereum-types", + "jsonrpsee", + "rustc-hex", + "serde", + "serde_json", +] + +[[package]] +name = "fc-storage" +version = "1.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "ethereum", + "ethereum-types", + "fp-rpc", + "fp-storage", + "parity-scale-codec", + "sc-client-api", + "sp-api", + "sp-blockchain", + "sp-io", + "sp-runtime", + "sp-storage", +] + +[[package]] +name = "fdlimit" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +dependencies = [ + "libc", +] + +[[package]] +name = "fdlimit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" +dependencies = [ + "libc", + "thiserror", +] + +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[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.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f69037fe1b785e84986b4f2cbcf647381876a00671d25ceef715d7812dd7e1dd" + +[[package]] +name = "file-per-thread-logger" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" +dependencies = [ + "env_logger", + "log", +] + +[[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 = "finality-grandpa" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" +dependencies = [ + "either", + "futures", + "futures-timer", + "log", + "num-traits", + "parity-scale-codec", + "parking_lot 0.12.1", + "scale-info", +] + +[[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 = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "libz-sys", + "miniz_oxide", +] + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "fork-tree" +version = "3.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "parity-scale-codec", +] + +[[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 = "fp-account" +version = "1.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "hex", + "impl-serde", + "libsecp256k1", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", +] + +[[package]] +name = "fp-consensus" +version = "2.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "ethereum", + "parity-scale-codec", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "fp-ethereum" +version = "1.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "ethereum", + "ethereum-types", + "fp-evm", + "frame-support", + "parity-scale-codec", + "sp-std", +] + +[[package]] +name = "fp-evm" +version = "3.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "evm", + "frame-support", + "num_enum 0.6.1", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "fp-rpc" +version = "3.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "ethereum", + "ethereum-types", + "fp-evm", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-std", +] + +[[package]] +name = "fp-self-contained" +version = "1.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "frame-support", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", +] + +[[package]] +name = "fp-storage" +version = "2.0.0" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "parity-scale-codec", + "serde", +] + +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + +[[package]] +name = "frame-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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-executive" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "frame-system" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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 = "frame-system-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "frame-system-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "parity-scale-codec", + "sp-api", +] + +[[package]] +name = "frame-try-runtime" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "frame-support", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "fs-err" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5fd9bcbe8b1087cbd395b51498c01bc997cef73e778a80b77a811af5e2d29f" +dependencies = [ + "autocfg", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "fs4" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +dependencies = [ + "rustix 0.38.23", + "windows-sys 0.48.0", +] + +[[package]] +name = "fs4" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" +dependencies = [ + "rustix 0.38.23", + "windows-sys 0.48.0", +] + +[[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-bounded" +version = "0.2.3" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "futures-timer", + "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-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite 0.2.13", + "waker-fn", +] + +[[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-micro" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b460264b3593d68b16a7bc35f7bc226ddfebdf9a1c8db1ed95d5cc6b7168c826" +dependencies = [ + "pin-project-lite 0.2.13", +] + +[[package]] +name = "futures-rustls" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" +dependencies = [ + "futures-io", + "rustls 0.20.9", + "webpki 0.22.4", +] + +[[package]] +name = "futures-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" +dependencies = [ + "futures-io", + "rustls 0.21.8", +] + +[[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-ticker" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9763058047f713632a52e916cc7f6a4b3fc6e9fc1ff8c5b1dc49e5a89041682e" +dependencies = [ + "futures", + "futures-timer", + "instant", +] + +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper", +] + +[[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 0.2.13", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +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 = "ghash" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +dependencies = [ + "opaque-debug 0.3.0", + "polyval 0.5.3", +] + +[[package]] +name = "ghash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +dependencies = [ + "opaque-debug 0.3.0", + "polyval 0.6.1", +] + +[[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 = "globset" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +dependencies = [ + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "gloo-net" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" + +[[package]] +name = "hash-db" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +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" +dependencies = [ + "ahash 0.8.6", + "allocator-api2", +] + +[[package]] +name = "hdrhistogram" +version = "7.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5b38e5c02b7c7be48c8dc5217c4f1634af2ea221caae2e024bffc7a7651c691" +dependencies = [ + "base64 0.13.1", + "byteorder", + "flate2", + "nom", + "num-traits", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.3" +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" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hex_fmt" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" + +[[package]] +name = "hexlit" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b6e75c860d4216ac53f9ac88b25c99eaedba075b3a7b2ed31f2adc51a74fffd" + +[[package]] +name = "hickory-proto" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner 0.6.0", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand 0.8.5", + "socket2 0.5.5", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35b8f021164e6a984c9030023544c57789c51760065cd510572fedcfb04164e8" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot 0.12.1", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "hkdf" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +dependencies = [ + "hmac 0.12.1", +] + +[[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 = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hwlocality" +version = "1.0.0-alpha.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6020affad7f95b46f12607a8714aa70bd02c8df3b3abf9ef5c8cd2f7ae57a033" +dependencies = [ + "arrayvec 0.7.4", + "bitflags 2.4.1", + "derive_more", + "errno", + "hwlocality-sys", + "libc", + "num_enum 0.7.2", + "thiserror", +] + +[[package]] +name = "hwlocality-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ecc1a90eeca65f95f08a7d32132cd4d35c9ee95ed89e32d0342a4bf7b5d644" +dependencies = [ + "autotools", + "cmake", + "flate2", + "hex-literal", + "libc", + "pkg-config", + "reqwest", + "sha3", + "tar", + "windows-sys 0.52.0", +] + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite 0.2.13", + "socket2 0.4.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls 0.21.8", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "webpki-roots 0.25.2", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite 0.2.13", + "tokio", + "tokio-io-timeout", +] + +[[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.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[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 = "if-addrs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "if-watch" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb892e5777fe09e16f3d44de7802f4daa7267ecbe8c466f19d94e25bb0c303e" +dependencies = [ + "async-io", + "core-foundation", + "fnv", + "futures", + "if-addrs", + "ipnet", + "log", + "rtnetlink", + "system-configuration", + "tokio", + "windows", +] + +[[package]] +name = "igd-next" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e065e90a518ab5fedf79aa1e4b784e10f8e484a834f6bda85c42633a2cb7af" +dependencies = [ + "async-trait", + "attohttpc", + "bytes", + "futures", + "http", + "hyper", + "log", + "rand 0.8.5", + "tokio", + "url", + "xmltree", +] + +[[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-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[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 = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "block-padding 0.3.3", + "generic-array 0.14.7", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", +] + +[[package]] +name = "interceptor" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" +dependencies = [ + "async-trait", + "bytes", + "log", + "rand 0.8.5", + "rtcp", + "rtp", + "thiserror", + "tokio", + "waitgroup", + "webrtc-srtp", + "webrtc-util", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.3", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "ip_network" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" + +[[package]] +name = "ipconfig" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +dependencies = [ + "socket2 0.5.5", + "widestring", + "windows-sys 0.48.0", + "winreg", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.3", + "rustix 0.38.23", + "windows-sys 0.48.0", +] + +[[package]] +name = "is_ci" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" + +[[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 = "jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0de374a9f8e63150e6f5e8a60cc14c668226d7a347d8aee1a45766e3c4dd3bc" +dependencies = [ + "jemalloc-sys", + "libc", +] + +[[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 = "jsonrpsee" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", + "jsonrpsee-wasm-client", + "jsonrpsee-ws-client", + "tracing", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" +dependencies = [ + "anyhow", + "futures-channel", + "futures-timer", + "futures-util", + "gloo-net", + "http", + "jsonrpsee-core", + "jsonrpsee-types", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util", + "tracing", + "webpki-roots 0.25.2", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" +dependencies = [ + "anyhow", + "arrayvec 0.7.4", + "async-lock", + "async-trait", + "beef", + "futures-channel", + "futures-timer", + "futures-util", + "globset", + "hyper", + "jsonrpsee-types", + "parking_lot 0.12.1", + "rand 0.8.5", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core", + "jsonrpsee-types", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +dependencies = [ + "heck", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" +dependencies = [ + "futures-channel", + "futures-util", + "http", + "hyper", + "jsonrpsee-core", + "jsonrpsee-types", + "serde", + "serde_json", + "soketto", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", +] + +[[package]] +name = "jsonrpsee-types" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "jsonrpsee-wasm-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5df77c8f625d36e4cfb583c5a674eccebe32403fcfe42f7ceff7fac9324dd" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" +dependencies = [ + "http", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + +[[package]] +name = "k256" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +dependencies = [ + "cfg-if", + "ecdsa 0.16.8", + "elliptic-curve 0.13.6", + "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 = "kvdb" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" +dependencies = [ + "smallvec", +] + +[[package]] +name = "kvdb-memorydb" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" +dependencies = [ + "kvdb", + "parking_lot 0.12.1", +] + +[[package]] +name = "kzg" +version = "0.1.0" +source = "git+https://github.com/sifraitech/rust-kzg?rev=c34b73916af9b8a699a74bd0186f82f25e72861c#c34b73916af9b8a699a74bd0186f82f25e72861c" +dependencies = [ + "blst", + "sha2 0.10.8", +] + +[[package]] +name = "language-tags" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" + +[[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 = "libmimalloc-sys" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" +dependencies = [ + "cc", + "cty", + "libc", +] + +[[package]] +name = "libp2p" +version = "0.51.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" +dependencies = [ + "bytes", + "futures", + "futures-timer", + "getrandom 0.2.11", + "instant", + "libp2p-allow-block-list 0.1.1", + "libp2p-connection-limits 0.1.0", + "libp2p-core 0.39.2", + "libp2p-dns 0.39.0", + "libp2p-identify 0.42.2", + "libp2p-identity 0.1.3", + "libp2p-kad 0.43.3", + "libp2p-mdns 0.43.1", + "libp2p-metrics 0.12.0", + "libp2p-noise 0.42.2", + "libp2p-ping 0.42.0", + "libp2p-quic 0.7.0-alpha.3", + "libp2p-request-response 0.24.1", + "libp2p-swarm 0.42.2", + "libp2p-tcp 0.39.0", + "libp2p-wasm-ext", + "libp2p-webrtc", + "libp2p-websocket", + "libp2p-yamux 0.43.1", + "multiaddr 0.17.1", + "pin-project", +] + +[[package]] +name = "libp2p" +version = "0.53.1" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "bytes", + "either", + "futures", + "futures-timer", + "getrandom 0.2.11", + "instant", + "libp2p-allow-block-list 0.3.0", + "libp2p-autonat", + "libp2p-connection-limits 0.3.0", + "libp2p-core 0.41.1", + "libp2p-dns 0.41.1", + "libp2p-gossipsub", + "libp2p-identify 0.44.1", + "libp2p-identity 0.2.8", + "libp2p-kad 0.45.2", + "libp2p-mdns 0.45.1", + "libp2p-metrics 0.14.1", + "libp2p-noise 0.44.0", + "libp2p-ping 0.44.0", + "libp2p-plaintext", + "libp2p-quic 0.10.1", + "libp2p-request-response 0.26.0", + "libp2p-swarm 0.44.0", + "libp2p-tcp 0.41.0", + "libp2p-upnp", + "libp2p-yamux 0.45.0", + "multiaddr 0.18.1", + "pin-project", + "rw-stream-sink 0.4.0", + "thiserror", +] + +[[package]] +name = "libp2p-allow-block-list" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" +dependencies = [ + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "void", +] + +[[package]] +name = "libp2p-allow-block-list" +version = "0.3.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.44.0", + "void", +] + +[[package]] +name = "libp2p-autonat" +version = "0.12.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "async-trait", + "asynchronous-codec 0.7.0", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-request-response 0.26.0", + "libp2p-swarm 0.44.0", + "quick-protobuf", + "quick-protobuf-codec 0.3.0", + "rand 0.8.5", + "tracing", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +dependencies = [ + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.3.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.44.0", + "void", +] + +[[package]] +name = "libp2p-core" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-identity 0.1.3", + "log", + "multiaddr 0.17.1", + "multihash 0.17.0", + "multistream-select 0.12.1", + "once_cell", + "parking_lot 0.12.1", + "pin-project", + "quick-protobuf", + "rand 0.8.5", + "rw-stream-sink 0.3.0", + "smallvec", + "thiserror", + "unsigned-varint 0.7.2", + "void", +] + +[[package]] +name = "libp2p-core" +version = "0.41.1" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-identity 0.2.8", + "multiaddr 0.18.1", + "multihash 0.19.1", + "multistream-select 0.13.0", + "once_cell", + "parking_lot 0.12.1", + "pin-project", + "quick-protobuf", + "rand 0.8.5", + "rw-stream-sink 0.4.0", + "serde", + "smallvec", + "thiserror", + "tracing", + "unsigned-varint 0.8.0", + "void", +] + +[[package]] +name = "libp2p-dns" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" +dependencies = [ + "futures", + "libp2p-core 0.39.2", + "log", + "parking_lot 0.12.1", + "smallvec", + "trust-dns-resolver", +] + +[[package]] +name = "libp2p-dns" +version = "0.41.1" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "async-trait", + "futures", + "hickory-resolver", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "parking_lot 0.12.1", + "smallvec", + "tracing", +] + +[[package]] +name = "libp2p-gossipsub" +version = "0.46.1" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "asynchronous-codec 0.7.0", + "base64 0.21.5", + "byteorder", + "bytes", + "either", + "fnv", + "futures", + "futures-ticker", + "getrandom 0.2.11", + "hex_fmt", + "instant", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.44.0", + "prometheus-client 0.22.0", + "quick-protobuf", + "quick-protobuf-codec 0.3.0", + "rand 0.8.5", + "regex", + "serde", + "sha2 0.10.8", + "smallvec", + "tracing", + "void", +] + +[[package]] +name = "libp2p-identify" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" +dependencies = [ + "asynchronous-codec 0.6.2", + "either", + "futures", + "futures-timer", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "log", + "lru 0.10.1", + "quick-protobuf", + "quick-protobuf-codec 0.1.0", + "smallvec", + "thiserror", + "void", +] + +[[package]] +name = "libp2p-identify" +version = "0.44.1" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "asynchronous-codec 0.7.0", + "either", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.44.0", + "lru 0.12.0", + "quick-protobuf", + "quick-protobuf-codec 0.3.0", + "smallvec", + "thiserror", + "tracing", + "void", +] + +[[package]] +name = "libp2p-identity" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" +dependencies = [ + "bs58 0.4.0", + "ed25519-dalek", + "log", + "multiaddr 0.17.1", + "multihash 0.17.0", + "quick-protobuf", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror", + "zeroize", +] + +[[package]] +name = "libp2p-identity" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" +dependencies = [ + "bs58 0.5.0", + "ed25519-dalek", + "hkdf", + "multihash 0.19.1", + "quick-protobuf", + "rand 0.8.5", + "serde", + "sha2 0.10.8", + "thiserror", + "tracing", + "zeroize", +] + +[[package]] +name = "libp2p-kad" +version = "0.43.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" +dependencies = [ + "arrayvec 0.7.4", + "asynchronous-codec 0.6.2", + "bytes", + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "log", + "quick-protobuf", + "rand 0.8.5", + "sha2 0.10.8", + "smallvec", + "thiserror", + "uint", + "unsigned-varint 0.7.2", + "void", +] + +[[package]] +name = "libp2p-kad" +version = "0.45.2" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "arrayvec 0.7.4", + "asynchronous-codec 0.7.0", + "bytes", + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.44.0", + "quick-protobuf", + "quick-protobuf-codec 0.3.0", + "rand 0.8.5", + "serde", + "sha2 0.10.8", + "smallvec", + "thiserror", + "tracing", + "uint", + "void", +] + +[[package]] +name = "libp2p-mdns" +version = "0.43.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" +dependencies = [ + "data-encoding", + "futures", + "if-watch", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "log", + "rand 0.8.5", + "smallvec", + "socket2 0.4.10", + "tokio", + "trust-dns-proto", + "void", +] + +[[package]] +name = "libp2p-mdns" +version = "0.45.1" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "data-encoding", + "futures", + "hickory-proto", + "if-watch", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.44.0", + "rand 0.8.5", + "smallvec", + "socket2 0.5.5", + "tokio", + "tracing", + "void", +] + +[[package]] +name = "libp2p-metrics" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" +dependencies = [ + "libp2p-core 0.39.2", + "libp2p-identify 0.42.2", + "libp2p-kad 0.43.3", + "libp2p-ping 0.42.0", + "libp2p-swarm 0.42.2", + "prometheus-client 0.19.0", +] + +[[package]] +name = "libp2p-metrics" +version = "0.14.1" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "futures", + "instant", + "libp2p-core 0.41.1", + "libp2p-gossipsub", + "libp2p-identify 0.44.1", + "libp2p-identity 0.2.8", + "libp2p-kad 0.45.2", + "libp2p-ping 0.44.0", + "libp2p-swarm 0.44.0", + "pin-project", + "prometheus-client 0.22.0", +] + +[[package]] +name = "libp2p-noise" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" +dependencies = [ + "bytes", + "curve25519-dalek 3.2.0", + "futures", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "log", + "once_cell", + "quick-protobuf", + "rand 0.8.5", + "sha2 0.10.8", + "snow", + "static_assertions", + "thiserror", + "x25519-dalek 1.1.1", + "zeroize", +] + +[[package]] +name = "libp2p-noise" +version = "0.44.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "asynchronous-codec 0.7.0", + "bytes", + "curve25519-dalek 4.1.1", + "futures", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "multiaddr 0.18.1", + "multihash 0.19.1", + "once_cell", + "quick-protobuf", + "rand 0.8.5", + "sha2 0.10.8", + "snow", + "static_assertions", + "thiserror", + "tracing", + "x25519-dalek 2.0.0", + "zeroize", +] + +[[package]] +name = "libp2p-ping" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" +dependencies = [ + "either", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.39.2", + "libp2p-swarm 0.42.2", + "log", + "rand 0.8.5", + "void", +] + +[[package]] +name = "libp2p-ping" +version = "0.44.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "either", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.44.0", + "rand 0.8.5", + "tracing", + "void", +] + +[[package]] +name = "libp2p-plaintext" +version = "0.41.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "asynchronous-codec 0.7.0", + "bytes", + "futures", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "quick-protobuf", + "quick-protobuf-codec 0.3.0", + "tracing", +] + +[[package]] +name = "libp2p-quic" +version = "0.7.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" +dependencies = [ + "bytes", + "futures", + "futures-timer", + "if-watch", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-tls 0.1.0", + "log", + "parking_lot 0.12.1", + "quinn-proto 0.9.6", + "rand 0.8.5", + "rustls 0.20.9", + "thiserror", + "tokio", +] + +[[package]] +name = "libp2p-quic" +version = "0.10.1" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "bytes", + "futures", + "futures-timer", + "if-watch", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-tls 0.3.0", + "parking_lot 0.12.1", + "quinn", + "rand 0.8.5", + "ring 0.16.20", + "rustls 0.21.8", + "socket2 0.5.5", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "libp2p-request-response" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" +dependencies = [ + "async-trait", + "futures", + "instant", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm 0.42.2", + "rand 0.8.5", + "smallvec", +] + +[[package]] +name = "libp2p-request-response" +version = "0.26.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "async-trait", + "futures", + "futures-bounded", + "futures-timer", + "instant", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-swarm 0.44.0", + "rand 0.8.5", + "smallvec", + "tracing", + "void", +] + +[[package]] +name = "libp2p-swarm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-swarm-derive 0.32.0", + "log", + "rand 0.8.5", + "smallvec", + "tokio", + "void", +] + +[[package]] +name = "libp2p-swarm" +version = "0.44.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "libp2p-swarm-derive 0.34.0", + "multistream-select 0.13.0", + "once_cell", + "rand 0.8.5", + "smallvec", + "tokio", + "tracing", + "void", +] + +[[package]] +name = "libp2p-swarm-derive" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" +dependencies = [ + "heck", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "libp2p-swarm-derive" +version = "0.34.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "libp2p-tcp" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" +dependencies = [ + "futures", + "futures-timer", + "if-watch", + "libc", + "libp2p-core 0.39.2", + "log", + "socket2 0.4.10", + "tokio", +] + +[[package]] +name = "libp2p-tcp" +version = "0.41.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "futures", + "futures-timer", + "if-watch", + "libc", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "socket2 0.5.5", + "tokio", + "tracing", +] + +[[package]] +name = "libp2p-tls" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" +dependencies = [ + "futures", + "futures-rustls 0.22.2", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "rcgen 0.10.0", + "ring 0.16.20", + "rustls 0.20.9", + "thiserror", + "webpki 0.22.4", + "x509-parser 0.14.0", + "yasna", +] + +[[package]] +name = "libp2p-tls" +version = "0.3.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "futures", + "futures-rustls 0.24.0", + "libp2p-core 0.41.1", + "libp2p-identity 0.2.8", + "rcgen 0.11.3", + "ring 0.16.20", + "rustls 0.21.8", + "rustls-webpki", + "thiserror", + "x509-parser 0.15.1", + "yasna", +] + +[[package]] +name = "libp2p-upnp" +version = "0.2.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "futures", + "futures-timer", + "igd-next", + "libp2p-core 0.41.1", + "libp2p-swarm 0.44.0", + "tokio", + "tracing", + "void", +] + +[[package]] +name = "libp2p-wasm-ext" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" +dependencies = [ + "futures", + "js-sys", + "libp2p-core 0.39.2", + "parity-send-wrapper", + "wasm-bindgen", + "wasm-bindgen-futures", +] + +[[package]] +name = "libp2p-webrtc" +version = "0.4.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" +dependencies = [ + "async-trait", + "asynchronous-codec 0.6.2", + "bytes", + "futures", + "futures-timer", + "hex", + "if-watch", + "libp2p-core 0.39.2", + "libp2p-identity 0.1.3", + "libp2p-noise 0.42.2", + "log", + "multihash 0.17.0", + "quick-protobuf", + "quick-protobuf-codec 0.1.0", + "rand 0.8.5", + "rcgen 0.9.3", + "serde", + "stun", + "thiserror", + "tinytemplate", + "tokio", + "tokio-util", + "webrtc", +] + +[[package]] +name = "libp2p-websocket" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" +dependencies = [ + "either", + "futures", + "futures-rustls 0.22.2", + "libp2p-core 0.39.2", + "log", + "parking_lot 0.12.1", + "quicksink", + "rw-stream-sink 0.3.0", + "soketto", + "url", + "webpki-roots 0.22.6", +] + +[[package]] +name = "libp2p-yamux" +version = "0.43.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" +dependencies = [ + "futures", + "libp2p-core 0.39.2", + "log", + "thiserror", + "yamux 0.10.2", +] + +[[package]] +name = "libp2p-yamux" +version = "0.45.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "futures", + "libp2p-core 0.41.1", + "thiserror", + "tracing", + "yamux 0.12.0", +] + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + +[[package]] +name = "libsecp256k1" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" +dependencies = [ + "arrayref", + "base64 0.13.1", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libz-sys" +version = "1.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "link-cplusplus" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" +dependencies = [ + "cc", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linked_hash_set" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" +dependencies = [ + "linked-hash-map", +] + +[[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.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" + +[[package]] +name = "local-channel" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" +dependencies = [ + "futures-core", + "futures-sink", + "local-waker", +] + +[[package]] +name = "local-waker" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" + +[[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 = "lru" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" +dependencies = [ + "hashbrown 0.13.2", +] + +[[package]] +name = "lru" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" +dependencies = [ + "hashbrown 0.14.2", +] + +[[package]] +name = "lru" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efa59af2ddfad1854ae27d75009d538d0998b4b2fd47083e743ac1a10e46c60" +dependencies = [ + "hashbrown 0.14.2", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "lz4" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] + +[[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 = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "matrixmultiply" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" +dependencies = [ + "autocfg", + "rawpointer", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + +[[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.23", +] + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memmap2" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +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 0.16.0", +] + +[[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 = "mimalloc" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c" +dependencies = [ + "libmimalloc-sys", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "mockall" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "multiaddr" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "log", + "multibase", + "multihash 0.17.0", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint 0.7.2", + "url", +] + +[[package]] +name = "multiaddr" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "libp2p-identity 0.2.8", + "multibase", + "multihash 0.19.1", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint 0.7.2", + "url", +] + +[[package]] +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + +[[package]] +name = "multihash" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" +dependencies = [ + "blake2b_simd", + "blake2s_simd", + "blake3", + "core2", + "digest 0.10.7", + "multihash-derive", + "sha2 0.10.8", + "sha3", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multihash" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +dependencies = [ + "core2", + "serde", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multihash-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" +dependencies = [ + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "multistream-select" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" +dependencies = [ + "bytes", + "futures", + "log", + "pin-project", + "smallvec", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multistream-select" +version = "0.13.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "bytes", + "futures", + "pin-project", + "smallvec", + "tracing", + "unsigned-varint 0.8.0", +] + +[[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 = "names" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" +dependencies = [ + "rand 0.8.5", +] + +[[package]] +name = "netlink-packet-core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" +dependencies = [ + "anyhow", + "byteorder", + "libc", + "netlink-packet-utils", +] + +[[package]] +name = "netlink-packet-route" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" +dependencies = [ + "anyhow", + "bitflags 1.3.2", + "byteorder", + "libc", + "netlink-packet-core", + "netlink-packet-utils", +] + +[[package]] +name = "netlink-packet-utils" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" +dependencies = [ + "anyhow", + "byteorder", + "paste", + "thiserror", +] + +[[package]] +name = "netlink-proto" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" +dependencies = [ + "bytes", + "futures", + "log", + "netlink-packet-core", + "netlink-sys", + "thiserror", + "tokio", +] + +[[package]] +name = "netlink-sys" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" +dependencies = [ + "bytes", + "futures", + "libc", + "log", + "tokio", +] + +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[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-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "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-bigint", + "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 0.3.3", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive 0.7.2", +] + +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[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 = "oid-registry" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" +dependencies = [ + "asn1-rs 0.3.1", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs 0.5.2", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +dependencies = [ + "atomic-polyfill", + "critical-section", +] + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "orml-vesting" +version = "0.4.1-dev" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", +] + +[[package]] +name = "p384" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" +dependencies = [ + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", +] + +[[package]] +name = "pallet-balances" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-base-fee" +version = "1.0.0" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "fp-evm", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "pallet-domain-id" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-domains", + "sp-runtime", +] + +[[package]] +name = "pallet-domains" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "domain-runtime-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-consensus-slots", + "sp-core", + "sp-domains", + "sp-domains-fraud-proof", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", + "subspace-core-primitives", + "subspace-runtime-primitives", +] + +[[package]] +name = "pallet-ethereum" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "ethereum", + "ethereum-types", + "evm", + "fp-consensus", + "fp-ethereum", + "fp-evm", + "fp-rpc", + "fp-storage", + "frame-support", + "frame-system", + "pallet-evm", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-evm" +version = "6.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "environmental", + "evm", + "fp-account", + "fp-evm", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex", + "hex-literal", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "rlp", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-evm-chain-id" +version = "1.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", +] + +[[package]] +name = "pallet-evm-precompile-modexp" +version = "2.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "fp-evm", + "num", +] + +[[package]] +name = "pallet-evm-precompile-sha3fips" +version = "2.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "fp-evm", + "tiny-keccak", +] + +[[package]] +name = "pallet-evm-precompile-simple" +version = "2.0.0-dev" +source = "git+https://github.com/subspace/frontier?rev=37ee45323120b21adc1d69ae7348bd0f7282eeae#37ee45323120b21adc1d69ae7348bd0f7282eeae" +dependencies = [ + "fp-evm", + "ripemd", + "sp-io", +] + +[[package]] +name = "pallet-messenger" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-domains", + "sp-messenger", + "sp-runtime", + "sp-std", + "sp-trie", +] + +[[package]] +name = "pallet-offences-subspace" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-consensus-subspace", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-operator-rewards" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-rewards" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "subspace-runtime-primitives", +] + +[[package]] +name = "pallet-runtime-configs" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-subspace" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "schnorrkel", + "serde", + "sp-consensus-slots", + "sp-consensus-subspace", + "sp-core", + "sp-runtime", + "sp-std", + "subspace-core-primitives", + "subspace-runtime-primitives", + "subspace-verification", +] + +[[package]] +name = "pallet-sudo" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "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-fees" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "subspace-runtime-primitives", +] + +[[package]] +name = "pallet-transaction-payment" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "jsonrpsee", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "pallet-transaction-payment-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "pallet-transaction-payment", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-weights", +] + +[[package]] +name = "pallet-transporter" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "domain-runtime-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-messenger", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-utility" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "parity-db" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" +dependencies = [ + "blake2", + "crc32fast", + "fs2", + "hex", + "libc", + "log", + "lz4", + "memmap2 0.5.10", + "parking_lot 0.12.1", + "rand 0.8.5", + "siphasher", + "snap", +] + +[[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-send-wrapper" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" + +[[package]] +name = "parity-wasm" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" + +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[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 0.9.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[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 0.4.1", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + +[[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 = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "pem" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3163d2912b7c3b52d651a055f2c7eec9ba5cd22d26ef75b8dd3a59980b185923" +dependencies = [ + "base64 0.21.5", + "serde", +] + +[[package]] +name = "pem-rfc7468" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.1.0", +] + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" + +[[package]] +name = "pin-project-lite" +version = "0.2.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.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der 0.6.1", + "spki 0.6.0", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.8", + "spki 0.7.2", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite 0.2.13", + "windows-sys 0.48.0", +] + +[[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 0.5.1", +] + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash 0.4.1", +] + +[[package]] +name = "polyval" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash 0.5.1", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + +[[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-rlp", + "impl-serde", + "scale-info", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +dependencies = [ + "thiserror", + "toml 0.5.11", +] + +[[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 = "prometheus" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot 0.12.1", + "thiserror", +] + +[[package]] +name = "prometheus-client" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" +dependencies = [ + "dtoa", + "itoa", + "parking_lot 0.12.1", + "prometheus-client-derive-encode", +] + +[[package]] +name = "prometheus-client" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510c4f1c9d81d556458f94c98f857748130ea9737bbd6053da497503b26ea63c" +dependencies = [ + "dtoa", + "itoa", + "parking_lot 0.12.1", + "prometheus-client-derive-encode", +] + +[[package]] +name = "prometheus-client-derive-encode" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "prost" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +dependencies = [ + "bytes", + "heck", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 1.0.109", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost", +] + +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + +[[package]] +name = "quick-protobuf-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +dependencies = [ + "asynchronous-codec 0.6.2", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "quick-protobuf-codec" +version = "0.3.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "asynchronous-codec 0.7.0", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint 0.8.0", +] + +[[package]] +name = "quicksink" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" +dependencies = [ + "futures-core", + "futures-sink", + "pin-project-lite 0.1.12", +] + +[[package]] +name = "quinn" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" +dependencies = [ + "bytes", + "futures-io", + "pin-project-lite 0.2.13", + "quinn-proto 0.10.6", + "quinn-udp", + "rustc-hash", + "rustls 0.21.8", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls 0.20.9", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki 0.22.4", +] + +[[package]] +name = "quinn-proto" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls 0.21.8", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" +dependencies = [ + "bytes", + "libc", + "socket2 0.5.5", + "tracing", + "windows-sys 0.48.0", +] + +[[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 = "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 = "rayon" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rcgen" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" +dependencies = [ + "pem 1.1.1", + "ring 0.16.20", + "time", + "x509-parser 0.13.2", + "yasna", +] + +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem 1.1.1", + "ring 0.16.20", + "time", + "yasna", +] + +[[package]] +name = "rcgen" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6" +dependencies = [ + "pem 3.0.2", + "ring 0.16.20", + "time", + "yasna", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +dependencies = [ + "getrandom 0.2.11", + "libredox", + "thiserror", +] + +[[package]] +name = "ref-cast" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "regalloc2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" +dependencies = [ + "fxhash", + "log", + "slice-group-by", + "smallvec", +] + +[[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 = "reqwest" +version = "0.11.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +dependencies = [ + "base64 0.21.5", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite 0.2.13", + "rustls 0.21.8", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.2", + "winreg", +] + +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", +] + +[[package]] +name = "rfc6979" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac 0.12.1", + "zeroize", +] + +[[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 = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +dependencies = [ + "cc", + "getrandom 0.2.11", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rlp-derive", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rs_merkle" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05225752ca6ede4cb1b73aa37ce3904affd042e98f28246f56f438ebfd47a810" +dependencies = [ + "sha2 0.10.8", +] + +[[package]] +name = "rtcp" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" +dependencies = [ + "bytes", + "thiserror", + "webrtc-util", +] + +[[package]] +name = "rtnetlink" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" +dependencies = [ + "futures", + "log", + "netlink-packet-route", + "netlink-proto", + "nix", + "thiserror", + "tokio", +] + +[[package]] +name = "rtp" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" +dependencies = [ + "async-trait", + "bytes", + "rand 0.8.5", + "serde", + "thiserror", + "webrtc-util", +] + +[[package]] +name = "rust-kzg-blst" +version = "0.1.0" +source = "git+https://github.com/sifraitech/rust-kzg?rev=c34b73916af9b8a699a74bd0186f82f25e72861c#c34b73916af9b8a699a74bd0186f82f25e72861c" +dependencies = [ + "blst", + "hex", + "kzg", + "libc", + "num_cpus", + "once_cell", + "rayon", + "smallvec", +] + +[[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 1.0.20", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[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.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb93593068e9babdad10e4fce47dc9b3ac25315a72a59766ffd9e9a71996a04" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys 0.4.11", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.1", + "log", + "ring 0.16.20", + "sct 0.6.1", + "webpki 0.21.4", +] + +[[package]] +name = "rustls" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +dependencies = [ + "log", + "ring 0.16.20", + "sct 0.7.1", + "webpki 0.22.4", +] + +[[package]] +name = "rustls" +version = "0.21.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" +dependencies = [ + "log", + "ring 0.17.5", + "rustls-webpki", + "sct 0.7.1", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.5", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.5", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "rw-stream-sink" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] + +[[package]] +name = "rw-stream-sink" +version = "0.4.0" +source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] + +[[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 = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "sc-allocator" +version = "4.1.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "log", + "sp-core", + "sp-wasm-interface", + "thiserror", +] + +[[package]] +name = "sc-basic-authorship" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "sc-block-builder", + "sc-client-api", + "sc-proposer-metrics", + "sc-telemetry", + "sc-transaction-pool-api", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-block-builder" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "parity-scale-codec", + "sc-client-api", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core", + "sp-inherents", + "sp-runtime", +] + +[[package]] +name = "sc-chain-spec" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "memmap2 0.5.10", + "sc-chain-spec-derive", + "sc-client-api", + "sc-executor", + "sc-network", + "sc-telemetry", + "serde", + "serde_json", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-state-machine", +] + +[[package]] +name = "sc-chain-spec-derive" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "sc-client-api" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "fnv", + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-executor", + "sc-transaction-pool-api", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-database", + "sp-externalities", + "sp-runtime", + "sp-state-machine", + "sp-statement-store", + "sp-storage", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-client-db" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "hash-db 0.16.0", + "kvdb", + "kvdb-memorydb", + "linked-hash-map", + "log", + "parity-db", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-state-db", + "schnellru", + "sp-arithmetic", + "sp-blockchain", + "sp-core", + "sp-database", + "sp-runtime", + "sp-state-machine", + "sp-trie", +] + +[[package]] +name = "sc-consensus" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-lock", + "async-trait", + "futures", + "futures-timer", + "libp2p-identity 0.1.3", + "log", + "mockall", + "parking_lot 0.12.1", + "sc-client-api", + "sc-utils", + "serde", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", + "substrate-prometheus-endpoint", + "thiserror", + "tokio", +] + +[[package]] +name = "sc-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-trait", + "futures", + "log", + "parity-scale-codec", + "sc-block-builder", + "sc-client-api", + "sc-consensus", + "sc-consensus-slots", + "sc-telemetry", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus-slots" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-consensus", + "sc-telemetry", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", +] + +[[package]] +name = "sc-consensus-subspace" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-trait", + "futures", + "lru 0.11.1", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rayon", + "sc-client-api", + "sc-consensus", + "sc-consensus-slots", + "sc-proof-of-time", + "sc-telemetry", + "sc-transaction-pool-api", + "sc-utils", + "schnorrkel", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-slots", + "sp-consensus-subspace", + "sp-core", + "sp-inherents", + "sp-objects", + "sp-runtime", + "subspace-archiving", + "subspace-core-primitives", + "subspace-proof-of-space", + "subspace-verification", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "sc-consensus-subspace-rpc" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-oneshot", + "futures", + "futures-timer", + "jsonrpsee", + "lru 0.11.1", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-consensus-subspace", + "sc-rpc", + "sc-utils", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-subspace", + "sp-core", + "sp-objects", + "sp-runtime", + "subspace-archiving", + "subspace-core-primitives", + "subspace-farmer-components", + "subspace-networking", + "subspace-rpc-primitives", + "tracing", +] + +[[package]] +name = "sc-executor" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-executor-common", + "sc-executor-wasmtime", + "schnellru", + "sp-api", + "sp-core", + "sp-externalities", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface", + "sp-trie", + "sp-version", + "sp-wasm-interface", + "tracing", +] + +[[package]] +name = "sc-executor-common" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "sc-allocator", + "sp-maybe-compressed-blob", + "sp-wasm-interface", + "thiserror", + "wasm-instrument", +] + +[[package]] +name = "sc-executor-wasmtime" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "anyhow", + "cfg-if", + "libc", + "log", + "rustix 0.36.17", + "sc-allocator", + "sc-executor-common", + "sp-runtime-interface", + "sp-wasm-interface", + "wasmtime", +] + +[[package]] +name = "sc-informant" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "ansi_term", + "futures", + "futures-timer", + "log", + "sc-client-api", + "sc-network", + "sc-network-common", + "sp-blockchain", + "sp-runtime", +] + +[[package]] +name = "sc-keystore" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "array-bytes", + "parking_lot 0.12.1", + "serde_json", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "thiserror", +] + +[[package]] +name = "sc-network" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "array-bytes", + "async-channel", + "async-trait", + "asynchronous-codec 0.6.2", + "atomic", + "bytes", + "either", + "fnv", + "futures", + "futures-timer", + "ip_network", + "libp2p 0.51.3", + "linked_hash_set", + "log", + "mockall", + "parity-scale-codec", + "parking_lot 0.12.1", + "partial_sort", + "pin-project", + "rand 0.8.5", + "sc-client-api", + "sc-network-common", + "sc-utils", + "serde", + "serde_json", + "smallvec", + "sp-arithmetic", + "sp-blockchain", + "sp-core", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", + "unsigned-varint 0.7.2", + "wasm-timer", + "zeroize", +] + +[[package]] +name = "sc-network-bitswap" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-channel", + "cid", + "futures", + "libp2p-identity 0.1.3", + "log", + "prost", + "prost-build", + "sc-client-api", + "sc-network", + "sp-blockchain", + "sp-runtime", + "thiserror", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "sc-network-common" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-trait", + "bitflags 1.3.2", + "futures", + "libp2p-identity 0.1.3", + "parity-scale-codec", + "prost-build", + "sc-consensus", + "sp-consensus", + "sp-consensus-grandpa", + "sp-runtime", +] + +[[package]] +name = "sc-network-gossip" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "ahash 0.8.6", + "futures", + "futures-timer", + "libp2p 0.51.3", + "log", + "sc-network", + "sc-network-common", + "schnellru", + "sp-runtime", + "substrate-prometheus-endpoint", + "tracing", +] + +[[package]] +name = "sc-network-light" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "array-bytes", + "async-channel", + "futures", + "libp2p-identity 0.1.3", + "log", + "parity-scale-codec", + "prost", + "prost-build", + "sc-client-api", + "sc-network", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + +[[package]] +name = "sc-network-sync" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "array-bytes", + "async-channel", + "async-trait", + "atomic", + "fork-tree", + "futures", + "futures-timer", + "libp2p 0.51.3", + "log", + "mockall", + "parity-scale-codec", + "prost", + "prost-build", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-common", + "sc-utils", + "schnellru", + "smallvec", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-network-transactions" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "array-bytes", + "futures", + "libp2p 0.51.3", + "log", + "parity-scale-codec", + "sc-network", + "sc-network-common", + "sc-utils", + "sp-consensus", + "sp-runtime", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-offchain" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "array-bytes", + "bytes", + "fnv", + "futures", + "futures-timer", + "hyper", + "hyper-rustls", + "libp2p 0.51.3", + "log", + "num_cpus", + "once_cell", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-client-api", + "sc-network", + "sc-network-common", + "sc-transaction-pool-api", + "sc-utils", + "sp-api", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-offchain", + "sp-runtime", + "threadpool", + "tracing", +] + +[[package]] +name = "sc-proof-of-time" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "atomic", + "core_affinity", + "derive_more", + "futures", + "lru 0.11.1", + "parity-scale-codec", + "parking_lot 0.12.1", + "rayon", + "sc-client-api", + "sc-consensus-slots", + "sc-network", + "sc-network-gossip", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-slots", + "sp-consensus-subspace", + "sp-inherents", + "sp-runtime", + "subspace-core-primitives", + "subspace-proof-of-time", + "tracing", +] + +[[package]] +name = "sc-proposer-metrics" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "log", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-rpc-api", + "sc-tracing", + "sc-transaction-pool-api", + "sc-utils", + "serde_json", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-keystore", + "sp-offchain", + "sp-rpc", + "sp-runtime", + "sp-session", + "sp-statement-store", + "sp-version", + "tokio", +] + +[[package]] +name = "sc-rpc-api" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "jsonrpsee", + "parity-scale-codec", + "sc-chain-spec", + "sc-transaction-pool-api", + "scale-info", + "serde", + "serde_json", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-version", + "thiserror", +] + +[[package]] +name = "sc-rpc-server" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "http", + "jsonrpsee", + "log", + "serde_json", + "substrate-prometheus-endpoint", + "tokio", + "tower", + "tower-http", +] + +[[package]] +name = "sc-rpc-spec-v2" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "array-bytes", + "futures", + "futures-util", + "hex", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-chain-spec", + "sc-client-api", + "sc-transaction-pool-api", + "sc-utils", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-version", + "thiserror", + "tokio", + "tokio-stream", +] + +[[package]] +name = "sc-service" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-trait", + "directories", + "exit-future", + "futures", + "futures-timer", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-client-db", + "sc-consensus", + "sc-executor", + "sc-informant", + "sc-keystore", + "sc-network", + "sc-network-bitswap", + "sc-network-common", + "sc-network-light", + "sc-network-sync", + "sc-network-transactions", + "sc-rpc", + "sc-rpc-server", + "sc-rpc-spec-v2", + "sc-sysinfo", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "sc-transaction-pool-api", + "sc-utils", + "serde", + "serde_json", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-storage", + "sp-transaction-pool", + "sp-transaction-storage-proof", + "sp-trie", + "sp-version", + "static_init", + "substrate-prometheus-endpoint", + "tempfile", + "thiserror", + "tokio", + "tracing", + "tracing-futures", +] + +[[package]] +name = "sc-state-db" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core", +] + +[[package]] +name = "sc-storage-monitor" +version = "0.1.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "clap", + "fs4 0.6.6", + "log", + "sc-client-db", + "sp-core", + "thiserror", + "tokio", +] + +[[package]] +name = "sc-subspace-block-relay" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-channel", + "async-trait", + "derive_more", + "futures", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-transaction-pool-api", + "sp-api", + "sp-consensus-subspace", + "sp-runtime", + "strum_macros 0.25.3", + "substrate-prometheus-endpoint", + "thiserror", + "tracing", +] + +[[package]] +name = "sc-subspace-chain-specs" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "sc-chain-spec", + "sc-service", + "sc-telemetry", + "serde", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "sc-sysinfo" +version = "6.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "futures", + "libc", + "log", + "rand 0.8.5", + "rand_pcg", + "regex", + "sc-telemetry", + "serde", + "serde_json", + "sp-core", + "sp-io", + "sp-std", +] + +[[package]] +name = "sc-telemetry" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "chrono", + "futures", + "libp2p 0.51.3", + "log", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "sc-utils", + "serde", + "serde_json", + "thiserror", + "wasm-timer", +] + +[[package]] +name = "sc-tracing" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "ansi_term", + "atty", + "chrono", + "lazy_static", + "libc", + "log", + "parking_lot 0.12.1", + "regex", + "rustc-hash", + "sc-client-api", + "sc-tracing-proc-macro", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-tracing", + "thiserror", + "tracing", + "tracing-log 0.1.4", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "sc-tracing-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "sc-transaction-pool" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-trait", + "futures", + "futures-timer", + "linked-hash-map", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-transaction-pool-api", + "sc-utils", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-tracing", + "sp-transaction-pool", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-transaction-pool-api" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-trait", + "futures", + "log", + "parity-scale-codec", + "serde", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + +[[package]] +name = "sc-utils" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-channel", + "futures", + "futures-timer", + "lazy_static", + "log", + "parking_lot 0.12.1", + "prometheus", + "sp-arithmetic", +] + +[[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 = "schannel" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +dependencies = [ + "windows-sys 0.48.0", +] + +[[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 = "scratch" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" + +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.5", + "untrusted 0.9.0", +] + +[[package]] +name = "sdk-dsn" +version = "0.1.0" +dependencies = [ + "anyhow", + "derivative", + "derive_builder 0.12.0", + "derive_more", + "futures", + "hex", + "parking_lot 0.12.1", + "prometheus-client 0.22.0", + "sc-client-api", + "sc-consensus-subspace", + "sdk-utils", + "serde", + "sp-blockchain", + "sp-runtime", + "subspace-farmer", + "subspace-networking", + "tracing", +] + +[[package]] +name = "sdk-farmer" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "bytesize", + "derivative", + "derive_builder 0.12.0", + "derive_more", + "futures", + "libmimalloc-sys", + "lru 0.11.1", + "parking_lot 0.12.1", + "pin-project", + "rayon", + "sdk-traits", + "sdk-utils", + "serde", + "subspace-core-primitives", + "subspace-erasure-coding", + "subspace-farmer", + "subspace-farmer-components", + "subspace-networking", + "subspace-proof-of-space", + "subspace-rpc-primitives", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "tracing-futures", +] + +[[package]] +name = "sdk-node" +version = "0.1.0" +dependencies = [ + "anyhow", + "backoff", + "cross-domain-message-gossip", + "derivative", + "derive_builder 0.12.0", + "derive_more", + "domain-client-message-relayer", + "domain-client-operator", + "domain-eth-service", + "domain-runtime-primitives", + "domain-service", + "evm-domain-runtime", + "fp-evm", + "frame-system", + "futures", + "hex-literal", + "pallet-rewards", + "pallet-subspace", + "parity-scale-codec", + "parking_lot 0.12.1", + "pin-project", + "sc-client-api", + "sc-consensus-slots", + "sc-consensus-subspace", + "sc-executor", + "sc-network", + "sc-network-sync", + "sc-rpc-api", + "sc-service", + "sc-storage-monitor", + "sc-subspace-chain-specs", + "sc-telemetry", + "sc-transaction-pool-api", + "sc-utils", + "sdk-dsn", + "sdk-substrate", + "sdk-traits", + "sdk-utils", + "serde", + "serde_json", + "sp-blockchain", + "sp-consensus", + "sp-consensus-subspace", + "sp-core", + "sp-domains", + "sp-domains-fraud-proof", + "sp-messenger", + "sp-runtime", + "sp-version", + "subspace-core-primitives", + "subspace-farmer", + "subspace-farmer-components", + "subspace-networking", + "subspace-rpc-primitives", + "subspace-runtime", + "subspace-runtime-primitives", + "subspace-service", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "sdk-substrate" +version = "0.1.0" +dependencies = [ + "bytesize", + "derivative", + "derive_builder 0.12.0", + "derive_more", + "names", + "sc-chain-spec", + "sc-executor", + "sc-informant", + "sc-network", + "sc-service", + "sc-state-db", + "sc-storage-monitor", + "sdk-utils", + "serde", + "serde_json", + "sp-runtime", + "tokio", +] + +[[package]] +name = "sdk-traits" +version = "0.1.0" +dependencies = [ + "async-trait", + "parking_lot 0.12.1", + "sc-client-api", + "sdk-dsn", + "subspace-core-primitives", + "subspace-farmer", + "subspace-proof-of-space", +] + +[[package]] +name = "sdk-utils" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "base58", + "blake2", + "bytesize", + "bytesize-serde", + "derivative", + "derive_more", + "frame-support", + "frame-system", + "futures", + "jsonrpsee-core", + "libp2p-core 0.41.1", + "parity-scale-codec", + "sc-consensus-subspace-rpc", + "sc-network", + "sc-rpc", + "sc-rpc-api", + "sc-service", + "serde", + "serde_json", + "sp-core", + "sp-core-hashing", + "sp-runtime", + "sp-storage", + "ss58-registry", + "subspace-core-primitives", + "subspace-farmer", + "subspace-rpc-primitives", + "subspace-runtime", + "subspace-runtime-primitives", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "sdp" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" +dependencies = [ + "rand 0.8.5", + "substring", + "thiserror", + "url", +] + +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct 0.1.1", + "der 0.6.1", + "generic-array 0.14.7", + "pkcs8 0.9.0", + "subtle", + "zeroize", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.8", + "generic-array 0.14.7", + "pkcs8 0.10.2", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +dependencies = [ + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +dependencies = [ + "cc", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[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 = "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 = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + +[[package]] +name = "seq-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" + +[[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_arrays" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38636132857f68ec3d5f3eb121166d2af33cb55174c4d5ff645db6165cbef0fd" +dependencies = [ + "serde", +] + +[[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 = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha-1" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.9.9" +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 = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "signature" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +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 = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "snap" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" + +[[package]] +name = "snow" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" +dependencies = [ + "aes-gcm 0.10.3", + "blake2", + "chacha20poly1305", + "curve25519-dalek 4.1.1", + "rand_core 0.6.4", + "ring 0.17.5", + "rustc_version", + "sha2 0.10.8", + "subtle", +] + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "soketto" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +dependencies = [ + "base64 0.13.1", + "bytes", + "flate2", + "futures", + "http", + "httparse", + "log", + "rand 0.8.5", + "sha-1", +] + +[[package]] +name = "sp-api" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "hash-db 0.16.0", + "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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-std", + "static_assertions", +] + +[[package]] +name = "sp-block-builder" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-blockchain" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "futures", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "schnellru", + "sp-api", + "sp-consensus", + "sp-database", + "sp-runtime", + "sp-state-machine", + "thiserror", +] + +[[package]] +name = "sp-consensus" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-trait", + "futures", + "log", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "thiserror", +] + +[[package]] +name = "sp-consensus-aura" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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-grandpa" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "finality-grandpa", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-std", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-subspace" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-trait", + "log", + "parity-scale-codec", + "scale-info", + "schnorrkel", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "sp-timestamp", + "subspace-core-primitives", + "subspace-proof-of-space", + "subspace-verification", + "thiserror", +] + +[[package]] +name = "sp-core" +version = "21.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "array-bytes", + "bandersnatch_vrfs", + "bitflags 1.3.2", + "blake2", + "bounded-collections", + "bs58 0.5.0", + "dyn-clonable", + "ed25519-zebra", + "futures", + "hash-db 0.16.0", + "hash256-std-hasher", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin 2.0.1", + "parity-scale-codec", + "parking_lot 0.12.1", + "paste", + "primitive-types", + "rand 0.8.5", + "regex", + "scale-info", + "schnorrkel", + "secp256k1", + "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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.8", + "sha3", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing-proc-macro" +version = "9.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "quote", + "sp-core-hashing", + "syn 2.0.39", +] + +[[package]] +name = "sp-database" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "kvdb", + "parking_lot 0.12.1", +] + +[[package]] +name = "sp-debug-derive" +version = "8.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "sp-domain-digests" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "parity-scale-codec", + "sp-runtime", +] + +[[package]] +name = "sp-domains" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "blake2", + "domain-runtime-primitives", + "frame-support", + "hash-db 0.16.0", + "hexlit", + "memory-db", + "parity-scale-codec", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rs_merkle", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-runtime", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-weights", + "subspace-core-primitives", + "subspace-runtime-primitives", + "trie-db", +] + +[[package]] +name = "sp-domains-fraud-proof" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "domain-block-preprocessor", + "domain-runtime-primitives", + "frame-support", + "hash-db 0.16.0", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-executor", + "scale-info", + "sp-api", + "sp-blockchain", + "sp-consensus-slots", + "sp-core", + "sp-domain-digests", + "sp-domains", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-trie", + "subspace-core-primitives", + "subspace-runtime-primitives", + "thiserror", + "trie-db", +] + +[[package]] +name = "sp-executive" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents", + "sp-std", +] + +[[package]] +name = "sp-externalities" +version = "0.19.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std", + "sp-storage", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.1.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "serde_json", + "sp-api", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-inherents" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "bytes", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "rustversion", + "secp256k1", + "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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.1", + "sp-core", + "sp-externalities", + "thiserror", +] + +[[package]] +name = "sp-maybe-compressed-blob" +version = "4.1.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "thiserror", + "zstd 0.12.4", +] + +[[package]] +name = "sp-messenger" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "frame-support", + "hash-db 0.16.0", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-core", + "sp-domains", + "sp-runtime", + "sp-std", + "sp-trie", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.1.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std", +] + +[[package]] +name = "sp-objects" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "sp-api", + "sp-std", + "subspace-core-primitives", + "subspace-runtime-primitives", +] + +[[package]] +name = "sp-offchain" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "sp-api", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "sp-panic-handler" +version = "8.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + +[[package]] +name = "sp-rpc" +version = "6.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "rustc-hash", + "serde", + "sp-core", +] + +[[package]] +name = "sp-runtime" +version = "24.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-weights", +] + +[[package]] +name = "sp-runtime-interface" +version = "17.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "sp-session" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "hash-db 0.16.0", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std", + "sp-trie", + "thiserror", + "tracing", + "trie-db", +] + +[[package]] +name = "sp-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "aes-gcm 0.10.3", + "curve25519-dalek 4.1.1", + "ed25519-dalek", + "hkdf", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sha2 0.10.8", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "thiserror", + "x25519-dalek 2.0.0", +] + +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" + +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "sp-timestamp" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-trait", + "parity-scale-codec", + "sp-inherents", + "sp-runtime", + "sp-std", + "thiserror", +] + +[[package]] +name = "sp-tracing" +version = "10.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "parity-scale-codec", + "sp-std", + "tracing", + "tracing-core", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "sp-transaction-pool" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "sp-api", + "sp-runtime", +] + +[[package]] +name = "sp-transaction-storage-proof" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-trie", +] + +[[package]] +name = "sp-trie" +version = "22.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "ahash 0.8.6", + "hash-db 0.16.0", + "hashbrown 0.13.2", + "lazy_static", + "memory-db", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "scale-info", + "schnellru", + "sp-core", + "sp-std", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-version" +version = "22.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +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/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der 0.6.1", +] + +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der 0.7.8", +] + +[[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 = "static_init" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" +dependencies = [ + "bitflags 1.3.2", + "cfg_aliases", + "libc", + "parking_lot 0.11.2", + "parking_lot_core 0.8.6", + "static_init_macro", + "winapi", +] + +[[package]] +name = "static_init_macro" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" +dependencies = [ + "cfg_aliases", + "memchr", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "strsim" +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 0.24.3", +] + +[[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 = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.39", +] + +[[package]] +name = "stun" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" +dependencies = [ + "base64 0.13.1", + "crc", + "lazy_static", + "md-5", + "rand 0.8.5", + "ring 0.16.20", + "subtle", + "thiserror", + "tokio", + "url", + "webrtc-util", +] + +[[package]] +name = "subspace-archiving" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "parity-scale-codec", + "rayon", + "serde", + "subspace-core-primitives", + "subspace-erasure-coding", + "thiserror", +] + +[[package]] +name = "subspace-core-primitives" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "blake3", + "derive_more", + "hex", + "kzg", + "num-traits", + "parity-scale-codec", + "parking_lot 0.12.1", + "rayon", + "rust-kzg-blst", + "scale-info", + "serde", + "serde_arrays", + "spin 0.9.8", + "static_assertions", + "tracing", + "uint", +] + +[[package]] +name = "subspace-erasure-coding" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "kzg", + "rust-kzg-blst", + "subspace-core-primitives", +] + +[[package]] +name = "subspace-farmer" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "anyhow", + "async-lock", + "async-trait", + "atomic", + "base58", + "blake2", + "blake3", + "bytesize", + "clap", + "criterion", + "derive_more", + "event-listener-primitives", + "fdlimit 0.3.0", + "fs4 0.7.0", + "futures", + "hex", + "hwlocality", + "jsonrpsee", + "libc", + "libmimalloc-sys", + "lru 0.11.1", + "mimalloc", + "num_cpus", + "parity-scale-codec", + "parking_lot 0.12.1", + "prometheus-client 0.22.0", + "rand 0.8.5", + "rayon", + "schnorrkel", + "serde", + "serde_json", + "ss58-registry", + "static_assertions", + "subspace-archiving", + "subspace-core-primitives", + "subspace-erasure-coding", + "subspace-farmer-components", + "subspace-metrics", + "subspace-networking", + "subspace-proof-of-space", + "subspace-rpc-primitives", + "substrate-bip39", + "supports-color", + "tempfile", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber 0.3.18", + "ulid", + "windows-sys 0.52.0", + "zeroize", +] + +[[package]] +name = "subspace-farmer-components" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-lock", + "async-trait", + "backoff", + "bitvec", + "fs2", + "futures", + "hex", + "libc", + "parity-scale-codec", + "rand 0.8.5", + "rayon", + "schnorrkel", + "serde", + "static_assertions", + "subspace-archiving", + "subspace-core-primitives", + "subspace-erasure-coding", + "subspace-proof-of-space", + "subspace-verification", + "thiserror", + "tokio", + "tracing", + "winapi", +] + +[[package]] +name = "subspace-metrics" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "actix-web", + "parking_lot 0.12.1", + "prometheus", + "prometheus-client 0.22.0", + "tracing", +] + +[[package]] +name = "subspace-networking" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "actix-web", + "async-mutex", + "async-trait", + "backoff", + "bytes", + "clap", + "derive_more", + "either", + "event-listener-primitives", + "fs2", + "futures", + "futures-timer", + "hex", + "libp2p 0.53.1", + "lru 0.11.1", + "memmap2 0.7.1", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.12.1", + "pin-project", + "prometheus-client 0.22.0", + "rand 0.8.5", + "serde", + "serde_json", + "subspace-core-primitives", + "subspace-metrics", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber 0.3.18", + "unsigned-varint 0.7.2", + "void", +] + +[[package]] +name = "subspace-proof-of-space" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "chacha20", + "derive_more", + "rayon", + "seq-macro", + "sha2 0.10.8", + "subspace-core-primitives", +] + +[[package]] +name = "subspace-proof-of-time" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "aes 0.8.3", + "subspace-core-primitives", + "thiserror", +] + +[[package]] +name = "subspace-rpc-primitives" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "hex", + "serde", + "subspace-core-primitives", + "subspace-farmer-components", + "subspace-networking", +] + +[[package]] +name = "subspace-runtime" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "domain-runtime-primitives", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "orml-vesting", + "pallet-balances", + "pallet-domains", + "pallet-messenger", + "pallet-offences-subspace", + "pallet-rewards", + "pallet-runtime-configs", + "pallet-subspace", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-fees", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-transporter", + "pallet-utility", + "parity-scale-codec", + "sc-executor", + "scale-info", + "sp-api", + "sp-block-builder", + "sp-consensus-slots", + "sp-consensus-subspace", + "sp-core", + "sp-domains", + "sp-domains-fraud-proof", + "sp-inherents", + "sp-messenger", + "sp-objects", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "static_assertions", + "subspace-core-primitives", + "subspace-runtime-primitives", + "substrate-wasm-builder", +] + +[[package]] +name = "subspace-runtime-primitives" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "pallet-transaction-payment", + "serde", + "sp-core", + "sp-runtime", + "sp-std", + "subspace-core-primitives", +] + +[[package]] +name = "subspace-sdk" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap", + "console-subscriber", + "derive_builder 0.12.0", + "derive_more", + "fdlimit 0.2.1", + "futures", + "jemallocator", + "sdk-dsn", + "sdk-farmer", + "sdk-node", + "sdk-substrate", + "sdk-utils", + "serde_json", + "static_assertions", + "subspace-farmer-components", + "subspace-proof-of-space", + "tempfile", + "tokio", + "tracing", + "tracing-futures", + "tracing-subscriber 0.3.18", +] + +[[package]] +name = "subspace-service" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "async-trait", + "atomic", + "cross-domain-message-gossip", + "domain-runtime-primitives", + "frame-system-rpc-runtime-api", + "futures", + "hex", + "jsonrpsee", + "pallet-transaction-payment-rpc", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "parking_lot 0.12.1", + "prometheus-client 0.22.0", + "sc-basic-authorship", + "sc-chain-spec", + "sc-client-api", + "sc-consensus", + "sc-consensus-slots", + "sc-consensus-subspace", + "sc-consensus-subspace-rpc", + "sc-executor", + "sc-network", + "sc-network-sync", + "sc-offchain", + "sc-proof-of-time", + "sc-rpc", + "sc-rpc-api", + "sc-rpc-spec-v2", + "sc-service", + "sc-subspace-block-relay", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "sc-transaction-pool-api", + "schnorrkel", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-slots", + "sp-consensus-subspace", + "sp-core", + "sp-domains", + "sp-domains-fraud-proof", + "sp-externalities", + "sp-objects", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-timestamp", + "sp-transaction-pool", + "static_assertions", + "subspace-archiving", + "subspace-core-primitives", + "subspace-metrics", + "subspace-networking", + "subspace-proof-of-space", + "subspace-runtime-primitives", + "substrate-frame-rpc-system", + "substrate-prometheus-endpoint", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "subspace-verification" +version = "0.1.0" +source = "git+https://github.com/subspace/subspace?rev=bd435100200b3dcce6d6f50534d52e3cd039ca8e#bd435100200b3dcce6d6f50534d52e3cd039ca8e" +dependencies = [ + "parity-scale-codec", + "schnorrkel", + "sp-arithmetic", + "subspace-archiving", + "subspace-core-primitives", + "subspace-proof-of-space", + "thiserror", +] + +[[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 = "substrate-build-script-utils" +version = "3.0.0" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" + +[[package]] +name = "substrate-frame-rpc-system" +version = "4.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "frame-system-rpc-runtime-api", + "futures", + "jsonrpsee", + "log", + "parity-scale-codec", + "sc-rpc-api", + "sc-transaction-pool-api", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.10.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "hyper", + "log", + "prometheus", + "thiserror", + "tokio", +] + +[[package]] +name = "substrate-wasm-builder" +version = "5.0.0-dev" +source = "git+https://github.com/subspace/polkadot-sdk?rev=c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c#c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" +dependencies = [ + "ansi_term", + "build-helper", + "cargo_metadata", + "filetime", + "parity-wasm", + "sp-maybe-compressed-blob", + "strum", + "tempfile", + "toml 0.7.8", + "walkdir", + "wasm-opt", +] + +[[package]] +name = "substring" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" +dependencies = [ + "autocfg", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "supports-color" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" +dependencies = [ + "is-terminal", + "is_ci", +] + +[[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 = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tar" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "target-lexicon" +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 2.0.1", + "redox_syscall 0.4.1", + "rustix 0.38.23", + "windows-sys 0.48.0", +] + +[[package]] +name = "termcolor" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + +[[package]] +name = "thiserror" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +dependencies = [ + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +dependencies = [ + "time-core", +] + +[[package]] +name = "tiny-bip39" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" +dependencies = [ + "anyhow", + "hmac 0.12.1", + "once_cell", + "pbkdf2 0.11.0", + "rand 0.8.5", + "rustc-hash", + "sha2 0.10.8", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot 0.12.1", + "pin-project-lite 0.2.13", + "signal-hook-registry", + "socket2 0.5.5", + "tokio-macros", + "tracing", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite 0.2.13", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.8", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite 0.2.13", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite 0.2.13", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tonic" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" +dependencies = [ + "async-trait", + "axum", + "base64 0.21.5", + "bytes", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite 0.2.13", + "rand 0.8.5", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +dependencies = [ + "bitflags 2.4.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite 0.2.13", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite 0.2.13", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-log" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +dependencies = [ + "ansi_term", + "chrono", + "lazy_static", + "matchers 0.0.1", + "parking_lot 0.11.2", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log 0.1.4", + "tracing-serde", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers 0.1.0", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log 0.2.0", +] + +[[package]] +name = "trie-db" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" +dependencies = [ + "hash-db 0.16.0", + "hashbrown 0.13.2", + "log", + "rustc-hex", + "smallvec", +] + +[[package]] +name = "trie-root" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" +dependencies = [ + "hash-db 0.16.0", +] + +[[package]] +name = "triehash" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" +dependencies = [ + "hash-db 0.15.2", + "rlp", +] + +[[package]] +name = "trust-dns-proto" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner 0.5.1", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.2.3", + "ipnet", + "lazy_static", + "rand 0.8.5", + "smallvec", + "socket2 0.4.10", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "trust-dns-resolver" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" +dependencies = [ + "cfg-if", + "futures-util", + "ipconfig", + "lazy_static", + "lru-cache", + "parking_lot 0.12.1", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", + "trust-dns-proto", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "tt-call" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" + +[[package]] +name = "turn" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" +dependencies = [ + "async-trait", + "base64 0.13.1", + "futures", + "log", + "md-5", + "rand 0.8.5", + "ring 0.16.20", + "stun", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "digest 0.10.7", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "ulid" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e37c4b6cbcc59a8dcd09a6429fbc7890286bcbb79215cea7b38a3c4c0921d93" +dependencies = [ + "rand 0.8.5", + "serde", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "unsigned-varint" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" +dependencies = [ + "asynchronous-codec 0.6.2", + "bytes", + "futures-io", + "futures-util", +] + +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" +dependencies = [ + "asynchronous-codec 0.7.0", + "bytes", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +dependencies = [ + "form_urlencoded", + "idna 0.4.0", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +dependencies = [ + "getrandom 0.2.11", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "waitgroup" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" +dependencies = [ + "atomic-waker", +] + +[[package]] +name = "waker-fn" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +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 = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.39", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" + +[[package]] +name = "wasm-instrument" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" +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 0.24.3", + "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 = "wasm-timer" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" +dependencies = [ + "futures", + "js-sys", + "parking_lot 0.11.2", + "pin-utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmparser" +version = "0.102.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" +dependencies = [ + "indexmap 1.9.3", + "url", +] + +[[package]] +name = "wasmtime" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" +dependencies = [ + "anyhow", + "bincode", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "object 0.30.4", + "once_cell", + "paste", + "psm", + "rayon", + "serde", + "target-lexicon", + "wasmparser", + "wasmtime-cache", + "wasmtime-cranelift", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-runtime", + "windows-sys 0.45.0", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "wasmtime-cache" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" +dependencies = [ + "anyhow", + "base64 0.21.5", + "bincode", + "directories-next", + "file-per-thread-logger", + "log", + "rustix 0.36.17", + "serde", + "sha2 0.10.8", + "toml 0.5.11", + "windows-sys 0.45.0", + "zstd 0.11.2+zstd.1.5.2", +] + +[[package]] +name = "wasmtime-cranelift" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "cranelift-native", + "cranelift-wasm", + "gimli 0.27.3", + "log", + "object 0.30.4", + "target-lexicon", + "thiserror", + "wasmparser", + "wasmtime-cranelift-shared", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli 0.27.3", + "object 0.30.4", + "target-lexicon", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-environ" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" +dependencies = [ + "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 = "wasmtime-jit" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" +dependencies = [ + "addr2line 0.19.0", + "anyhow", + "bincode", + "cfg-if", + "cpp_demangle", + "gimli 0.27.3", + "log", + "object 0.30.4", + "rustc-demangle", + "serde", + "target-lexicon", + "wasmtime-environ", + "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", + "windows-sys 0.45.0", +] + +[[package]] +name = "wasmtime-jit-debug" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" +dependencies = [ + "object 0.30.4", + "once_cell", + "rustix 0.36.17", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.45.0", +] + +[[package]] +name = "wasmtime-runtime" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "mach", + "memfd", + "memoffset 0.8.0", + "paste", + "rand 0.8.5", + "rustix 0.36.17", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-jit-debug", + "windows-sys 0.45.0", +] + +[[package]] +name = "wasmtime-types" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" +dependencies = [ + "cranelift-entity", + "serde", + "thiserror", + "wasmparser", +] + +[[package]] +name = "web-sys" +version = "0.3.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring 0.17.5", + "untrusted 0.9.0", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki 0.22.4", +] + +[[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + +[[package]] +name = "webrtc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "hex", + "interceptor", + "lazy_static", + "log", + "rand 0.8.5", + "rcgen 0.9.3", + "regex", + "ring 0.16.20", + "rtcp", + "rtp", + "rustls 0.19.1", + "sdp", + "serde", + "serde_json", + "sha2 0.10.8", + "stun", + "thiserror", + "time", + "tokio", + "turn", + "url", + "waitgroup", + "webrtc-data", + "webrtc-dtls", + "webrtc-ice", + "webrtc-mdns", + "webrtc-media", + "webrtc-sctp", + "webrtc-srtp", + "webrtc-util", +] + +[[package]] +name = "webrtc-data" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" +dependencies = [ + "bytes", + "derive_builder 0.11.2", + "log", + "thiserror", + "tokio", + "webrtc-sctp", + "webrtc-util", +] + +[[package]] +name = "webrtc-dtls" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" +dependencies = [ + "aes 0.6.0", + "aes-gcm 0.10.3", + "async-trait", + "bincode", + "block-modes", + "byteorder", + "ccm", + "curve25519-dalek 3.2.0", + "der-parser 8.2.0", + "elliptic-curve 0.12.3", + "hkdf", + "hmac 0.12.1", + "log", + "p256", + "p384", + "rand 0.8.5", + "rand_core 0.6.4", + "rcgen 0.10.0", + "ring 0.16.20", + "rustls 0.19.1", + "sec1 0.3.0", + "serde", + "sha1", + "sha2 0.10.8", + "signature 1.6.4", + "subtle", + "thiserror", + "tokio", + "webpki 0.21.4", + "webrtc-util", + "x25519-dalek 2.0.0", + "x509-parser 0.13.2", +] + +[[package]] +name = "webrtc-ice" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" +dependencies = [ + "arc-swap", + "async-trait", + "crc", + "log", + "rand 0.8.5", + "serde", + "serde_json", + "stun", + "thiserror", + "tokio", + "turn", + "url", + "uuid", + "waitgroup", + "webrtc-mdns", + "webrtc-util", +] + +[[package]] +name = "webrtc-mdns" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" +dependencies = [ + "log", + "socket2 0.4.10", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-media" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" +dependencies = [ + "byteorder", + "bytes", + "rand 0.8.5", + "rtp", + "thiserror", +] + +[[package]] +name = "webrtc-sctp" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "crc", + "log", + "rand 0.8.5", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-srtp" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" +dependencies = [ + "aead 0.4.3", + "aes 0.7.5", + "aes-gcm 0.9.4", + "async-trait", + "byteorder", + "bytes", + "ctr 0.8.0", + "hmac 0.11.0", + "log", + "rtcp", + "rtp", + "sha-1", + "subtle", + "thiserror", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-util" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" +dependencies = [ + "async-trait", + "bitflags 1.3.2", + "bytes", + "cc", + "ipnet", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.8.5", + "thiserror", + "tokio", + "winapi", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.23", +] + +[[package]] +name = "wide" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" +dependencies = [ + "bytemuck", + "safe_arch", +] + +[[package]] +name = "widestring" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +dependencies = [ + "windows-core", + "windows-targets 0.48.5", +] + +[[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 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[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]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "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-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[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_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[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_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[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_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[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_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[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_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[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_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "x25519-dalek" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" +dependencies = [ + "curve25519-dalek 3.2.0", + "rand_core 0.5.1", + "zeroize", +] + +[[package]] +name = "x25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +dependencies = [ + "curve25519-dalek 4.1.1", + "rand_core 0.6.4", + "serde", + "zeroize", +] + +[[package]] +name = "x509-parser" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" +dependencies = [ + "asn1-rs 0.3.1", + "base64 0.13.1", + "data-encoding", + "der-parser 7.0.0", + "lazy_static", + "nom", + "oid-registry 0.4.0", + "ring 0.16.20", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs 0.5.2", + "base64 0.13.1", + "data-encoding", + "der-parser 8.2.0", + "lazy_static", + "nom", + "oid-registry 0.6.1", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "x509-parser" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +dependencies = [ + "asn1-rs 0.5.2", + "data-encoding", + "der-parser 8.2.0", + "lazy_static", + "nom", + "oid-registry 0.6.1", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "xattr" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc6ab6ec1907d1a901cdbcd2bd4cb9e7d64ce5c9739cbb97d3c391acd8c7fae" +dependencies = [ + "libc", +] + +[[package]] +name = "xml-rs" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" + +[[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", +] + +[[package]] +name = "yamux" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" +dependencies = [ + "futures", + "log", + "nohash-hasher", + "parking_lot 0.12.1", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "yamux" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0329ef377816896f014435162bb3711ea7a07729c23d0960e6f8048b21b8fe91" +dependencies = [ + "futures", + "log", + "nohash-hasher", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[package]] +name = "zerocopy" +version = "0.7.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +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", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe 6.0.6", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[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/sdk/Cargo.toml b/sdk/Cargo.toml new file mode 100644 index 00000000..db8f9786 --- /dev/null +++ b/sdk/Cargo.toml @@ -0,0 +1,120 @@ +[package] +name = "subspace-sdk" +version = "0.1.0" +edition = "2021" + +[dependencies] +sdk-dsn = { path = "dsn" } +sdk-farmer = { path = "farmer", default-features = false } +sdk-node = { path = "node" } +sdk-substrate = { path = "substrate" } +sdk-utils = { path = "utils" } +static_assertions = "1.1.0" + +subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } + +# The only triple tested and confirmed as working in `jemallocator` crate is `x86_64-unknown-linux-gnu` +[target.'cfg(all(target_arch = "x86_64", target_vendor = "unknown", target_os = "linux", target_env = "gnu"))'.dev-dependencies] +jemallocator = "0.5.0" + +[target.'cfg(tokio_unstable)'.dev-dependencies] +console-subscriber = "0.1" + +[dev-dependencies] +anyhow = "1" +clap = { version = "4", features = ["derive"] } +derive_builder = "0.12" +derive_more = "0.99" +fdlimit = "0.2" +futures = "0.3" +serde_json = "1" +subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +tempfile = "3" +tokio = { version = "1.34.0", features = ["rt-multi-thread", "macros"] } +tracing = "0.1" +tracing-futures = "0.2" +tracing-subscriber = "0.3" + +# The list of dependencies below (which can be both direct and indirect dependencies) are crates +# that are suspected to be CPU-intensive, and that are unlikely to require debugging (as some of +# their debug info might be missing) or to require to be frequently recompiled. We compile these +# dependencies with `opt-level=3` even in "dev" mode in order to make "dev" mode more usable. +# The majority of these crates are cryptographic libraries. +# +# This list is ordered alphabetically. +[profile.dev.package] +bitvec = { opt-level = 3 } +blake2 = { opt-level = 3 } +blake3 = { opt-level = 3 } +blake2b_simd = { opt-level = 3 } +blst = { opt-level = 3 } +blst_rust = { opt-level = 3 } +chacha20 = { opt-level = 3 } +chacha20poly1305 = { opt-level = 3 } +cranelift-codegen = { opt-level = 3 } +cranelift-wasm = { opt-level = 3 } +crc32fast = { opt-level = 3 } +crossbeam-deque = { opt-level = 3 } +crypto-mac = { opt-level = 3 } +curve25519-dalek = { opt-level = 3 } +ed25519-zebra = { opt-level = 3 } +flate2 = { opt-level = 3 } +futures-channel = { opt-level = 3 } +hashbrown = { opt-level = 3 } +hash-db = { opt-level = 3 } +hmac = { opt-level = 3 } +httparse = { opt-level = 3 } +integer-sqrt = { opt-level = 3 } +k256 = { opt-level = 3 } +keccak = { opt-level = 3 } +kzg = { opt-level = 3 } +libsecp256k1 = { opt-level = 3 } +libz-sys = { opt-level = 3 } +mio = { opt-level = 3 } +nalgebra = { opt-level = 3 } +num-bigint = { opt-level = 3 } +parking_lot = { opt-level = 3 } +parking_lot_core = { opt-level = 3 } +percent-encoding = { opt-level = 3 } +primitive-types = { opt-level = 3 } +ring = { opt-level = 3 } +rustls = { opt-level = 3 } +secp256k1 = { opt-level = 3 } +sha2 = { opt-level = 3 } +sha3 = { opt-level = 3 } +smallvec = { opt-level = 3 } +snow = { opt-level = 3 } +subspace-archiving = { opt-level = 3 } +subspace-core-primitives = { opt-level = 3 } +subspace-erasure-coding = { opt-level = 3 } +subspace-farmer-components = { opt-level = 3 } +subspace-proof-of-space = { opt-level = 3 } +twox-hash = { opt-level = 3 } +uint = { opt-level = 3 } +x25519-dalek = { opt-level = 3 } +yamux = { opt-level = 3 } +zeroize = { opt-level = 3 } + +[workspace] +resolver = "2" +members = [ + "dsn", + "farmer", + "node", + "substrate", + "traits", + "utils", +] + +[features] +default = ["numa"] +numa = [ + "sdk-farmer/numa", +] +integration-test = [ + "sdk-utils/integration-test", + "sdk-dsn/integration-test", + "sdk-node/integration-test", + "sdk-substrate/integration-test", + "sdk-farmer/integration-test" +] diff --git a/sdk/LICENSE.md b/sdk/LICENSE.md new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/sdk/LICENSE.md @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/sdk/README.md b/sdk/README.md new file mode 100644 index 00000000..d2596ad8 --- /dev/null +++ b/sdk/README.md @@ -0,0 +1,55 @@ +# Subspace-SDK + +[![Latest Release](https://img.shields.io/github/v/release/subspace/subspace-sdk?display_name=tag&style=flat-square)](https://github.com/subspace/subspace-sdk/releases) +[![Downloads Latest](https://img.shields.io/github/downloads/subspace/subspace-sdk/latest/total?style=flat-square)](https://github.com/subspace/subspace-sdk/releases/latest) +[![Rust](https://img.shields.io/github/actions/workflow/status/subspace/subspace-sdk/push.yml?branch=master)](https://github.com/subspace/subspace-sdk/actions/workflows/push.yaml) +[![Rust Docs](https://img.shields.io/github/actions/workflow/status/subspace/subspace-sdk/rustdoc.yml?branch=master)](https://subspace.github.io/subspace-sdk) +[![Code coverage](https://img.shields.io/codecov/c/gh/subspace/subspace-sdk)](https://app.codecov.io/gh/subspace/subspace-sdk) + + + +A library for easily running a local Subspace node and/or farmer. + +## Dependencies + +You'll have to have [Rust toolchain](https://rustup.rs/) installed as well as some packages in addition (Ubuntu example): +```bash +sudo apt-get install build-essential llvm protobuf-compiler +``` + +## Simplest example + +Start a node and farmer and wait for 10 blocks being farmed. + +```rust +use futures::prelude::*; + +let node = subspace_sdk::Node::builder() + .force_authoring(true) + .role(subspace_sdk::node::Role::Authority) + // Starting a new chain + .build("node", subspace_sdk::chain_spec::dev_config().unwrap()) + .await + .unwrap(); + +let plots = [subspace_sdk::PlotDescription::new("plot", bytesize::ByteSize::mb(100)).unwrap()]; +let cache = subspace_sdk::farmer::CacheDescription::new("cache", bytesize::ByteSize::mb(10)).unwrap(); +let farmer = subspace_sdk::Farmer::builder() + .build(subspace_sdk::PublicKey::from([0; 32]), node.clone(), &plots, cache) + .await + .expect("Failed to init a farmer"); + +for plot in farmer.iter_plots().await { + let mut plotting_progress = plot.subscribe_initial_plotting_progress().await; + while plotting_progress.next().await.is_some() {} +} +tracing::info!("Initial plotting completed"); + +node.subscribe_new_blocks() + .await + .unwrap() + // Wait 10 blocks and exit + .take(10) + .for_each(|block| async move { tracing::info!(?block, "New block!") }) + .await; +``` diff --git a/sdk/clippy.toml b/sdk/clippy.toml new file mode 100644 index 00000000..cce06838 --- /dev/null +++ b/sdk/clippy.toml @@ -0,0 +1 @@ +disallowed-types = ["std::sync::Mutex", "std::sync::RwLock", "std::sync::Once", "std::sync::Condvar"] diff --git a/sdk/dsn/Cargo.toml b/sdk/dsn/Cargo.toml new file mode 100644 index 00000000..167e4f81 --- /dev/null +++ b/sdk/dsn/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "sdk-dsn" +version = "0.1.0" +edition = "2021" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1" +derivative = "2.2.0" +derive_builder = "0.12" +derive_more = "0.99" +futures = "0.3" +hex = "0.4.3" +parking_lot = "0.12" +prometheus-client = "0.22.0" +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +sdk-utils = { path = "../utils" } +serde = { version = "1", features = ["derive"] } +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e", default-features = false } +subspace-networking = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +tracing = "0.1" + +[features] +default = [] +integration-test = [ + "sdk-utils/integration-test" +] diff --git a/sdk/dsn/src/builder.rs b/sdk/dsn/src/builder.rs new file mode 100644 index 00000000..8a19cb31 --- /dev/null +++ b/sdk/dsn/src/builder.rs @@ -0,0 +1,356 @@ +use std::collections::HashSet; +use std::path::PathBuf; +use std::sync::{Arc, Weak}; + +use anyhow::Context; +use derivative::Derivative; +use derive_builder::Builder; +use derive_more::{Deref, DerefMut, Display, From}; +use futures::prelude::*; +use prometheus_client::registry::Registry; +use sc_consensus_subspace::archiver::SegmentHeadersStore; +use sdk_utils::{self, DestructorSet, Multiaddr, MultiaddrWithPeerId}; +use serde::{Deserialize, Serialize}; +use subspace_farmer::piece_cache::PieceCache as FarmerPieceCache; +use subspace_farmer::utils::readers_and_pieces::ReadersAndPieces; +use subspace_farmer::KNOWN_PEERS_CACHE_SIZE; +use subspace_networking::libp2p::metrics::Metrics; +use subspace_networking::utils::strip_peer_id; +use subspace_networking::{ + KademliaMode, KnownPeersManager, KnownPeersManagerConfig, PeerInfo, PeerInfoProvider, + PieceByIndexRequest, PieceByIndexRequestHandler, PieceByIndexResponse, + SegmentHeaderBySegmentIndexesRequestHandler, SegmentHeaderRequest, SegmentHeaderResponse, +}; + +use super::local_provider_record_utils::MaybeLocalRecordProvider; +use super::LocalRecordProvider; + +/// Wrapper with default value for listen address +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct ListenAddresses( + #[derivative(Default( + // TODO: get rid of it, once it won't be required by monorepo + value = "vec![\"/ip4/127.0.0.1/tcp/0\".parse().expect(\"Always valid\")]" + ))] + pub Vec, +); + +/// Wrapper with default value for number of incoming connections +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct InConnections(#[derivative(Default(value = "300"))] pub u32); + +/// Wrapper with default value for number of outgoing connections +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct OutConnections(#[derivative(Default(value = "150"))] pub u32); + +/// Wrapper with default value for number of target connections +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct TargetConnections(#[derivative(Default(value = "15"))] pub u32); + +/// Wrapper with default value for number of pending incoming connections +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct PendingInConnections(#[derivative(Default(value = "100"))] pub u32); + +/// Wrapper with default value for number of pending outgoing connections +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct PendingOutConnections(#[derivative(Default(value = "150"))] pub u32); + +/// Node DSN builder +#[derive(Debug, Clone, Derivative, Builder, Deserialize, Serialize, PartialEq)] +#[derivative(Default)] +#[builder(pattern = "immutable", build_fn(private, name = "_build"), name = "DsnBuilder")] +#[non_exhaustive] +pub struct Dsn { + /// Listen on some address for other nodes + #[builder(default, setter(into, strip_option))] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub provider_storage_path: Option, + /// Listen on some address for other nodes + #[builder(default, setter(into))] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub listen_addresses: ListenAddresses, + /// Boot nodes + #[builder(default)] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub boot_nodes: Vec, + /// Known external addresses + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub external_addresses: Vec, + /// Reserved nodes + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub reserved_nodes: Vec, + /// Determines whether we allow keeping non-global (private, shared, + /// loopback..) addresses in Kademlia DHT. + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub allow_non_global_addresses_in_dht: bool, + /// Defines max established incoming swarm connection limit. + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub in_connections: InConnections, + /// Defines max established outgoing swarm connection limit. + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub out_connections: OutConnections, + /// Pending incoming swarm connection limit. + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub pending_in_connections: PendingInConnections, + /// Pending outgoing swarm connection limit. + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub pending_out_connections: PendingOutConnections, + /// Defines target total (in and out) connection number for DSN that + /// should be maintained. + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub target_connections: TargetConnections, +} + +sdk_utils::generate_builder!(Dsn); + +impl DsnBuilder { + /// Dev chain configuration + pub fn dev() -> Self { + Self::new().allow_non_global_addresses_in_dht(true) + } + + /// Gemini 3g configuration + pub fn gemini_3g() -> Self { + Self::new().listen_addresses(vec![ + "/ip6/::/tcp/30433".parse().expect("hardcoded value is true"), + "/ip4/0.0.0.0/tcp/30433".parse().expect("hardcoded value is true"), + ]) + } + + /// Gemini 3g configuration + pub fn devnet() -> Self { + Self::new().listen_addresses(vec![ + "/ip6/::/tcp/30433".parse().expect("hardcoded value is true"), + "/ip4/0.0.0.0/tcp/30433".parse().expect("hardcoded value is true"), + ]) + } +} + +/// Options for DSN +pub struct DsnOptions { + /// Client to aux storage for node piece cache + pub client: Arc, + /// Path for dsn + pub base_path: PathBuf, + /// Keypair for networking + pub keypair: subspace_networking::libp2p::identity::Keypair, + /// Get piece by hash handler + pub get_piece_by_index: PieceByIndex, + /// Get segment header by segment indexes handler + pub get_segment_header_by_segment_indexes: SegmentHeaderByIndexes, + /// Segment header store + pub segment_header_store: SegmentHeadersStore, + /// Is libp2p metrics enabled + pub is_metrics_enabled: bool, +} + +/// Shared Dsn structure between node and farmer +#[derive(Derivative)] +#[derivative(Debug)] +pub struct DsnShared { + /// Dsn node + pub node: subspace_networking::Node, + /// Farmer readers and pieces + pub farmer_readers_and_pieces: Arc>>, + /// Farmer piece cache + pub farmer_piece_cache: Arc>>, + _destructors: DestructorSet, +} + +impl Dsn { + /// Build dsn + pub fn build_dsn( + self, + options: DsnOptions, + ) -> anyhow::Result<( + DsnShared, + subspace_networking::NodeRunner, + Option, + )> + where + B: sp_runtime::traits::Block, + C: sc_client_api::AuxStore + sp_blockchain::HeaderBackend + Send + Sync + 'static, + PieceByIndex: Fn( + &PieceByIndexRequest, + Weak>>, + Arc>>, + ) -> F1 + + Send + + Sync + + 'static, + F1: Future> + Send + 'static, + SegmentHeaderByIndexes: Fn(&SegmentHeaderRequest, &SegmentHeadersStore) -> Option + + Send + + Sync + + 'static, + { + let DsnOptions { + client, + base_path, + keypair, + get_piece_by_index, + get_segment_header_by_segment_indexes, + segment_header_store, + is_metrics_enabled, + } = options; + let farmer_readers_and_pieces = Arc::new(parking_lot::Mutex::new(None)); + let protocol_version = hex::encode(client.info().genesis_hash); + let farmer_piece_cache = Arc::new(parking_lot::RwLock::new(None)); + let local_records_provider = MaybeLocalRecordProvider::new(farmer_piece_cache.clone()); + + let mut metrics_registry = Registry::default(); + let metrics = is_metrics_enabled.then(|| Metrics::new(&mut metrics_registry)); + + tracing::debug!(genesis_hash = protocol_version, "Setting DSN protocol version..."); + + let Self { + listen_addresses, + reserved_nodes, + allow_non_global_addresses_in_dht, + provider_storage_path: _, + in_connections: InConnections(max_established_incoming_connections), + out_connections: OutConnections(max_established_outgoing_connections), + target_connections: TargetConnections(target_connections), + pending_in_connections: PendingInConnections(max_pending_incoming_connections), + pending_out_connections: PendingOutConnections(max_pending_outgoing_connections), + boot_nodes, + external_addresses, + } = self; + + let bootstrap_nodes = boot_nodes.into_iter().map(Into::into).collect::>(); + + let listen_on = listen_addresses.0.into_iter().map(Into::into).collect(); + + let networking_parameters_registry = KnownPeersManager::new(KnownPeersManagerConfig { + path: Some(base_path.join("known_addresses.bin").into_boxed_path()), + ignore_peer_list: strip_peer_id(bootstrap_nodes.clone()) + .into_iter() + .map(|(peer_id, _)| peer_id) + .collect::>(), + cache_size: KNOWN_PEERS_CACHE_SIZE, + ..Default::default() + }) + .context("Failed to open known addresses database for DSN")? + .boxed(); + + let default_networking_config = subspace_networking::Config::new( + protocol_version, + keypair, + local_records_provider.clone(), + Some(PeerInfoProvider::new_farmer()), + ); + + let config = subspace_networking::Config { + listen_on, + allow_non_global_addresses_in_dht, + networking_parameters_registry, + request_response_protocols: vec![ + PieceByIndexRequestHandler::create({ + let weak_readers_and_pieces = Arc::downgrade(&farmer_readers_and_pieces); + let farmer_piece_cache = farmer_piece_cache.clone(); + move |_, req| { + let weak_readers_and_pieces = weak_readers_and_pieces.clone(); + let farmer_piece_cache = farmer_piece_cache.clone(); + + get_piece_by_index(req, weak_readers_and_pieces, farmer_piece_cache) + } + }), + SegmentHeaderBySegmentIndexesRequestHandler::create({ + let segment_header_store = segment_header_store.clone(); + move |_, req| { + futures::future::ready(get_segment_header_by_segment_indexes( + req, + &segment_header_store, + )) + } + }), + ], + reserved_peers: reserved_nodes.into_iter().map(Into::into).collect(), + max_established_incoming_connections, + max_established_outgoing_connections, + max_pending_incoming_connections, + max_pending_outgoing_connections, + bootstrap_addresses: bootstrap_nodes, + kademlia_mode: KademliaMode::Dynamic, + external_addresses: external_addresses.into_iter().map(Into::into).collect(), + // Proactively maintain permanent connections with farmers (least restrictive value + // taken from farmer) + special_connected_peers_handler: Some(Arc::new(PeerInfo::is_farmer)), + // Maintain proactive connections with all peers (least restrictive value taken from + // node) + general_connected_peers_handler: Some(Arc::new(|_| true)), + // Maintain some number of persistent connections (taken from farmer) + general_connected_peers_target: 0, + // Special peers (taken from farmer) + special_connected_peers_target: target_connections, + // Allow up to quarter of incoming connections to be maintained (taken from node) + general_connected_peers_limit: max_established_incoming_connections / 4, + // Allow to maintain some extra farmer connections beyond direct interest too (taken + // from farmer) + special_connected_peers_limit: target_connections + + max_established_incoming_connections / 4, + metrics, + ..default_networking_config + }; + + let (node, runner) = subspace_networking::construct(config)?; + + let mut destructors = DestructorSet::new_without_async("dsn-destructors"); + let on_new_listener = node.on_new_listener(Arc::new({ + let node = node.clone(); + + move |address| { + tracing::info!( + "DSN listening on {}", + address + .clone() + .with(subspace_networking::libp2p::multiaddr::Protocol::P2p(node.id())) + ); + } + })); + destructors.add_items_to_drop(on_new_listener)?; + + Ok(( + DsnShared { + node, + farmer_readers_and_pieces, + _destructors: destructors, + farmer_piece_cache, + }, + runner, + is_metrics_enabled.then_some(metrics_registry), + )) + } +} diff --git a/sdk/dsn/src/lib.rs b/sdk/dsn/src/lib.rs new file mode 100644 index 00000000..b36fa8ec --- /dev/null +++ b/sdk/dsn/src/lib.rs @@ -0,0 +1,22 @@ +//! Crate with DSN shared between sdk farmer and sdk node + +#![warn( + missing_docs, + clippy::dbg_macro, + clippy::unwrap_used, + clippy::disallowed_types, + unused_features +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![feature(concat_idents, const_option)] + +mod builder; +mod local_provider_record_utils; + +pub use builder::*; +use subspace_farmer::piece_cache::PieceCache as FarmerPieceCache; +use tracing::warn; + +/// A record provider that uses farmer piece cache underneath +pub type LocalRecordProvider = + local_provider_record_utils::MaybeLocalRecordProvider; diff --git a/sdk/dsn/src/local_provider_record_utils.rs b/sdk/dsn/src/local_provider_record_utils.rs new file mode 100644 index 00000000..2a846af7 --- /dev/null +++ b/sdk/dsn/src/local_provider_record_utils.rs @@ -0,0 +1,31 @@ +use std::sync::Arc; + +use derivative::Derivative; +use parking_lot::RwLock; +use subspace_networking::libp2p::kad::{ProviderRecord, RecordKey}; +use subspace_networking::LocalRecordProvider; + +#[derive(Derivative)] +#[derivative(Debug)] +pub struct MaybeLocalRecordProvider { + #[derivative(Debug = "ignore")] + inner: Arc>>, +} + +impl Clone for MaybeLocalRecordProvider { + fn clone(&self) -> Self { + Self { inner: Arc::clone(&self.inner) } + } +} + +impl MaybeLocalRecordProvider { + pub fn new(inner: Arc>>) -> Self { + Self { inner } + } +} + +impl LocalRecordProvider for MaybeLocalRecordProvider { + fn record(&self, key: &RecordKey) -> Option { + self.inner.read().as_ref().map(|v| v.record(key)).unwrap_or(None) + } +} diff --git a/sdk/examples/complete.rs b/sdk/examples/complete.rs new file mode 100644 index 00000000..5c39b86d --- /dev/null +++ b/sdk/examples/complete.rs @@ -0,0 +1,84 @@ +use std::num::NonZeroU8; + +use futures::StreamExt; +use subspace_sdk::node::NetworkBuilder; +use subspace_sdk::{chain_spec, node, ByteSize, FarmDescription, Farmer, Node, PublicKey}; + +#[tokio::main] +async fn main() { + let plots = [FarmDescription::new("plot", ByteSize::gb(10))]; + let node: Node = Node::builder() + .blocks_pruning(node::BlocksPruning::Some(1000)) + .state_pruning(node::PruningMode::ArchiveCanonical) + .network(NetworkBuilder::new().name("i1i1")) + .build("node", chain_spec::dev_config()) + .await + .expect("Failed to init a node"); + + node.sync().await.unwrap(); + + let reward_address = PublicKey::from([0; 32]); + let farmer: Farmer = Farmer::builder() + // .ws_rpc("127.0.0.1:9955".parse().unwrap()) + // .listen_on("/ip4/0.0.0.0/tcp/40333".parse().unwrap()) + .build( + reward_address, + &node, + &plots, + NonZeroU8::new(1).expect("Static value should not fail; qed"), + ) + .await + .expect("Failed to init a farmer"); + + tokio::spawn({ + let mut solutions = + farmer.iter_farms().await.next().unwrap().subscribe_new_solutions().await; + async move { + while let Some(solution) = solutions.next().await { + eprintln!("Found solution: {solution:?}"); + } + } + }); + tokio::spawn({ + let mut new_blocks = node.subscribe_new_heads().await.unwrap(); + async move { + while let Some(block) = new_blocks.next().await { + eprintln!("New block: {block:?}"); + } + } + }); + + dbg!(node.get_info().await.unwrap()); + dbg!(farmer.get_info().await.unwrap()); + + farmer.close().await.unwrap(); + node.close().await.unwrap(); + + // Restarting + let node = Node::builder() + .blocks_pruning(node::BlocksPruning::Some(1000)) + .state_pruning(node::PruningMode::ArchiveCanonical) + .build("node", chain_spec::dev_config()) + .await + .expect("Failed to init a node"); + node.sync().await.unwrap(); + + let farmer = Farmer::builder() + .build( + reward_address, + &node, + &[FarmDescription::new("plot", ByteSize::gb(10))], + NonZeroU8::new(1).expect("Static value should not fail; qed"), + ) + .await + .expect("Failed to init a farmer"); + + farmer.close().await.unwrap(); + node.close().await.unwrap(); + + // Delete everything + for plot in plots { + plot.wipe().await.unwrap(); + } + Node::wipe("node").await.unwrap(); +} diff --git a/sdk/examples/mini-farmer.rs b/sdk/examples/mini-farmer.rs new file mode 100644 index 00000000..1566204b --- /dev/null +++ b/sdk/examples/mini-farmer.rs @@ -0,0 +1,206 @@ +use std::num::NonZeroU8; +use std::path::PathBuf; + +use anyhow::Context; +use clap::{Parser, ValueEnum}; +use futures::prelude::*; +use subspace_sdk::node::{self, Event, Node, RewardsEvent, SubspaceEvent}; +use subspace_sdk::{ByteSize, FarmDescription, Farmer, PublicKey}; +use tracing_subscriber::prelude::*; + +#[cfg(all( + target_arch = "x86_64", + target_vendor = "unknown", + target_os = "linux", + target_env = "gnu" +))] +#[global_allocator] +static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc; + +#[derive(ValueEnum, Debug, Clone)] +enum Chain { + Gemini3f, + Devnet, + Dev, +} + +/// Mini farmer +#[derive(Parser, Debug)] +#[command(author, version, about)] +pub struct Args { + /// Set the chain + #[arg(value_enum)] + chain: Chain, + #[cfg(feature = "executor")] + /// Run executor with specified domain + #[arg(short, long)] + executor: bool, + /// Address for farming rewards + #[arg(short, long)] + reward_address: PublicKey, + /// Path for all data + #[arg(short, long)] + base_path: Option, + /// Size of the plot + #[arg(short, long)] + plot_size: ByteSize, + /// Cache size + #[arg(short, long, default_value_t = ByteSize::gib(1))] + cache_size: ByteSize, +} + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + fdlimit::raise_fd_limit(); + + #[cfg(tokio_unstable)] + let registry = tracing_subscriber::registry().with(console_subscriber::spawn()); + #[cfg(not(tokio_unstable))] + let registry = tracing_subscriber::registry(); + + registry + .with(tracing_subscriber::fmt::layer()) + .with( + tracing_subscriber::EnvFilter::from_default_env() + .add_directive("info".parse().unwrap()), + ) + .init(); + + let Args { + chain, + #[cfg(feature = "executor")] + executor, + reward_address, + base_path, + plot_size, + cache_size: _, + } = Args::parse(); + let (base_path, _tmp_dir) = base_path.map(|x| (x, None)).unwrap_or_else(|| { + let tmp = tempfile::tempdir().expect("Failed to create temporary directory"); + (tmp.as_ref().to_owned(), Some(tmp)) + }); + + let node_dir = base_path.join("node"); + let node = match chain { + Chain::Gemini3f => Node::gemini_3g().dsn( + subspace_sdk::node::DsnBuilder::gemini_3g() + .provider_storage_path(node_dir.join("provider_storage")), + ), + Chain::Devnet => Node::devnet().dsn( + subspace_sdk::node::DsnBuilder::devnet() + .provider_storage_path(node_dir.join("provider_storage")), + ), + Chain::Dev => Node::dev().dsn( + subspace_sdk::node::DsnBuilder::dev() + .provider_storage_path(node_dir.join("provider_storage")), + ), + } + .role(node::Role::Authority); + + #[cfg(feature = "executor")] + let node = if executor { + node.system_domain( + node::domains::ConfigBuilder::new() + .rpc(subspace_sdk::node::RpcBuilder::new().addr("127.0.0.1:9990".parse().unwrap())) + .role(node::Role::Authority), + ) + } else { + node + }; + + let node = node + .build( + &node_dir, + match chain { + Chain::Gemini3f => node::chain_spec::gemini_3g(), + Chain::Devnet => node::chain_spec::devnet_config(), + Chain::Dev => node::chain_spec::dev_config(), + }, + ) + .await?; + + let sync = if !matches!(chain, Chain::Dev) { + futures::future::Either::Left(node.sync()) + } else { + futures::future::Either::Right(futures::future::ok(())) + }; + + tokio::select! { + result = sync => result?, + _ = tokio::signal::ctrl_c() => { + tracing::error!("Exitting..."); + return node.close().await.context("Failed to close node") + } + } + tracing::error!("Node was synced!"); + + let farmer = Farmer::builder() + .build( + reward_address, + &node, + &[FarmDescription::new(base_path.join("plot"), plot_size)], + NonZeroU8::new(1).expect("static value should not fail; qed"), + ) + .await?; + + tokio::spawn({ + let initial_plotting = + farmer.iter_farms().await.next().unwrap().subscribe_initial_plotting_progress().await; + async move { + initial_plotting + .for_each(|progress| async move { + tracing::error!(?progress, "Plotting!"); + }) + .await; + tracing::error!("Finished initial plotting!"); + } + }); + + let rewards_sub = { + let node = &node; + + async move { + let mut new_blocks = node.subscribe_finalized_heads().await?; + while let Some(header) = new_blocks.next().await { + let events = node.get_events(Some(header.hash)).await?; + + for event in events { + match event { + Event::Rewards( + RewardsEvent::VoteReward { reward, voter: author } + | RewardsEvent::BlockReward { reward, block_author: author }, + ) if author == reward_address.into() => + tracing::error!(%reward, "Received a reward!"), + Event::Subspace(SubspaceEvent::FarmerVote { + reward_address: author, + height: block_number, + .. + }) if author == reward_address.into() => + tracing::error!(block_number, "Vote counted for block"), + _ => (), + }; + } + + if let Some(pre_digest) = header.pre_digest { + if pre_digest.solution().reward_address == reward_address { + tracing::error!("We authored a block"); + } + } + } + + anyhow::Ok(()) + } + }; + + tokio::select! { + _ = rewards_sub => {}, + _ = tokio::signal::ctrl_c() => { + tracing::error!("Exitting..."); + } + } + + node.close().await.context("Failed to close node")?; + farmer.close().await.context("Failed to close farmer")?; + + Ok(()) +} diff --git a/sdk/examples/simple.rs b/sdk/examples/simple.rs new file mode 100644 index 00000000..a5e2a89b --- /dev/null +++ b/sdk/examples/simple.rs @@ -0,0 +1,40 @@ +use std::num::NonZeroU8; + +use futures::prelude::*; + +#[tokio::main] +async fn main() { + tracing_subscriber::fmt().init(); + let plots = [subspace_sdk::FarmDescription::new("plot", subspace_sdk::ByteSize::mb(100))]; + let node = subspace_sdk::Node::builder() + .force_authoring(true) + .role(subspace_sdk::node::Role::Authority) + // Starting a new chain + .build("node", subspace_sdk::chain_spec::dev_config()) + .await + .unwrap(); + + let farmer = subspace_sdk::Farmer::builder() + .build( + subspace_sdk::PublicKey::from([0; 32]), + &node, + &plots, + NonZeroU8::new(1).expect("Static value should not fail; qed"), + ) + .await + .expect("Failed to init a farmer"); + + for plot in farmer.iter_farms().await { + let mut plotting_progress = plot.subscribe_initial_plotting_progress().await; + while plotting_progress.next().await.is_some() {} + } + tracing::info!("Initial plotting completed"); + + node.subscribe_new_heads() + .await + .unwrap() + // Wait 10 blocks and exit + .take(10) + .for_each(|header| async move { tracing::info!(?header, "New block!") }) + .await; +} diff --git a/sdk/examples/sync.rs b/sdk/examples/sync.rs new file mode 100644 index 00000000..8ba08646 --- /dev/null +++ b/sdk/examples/sync.rs @@ -0,0 +1,108 @@ +use std::num::NonZeroU8; +use std::path::PathBuf; + +use clap::Parser; +use futures::stream::StreamExt; +use subspace_sdk::node::NetworkBuilder; +use subspace_sdk::{ + chain_spec, ByteSize, FarmDescription, Farmer, MultiaddrWithPeerId, Node, PublicKey, +}; +use tempfile::TempDir; + +#[derive(clap::Parser, Debug)] +enum Args { + Farm { + /// Path to the plot + #[arg(short, long)] + plot: PathBuf, + + /// Size of the plot + #[arg(long)] + plot_size: ByteSize, + + /// Path to the node directory + #[arg(short, long)] + node: PathBuf, + + /// Path to the chain spec + #[arg(short, long)] + spec: PathBuf, + }, + Sync { + /// Bootstrap nodes + #[arg(short, long)] + boot_nodes: Vec, + + /// Path to the chain spec + #[arg(short, long)] + spec: PathBuf, + }, + GenerateSpec { + path: PathBuf, + }, +} + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + tracing_subscriber::fmt().init(); + + let args = Args::parse(); + match args { + Args::GenerateSpec { path } => + tokio::fs::write(path, serde_json::to_string_pretty(&chain_spec::dev_config())?).await?, + Args::Farm { plot, plot_size, node, spec } => { + let chain_spec = serde_json::from_str(&tokio::fs::read_to_string(spec).await?)?; + let (plot_size, _cache_size) = + (ByteSize::b(plot_size.as_u64() * 9 / 10), ByteSize::b(plot_size.as_u64() / 10)); + let plots = [FarmDescription::new(plot.join("plot"), plot_size)]; + + let node = Node::builder() + .network( + NetworkBuilder::new() + .listen_addresses(vec!["/ip4/127.0.0.1/tcp/0".parse().unwrap()]) + .force_synced(true), + ) + .force_authoring(true) + .role(subspace_sdk::node::Role::Authority) + .build(node, chain_spec) + .await?; + + let _farmer: Farmer = Farmer::builder() + .build( + PublicKey::from([13; 32]), + &node, + &plots, + NonZeroU8::new(1).expect("Static value should not fail; qed"), + ) + .await?; + + let addr = node.listen_addresses().await?.into_iter().next().unwrap(); + tracing::info!(%addr, "Node listening at"); + + node.subscribe_new_heads() + .await? + .for_each(|header| async move { tracing::info!(?header, "New block!") }) + .await; + } + Args::Sync { boot_nodes, spec } => { + let node = TempDir::new()?; + let chain_spec = serde_json::from_str(&tokio::fs::read_to_string(spec).await?)?; + let node = Node::builder() + .force_authoring(true) + .role(subspace_sdk::node::Role::Authority) + .network(NetworkBuilder::new().boot_nodes(boot_nodes)) + .build(node.as_ref(), chain_spec) + .await?; + + node.sync().await.unwrap(); + tracing::info!("Node was synced!"); + + node.subscribe_new_heads() + .await? + .for_each(|header| async move { tracing::info!(?header, "New block!") }) + .await; + } + } + + Ok(()) +} diff --git a/sdk/farmer/Cargo.toml b/sdk/farmer/Cargo.toml new file mode 100644 index 00000000..c905c2e5 --- /dev/null +++ b/sdk/farmer/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "sdk-farmer" +version = "0.1.0" +edition = "2021" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1" +async-trait = "0.1" +bytesize = "1.2.0" +derivative = "2.2.0" +derive_builder = "0.12" +derive_more = "0.99" +futures = "0.3" +lru = "0.11.0" +libmimalloc-sys = { version = "0.1.35", features = ["extended"] } +parking_lot = "0.12" +pin-project = "1" +rayon = "1.7.0" +sdk-traits = { path = "../traits" } +sdk-utils = { path = "../utils" } +serde = { version = "1", features = ["derive"] } +subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e", default-features = false } +subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-networking = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e", features = ["parallel"] } +subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +thiserror = "1" +tokio = { version = "1.34.0", features = ["fs", "rt", "tracing", "macros", "parking_lot", "rt-multi-thread", "signal"] } +tokio-stream = { version = "0.1", features = ["sync", "time"] } +tracing = "0.1" +tracing-futures = "0.2" + +[features] +default = ["numa"] +numa = [ + "subspace-farmer/numa", +] +integration-test = [ + "sdk-utils/integration-test", + "sdk-traits/integration-test" +] diff --git a/sdk/farmer/build.rs b/sdk/farmer/build.rs new file mode 100644 index 00000000..364bd6f5 --- /dev/null +++ b/sdk/farmer/build.rs @@ -0,0 +1,5 @@ +fn main() { + let output = std::process::Command::new("git").args(["rev-parse", "HEAD"]).output().unwrap(); + let git_hash = String::from_utf8(output.stdout).unwrap(); + println!("cargo:rustc-env=GIT_HASH={git_hash}"); +} diff --git a/sdk/farmer/src/lib.rs b/sdk/farmer/src/lib.rs new file mode 100644 index 00000000..6b30aef1 --- /dev/null +++ b/sdk/farmer/src/lib.rs @@ -0,0 +1,1114 @@ +//! This crate is related to abstract farmer implementation + +#![warn( + missing_docs, + clippy::dbg_macro, + clippy::unwrap_used, + clippy::disallowed_types, + unused_features +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![feature(const_option)] + +use std::collections::HashMap; +use std::io; +use std::num::{NonZeroU8, NonZeroUsize}; +use std::path::PathBuf; +use std::sync::Arc; + +use anyhow::{anyhow, Context}; +pub use builder::{Builder, Config}; +use derivative::Derivative; +use futures::prelude::*; +use futures::stream::FuturesUnordered; +use sdk_traits::Node; +use sdk_utils::{ByteSize, DestructorSet, PublicKey, TaskOutput}; +use serde::{Deserialize, Serialize}; +use subspace_core_primitives::crypto::kzg; +use subspace_core_primitives::{PieceIndex, Record, SectorIndex}; +use subspace_erasure_coding::ErasureCoding; +use subspace_farmer::piece_cache::PieceCache as FarmerPieceCache; +use subspace_farmer::single_disk_farm::{ + SingleDiskFarm, SingleDiskFarmError, SingleDiskFarmId, SingleDiskFarmInfo, + SingleDiskFarmOptions, SingleDiskFarmSummary, +}; +use subspace_farmer::thread_pool_manager::PlottingThreadPoolManager; +use subspace_farmer::utils::farmer_piece_getter::FarmerPieceGetter; +use subspace_farmer::utils::piece_validator::SegmentCommitmentPieceValidator; +use subspace_farmer::utils::readers_and_pieces::ReadersAndPieces; +use subspace_farmer::utils::{ + all_cpu_cores, create_plotting_thread_pool_manager, thread_pool_core_indices, +}; +use subspace_farmer::{Identity, KNOWN_PEERS_CACHE_SIZE}; +use subspace_farmer_components::plotting::PlottedSector; +use subspace_farmer_components::sector::{sector_size, SectorMetadataChecksummed}; +use subspace_networking::libp2p::kad::RecordKey; +use subspace_networking::utils::multihash::ToMultihash; +use subspace_networking::KnownPeersManager; +use subspace_rpc_primitives::{FarmerAppInfo, SolutionResponse}; +use tokio::sync::{mpsc, oneshot, watch, Mutex, Semaphore}; +use tracing::{debug, error, info, warn}; +use tracing_futures::Instrument; + +/// Description of the farm +#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] +#[non_exhaustive] +pub struct FarmDescription { + /// Path of the farm + pub directory: PathBuf, + /// Space which you want to pledge + pub space_pledged: ByteSize, +} + +impl FarmDescription { + /// Construct Farm description + pub fn new(directory: impl Into, space_pledged: ByteSize) -> Self { + Self { directory: directory.into(), space_pledged } + } + + /// Wipe all the data from the farm + pub async fn wipe(self) -> io::Result<()> { + tokio::fs::remove_dir_all(self.directory).await + } +} + +mod builder { + use std::num::{NonZeroU8, NonZeroUsize}; + + use derivative::Derivative; + use derive_builder::Builder; + use derive_more::{Deref, DerefMut, Display, From}; + use sdk_traits::Node; + use sdk_utils::{ByteSize, PublicKey}; + use serde::{Deserialize, Serialize}; + + use super::BuildError; + use crate::{FarmDescription, Farmer}; + + #[derive( + Debug, + Clone, + Derivative, + Deserialize, + Serialize, + PartialEq, + Eq, + From, + Deref, + DerefMut, + Display, + )] + #[derivative(Default)] + #[serde(transparent)] + pub struct MaxConcurrentFarms( + #[derivative(Default(value = "NonZeroUsize::new(10).expect(\"10 > 0\")"))] + pub(crate) NonZeroUsize, + ); + + #[derive( + Debug, + Clone, + Derivative, + Deserialize, + Serialize, + PartialEq, + Eq, + From, + Deref, + DerefMut, + Display, + )] + #[derivative(Default)] + #[serde(transparent)] + pub struct PieceCacheSize( + #[derivative(Default(value = "ByteSize::mib(10)"))] pub(crate) ByteSize, + ); + + #[derive( + Debug, + Clone, + Derivative, + Deserialize, + Serialize, + PartialEq, + Eq, + From, + Deref, + DerefMut, + Display, + )] + #[derivative(Default)] + #[serde(transparent)] + pub struct ProvidedKeysLimit( + #[derivative(Default(value = "NonZeroUsize::new(655360).expect(\"655360 > 0\")"))] + pub(crate) NonZeroUsize, + ); + + /// Technical type which stores all + #[derive(Debug, Clone, Derivative, Builder, Serialize, Deserialize)] + #[derivative(Default)] + #[builder(pattern = "immutable", build_fn(private, name = "_build"), name = "Builder")] + #[non_exhaustive] + pub struct Config { + /// Number of farms that can be plotted concurrently, impacts RAM usage. + #[builder(default, setter(into))] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub max_concurrent_farms: MaxConcurrentFarms, + /// Number of farms that can be farmted concurrently, impacts RAM usage. + #[builder(default, setter(into))] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub provided_keys_limit: ProvidedKeysLimit, + /// Maximum number of pieces in single sector + #[builder(default)] + pub max_pieces_in_sector: Option, + /// Size of PER FARM thread pool used for farming (mostly for blocking + /// I/O, but also for some compute-intensive operations during + /// proving), defaults to number of logical CPUs + /// available on UMA system and number of logical CPUs in + /// first NUMA node on NUMA system. + #[builder(default)] + pub farming_thread_pool_size: Option, + /// Size of one thread pool used for plotting, defaults to number of + /// logical CPUs available on UMA system and number of logical + /// CPUs available in NUMA node on NUMA system. + /// + /// Number of thread pools is defined by `--sector-encoding-concurrency` + /// option, different thread pools might have different number + /// of threads if NUMA nodes do not have the same size. + /// + /// Threads will be pinned to corresponding CPU cores at creation. + #[builder(default)] + pub plotting_thread_pool_size: Option, + /// the plotting process, defaults to `--sector-downloading-concurrency` + /// + 1 to download future sector ahead of time + #[builder(default)] + pub sector_downloading_concurrency: Option, + /// Defines how many sectors farmer will encode concurrently, defaults + /// to 1 on UMA system and number of NUMA nodes on NUMA system. + /// It is further restricted by `sector_downloading_concurrency` + /// and setting this option higher than + /// `sector_downloading_concurrency` will have no effect. + #[builder(default)] + pub sector_encoding_concurrency: Option, + /// Threads will be pinned to corresponding CPU cores at creation. + #[builder(default)] + pub replotting_thread_pool_size: Option, + } + + impl Builder { + /// Get configuration for saving on disk + pub fn configuration(&self) -> Config { + self._build().expect("Build is infallible") + } + + /// Open and start farmer + pub async fn build( + self, + reward_address: PublicKey, + node: &N, + farms: &[FarmDescription], + cache_percentage: NonZeroU8, + ) -> Result, BuildError> { + self.configuration().build(reward_address, node, farms, cache_percentage).await + } + } +} + +/// Error when farm creation fails +#[derive(Debug, thiserror::Error)] +pub enum SingleDiskFarmCreationError { + /// Insufficient disk while creating single disk farm + #[error("Unable to create farm as Allocated space {} ({}) is not enough, minimum is ~{} (~{}, {} bytes to be exact", bytesize::to_string(*.allocated_space, true), bytesize::to_string(*.allocated_space, false), bytesize::to_string(*.min_space, true), bytesize::to_string(*.min_space, false), *.min_space)] + InsufficientSpaceForFarm { + /// Minimum space required for farm + min_space: u64, + /// Allocated space for farm + allocated_space: u64, + }, + /// Other error while creating single disk farm + #[error("Single disk farm creation error: {0}")] + Other(#[from] SingleDiskFarmError), +} + +/// Build Error +#[derive(Debug, thiserror::Error)] +pub enum BuildError { + /// Failed to create single disk farm + #[error("Single disk farm creation error: {0}")] + SingleDiskFarmCreate(#[from] SingleDiskFarmCreationError), + /// No farms were supplied during building + #[error("Supply at least one farm")] + NoFarmsSupplied, + /// Failed to fetch data from the node + #[error("Failed to fetch data from node: {0}")] + RPCError(#[source] subspace_farmer::RpcClientError), + /// Failed to build thread pool + #[error("Failed to build thread pool: {0}")] + ThreadPoolError(#[from] rayon::ThreadPoolBuildError), + /// Other error + #[error("{0}")] + Other(#[from] anyhow::Error), +} + +#[async_trait::async_trait] +impl sdk_traits::Farmer for Farmer { + type Table = T; + + async fn get_piece_by_index( + piece_index: PieceIndex, + piece_cache: &FarmerPieceCache, + weak_readers_and_pieces: &std::sync::Weak>>, + ) -> Option { + use tracing::debug; + + if let Some(piece) = + piece_cache.get_piece(RecordKey::from(piece_index.to_multihash())).await + { + return Some(piece); + } + + let weak_readers_and_pieces = weak_readers_and_pieces.clone(); + + debug!(?piece_index, "No piece in the cache. Trying archival storage..."); + + let readers_and_pieces = match weak_readers_and_pieces.upgrade() { + Some(readers_and_pieces) => readers_and_pieces, + None => { + debug!("A readers and pieces are already dropped"); + return None; + } + }; + let read_piece = match readers_and_pieces.lock().as_ref() { + Some(readers_and_pieces) => readers_and_pieces.read_piece(&piece_index), + None => { + debug!(?piece_index, "Readers and pieces are not initialized yet"); + return None; + } + }; + + match read_piece { + Some(fut) => fut.in_current_span().await, + None => None, + } + } +} + +const SEGMENT_COMMITMENTS_CACHE_SIZE: NonZeroUsize = + NonZeroUsize::new(1_000_000).expect("Not zero; qed"); + +async fn create_readers_and_pieces( + single_disk_farms: &[SingleDiskFarm], +) -> Result { + // Store piece readers so we can reference them later + let readers = single_disk_farms.iter().map(SingleDiskFarm::piece_reader).collect(); + let mut readers_and_pieces = ReadersAndPieces::new(readers); + + tracing::debug!("Collecting already plotted pieces"); + + let mut plotted_sectors_iters = futures::future::join_all( + single_disk_farms.iter().map(|single_disk_farm| single_disk_farm.plotted_sectors()), + ) + .await; + + plotted_sectors_iters.drain(..).enumerate().try_for_each( + |(disk_farm_index, plotted_sectors_iter)| { + let disk_farm_index = disk_farm_index.try_into().map_err(|_error| { + anyhow!( + "More than 256 farms are not supported, consider running multiple farmer \ + instances" + ) + })?; + + (0 as SectorIndex..).zip(plotted_sectors_iter).for_each( + |(sector_index, plotted_sector_result)| match plotted_sector_result { + Ok(plotted_sector) => { + readers_and_pieces.add_sector(disk_farm_index, &plotted_sector); + } + Err(error) => { + error!( + %error, + %disk_farm_index, + %sector_index, + "Failed reading plotted sector on startup, skipping" + ); + } + }, + ); + + Ok::<_, anyhow::Error>(()) + }, + )?; + + tracing::debug!("Finished collecting already plotted pieces"); + + Ok(readers_and_pieces) +} + +#[allow(clippy::too_many_arguments)] +fn handler_on_sector_plotted( + plotted_sector: &PlottedSector, + maybe_old_plotted_sector: &Option, + disk_farm_index: usize, + readers_and_pieces: Arc>>, +) { + let disk_farm_index = disk_farm_index + .try_into() + .expect("More than 256 farms are not supported, this is checked above already; qed"); + + { + let mut readers_and_pieces = readers_and_pieces.lock(); + let readers_and_pieces = + readers_and_pieces.as_mut().expect("Initial value was populated before; qed"); + + if let Some(old_plotted_sector) = maybe_old_plotted_sector { + readers_and_pieces.delete_sector(disk_farm_index, old_plotted_sector); + } + readers_and_pieces.add_sector(disk_farm_index, plotted_sector); + } +} + +impl Config { + /// Open and start farmer + pub async fn build( + self, + reward_address: PublicKey, + node: &N, + farms: &[FarmDescription], + cache_percentage: NonZeroU8, + ) -> Result, BuildError> { + if farms.is_empty() { + return Err(BuildError::NoFarmsSupplied); + } + + let mut destructors = DestructorSet::new("farmer-destructors"); + + let Self { + max_concurrent_farms: _, + provided_keys_limit: _, + max_pieces_in_sector, + farming_thread_pool_size, + plotting_thread_pool_size, + replotting_thread_pool_size, + sector_downloading_concurrency, + sector_encoding_concurrency, + } = self; + + let mut single_disk_farms = Vec::with_capacity(farms.len()); + let mut farm_info = HashMap::with_capacity(farms.len()); + + let readers_and_pieces = Arc::clone(&node.dsn().farmer_readers_and_pieces); + + let node_name = node.name().to_owned(); + + let peer_id = node.dsn().node.id(); + + let (farmer_piece_cache, farmer_piece_cache_worker) = + FarmerPieceCache::new(node.rpc().clone(), peer_id); + + let kzg = kzg::Kzg::new(kzg::embedded_kzg_settings()); + let erasure_coding = ErasureCoding::new( + NonZeroUsize::new(Record::NUM_S_BUCKETS.next_power_of_two().ilog2() as usize).expect( + "Number of buckets >= 1, therefore next power of 2 >= 2, therefore ilog2 >= 1", + ), + ) + .map_err(|error| anyhow::anyhow!("Failed to create erasure coding for farm: {error}"))?; + + let piece_provider = subspace_networking::utils::piece_provider::PieceProvider::new( + node.dsn().node.clone(), + Some(SegmentCommitmentPieceValidator::new( + node.dsn().node.clone(), + node.rpc().clone(), + kzg.clone(), + // TODO: Consider introducing and using global in-memory segment commitments cache + parking_lot::Mutex::new(lru::LruCache::new(SEGMENT_COMMITMENTS_CACHE_SIZE)), + )), + ); + let farmer_piece_getter = Arc::new(FarmerPieceGetter::new( + node.dsn().node.clone(), + piece_provider, + farmer_piece_cache.clone(), + node.rpc().clone(), + readers_and_pieces.clone(), + )); + + let (piece_cache_worker_drop_sender, piece_cache_worker_drop_receiver) = + oneshot::channel::<()>(); + let farmer_piece_cache_worker_join_handle = sdk_utils::task_spawn_blocking( + format!("sdk-farmer-{node_name}-pieces-cache-worker"), + { + let handle = tokio::runtime::Handle::current(); + let piece_getter = farmer_piece_getter.clone(); + + move || { + handle.block_on(future::select( + Box::pin({ + let piece_getter = piece_getter.clone(); + farmer_piece_cache_worker.run(piece_getter) + }), + piece_cache_worker_drop_receiver, + )); + } + }, + ); + + destructors.add_async_destructor({ + async move { + let _ = piece_cache_worker_drop_sender.send(()); + farmer_piece_cache_worker_join_handle.await.expect( + "awaiting worker should not fail except panic by the worker itself; qed", + ); + } + })?; + + let farmer_app_info = subspace_farmer::NodeClient::farmer_app_info(node.rpc()) + .await + .expect("Node is always reachable"); + + let max_pieces_in_sector = match max_pieces_in_sector { + Some(m) => m, + None => farmer_app_info.protocol_info.max_pieces_in_sector, + }; + + let mut plotting_delay_senders = Vec::with_capacity(farms.len()); + + let plotting_thread_pool_core_indices = + thread_pool_core_indices(plotting_thread_pool_size, sector_encoding_concurrency); + let replotting_thread_pool_core_indices = { + let mut replotting_thread_pool_core_indices = + thread_pool_core_indices(replotting_thread_pool_size, sector_encoding_concurrency); + if replotting_thread_pool_size.is_none() { + // The default behavior is to use all CPU cores, but for replotting we just want + // half + replotting_thread_pool_core_indices + .iter_mut() + .for_each(|set| set.truncate(set.cpu_cores().len() / 2)); + } + replotting_thread_pool_core_indices + }; + + let downloading_semaphore = Arc::new(Semaphore::new( + sector_downloading_concurrency + .map(|sector_downloading_concurrency| sector_downloading_concurrency.get()) + .unwrap_or(plotting_thread_pool_core_indices.len() + 1), + )); + + let all_cpu_cores = all_cpu_cores(); + let plotting_thread_pool_manager = create_plotting_thread_pool_manager( + plotting_thread_pool_core_indices.into_iter().zip(replotting_thread_pool_core_indices), + )?; + let farming_thread_pool_size = farming_thread_pool_size + .map(|farming_thread_pool_size| farming_thread_pool_size.get()) + .unwrap_or_else(|| { + all_cpu_cores + .first() + .expect("Not empty according to function description; qed") + .cpu_cores() + .len() + }); + + if all_cpu_cores.len() > 1 { + info!(numa_nodes = %all_cpu_cores.len(), "NUMA system detected"); + + if all_cpu_cores.len() > farms.len() { + warn!( + numa_nodes = %all_cpu_cores.len(), + farms_count = %farms.len(), + "Too few disk farms, CPU will not be utilized fully during plotting, same number of farms as NUMA \ + nodes or more is recommended" + ); + } + } + + // TODO: Remove code or environment variable once identified whether it helps or + // not + if std::env::var("NUMA_ALLOCATOR").is_ok() && all_cpu_cores.len() > 1 { + unsafe { + libmimalloc_sys::mi_option_set( + libmimalloc_sys::mi_option_use_numa_nodes, + all_cpu_cores.len() as std::ffi::c_long, + ); + } + } + + for (disk_farm_idx, description) in farms.iter().enumerate() { + let (plotting_delay_sender, plotting_delay_receiver) = + futures::channel::oneshot::channel(); + plotting_delay_senders.push(plotting_delay_sender); + + let (farm, single_disk_farm) = Farm::new(FarmOptions { + disk_farm_idx, + cache_percentage, + reward_address, + node, + max_pieces_in_sector, + piece_getter: Arc::clone(&farmer_piece_getter), + description, + kzg: kzg.clone(), + erasure_coding: erasure_coding.clone(), + farming_thread_pool_size, + plotting_delay: Some(plotting_delay_receiver), + downloading_semaphore: Arc::clone(&downloading_semaphore), + plotting_thread_pool_manager: plotting_thread_pool_manager.clone(), + }) + .await?; + + farm_info.insert(farm.directory.clone(), farm); + single_disk_farms.push(single_disk_farm); + } + + *node.dsn().farmer_piece_cache.write() = Some(farmer_piece_cache.clone()); + destructors.add_sync_destructor({ + let piece_cache = Arc::clone(&node.dsn().farmer_piece_cache); + move || { + piece_cache.write().take(); + } + })?; + + let cache_acknowledgement_receiver = farmer_piece_cache + .replace_backing_caches( + single_disk_farms + .iter() + .map(|single_disk_farm| single_disk_farm.piece_cache()) + .collect(), + ) + .await; + drop(farmer_piece_cache); + + let (plotting_delay_task_drop_sender, plotting_delay_task_drop_receiver) = + oneshot::channel::<()>(); + let plotting_delay_task_join_handle = sdk_utils::task_spawn_blocking( + format!("sdk-farmer-{node_name}-plotting-delay-task"), + { + let handle = tokio::runtime::Handle::current(); + + move || { + handle.block_on(future::select( + Box::pin(async { + if cache_acknowledgement_receiver.await.is_ok() { + for plotting_delay_sender in plotting_delay_senders { + // Doesn't matter if receiver is gone + let _ = plotting_delay_sender.send(()); + } + } + }), + plotting_delay_task_drop_receiver, + )); + } + }, + ); + + destructors.add_async_destructor({ + async move { + let _ = plotting_delay_task_drop_sender.send(()); + plotting_delay_task_join_handle.await.expect( + "awaiting worker should not fail except panic by the worker itself; qed", + ); + } + })?; + + let readers_and_pieces_instance = create_readers_and_pieces(&single_disk_farms).await?; + readers_and_pieces.lock().replace(readers_and_pieces_instance); + destructors.add_sync_destructor({ + let farmer_reader_and_pieces = node.dsn().farmer_readers_and_pieces.clone(); + move || { + farmer_reader_and_pieces.lock().take(); + } + })?; + + let mut sector_plotting_handler_ids = vec![]; + for (disk_farm_index, single_disk_farm) in single_disk_farms.iter().enumerate() { + let readers_and_pieces = Arc::clone(&readers_and_pieces); + let span = tracing::info_span!("farm", %disk_farm_index); + + // Collect newly plotted pieces + // TODO: Once we have replotting, this will have to be updated + sector_plotting_handler_ids.push(single_disk_farm.on_sector_plotted(Arc::new( + move |(plotted_sector, maybe_old_plotted_sector)| { + let _span_guard = span.enter(); + handler_on_sector_plotted( + plotted_sector, + maybe_old_plotted_sector, + disk_farm_index, + readers_and_pieces.clone(), + ) + }, + ))); + } + + let mut single_disk_farms_stream = + single_disk_farms.into_iter().map(SingleDiskFarm::run).collect::>(); + + let (farm_driver_drop_sender, mut farm_driver_drop_receiver) = oneshot::channel::<()>(); + let (farm_driver_result_sender, farm_driver_result_receiver) = + mpsc::channel::<_>(u8::MAX as usize + 1); + + let farm_driver_join_handle = sdk_utils::task_spawn_blocking( + format!("sdk-farmer-{node_name}-farms-driver"), + { + let handle = tokio::runtime::Handle::current(); + + move || { + use future::Either::*; + + loop { + let result = handle.block_on(future::select( + single_disk_farms_stream.next(), + &mut farm_driver_drop_receiver, + )); + + match result { + Left((maybe_result, _)) => { + let send_result = match maybe_result { + None => farm_driver_result_sender + .try_send(Ok(TaskOutput::Value(None))), + Some(result) => match result { + Ok(single_disk_farm_id) => farm_driver_result_sender + .try_send(Ok(TaskOutput::Value(Some( + single_disk_farm_id, + )))), + Err(e) => farm_driver_result_sender.try_send(Err(e)), + }, + }; + + // Receiver is closed which would mean we are shutting down + if send_result.is_err() { + break; + } + } + Right((_, _)) => { + warn!("Received drop signal for farm driver, exiting..."); + let _ = + farm_driver_result_sender.try_send(Ok(TaskOutput::Cancelled( + "Received drop signal for farm driver".into(), + ))); + break; + } + }; + } + } + }, + ); + + destructors.add_async_destructor({ + async move { + let _ = farm_driver_drop_sender.send(()); + farm_driver_join_handle.await.expect("joining should not fail; qed"); + } + })?; + + for handler_id in sector_plotting_handler_ids.drain(..) { + destructors.add_items_to_drop(handler_id)?; + } + + tracing::debug!("Started farmer"); + + Ok(Farmer { + reward_address, + farm_info, + result_receiver: Some(farm_driver_result_receiver), + node_name, + app_info: subspace_farmer::NodeClient::farmer_app_info(node.rpc()) + .await + .expect("Node is always reachable"), + _destructors: destructors, + }) + } +} + +type ResultReceiver = mpsc::Receiver, String>>>; + +/// Farmer structure +#[derive(Derivative)] +#[derivative(Debug)] +#[must_use = "Farmer should be closed"] +pub struct Farmer { + reward_address: PublicKey, + farm_info: HashMap>, + result_receiver: Option, + node_name: String, + app_info: FarmerAppInfo, + _destructors: DestructorSet, +} + +/// Info about some farm +#[derive(Debug)] +#[non_exhaustive] +// TODO: Should it be versioned? +pub struct FarmInfo { + /// ID of the farm + pub id: SingleDiskFarmId, + /// Genesis hash of the chain used for farm creation + pub genesis_hash: [u8; 32], + /// Public key of identity used for farm creation + pub public_key: PublicKey, + /// How much space in bytes is allocated for this farm + pub allocated_space: ByteSize, + /// How many pieces are in sector + pub pieces_in_sector: u16, +} + +impl From for FarmInfo { + fn from(info: SingleDiskFarmInfo) -> Self { + let SingleDiskFarmInfo::V0 { + id, + genesis_hash, + public_key, + allocated_space, + pieces_in_sector, + } = info; + Self { + id, + genesis_hash, + public_key: PublicKey(public_key), + allocated_space: ByteSize::b(allocated_space), + pieces_in_sector, + } + } +} + +/// Farmer info +#[derive(Debug)] +#[non_exhaustive] +pub struct Info { + /// Version of the farmer + pub version: String, + /// Reward address of our farmer + pub reward_address: PublicKey, + // TODO: add dsn peers info + // pub dsn_peers: u64, + /// Info about each farm + pub farms_info: HashMap, + /// Sector size in bits + pub sector_size: u64, +} + +/// Initial plotting progress +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct InitialPlottingProgress { + /// Number of sectors from which we started plotting + pub starting_sector: u64, + /// Current number of sectors + pub current_sector: u64, + /// Total number of sectors on disk + pub total_sectors: u64, +} + +/// Progress data received from sender, used to monitor plotting progress +pub type ProgressData = Option<(PlottedSector, Option)>; + +/// Farm structure +#[derive(Debug)] +pub struct Farm { + directory: PathBuf, + progress: watch::Receiver, + solutions: watch::Receiver>, + initial_plotting_progress: Arc>, + allocated_space: u64, + _destructors: DestructorSet, + _table: std::marker::PhantomData, +} + +#[pin_project::pin_project] +struct InitialPlottingProgressStreamInner { + last_initial_plotting_progress: InitialPlottingProgress, + #[pin] + stream: S, +} + +impl Stream for InitialPlottingProgressStreamInner +where + S: Stream, +{ + type Item = InitialPlottingProgress; + + fn poll_next( + self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + ) -> std::task::Poll> { + let this = self.project(); + match this.stream.poll_next(cx) { + result @ std::task::Poll::Ready(Some(progress)) => { + *this.last_initial_plotting_progress = progress; + result + } + result => result, + } + } + + fn size_hint(&self) -> (usize, Option) { + let left = self.last_initial_plotting_progress.total_sectors + - self.last_initial_plotting_progress.current_sector; + (left as usize, Some(left as usize)) + } +} + +/// Initial plotting progress stream +#[pin_project::pin_project] +pub struct InitialPlottingProgressStream { + #[pin] + boxed_stream: + std::pin::Pin + Send + Sync + Unpin>>, +} + +impl Stream for InitialPlottingProgressStream { + type Item = InitialPlottingProgress; + + fn poll_next( + self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + ) -> std::task::Poll> { + self.project().boxed_stream.poll_next(cx) + } + + fn size_hint(&self) -> (usize, Option) { + self.boxed_stream.size_hint() + } +} + +struct FarmOptions<'a, PG, N: sdk_traits::Node> { + pub disk_farm_idx: usize, + pub cache_percentage: NonZeroU8, + pub reward_address: PublicKey, + pub node: &'a N, + pub piece_getter: PG, + pub description: &'a FarmDescription, + pub kzg: kzg::Kzg, + pub erasure_coding: ErasureCoding, + pub max_pieces_in_sector: u16, + pub farming_thread_pool_size: usize, + pub plotting_delay: Option>, + pub downloading_semaphore: Arc, + pub plotting_thread_pool_manager: PlottingThreadPoolManager, +} + +impl Farm { + async fn new( + FarmOptions { + disk_farm_idx, + cache_percentage, + reward_address, + node, + piece_getter, + description, + kzg, + erasure_coding, + max_pieces_in_sector, + farming_thread_pool_size, + plotting_delay, + downloading_semaphore, + plotting_thread_pool_manager, + }: FarmOptions< + '_, + impl subspace_farmer_components::plotting::PieceGetter + Clone + Send + Sync + 'static, + impl sdk_traits::Node, + >, + ) -> Result<(Self, SingleDiskFarm), BuildError> { + let directory = description.directory.clone(); + let allocated_space = description.space_pledged.as_u64(); + let farmer_app_info = subspace_farmer::NodeClient::farmer_app_info(node.rpc()) + .await + .expect("Node is always reachable"); + + let description = SingleDiskFarmOptions { + allocated_space, + directory: directory.clone(), + farmer_app_info, + max_pieces_in_sector, + reward_address: *reward_address, + node_client: node.rpc().clone(), + kzg, + erasure_coding, + piece_getter, + cache_percentage, + downloading_semaphore, + farm_during_initial_plotting: false, + farming_thread_pool_size, + plotting_thread_pool_manager, + plotting_delay, + }; + let single_disk_farm_fut = SingleDiskFarm::new::<_, _, T>(description, disk_farm_idx); + let single_disk_farm = match single_disk_farm_fut.await { + Ok(single_disk_farm) => single_disk_farm, + Err(SingleDiskFarmError::InsufficientAllocatedSpace { min_space, allocated_space }) => { + return Err(BuildError::SingleDiskFarmCreate( + SingleDiskFarmCreationError::InsufficientSpaceForFarm { + min_space, + allocated_space, + }, + )); + } + Err(error) => { + return Err(BuildError::SingleDiskFarmCreate(SingleDiskFarmCreationError::Other( + error, + ))); + } + }; + let mut destructors = DestructorSet::new_without_async("farm-destructors"); + + let progress = { + let (sender, receiver) = watch::channel::>(None); + destructors.add_items_to_drop(single_disk_farm.on_sector_plotted(Arc::new( + move |sector| { + let _ = sender.send(Some(sector.clone())); + }, + )))?; + receiver + }; + let solutions = { + let (sender, receiver) = watch::channel::>(None); + destructors.add_items_to_drop(single_disk_farm.on_solution(Arc::new( + move |solution| { + let _ = sender.send(Some(solution.clone())); + }, + )))?; + receiver + }; + + // TODO: This calculation is directly imported from the monorepo and relies on + // internal calculation of farm. Remove it once we have public function. + let fixed_space_usage = 2 * 1024 * 1024 + + Identity::file_size() as u64 + + KnownPeersManager::file_size(KNOWN_PEERS_CACHE_SIZE) as u64; + // Calculate how many sectors can fit + let target_sector_count = { + let potentially_plottable_space = allocated_space.saturating_sub(fixed_space_usage) + / 100 + * (100 - u64::from(cache_percentage.get())); + // Do the rounding to make sure we have exactly as much space as fits whole + // number of sectors + potentially_plottable_space + / (sector_size(max_pieces_in_sector) + SectorMetadataChecksummed::encoded_size()) + as u64 + }; + + Ok(( + Self { + directory: directory.clone(), + allocated_space, + progress, + solutions, + initial_plotting_progress: Arc::new(Mutex::new(InitialPlottingProgress { + starting_sector: u64::try_from(single_disk_farm.plotted_sectors_count().await) + .expect("Sector count is less than u64::MAX"), + current_sector: u64::try_from(single_disk_farm.plotted_sectors_count().await) + .expect("Sector count is less than u64::MAX"), + total_sectors: target_sector_count, + })), + _destructors: destructors, + _table: Default::default(), + }, + single_disk_farm, + )) + } + + /// Farm location + pub fn directory(&self) -> &PathBuf { + &self.directory + } + + /// Farm size + pub fn allocated_space(&self) -> ByteSize { + ByteSize::b(self.allocated_space) + } + + /// Will return a stream of initial plotting progress which will end once we + /// finish plotting + pub async fn subscribe_initial_plotting_progress(&self) -> InitialPlottingProgressStream { + let initial = *self.initial_plotting_progress.lock().await; + if initial.current_sector == initial.total_sectors { + return InitialPlottingProgressStream { + boxed_stream: Box::pin(futures::stream::iter(None)), + }; + } + + let stream = tokio_stream::wrappers::WatchStream::new(self.progress.clone()) + .filter_map({ + let initial_plotting_progress = Arc::clone(&self.initial_plotting_progress); + move |_| { + let initial_plotting_progress = Arc::clone(&initial_plotting_progress); + async move { + let mut guard = initial_plotting_progress.lock().await; + let plotting_progress = *guard; + guard.current_sector += 1; + Some(plotting_progress) + } + } + }) + .take_while(|InitialPlottingProgress { current_sector, total_sectors, .. }| { + futures::future::ready(current_sector < total_sectors) + }); + let last_initial_plotting_progress = *self.initial_plotting_progress.lock().await; + + InitialPlottingProgressStream { + boxed_stream: Box::pin(Box::pin(InitialPlottingProgressStreamInner { + stream, + last_initial_plotting_progress, + })), + } + } + + /// New solution subscription + pub async fn subscribe_new_solutions( + &self, + ) -> impl Stream + Send + Sync + Unpin { + tokio_stream::wrappers::WatchStream::new(self.solutions.clone()) + .filter_map(futures::future::ready) + } +} + +impl Farmer { + /// Farmer builder + pub fn builder() -> Builder { + Builder::default() + } + + /// Gets farm info + pub async fn get_info(&self) -> anyhow::Result { + let farms_info = tokio::task::spawn_blocking({ + let dirs = self.farm_info.keys().cloned().collect::>(); + || dirs.into_iter().map(SingleDiskFarm::collect_summary).collect::>() + }) + .await? + .into_iter() + .map(|summary| match summary { + SingleDiskFarmSummary::Found { info, directory } => Ok((directory, info.into())), + SingleDiskFarmSummary::NotFound { directory } => + Err(anyhow::anyhow!("Didn't found farm at `{directory:?}'")), + SingleDiskFarmSummary::Error { directory, error } => + Err(error).context(format!("Failed to get farm summary at `{directory:?}'")), + }) + .collect::>()?; + + Ok(Info { + farms_info, + version: format!("{}-{}", env!("CARGO_PKG_VERSION"), env!("GIT_HASH")), + reward_address: self.reward_address, + sector_size: subspace_farmer_components::sector::sector_size( + self.app_info.protocol_info.max_pieces_in_sector, + ) as _, + }) + } + + /// Iterate over farms + pub async fn iter_farms(&'_ self) -> impl Iterator> + '_ { + self.farm_info.values() + } + + /// Stops farming, closes farms, and sends signal to the node + pub async fn close(mut self) -> anyhow::Result<()> { + self._destructors.async_drop().await?; + let mut result_receiver = self.result_receiver.take().expect("Handle is always there"); + result_receiver.close(); + while let Some(task_result) = result_receiver.recv().await { + let output = task_result?; + match output { + TaskOutput::Value(_) => {} + TaskOutput::Cancelled(reason) => { + warn!("Farm driver was cancelled due to reason: {:?}", reason); + } + } + } + + Ok(()) + } +} diff --git a/sdk/node/Cargo.toml b/sdk/node/Cargo.toml new file mode 100644 index 00000000..0369d370 --- /dev/null +++ b/sdk/node/Cargo.toml @@ -0,0 +1,76 @@ +[package] +name = "sdk-node" +version = "0.1.0" +edition = "2021" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1" +backoff = "0.4" +cross-domain-message-gossip = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +derivative = "2.2.0" +derive_builder = "0.12" +derive_more = "0.99" +domain-client-message-relayer = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +domain-client-operator = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +domain-eth-service = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +domain-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +domain-service = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +evm-domain-runtime = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "37ee45323120b21adc1d69ae7348bd0f7282eeae" } +frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +futures = "0.3" +hex-literal = "0.4" +pallet-rewards = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +pallet-subspace = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +parity-scale-codec = "3.6.3" +parking_lot = "0.12" +pin-project = "1" +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } +sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } +sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sdk-dsn = { path = "../dsn" } +sdk-substrate = { path = "../substrate" } +sdk-traits = { path = "../traits" } +sdk-utils = { path = "../utils" } +serde = { version = "1", features = ["derive"] } +serde_json = "1" +sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sp-domains = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +sp-domains-fraud-proof = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +sp-messenger = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sp-version = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e", default-features = false } +subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-networking = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-service = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +tokio = { version = "1.34.0", features = ["fs", "rt", "tracing", "macros", "parking_lot", "rt-multi-thread", "signal"] } +tokio-stream = { version = "0.1", features = ["sync", "time"] } +tracing = "0.1" + +[features] +default = [] +integration-test = [ + "sdk-utils/integration-test", + "sdk-dsn/integration-test", + "sdk-substrate/integration-test", + "sdk-traits/integration-test" +] diff --git a/sdk/node/src/builder.rs b/sdk/node/src/builder.rs new file mode 100644 index 00000000..cfbe3cbc --- /dev/null +++ b/sdk/node/src/builder.rs @@ -0,0 +1,169 @@ +use std::collections::HashSet; +use std::num::NonZeroUsize; +use std::path::Path; + +use derivative::Derivative; +use derive_builder::Builder; +use derive_more::{Deref, DerefMut, Display, From}; +use sc_service::BlocksPruning; +use sdk_dsn::{Dsn, DsnBuilder}; +use sdk_substrate::{ + Base, BaseBuilder, NetworkBuilder, OffchainWorkerBuilder, PruningMode, Role, RpcBuilder, + StorageMonitor, +}; +use sdk_utils::ByteSize; +use serde::{Deserialize, Serialize}; + +use super::{ChainSpec, Farmer, Node}; +use crate::domains::builder::DomainConfig; + +/// Wrapper with default value for piece cache size +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +/// Size of cache of pieces that node produces +/// TODO: Set it to 1 GB once DSN is fixed +pub struct PieceCacheSize(#[derivative(Default(value = "ByteSize::gib(3)"))] pub(crate) ByteSize); + +/// Wrapper with default value for segment publish concurrent jobs +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct SegmentPublishConcurrency( + #[derivative(Default(value = "NonZeroUsize::new(10).expect(\"10 > 0\")"))] + pub(crate) NonZeroUsize, +); + +/// Node builder +#[derive(Debug, Clone, Derivative, Builder, Deserialize, Serialize, PartialEq)] +#[derivative(Default(bound = ""))] +#[builder(pattern = "owned", build_fn(private, name = "_build"), name = "Builder")] +#[non_exhaustive] +pub struct Config { + /// Max number of segments that can be published concurrently, impacts + /// RAM usage and network bandwidth. + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub segment_publish_concurrency: SegmentPublishConcurrency, + /// Should we sync blocks from the DSN? + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub sync_from_dsn: bool, + #[doc(hidden)] + #[builder( + setter(into, strip_option), + field(type = "BaseBuilder", build = "self.base.build()") + )] + #[serde(flatten, skip_serializing_if = "sdk_utils::is_default")] + pub base: Base, + /// DSN settings + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub dsn: Dsn, + /// Storage monitor settings + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub storage_monitor: Option, + /// Enables subspace block relayer + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub enable_subspace_block_relay: bool, + #[builder(setter(skip), default)] + #[serde(skip, default)] + _farmer: std::marker::PhantomData, + /// Optional domain configuration + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub domain: Option, + /// Flag indicating if the node is authority for Proof of time consensus + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub is_timekeeper: bool, + /// CPU cores that timekeeper can use + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub timekeeper_cpu_cores: HashSet, + /// Proof of time entropy + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub pot_external_entropy: Option>, +} + +impl Config { + /// Dev configuraiton + pub fn dev() -> Builder { + Builder::dev() + } + + /// Gemini 3g configuraiton + pub fn gemini_3g() -> Builder { + Builder::gemini_3g() + } + + /// Devnet configuraiton + pub fn devnet() -> Builder { + Builder::devnet() + } +} + +impl Builder { + /// Dev chain configuration + pub fn dev() -> Self { + Self::new() + .is_timekeeper(true) + .force_authoring(true) + .network(NetworkBuilder::dev()) + .dsn(DsnBuilder::dev()) + .rpc(RpcBuilder::dev()) + .offchain_worker(OffchainWorkerBuilder::dev()) + } + + /// Gemini 3g configuration + pub fn gemini_3g() -> Self { + Self::new() + .network(NetworkBuilder::gemini_3g()) + .dsn(DsnBuilder::gemini_3g()) + .rpc(RpcBuilder::gemini_3g()) + .offchain_worker(OffchainWorkerBuilder::gemini_3g()) + .role(Role::Authority) + .state_pruning(PruningMode::ArchiveAll) + .blocks_pruning(BlocksPruning::Some(256)) + } + + /// Devnet chain configuration + pub fn devnet() -> Self { + Self::new() + .network(NetworkBuilder::devnet()) + .dsn(DsnBuilder::devnet()) + .rpc(RpcBuilder::devnet()) + .offchain_worker(OffchainWorkerBuilder::devnet()) + .role(Role::Authority) + .state_pruning(PruningMode::ArchiveAll) + .blocks_pruning(BlocksPruning::Some(256)) + } + + /// Get configuration for saving on disk + pub fn configuration(self) -> Config { + self._build().expect("Build is infallible") + } + + /// New builder + pub fn new() -> Self { + Self::default() + } + + /// Start a node with supplied parameters + pub async fn build( + self, + directory: impl AsRef, + chain_spec: ChainSpec, + ) -> anyhow::Result> { + self.configuration().build(directory, chain_spec).await + } +} + +sdk_substrate::derive_base!( @ Base => Builder); diff --git a/sdk/node/src/chain_spec.rs b/sdk/node/src/chain_spec.rs new file mode 100644 index 00000000..9f6140b9 --- /dev/null +++ b/sdk/node/src/chain_spec.rs @@ -0,0 +1,500 @@ +//! Subspace chain configurations. + +use std::collections::BTreeSet; +use std::marker::PhantomData; +use std::num::NonZeroU32; + +use hex_literal::hex; +use parity_scale_codec::Encode; +use sc_service::{ChainType, NoExtension}; +use sc_subspace_chain_specs::{SerializableChainSpec, DEVNET_CHAIN_SPEC, GEMINI_3G_CHAIN_SPEC}; +use sc_telemetry::TelemetryEndpoints; +use sdk_utils::chain_spec as utils; +use sdk_utils::chain_spec::{chain_spec_properties, get_public_key_from_seed}; +use sp_consensus_subspace::FarmerPublicKey; +use sp_core::crypto::{Ss58Codec, UncheckedFrom}; +use sp_domains::storage::RawGenesis; +use sp_domains::{OperatorAllowList, OperatorPublicKey, RuntimeType}; +use sp_runtime::{BuildStorage, Percent}; +use subspace_core_primitives::PotKey; +use subspace_runtime::{ + AllowAuthoringBy, BalancesConfig, DomainsConfig, MaxDomainBlockSize, MaxDomainBlockWeight, + RuntimeConfigsConfig, RuntimeGenesisConfig, SubspaceConfig, SudoConfig, SystemConfig, + VestingConfig, MILLISECS_PER_BLOCK, WASM_BINARY, +}; +use subspace_runtime_primitives::{AccountId, Balance, BlockNumber, SSC}; + +use crate::domains::evm_chain_spec; +use crate::domains::evm_chain_spec::SpecId; + +const SUBSPACE_TELEMETRY_URL: &str = "wss://telemetry.subspace.network/submit/"; + +/// List of accounts which should receive token grants, amounts are specified in +/// SSC. +const TOKEN_GRANTS: &[(&str, u128)] = &[ + ("5Dns1SVEeDqnbSm2fVUqHJPCvQFXHVsgiw28uMBwmuaoKFYi", 3_000_000), + ("5DxtHHQL9JGapWCQARYUAWj4yDcwuhg9Hsk5AjhEzuzonVyE", 1_500_000), + ("5EHhw9xuQNdwieUkNoucq2YcateoMVJQdN8EZtmRy3roQkVK", 133_333), + ("5C5qYYCQBnanGNPGwgmv6jiR2MxNPrGnWYLPFEyV1Xdy2P3x", 178_889), + ("5GBWVfJ253YWVPHzWDTos1nzYZpa9TemP7FpQT9RnxaFN6Sz", 350_000), + ("5F9tEPid88uAuGbjpyegwkrGdkXXtaQ9sGSWEnYrfVCUCsen", 111_111), + ("5DkJFCv3cTBsH5y1eFT94DXMxQ3EmVzYojEA88o56mmTKnMp", 244_444), + ("5G23o1yxWgVNQJuL4Y9UaCftAFvLuMPCRe7BCARxCohjoHc9", 311_111), + ("5GhHwuJoK1b7uUg5oi8qUXxWHdfgzv6P5CQSdJ3ffrnPRgKM", 317_378), + ("5EqBwtqrCV427xCtTsxnb9X2Qay39pYmKNk9wD9Kd62jLS97", 300_000), + ("5D9pNnGCiZ9UqhBQn5n71WFVaRLvZ7znsMvcZ7PHno4zsiYa", 600_000), + ("5DXfPcXUcP4BG8LBSkJDrfFNApxjWySR6ARfgh3v27hdYr5S", 430_000), + ("5CXSdDJgzRTj54f9raHN2Z5BNPSMa2ETjqCTUmpaw3ECmwm4", 330_000), + ("5DqKxL7bQregQmUfFgzTMfRKY4DSvA1KgHuurZWYmxYSCmjY", 200_000), + ("5CfixiS93yTwHQbzzfn8P2tMxhKXdTx7Jam9htsD7XtiMFtn", 27_800), + ("5FZe9YzXeEXe7sK5xLR8yCmbU8bPJDTZpNpNbToKvSJBUiEo", 18_067), + ("5FZwEgsvZz1vpeH7UsskmNmTpbfXvAcojjgVfShgbRqgC1nx", 27_800), +]; + +/// Additional subspace specific genesis parameters. +pub struct GenesisParams { + enable_rewards: bool, + enable_storage_access: bool, + allow_authoring_by: AllowAuthoringBy, + pot_slot_iterations: NonZeroU32, + enable_domains: bool, + enable_balance_transfers: bool, + confirmation_depth_k: u32, +} + +struct GenesisDomainParams { + domain_name: String, + operator_allow_list: OperatorAllowList, + operator_signing_key: OperatorPublicKey, +} + +/// Chain spec type for the subspace +pub type ChainSpec = SerializableChainSpec; + +/// Gemini 3g chain spec +pub fn gemini_3g() -> ChainSpec { + ChainSpec::from_json_bytes(GEMINI_3G_CHAIN_SPEC.as_bytes()).expect("Always valid") +} + +/// Gemini 3g compiled chain spec +pub fn gemini_3g_compiled() -> ChainSpec { + ChainSpec::from_genesis( + // Name + "Subspace Gemini 3g", + // ID + "subspace_gemini_3g", + ChainType::Custom("Subspace Gemini 3g".to_string()), + || { + let sudo_account = + AccountId::from_ss58check("5DNwQTHfARgKoa2NdiUM51ZUow7ve5xG9S2yYdSbVQcnYxBA") + .expect("Wrong root account address"); + + let mut balances = vec![(sudo_account.clone(), 1_000 * SSC)]; + let vesting_schedules = TOKEN_GRANTS + .iter() + .flat_map(|&(account_address, amount)| { + let account_id = AccountId::from_ss58check(account_address) + .expect("Wrong vesting account address"); + let amount: Balance = amount * SSC; + + // TODO: Adjust start block to real value before mainnet launch + let start_block = 100_000_000; + let one_month_in_blocks = + u32::try_from(3600 * 24 * 30 * MILLISECS_PER_BLOCK / 1000) + .expect("One month of blocks always fits in u32; qed"); + + // Add balance so it can be locked + balances.push((account_id.clone(), amount)); + + [ + // 1/4 of tokens are released after 1 year. + (account_id.clone(), start_block, one_month_in_blocks * 12, 1, amount / 4), + // 1/48 of tokens are released every month after that for 3 more years. + ( + account_id, + start_block + one_month_in_blocks * 12, + one_month_in_blocks, + 36, + amount / 48, + ), + ] + }) + .collect::>(); + subspace_genesis_config( + SpecId::Gemini, + WASM_BINARY.expect("Wasm binary must be built for Gemini"), + sudo_account.clone(), + balances, + vesting_schedules, + GenesisParams { + enable_rewards: false, + enable_storage_access: false, + allow_authoring_by: AllowAuthoringBy::RootFarmer( + FarmerPublicKey::unchecked_from(hex_literal::hex!( + "8aecbcf0b404590ddddc01ebacb205a562d12fdb5c2aa6a4035c1a20f23c9515" + )), + ), + // TODO: Adjust once we bench PoT on faster hardware + // About 1s on 6.0 GHz Raptor Lake CPU (14900K) + pot_slot_iterations: NonZeroU32::new(200_032_000).expect("Not zero; qed"), + enable_domains: true, + enable_balance_transfers: true, + confirmation_depth_k: 100, // TODO: Proper value here + }, + GenesisDomainParams { + domain_name: "nova".to_owned(), + operator_allow_list: OperatorAllowList::Operators(BTreeSet::from_iter(vec![ + sudo_account, + ])), + operator_signing_key: OperatorPublicKey::unchecked_from(hex!( + "aa3b05b4d649666723e099cf3bafc2f2c04160ebe0e16ddc82f72d6ed97c4b6b" + )), + }, + ) + }, + // Bootnodes + vec![], + // Telemetry + Some( + TelemetryEndpoints::new(vec![(SUBSPACE_TELEMETRY_URL.into(), 1)]) + .expect("Telemetry value is valid"), + ), + // Protocol ID + Some("subspace-gemini-3g"), + None, + // Properties + Some({ + let mut properties = chain_spec_properties(); + properties.insert( + "potExternalEntropy".to_string(), + serde_json::to_value(None::).expect("Serialization is not infallible; qed"), + ); + properties + }), + // Extensions + NoExtension::None, + ) +} + +/// Dev net raw configuration +pub fn devnet_config() -> ChainSpec { + ChainSpec::from_json_bytes(DEVNET_CHAIN_SPEC.as_bytes()).expect("Always valid") +} + +/// Dev net compiled configuration +pub fn devnet_config_compiled() -> ChainSpec { + ChainSpec::from_genesis( + // Name + "Subspace Dev network", + // ID + "subspace_devnet", + ChainType::Custom("Testnet".to_string()), + || { + let sudo_account = + AccountId::from_ss58check("5CXTmJEusve5ixyJufqHThmy4qUrrm6FyLCR7QfE4bbyMTNC") + .expect("Wrong root account address"); + + let mut balances = vec![(sudo_account.clone(), 1_000 * SSC)]; + let vesting_schedules = TOKEN_GRANTS + .iter() + .flat_map(|&(account_address, amount)| { + let account_id = AccountId::from_ss58check(account_address) + .expect("Wrong vesting account address"); + let amount: Balance = amount * SSC; + + // TODO: Adjust start block to real value before mainnet launch + let start_block = 100_000_000; + let one_month_in_blocks = + u32::try_from(3600 * 24 * 30 * MILLISECS_PER_BLOCK / 1000) + .expect("One month of blocks always fits in u32; qed"); + + // Add balance so it can be locked + balances.push((account_id.clone(), amount)); + + [ + // 1/4 of tokens are released after 1 year. + (account_id.clone(), start_block, one_month_in_blocks * 12, 1, amount / 4), + // 1/48 of tokens are released every month after that for 3 more years. + ( + account_id, + start_block + one_month_in_blocks * 12, + one_month_in_blocks, + 36, + amount / 48, + ), + ] + }) + .collect::>(); + subspace_genesis_config( + evm_chain_spec::SpecId::DevNet, + WASM_BINARY.expect("Wasm binary must be built for Gemini"), + sudo_account, + balances, + vesting_schedules, + GenesisParams { + enable_rewards: false, + enable_storage_access: false, + allow_authoring_by: AllowAuthoringBy::FirstFarmer, + pot_slot_iterations: NonZeroU32::new(150_000_000).expect("Not zero; qed"), + enable_domains: true, + enable_balance_transfers: true, + confirmation_depth_k: 100, // TODO: Proper value here + }, + GenesisDomainParams { + domain_name: "evm-domain".to_owned(), + operator_allow_list: OperatorAllowList::Anyone, + operator_signing_key: OperatorPublicKey::unchecked_from(hex!( + "aa3b05b4d649666723e099cf3bafc2f2c04160ebe0e16ddc82f72d6ed97c4b6b" + )), + }, + ) + }, + // Bootnodes + vec![], + // Telemetry + Some( + TelemetryEndpoints::new(vec![(SUBSPACE_TELEMETRY_URL.into(), 1)]) + .expect("Telemetry value is valid"), + ), + // Protocol ID + Some("subspace-devnet"), + None, + // Properties + Some({ + let mut properties = chain_spec_properties(); + properties.insert( + "potExternalEntropy".to_string(), + serde_json::to_value(None::).expect("Serialization is not infallible; qed"), + ); + properties + }), + // Extensions + None, + ) +} + +/// New dev chain spec +pub fn dev_config() -> ChainSpec { + let wasm_binary = WASM_BINARY.expect("Development wasm not available"); + + ChainSpec::from_genesis( + // Name + "Subspace development", + // ID + "subspace_dev", + ChainType::Development, + || { + subspace_genesis_config( + evm_chain_spec::SpecId::Dev, + wasm_binary, + // Sudo account + utils::get_account_id_from_seed("Alice"), + // Pre-funded accounts + vec![ + (utils::get_account_id_from_seed("Alice"), 1_000 * SSC), + (utils::get_account_id_from_seed("Bob"), 1_000 * SSC), + (utils::get_account_id_from_seed("Alice//stash"), 1_000 * SSC), + (utils::get_account_id_from_seed("Bob//stash"), 1_000 * SSC), + ], + vec![], + GenesisParams { + enable_rewards: false, + enable_balance_transfers: true, + enable_storage_access: false, + allow_authoring_by: AllowAuthoringBy::Anyone, + pot_slot_iterations: NonZeroU32::new(100_000_000).expect("Not zero; qed"), + enable_domains: true, + confirmation_depth_k: 100, + }, + GenesisDomainParams { + domain_name: "evm-domain".to_owned(), + operator_allow_list: OperatorAllowList::Anyone, + operator_signing_key: get_public_key_from_seed::("Alice"), + }, + ) + }, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + None, + None, + // Properties + Some({ + let mut properties = chain_spec_properties(); + properties.insert( + "potExternalEntropy".to_string(), + serde_json::to_value(None::).expect("Serialization is not infallible; qed"), + ); + properties + }), + // Extensions + None, + ) +} + +/// New local chain spec +pub fn local_config() -> ChainSpec { + let wasm_binary = WASM_BINARY.expect("Development wasm not available"); + + ChainSpec::from_genesis( + // Name + "Subspace local", + // ID + "subspace_local", + ChainType::Local, + || { + subspace_genesis_config( + evm_chain_spec::SpecId::Local, + wasm_binary, + // Sudo account + utils::get_account_id_from_seed("Alice"), + // Pre-funded accounts + vec![ + (utils::get_account_id_from_seed("Alice"), 1_000 * SSC), + (utils::get_account_id_from_seed("Bob"), 1_000 * SSC), + (utils::get_account_id_from_seed("Charlie"), 1_000 * SSC), + (utils::get_account_id_from_seed("Dave"), 1_000 * SSC), + (utils::get_account_id_from_seed("Eve"), 1_000 * SSC), + (utils::get_account_id_from_seed("Ferdie"), 1_000 * SSC), + (utils::get_account_id_from_seed("Alice//stash"), 1_000 * SSC), + (utils::get_account_id_from_seed("Bob//stash"), 1_000 * SSC), + (utils::get_account_id_from_seed("Charlie//stash"), 1_000 * SSC), + (utils::get_account_id_from_seed("Dave//stash"), 1_000 * SSC), + (utils::get_account_id_from_seed("Eve//stash"), 1_000 * SSC), + (utils::get_account_id_from_seed("Ferdie//stash"), 1_000 * SSC), + ], + vec![], + GenesisParams { + enable_rewards: false, + enable_balance_transfers: true, + enable_storage_access: false, + allow_authoring_by: AllowAuthoringBy::Anyone, + pot_slot_iterations: NonZeroU32::new(100_000_000).expect("Not zero; qed"), + enable_domains: true, + confirmation_depth_k: 1, + }, + GenesisDomainParams { + domain_name: "evm-domain".to_owned(), + operator_allow_list: OperatorAllowList::Anyone, + operator_signing_key: get_public_key_from_seed::("Alice"), + }, + ) + }, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + None, + None, + // Properties + Some({ + let mut properties = chain_spec_properties(); + properties.insert( + "potExternalEntropy".to_string(), + serde_json::to_value(None::).expect("Serialization is not infallible; qed"), + ); + properties + }), + // Extensions + None, + ) +} + +/// Configure initial storage state for FRAME modules. +fn subspace_genesis_config( + evm_domain_spec_id: evm_chain_spec::SpecId, + wasm_binary: &[u8], + sudo_account: AccountId, + balances: Vec<(AccountId, Balance)>, + // who, start, period, period_count, per_period + vesting: Vec<(AccountId, BlockNumber, BlockNumber, u32, Balance)>, + genesis_params: GenesisParams, + genesis_domain_params: GenesisDomainParams, +) -> RuntimeGenesisConfig { + let GenesisParams { + enable_rewards, + enable_storage_access, + allow_authoring_by, + pot_slot_iterations, + enable_domains, + enable_balance_transfers, + confirmation_depth_k, + } = genesis_params; + + let domain_genesis_config = evm_chain_spec::get_testnet_genesis_by_spec_id(evm_domain_spec_id); + + let raw_genesis_storage = { + let storage = domain_genesis_config + .build_storage() + .expect("Failed to build genesis storage from genesis runtime config"); + let raw_genesis = RawGenesis::from_storage(storage); + raw_genesis.encode() + }; + + RuntimeGenesisConfig { + domains: DomainsConfig { + genesis_domain: Some(sp_domains::GenesisDomain { + runtime_name: "evm".into(), + runtime_type: RuntimeType::Evm, + runtime_version: evm_domain_runtime::VERSION, + + // Domain config, mainly for placeholder the concrete value TBD + raw_genesis_storage, + owner_account_id: sudo_account.clone(), + domain_name: genesis_domain_params.domain_name, + max_block_size: MaxDomainBlockSize::get(), + max_block_weight: MaxDomainBlockWeight::get(), + bundle_slot_probability: (1, 1), + target_bundles_per_block: 10, + operator_allow_list: genesis_domain_params.operator_allow_list, + signing_key: genesis_domain_params.operator_signing_key, + nomination_tax: Percent::from_percent(5), + minimum_nominator_stake: 100 * SSC, + }), + }, + system: SystemConfig { + // Add Wasm runtime to storage. + code: wasm_binary.to_vec(), + ..Default::default() + }, + balances: BalancesConfig { balances }, + transaction_payment: Default::default(), + sudo: SudoConfig { + // Assign network admin rights. + key: Some(sudo_account), + }, + subspace: SubspaceConfig { + enable_rewards, + enable_storage_access, + allow_authoring_by, + pot_slot_iterations, + phantom: PhantomData, + }, + vesting: VestingConfig { vesting }, + runtime_configs: RuntimeConfigsConfig { + enable_domains, + enable_balance_transfers, + confirmation_depth_k, + }, + } +} + +#[cfg(test)] +mod tests { + #![allow(clippy::unwrap_used)] + + use super::*; + + #[test] + fn test_chain_specs() { + gemini_3g_compiled(); + gemini_3g(); + devnet_config_compiled(); + devnet_config(); + dev_config(); + local_config(); + } +} diff --git a/sdk/node/src/domains/builder.rs b/sdk/node/src/domains/builder.rs new file mode 100644 index 00000000..be4d8ed4 --- /dev/null +++ b/sdk/node/src/domains/builder.rs @@ -0,0 +1,462 @@ +use std::path::Path; +use std::sync::Arc; + +use anyhow::{anyhow, Result}; +use cross_domain_message_gossip::{ChainTxPoolMsg, Message}; +use derivative::Derivative; +use derive_builder::Builder; +use domain_client_operator::{BootstrapResult, Bootstrapper}; +use domain_runtime_primitives::opaque::Block as DomainBlock; +use futures::future; +use futures::future::Either::{Left, Right}; +use sc_consensus_subspace::block_import::BlockImportingNotification; +use sc_consensus_subspace::notification::SubspaceNotificationStream; +use sc_consensus_subspace::slot_worker::NewSlotNotification; +use sc_network::NetworkService; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; +use sc_utils::mpsc::{TracingUnboundedReceiver, TracingUnboundedSender}; +use sdk_substrate::{Base, BaseBuilder}; +use sdk_utils::{DestructorSet, MultiaddrWithPeerId, TaskOutput}; +use serde::{Deserialize, Serialize}; +use sp_core::H256; +use sp_domains::{DomainId, OperatorId}; +use sp_runtime::traits::Block as BlockT; +use subspace_runtime::RuntimeApi as CRuntimeApi; +use subspace_runtime_primitives::opaque::Block as CBlock; +use subspace_service::transaction_pool::FullPool; +use subspace_service::FullClient as CFullClient; +use tokio::sync::{oneshot, RwLock}; + +use crate::domains::domain::{Domain, DomainBuildingProgress}; +use crate::domains::domain_instance_starter::DomainInstanceStarter; +use crate::domains::evm_chain_spec; +use crate::ExecutorDispatch as CExecutorDispatch; + +/// Link to the consensus node +pub struct ConsensusNodeLink { + /// Consensus client + pub consensus_client: Arc>, + /// Consensus network + pub consensus_network: Arc>, + /// Block import notification stream for consensus chain + pub block_importing_notification_stream: + SubspaceNotificationStream>, + /// New slot notification stream for consensus chain + pub new_slot_notification_stream: SubspaceNotificationStream, + /// Reference to the consensus node's network sync service + pub consensus_sync_service: Arc>, + /// Consensus tx pool + pub consensus_transaction_pool: Arc< + FullPool< + CFullClient, + CBlock, + ::Header, + >, + >, + /// Cross domain message gossip worker's message sink + pub gossip_message_sink: TracingUnboundedSender, + /// Cross domain message receiver for the domain + pub domain_message_receiver: TracingUnboundedReceiver, + /// Domain boot node property read from chain-spec + pub chain_spec_domains_bootstrap_nodes: Vec, +} + +/// Domain node configuration +#[derive(Debug, Clone, Derivative, Builder, Deserialize, Serialize, PartialEq)] +#[builder(pattern = "owned", build_fn(private, name = "_build"))] +#[non_exhaustive] +pub struct DomainConfig { + /// Chain ID of domain node (must be same as the consensus node's chain id) + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub chain_id: String, + + /// Uniquely identifies a domain + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub domain_id: DomainId, + + /// Operator Id + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub maybe_operator_id: Option, + + /// Additional arguments to pass to domain instance starter + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub additional_args: Vec, + + #[doc(hidden)] + #[builder( + setter(into, strip_option), + field(type = "BaseBuilder", build = "self.base.build()") + )] + #[serde(flatten, skip_serializing_if = "sdk_utils::is_default")] + pub base: Base, +} + +impl Default for DomainConfig { + fn default() -> Self { + DomainConfig { + chain_id: "".to_string(), + domain_id: Default::default(), + maybe_operator_id: None, + additional_args: vec![], + base: Default::default(), + } + } +} + +sdk_substrate::derive_base!(@ Base => DomainConfigBuilder); + +impl DomainConfig { + /// Dev configuraiton + pub fn dev() -> DomainConfigBuilder { + DomainConfigBuilder::dev() + } + + /// Gemini 3g configuraiton + pub fn gemini_3g() -> DomainConfigBuilder { + DomainConfigBuilder::gemini_3g() + } + + /// Devnet configuraiton + pub fn devnet() -> DomainConfigBuilder { + DomainConfigBuilder::devnet() + } +} + +impl DomainConfigBuilder { + /// New builder + pub fn new() -> Self { + Self::default() + } + + /// Dev chain configuration + pub fn dev() -> Self { + Self::new().chain_id("dev").domain_id(DomainId::new(0)).dev_key_seed("//Alice") + } + + /// Gemini 3g configuration + pub fn gemini_3g() -> Self { + Self::new().chain_id("gemini-3g").domain_id(DomainId::new(0)) + } + + /// Devnet chain configuration + pub fn devnet() -> Self { + Self::new().chain_id("devnet").domain_id(DomainId::new(0)) + } + + /// Get configuration for saving on disk + pub fn configuration(self) -> DomainConfig { + self._build().expect("Build is infallible") + } + + /// Build a domain node + pub async fn build( + self, + directory: impl AsRef + Send + 'static, + consensus_node_link: ConsensusNodeLink, + ) -> Result { + self.configuration().build(directory, consensus_node_link).await + } +} + +impl DomainConfig { + /// Build a domain node + pub async fn build( + self, + directory: impl AsRef + Send + 'static, + consensus_node_link: ConsensusNodeLink, + ) -> Result { + let ConsensusNodeLink { + consensus_client, + consensus_network, + block_importing_notification_stream, + new_slot_notification_stream, + consensus_sync_service, + consensus_transaction_pool, + gossip_message_sink, + domain_message_receiver, + chain_spec_domains_bootstrap_nodes, + } = consensus_node_link; + let printable_domain_id: u32 = self.domain_id.into(); + let mut destructor_set = + DestructorSet::new(format!("domain-{}-worker-destructor", printable_domain_id)); + let shared_rpc_handler = Arc::new(RwLock::new(None)); + let shared_progress_data = Arc::new(RwLock::new(DomainBuildingProgress::Default)); + + let (bootstrapping_result_sender, bootstrapping_result_receiver) = oneshot::channel(); + let (bootstrapping_worker_drop_sender, bootstrapping_worker_drop_receiver) = + oneshot::channel(); + let domain_bootstrapper_join_handle = sdk_utils::task_spawn( + format!("domain/domain-{}/bootstrapping", printable_domain_id), + { + let consensus_client = consensus_client.clone(); + let shared_progress_data = shared_progress_data.clone(); + async move { + *shared_progress_data.write().await = DomainBuildingProgress::BuildingStarted; + let bootstrapper = + Bootstrapper::::new(consensus_client.clone()); + match future::select( + Box::pin(bootstrapper.fetch_domain_bootstrap_info(self.domain_id)), + bootstrapping_worker_drop_receiver, + ) + .await + { + Left((result, _)) => { + let result = result + .map_err(|bootstrapping_error| { + anyhow!( + "Error while bootstrapping the domain:{} : {:?}", + printable_domain_id, + bootstrapping_error + ) + }) + .map(TaskOutput::Value); + let _ = bootstrapping_result_sender.send(result); + } + Right(_) => { + tracing::info!( + "Received drop signal while bootstrapping the domain with \ + domain_id: {:?}. exiting...", + printable_domain_id + ); + let _ = bootstrapping_result_sender.send(Ok(TaskOutput::Cancelled( + format!( + "received cancellation signal while bootstrapping the domain: \ + {}.", + printable_domain_id + ), + ))); + } + }; + } + }, + ); + + destructor_set.add_async_destructor({ + async move { + let _ = bootstrapping_worker_drop_sender.send(()); + domain_bootstrapper_join_handle.await.expect( + "If joining is failing; that means the future being joined panicked, so we \ + need to propagate it; qed.", + ); + } + })?; + + let (domain_runner_result_sender, domain_runner_result_receiver) = oneshot::channel(); + let (domain_runner_drop_sender, mut domain_runner_drop_receiver) = oneshot::channel(); + let domain_runner_join_handle = + sdk_utils::task_spawn(format!("domain/domain-{}/running", printable_domain_id), { + let shared_rpc_handler = shared_rpc_handler.clone(); + let shared_progress_data = shared_progress_data.clone(); + async move { + let bootstrap_result = match future::select( + bootstrapping_result_receiver, + &mut domain_runner_drop_receiver, + ) + .await + { + Left((wrapped_result, _)) => match wrapped_result { + Ok(result) => match result { + Ok(boostrap_task_output) => match boostrap_task_output { + TaskOutput::Value(bootstrap_result) => bootstrap_result, + TaskOutput::Cancelled(reason) => { + tracing::info!( + "Bootstrapping task was cancelled for reason: {:?} \ + for domain_id: {:?}. exiting...", + reason, + printable_domain_id + ); + let _ = domain_runner_result_sender.send(Ok( + TaskOutput::Cancelled(format!( + "Bootstrapping task was cancelled for reason: \ + {:?} for domain_id: {:?}. exiting...", + reason, printable_domain_id + )), + )); + return; + } + }, + Err(bootstrap_error) => { + let _ = domain_runner_result_sender.send(Err(anyhow!( + "received an error from domain bootstrapper for domain \ + id: {} error: {}", + printable_domain_id, + bootstrap_error + ))); + return; + } + }, + Err(recv_err) => { + let _ = domain_runner_result_sender.send(Err(anyhow!( + "unable to receive message from domain bootstrapper for \ + domain id: {} due to an error: {}", + printable_domain_id, + recv_err + ))); + return; + } + }, + Right(_) => { + tracing::info!( + "Received drop signal while bootstrapping the domain with \ + domain_id: {:?}. exiting...", + self.domain_id + ); + let _ = domain_runner_result_sender.send(Ok(TaskOutput::Cancelled( + format!( + "received cancellation signal while waiting for bootstrapping \ + result for domain: {}.", + printable_domain_id + ), + ))); + return; + } + }; + + *shared_progress_data.write().await = DomainBuildingProgress::Bootstrapped; + + let BootstrapResult { + domain_instance_data, + domain_created_at, + imported_block_notification_stream, + } = bootstrap_result; + + let runtime_type = domain_instance_data.runtime_type.clone(); + + let domain_spec_result = evm_chain_spec::create_domain_spec( + self.chain_id.as_str(), + domain_instance_data.raw_genesis, + ); + + let domain_spec = match domain_spec_result { + Ok(domain_spec) => domain_spec, + Err(domain_spec_creation_error) => { + let _ = domain_runner_result_sender.send(Err(anyhow!( + "Error while creating domain spec for the domain: {} Error: {:?}", + printable_domain_id, + domain_spec_creation_error + ))); + return; + } + }; + + let domains_directory = + directory.as_ref().join(format!("domain-{}", printable_domain_id)); + let mut service_config = + self.base.configuration(domains_directory, domain_spec).await; + + if service_config.network.boot_nodes.is_empty() { + service_config.network.boot_nodes = chain_spec_domains_bootstrap_nodes + .clone() + .into_iter() + .map(Into::into) + .collect::>(); + } + + let domain_starter = DomainInstanceStarter { + service_config, + consensus_network, + maybe_operator_id: self.maybe_operator_id, + domain_id: self.domain_id, + runtime_type, + additional_arguments: self.additional_args.clone(), + consensus_client, + block_importing_notification_stream, + new_slot_notification_stream, + consensus_sync_service, + consensus_offchain_tx_pool_factory: OffchainTransactionPoolFactory::new( + consensus_transaction_pool.clone(), + ), + gossip_message_sink, + domain_message_receiver, + }; + + *shared_progress_data.write().await = DomainBuildingProgress::PreparingToStart; + + let maybe_start_data = domain_starter + .prepare_for_start(domain_created_at, imported_block_notification_stream) + .await; + let (rpc_handler, domain_start_handle) = match maybe_start_data { + Ok(start_data) => start_data, + Err(start_error) => { + let _ = domain_runner_result_sender.send(Err(anyhow!( + "Error while preparing to start domain for the domain id: {} \ + Error: {:?}", + printable_domain_id, + start_error + ))); + return; + } + }; + + let shared_rpc_handler = shared_rpc_handler.clone(); + shared_rpc_handler.write().await.replace(rpc_handler); + + *shared_progress_data.write().await = DomainBuildingProgress::Starting; + + match future::select(domain_start_handle, &mut domain_runner_drop_receiver) + .await + { + Left((wrapped_result, _)) => match wrapped_result { + Ok(result) => match result { + Ok(_) => { + let _ = + domain_runner_result_sender.send(Ok(TaskOutput::Value(()))); + } + Err(run_error) => { + let _ = domain_runner_result_sender.send(Err(anyhow!( + "received an error while trying to run the domain id: {} \ + error: {}", + printable_domain_id, + run_error + ))); + } + }, + Err(join_error) => { + let _ = domain_runner_result_sender.send(Err(anyhow!( + "unable to join domain runner for domain id: {} due to an \ + error: {}", + printable_domain_id, + join_error + ))); + } + }, + Right(_) => { + tracing::info!( + "Received drop signal while running the domain with domain_id: \ + {:?}. exiting...", + self.domain_id + ); + let _ = domain_runner_result_sender.send(Ok(TaskOutput::Cancelled( + format!( + "Received cancellation signal while waiting for domain runner \ + for domain: {}.", + printable_domain_id + ), + ))); + } + }; + } + }); + + destructor_set.add_async_destructor({ + async move { + let _ = domain_runner_drop_sender.send(()); + domain_runner_join_handle.await.expect( + "If joining is failing; that means the future being joined panicked, so we \ + need to propagate it; qed.", + ); + } + })?; + + Ok(Domain { + _destructors: destructor_set, + rpc_handlers: shared_rpc_handler, + domain_runner_result_receiver, + current_building_progress: shared_progress_data, + }) + } +} diff --git a/sdk/node/src/domains/domain.rs b/sdk/node/src/domains/domain.rs new file mode 100644 index 00000000..46b5b5ed --- /dev/null +++ b/sdk/node/src/domains/domain.rs @@ -0,0 +1,49 @@ +use std::sync::Arc; + +use derivative::Derivative; +use sc_service::RpcHandlers; +use sdk_utils::{DestructorSet, TaskOutput}; + +/// Progress of Domain +#[derive(Derivative)] +#[derivative(Debug)] +pub enum DomainBuildingProgress { + Default, + BuildingStarted, + Bootstrapped, + PreparingToStart, + Starting, +} + +/// Domain structure +#[derive(Derivative)] +#[derivative(Debug)] +#[must_use = "Domain should be closed"] +pub struct Domain { + #[doc(hidden)] + pub _destructors: DestructorSet, + /// Rpc Handlers for Domain node + #[derivative(Debug = "ignore")] + pub rpc_handlers: Arc>>, + /// Domain building progress tracker + pub current_building_progress: Arc>, + /// Oneshot channel to receive result of domain runner + #[derivative(Debug = "ignore")] + pub domain_runner_result_receiver: + tokio::sync::oneshot::Receiver>>, +} + +impl Domain { + /// Shuts down domain node + pub async fn close(self) -> anyhow::Result<()> { + self._destructors.async_drop().await?; + let output = self.domain_runner_result_receiver.await??; + match output { + TaskOutput::Value(_) => Ok(()), + TaskOutput::Cancelled(reason) => { + tracing::warn!("Domain runner task was cancelled due to reason: {}", reason); + Ok(()) + } + } + } +} diff --git a/sdk/node/src/domains/domain_instance_starter.rs b/sdk/node/src/domains/domain_instance_starter.rs new file mode 100644 index 00000000..5546df01 --- /dev/null +++ b/sdk/node/src/domains/domain_instance_starter.rs @@ -0,0 +1,162 @@ +use std::sync::Arc; + +use cross_domain_message_gossip::ChainTxPoolMsg; +use domain_client_operator::OperatorStreams; +use domain_eth_service::provider::EthProvider; +use domain_eth_service::DefaultEthConfig; +use domain_runtime_primitives::opaque::Block as DomainBlock; +use domain_service::{FullBackend, FullClient}; +use futures::StreamExt; +use sc_client_api::ImportNotifications; +use sc_consensus_subspace::block_import::BlockImportingNotification; +use sc_consensus_subspace::notification::SubspaceNotificationStream; +use sc_consensus_subspace::slot_worker::NewSlotNotification; +use sc_network::NetworkService; +use sc_service::{BasePath, Configuration, RpcHandlers}; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; +use sc_utils::mpsc::{TracingUnboundedReceiver, TracingUnboundedSender}; +use sp_core::H256; +use sp_domains::{DomainId, OperatorId, RuntimeType}; +use sp_runtime::traits::NumberFor; +use subspace_runtime::RuntimeApi as CRuntimeApi; +use subspace_runtime_primitives::opaque::Block as CBlock; +use subspace_service::FullClient as CFullClient; +use tokio::task::JoinHandle; + +use crate::domains::evm_domain_executor_dispatch::EVMDomainExecutorDispatch; +use crate::domains::utils::AccountId20; +use crate::ExecutorDispatch as CExecutorDispatch; + +/// `DomainInstanceStarter` used to start a domain instance node based on the +/// given bootstrap result +pub struct DomainInstanceStarter { + pub service_config: Configuration, + pub maybe_operator_id: Option, + pub domain_id: DomainId, + pub runtime_type: RuntimeType, + pub additional_arguments: Vec, + pub consensus_client: Arc>, + pub consensus_network: Arc>, + pub block_importing_notification_stream: + SubspaceNotificationStream>, + pub new_slot_notification_stream: SubspaceNotificationStream, + pub consensus_sync_service: Arc>, + pub consensus_offchain_tx_pool_factory: OffchainTransactionPoolFactory, + pub domain_message_receiver: TracingUnboundedReceiver, + pub gossip_message_sink: TracingUnboundedSender, +} + +impl DomainInstanceStarter { + pub async fn prepare_for_start( + self, + domain_created_at: NumberFor, + imported_block_notification_stream: ImportNotifications, + ) -> anyhow::Result<(RpcHandlers, JoinHandle>)> { + let DomainInstanceStarter { + domain_id, + consensus_network, + maybe_operator_id, + runtime_type, + mut additional_arguments, + service_config, + consensus_client, + block_importing_notification_stream, + new_slot_notification_stream, + consensus_sync_service, + consensus_offchain_tx_pool_factory, + domain_message_receiver, + gossip_message_sink, + } = self; + + let block_importing_notification_stream = || { + block_importing_notification_stream.subscribe().then( + |block_importing_notification| async move { + ( + block_importing_notification.block_number, + block_importing_notification.acknowledgement_sender, + ) + }, + ) + }; + + let new_slot_notification_stream = || { + new_slot_notification_stream.subscribe().then(|slot_notification| async move { + ( + slot_notification.new_slot_info.slot, + slot_notification.new_slot_info.global_randomness, + ) + }) + }; + + let operator_streams = OperatorStreams { + // TODO: proper value + consensus_block_import_throttling_buffer_size: 10, + block_importing_notification_stream: block_importing_notification_stream(), + imported_block_notification_stream, + new_slot_notification_stream: new_slot_notification_stream(), + _phantom: Default::default(), + acknowledgement_sender_stream: futures::stream::empty(), + }; + + match runtime_type { + RuntimeType::Evm => { + let eth_provider = EthProvider::< + evm_domain_runtime::TransactionConverter, + DefaultEthConfig< + FullClient< + DomainBlock, + evm_domain_runtime::RuntimeApi, + EVMDomainExecutorDispatch, + >, + FullBackend, + >, + >::new( + Some(BasePath::new(service_config.base_path.path())), + additional_arguments.drain(..), + ); + + let domain_params = domain_service::DomainParams { + domain_id, + domain_config: service_config, + domain_created_at, + maybe_operator_id, + consensus_client, + consensus_network, + consensus_offchain_tx_pool_factory, + consensus_network_sync_oracle: consensus_sync_service.clone(), + operator_streams, + gossip_message_sink, + domain_message_receiver, + provider: eth_provider, + skip_empty_bundle_production: true, + }; + + let mut domain_node = domain_service::new_full::< + _, + _, + _, + _, + _, + _, + evm_domain_runtime::RuntimeApi, + EVMDomainExecutorDispatch, + AccountId20, + _, + _, + >(domain_params) + .await + .map_err(anyhow::Error::new)?; + + let domain_start_join_handle = sdk_utils::task_spawn( + format!("domain-{}/start-domain", >::into(domain_id)), + async move { + domain_node.network_starter.start_network(); + domain_node.task_manager.future().await.map_err(anyhow::Error::new) + }, + ); + + Ok((domain_node.rpc_handlers.clone(), domain_start_join_handle)) + } + } + } +} diff --git a/sdk/node/src/domains/domain_node.rs b/sdk/node/src/domains/domain_node.rs new file mode 100644 index 00000000..c2accd42 --- /dev/null +++ b/sdk/node/src/domains/domain_node.rs @@ -0,0 +1,11 @@ +use derivative::Derivative; +use sdk_utils::DestructorSet; +use tokio::sync::oneshot; + +#[derive(Derivative)] +#[derivative(Debug)] +#[must_use = "Domain node should be closed"] +pub struct DomainNode { + pub domain_worker_result_receiver: oneshot::Receiver>, + pub _destructors: DestructorSet, +} diff --git a/sdk/node/src/domains/evm_chain_spec.rs b/sdk/node/src/domains/evm_chain_spec.rs new file mode 100644 index 00000000..f445a89e --- /dev/null +++ b/sdk/node/src/domains/evm_chain_spec.rs @@ -0,0 +1,238 @@ +//! System domain chain specs + +use std::str::FromStr; + +use evm_domain_runtime::{ + AccountId, BalancesConfig, EVMChainIdConfig, EVMConfig, Precompiles, RuntimeGenesisConfig, + SudoConfig, SystemConfig, WASM_BINARY, +}; +use hex_literal::hex; +use sc_service::{ChainSpec as _, ChainType}; +use sc_subspace_chain_specs::ExecutionChainSpec; +use sdk_utils::chain_spec::chain_spec_properties; +use sp_domains::storage::RawGenesis; +use subspace_runtime_primitives::SSC; + +/// Chain spec type for the system domain +pub type ChainSpec = ExecutionChainSpec; + +pub enum SpecId { + Dev, + Gemini, + DevNet, + Local, +} + +pub fn create_domain_spec(chain_id: &str, raw_genesis: RawGenesis) -> Result { + // The value of the `RuntimeGenesisConfig` doesn't matter since it will be + // overwritten later + let constructor = RuntimeGenesisConfig::default; + let mut chain_spec = match chain_id { + "dev" => development_config(constructor), + "gemini-3g" => gemini_3g_config(constructor), + "devnet" => devnet_config(constructor), + "" | "local" => local_testnet_config(constructor), + path => ChainSpec::from_json_file(std::path::PathBuf::from(path))?, + }; + + chain_spec.set_storage(raw_genesis.into_storage()); + + Ok(chain_spec) +} + +/// Development keys that will be injected automatically on polkadotjs apps +fn get_dev_accounts() -> Vec { + vec![ + // Alith key + AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")), + // Baltathar key + AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")), + // Charleth key + AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")), + // Dorothy + AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")), + ] +} + +pub fn get_testnet_genesis_by_spec_id(spec_id: SpecId) -> RuntimeGenesisConfig { + match spec_id { + SpecId::Dev => { + let accounts = get_dev_accounts(); + testnet_genesis( + accounts.clone(), + // Alith is Sudo + Some(accounts[0]), + ) + } + SpecId::Gemini => { + let sudo_account = AccountId::from_str("f31e60022e290708c17d6997c34de6a30d09438f") + .expect("Invalid Sudo account"); + testnet_genesis( + vec![ + // Sudo account + sudo_account, + ], + Some(sudo_account), + ) + } + SpecId::DevNet => { + let sudo_account = AccountId::from_str("b66a91845249464309fad766fd0ece8144547736") + .expect("Invalid Sudo account"); + testnet_genesis( + vec![ + // Sudo account + sudo_account, + ], + Some(sudo_account), + ) + } + SpecId::Local => { + let accounts = get_dev_accounts(); + testnet_genesis( + accounts.clone(), + // Alith is sudo + Some(accounts[0]), + ) + } + } +} + +/// Development config +pub fn development_config RuntimeGenesisConfig + 'static + Send + Sync>( + constructor: F, +) -> ChainSpec { + ChainSpec::from_genesis( + // Name + "Development", + // ID + "evm_domain_dev", + ChainType::Development, + constructor, + vec![], + None, + None, + None, + Some(chain_spec_properties()), + None, + ) +} + +/// Local config +pub fn local_testnet_config RuntimeGenesisConfig + 'static + Send + Sync>( + constructor: F, +) -> ChainSpec { + ChainSpec::from_genesis( + // Name + "Local Testnet", + // ID + "evm_domain_local_testnet", + ChainType::Local, + constructor, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + Some("evm-local"), + None, + // Properties + Some(chain_spec_properties()), + // Extensions + None, + ) +} + +/// Gemini 3g config +pub fn gemini_3g_config RuntimeGenesisConfig + 'static + Send + Sync>( + constructor: F, +) -> ChainSpec { + ChainSpec::from_genesis( + // Name + "Subspace Gemini 3g EVM Domain", + // ID + "subspace_gemini_3g_evm_domain", + ChainType::Live, + constructor, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + Some("subspace-gemini-3g-evm-domain"), + None, + // Properties + Some(chain_spec_properties()), + // Extensions + None, + ) +} + +pub fn devnet_config RuntimeGenesisConfig + 'static + Send + Sync>( + constructor: F, +) -> ChainSpec { + ChainSpec::from_genesis( + // Name + "Subspace Devnet EVM Domain", + // ID + "subspace_devnet_evm_domain", + ChainType::Custom("Testnet".to_string()), + constructor, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + Some("subspace-devnet-evm-domain"), + None, + // Properties + Some(chain_spec_properties()), + // Extensions + None, + ) +} + +fn testnet_genesis( + endowed_accounts: Vec, + maybe_sudo_account: Option, +) -> RuntimeGenesisConfig { + // This is the simplest bytecode to revert without returning any data. + // We will pre-deploy it under all of our precompiles to ensure they can be + // called from within contracts. + // (PUSH1 0x00 PUSH1 0x00 REVERT) + let revert_bytecode = vec![0x60, 0x00, 0x60, 0x00, 0xFD]; + + RuntimeGenesisConfig { + system: SystemConfig { + code: WASM_BINARY.expect("WASM binary was not build, please build it!").to_vec(), + ..Default::default() + }, + sudo: SudoConfig { key: maybe_sudo_account }, + transaction_payment: Default::default(), + balances: BalancesConfig { + balances: endowed_accounts.iter().cloned().map(|k| (k, 1_000_000 * SSC)).collect(), + }, + // this is set to default and chain_id will be set into genesis during the domain + // instantiation on Consensus runtime. + evm_chain_id: EVMChainIdConfig::default(), + evm: EVMConfig { + // We need _some_ code inserted at the precompile address so that + // the evm will actually call the address. + accounts: Precompiles::used_addresses() + .into_iter() + .map(|addr| { + ( + addr, + fp_evm::GenesisAccount { + nonce: Default::default(), + balance: Default::default(), + storage: Default::default(), + code: revert_bytecode.clone(), + }, + ) + }) + .collect(), + ..Default::default() + }, + ..Default::default() + } +} diff --git a/sdk/node/src/domains/evm_domain_executor_dispatch.rs b/sdk/node/src/domains/evm_domain_executor_dispatch.rs new file mode 100644 index 00000000..4255e213 --- /dev/null +++ b/sdk/node/src/domains/evm_domain_executor_dispatch.rs @@ -0,0 +1,19 @@ +use sc_executor::NativeExecutionDispatch; + +/// EVM domain executor instance. +pub struct EVMDomainExecutorDispatch; + +impl NativeExecutionDispatch for EVMDomainExecutorDispatch { + #[cfg(feature = "runtime-benchmarks")] + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + #[cfg(not(feature = "runtime-benchmarks"))] + type ExtendHostFunctions = (); + + fn dispatch(method: &str, data: &[u8]) -> Option> { + evm_domain_runtime::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + evm_domain_runtime::native_version() + } +} diff --git a/sdk/node/src/domains/mod.rs b/sdk/node/src/domains/mod.rs new file mode 100644 index 00000000..d8a19018 --- /dev/null +++ b/sdk/node/src/domains/mod.rs @@ -0,0 +1,7 @@ +pub mod builder; +pub mod domain; +pub mod domain_instance_starter; +pub mod domain_node; +pub mod evm_chain_spec; +pub mod evm_domain_executor_dispatch; +pub mod utils; diff --git a/sdk/node/src/domains/utils.rs b/sdk/node/src/domains/utils.rs new file mode 100644 index 00000000..6078ee89 --- /dev/null +++ b/sdk/node/src/domains/utils.rs @@ -0,0 +1,14 @@ +pub use evm_domain_runtime::AccountId as AccountId20; +use sp_core::crypto::AccountId32; +use sp_core::{ByteArray, H160}; +use sp_runtime::traits::Convert; + +pub struct AccountId32ToAccountId20Converter; + +impl Convert for AccountId32ToAccountId20Converter { + fn convert(acc: AccountId32) -> AccountId20 { + // Using the full hex key, truncating to the first 20 bytes (the first 40 hex + // chars) + H160::from_slice(&acc.as_slice()[0..20]).into() + } +} diff --git a/sdk/node/src/lib.rs b/sdk/node/src/lib.rs new file mode 100644 index 00000000..7efc10aa --- /dev/null +++ b/sdk/node/src/lib.rs @@ -0,0 +1,926 @@ +//! Crate with subspace node + +#![warn( + missing_docs, + clippy::dbg_macro, + clippy::unwrap_used, + clippy::disallowed_types, + unused_features +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![feature(concat_idents)] + +use std::io; +use std::path::Path; +use std::sync::Arc; +use std::time::Duration; + +use anyhow::Context; +use cross_domain_message_gossip::GossipWorkerBuilder; +use derivative::Derivative; +use frame_system::pallet_prelude::BlockNumberFor; +use futures::{FutureExt, Stream, StreamExt}; +use sc_consensus_subspace::archiver::SegmentHeadersStore; +use sc_network::network_state::NetworkState; +use sc_network::{NetworkService, NetworkStateInfo, SyncState}; +use sc_rpc_api::state::StateApiClient; +use sc_service::Configuration; +use sc_utils::mpsc::tracing_unbounded; +use sdk_dsn::{DsnOptions, DsnShared}; +use sdk_traits::Farmer; +use sdk_utils::{DestructorSet, MultiaddrWithPeerId, PublicKey, TaskOutput}; +use sp_consensus::SyncOracle; +use sp_consensus_subspace::digests::PreDigest; +use sp_core::traits::SpawnEssentialNamed; +use sp_messenger::messages::ChainId; +use sp_runtime::DigestItem; +use subspace_core_primitives::{HistorySize, SegmentIndex}; +use subspace_farmer::node_client::NodeClient; +use subspace_farmer::piece_cache::PieceCache as FarmerPieceCache; +use subspace_farmer_components::FarmerProtocolInfo; +use subspace_networking::{ + PieceByIndexRequest, PieceByIndexResponse, SegmentHeaderRequest, SegmentHeaderResponse, +}; +use subspace_rpc_primitives::MAX_SEGMENT_HEADERS_PER_REQUEST; +use subspace_runtime::RuntimeApi; +use subspace_runtime_primitives::opaque::{Block as OpaqueBlock, Header}; +use subspace_service::SubspaceConfiguration; +use tokio::sync::oneshot; + +mod builder; +pub mod chain_spec; +mod domains; + +pub use builder::*; +pub use domains::builder::{DomainConfig, DomainConfigBuilder}; +pub use domains::domain::Domain; +pub use subspace_runtime::RuntimeEvent as Event; +use tracing::Instrument; + +use crate::domains::builder::ConsensusNodeLink; + +/// Events from subspace pallet +pub type SubspaceEvent = pallet_subspace::Event; + +/// Events from subspace pallet +pub type RewardsEvent = pallet_rewards::Event; + +const SEGMENT_HEADERS_NUMBER_LIMIT: u64 = MAX_SEGMENT_HEADERS_PER_REQUEST as u64; + +fn pot_external_entropy( + consensus_chain_config: &Configuration, + config_pot_external_entropy: Option>, +) -> Result, sc_service::Error> { + let maybe_chain_spec_pot_external_entropy = consensus_chain_config + .chain_spec + .properties() + .get("potExternalEntropy") + .map(|d| serde_json::from_value(d.clone())) + .transpose() + .map_err(|error| { + sc_service::Error::Other(format!("Failed to decode PoT initial key: {error:?}")) + })? + .flatten(); + if maybe_chain_spec_pot_external_entropy.is_some() + && config_pot_external_entropy.is_some() + && maybe_chain_spec_pot_external_entropy != config_pot_external_entropy + { + tracing::warn!( + "--pot-external-entropy CLI argument was ignored due to chain spec having a different \ + explicit value" + ); + } + Ok(maybe_chain_spec_pot_external_entropy.or(config_pot_external_entropy).unwrap_or_default()) +} + +impl Config { + /// Start a node with supplied parameters + pub async fn build( + self, + directory: impl AsRef, + chain_spec: ChainSpec, + ) -> anyhow::Result> { + let Self { + base, + mut dsn, + sync_from_dsn, + storage_monitor, + enable_subspace_block_relay, + is_timekeeper, + timekeeper_cpu_cores, + pot_external_entropy: config_pot_external_entropy, + .. + } = self; + + let base = base.configuration(directory.as_ref(), chain_spec.clone()).await; + let name = base.network.node_name.clone(); + let database_source = base.database.clone(); + + let partial_components = + subspace_service::new_partial::( + &base, + &pot_external_entropy(&base, config_pot_external_entropy) + .context("Failed to get proof of time external entropy")?, + ) + .context("Failed to build a partial subspace node")?; + + let (subspace_networking, dsn, mut runner) = { + let keypair = { + let keypair = base + .network + .node_key + .clone() + .into_keypair() + .context("Failed to convert network keypair")? + .to_protobuf_encoding() + .context("Failed to convert network keypair")?; + + subspace_networking::libp2p::identity::Keypair::from_protobuf_encoding(&keypair) + .expect("Address is correct") + }; + + let chain_spec_boot_nodes = base + .chain_spec + .properties() + .get("dsnBootstrapNodes") + .cloned() + .map(serde_json::from_value::>) + .transpose() + .context("Failed to decode DSN bootsrap nodes")? + .unwrap_or_default(); + + tracing::trace!("Subspace networking starting."); + + dsn.boot_nodes.extend(chain_spec_boot_nodes); + let bootstrap_nodes = + dsn.boot_nodes.clone().into_iter().map(Into::into).collect::>(); + + let segment_header_store = partial_components.other.segment_headers_store.clone(); + + let is_metrics_enabled = base.prometheus_config.is_some(); + + let (dsn, runner, metrics_registry) = dsn.build_dsn(DsnOptions { + client: partial_components.client.clone(), + keypair, + base_path: directory.as_ref().to_path_buf(), + get_piece_by_index: get_piece_by_index::, + get_segment_header_by_segment_indexes, + segment_header_store, + is_metrics_enabled, + })?; + + tracing::debug!("Subspace networking initialized: Node ID is {}", dsn.node.id()); + + ( + subspace_service::SubspaceNetworking::Reuse { + node: dsn.node.clone(), + bootstrap_nodes, + metrics_registry, + }, + dsn, + runner, + ) + }; + + let chain_spec_domains_bootstrap_nodes_map: serde_json::map::Map< + String, + serde_json::Value, + > = base + .chain_spec + .properties() + .get("domainsBootstrapNodes") + .map(|d| serde_json::from_value(d.clone())) + .transpose() + .map_err(|error| { + sc_service::Error::Other(format!( + "Failed to decode Domains bootstrap nodes: {error:?}" + )) + })? + .unwrap_or_default(); + + let consensus_state_pruning_mode = base.state_pruning.clone().unwrap_or_default(); + + // Default value are used for many of parameters + let configuration = SubspaceConfiguration { + base, + force_new_slot_notifications: false, + subspace_networking, + sync_from_dsn, + enable_subspace_block_relay, + is_timekeeper, + timekeeper_cpu_cores, + }; + + let node_runner_future = subspace_farmer::utils::run_future_in_dedicated_thread( + move || async move { + runner.run().await; + tracing::error!("Exited from node runner future"); + }, + format!("sdk-networking-{name}"), + ) + .context("Failed to run node runner future")?; + + let slot_proportion = sc_consensus_slots::SlotProportion::new(3f32 / 4f32); + let full_client = subspace_service::new_full::( + configuration, + partial_components, + true, + slot_proportion, + ) + .await + .context("Failed to build a full subspace node")?; + + let NewFull { + mut task_manager, + client, + rpc_handlers, + network_starter, + sync_service, + network_service, + + backend: _, + select_chain: _, + reward_signing_notification_stream: _, + archived_segment_notification_stream: _, + transaction_pool, + block_importing_notification_stream, + new_slot_notification_stream, + } = full_client; + + if let Some(storage_monitor) = storage_monitor { + sc_storage_monitor::StorageMonitorService::try_spawn( + storage_monitor.into(), + database_source, + &task_manager.spawn_essential_handle(), + ) + .context("Failed to start storage monitor")?; + } + + let mut destructors = DestructorSet::new("node-destructors"); + + let mut maybe_domain = None; + if let Some(domain_config) = self.domain { + let base_directory = directory.as_ref().to_owned().clone(); + + let chain_spec_domains_bootstrap_nodes = chain_spec_domains_bootstrap_nodes_map + .get(&format!("{}", domain_config.domain_id)) + .map(|d| serde_json::from_value(d.clone())) + .transpose() + .map_err(|error| { + sc_service::Error::Other(format!( + "Failed to decode Domain: {} bootstrap nodes: {error:?}", + domain_config.domain_id + )) + })? + .unwrap_or_default(); + + let mut xdm_gossip_worker_builder = GossipWorkerBuilder::new(); + + let relayer_worker = + domain_client_message_relayer::worker::relay_consensus_chain_messages( + client.clone(), + consensus_state_pruning_mode, + sync_service.clone(), + xdm_gossip_worker_builder.gossip_msg_sink(), + ); + + task_manager.spawn_essential_handle().spawn_essential_blocking( + "consensus-chain-relayer", + None, + Box::pin(relayer_worker), + ); + + let (consensus_msg_sink, consensus_msg_receiver) = + tracing_unbounded("consensus_message_channel", 100); + + // Start cross domain message listener for Consensus chain to receive messages + // from domains in the network + let consensus_listener = + cross_domain_message_gossip::start_cross_chain_message_listener( + ChainId::Consensus, + client.clone(), + transaction_pool.clone(), + network_service.clone(), + consensus_msg_receiver, + ); + + task_manager.spawn_essential_handle().spawn_essential_blocking( + "consensus-message-listener", + None, + Box::pin(consensus_listener), + ); + + xdm_gossip_worker_builder + .push_chain_tx_pool_sink(ChainId::Consensus, consensus_msg_sink); + + let (domain_message_sink, domain_message_receiver) = + tracing_unbounded("domain_message_channel", 100); + + xdm_gossip_worker_builder.push_chain_tx_pool_sink( + ChainId::Domain(domain_config.domain_id), + domain_message_sink, + ); + + let domain = domain_config + .build( + base_directory, + ConsensusNodeLink { + consensus_network: network_service.clone(), + consensus_client: client.clone(), + block_importing_notification_stream: block_importing_notification_stream + .clone(), + new_slot_notification_stream: new_slot_notification_stream.clone(), + consensus_sync_service: sync_service.clone(), + consensus_transaction_pool: transaction_pool.clone(), + gossip_message_sink: xdm_gossip_worker_builder.gossip_msg_sink(), + domain_message_receiver, + chain_spec_domains_bootstrap_nodes, + }, + ) + .await?; + + let cross_domain_message_gossip_worker = xdm_gossip_worker_builder + .build::(network_service.clone(), sync_service.clone()); + + task_manager.spawn_essential_handle().spawn_essential_blocking( + "cross-domain-gossip-message-worker", + None, + Box::pin(cross_domain_message_gossip_worker.run()), + ); + + maybe_domain = Some(domain); + } + + let (task_manager_drop_sender, task_manager_drop_receiver) = oneshot::channel(); + let (task_manager_result_sender, task_manager_result_receiver) = oneshot::channel(); + let task_manager_join_handle = sdk_utils::task_spawn( + format!("sdk-node-{name}-task-manager"), + { + async move { + futures::select! { + _ = task_manager_drop_receiver.fuse() => { + let _ = task_manager_result_sender.send(Ok(TaskOutput::Cancelled("received drop signal for task manager".into()))); + }, + result = task_manager.future().fuse() => { + let _ = task_manager_result_sender.send(result.map_err(anyhow::Error::new).map(TaskOutput::Value)); + } + _ = node_runner_future.fuse() => { + let _ = task_manager_result_sender.send(Ok(TaskOutput::Value(()))); + } + } + } + }, + ); + + destructors.add_async_destructor({ + async move { + let _ = task_manager_drop_sender.send(()); + task_manager_join_handle.await.expect("joining should not fail; qed"); + } + })?; + + let rpc_handle = sdk_utils::Rpc::new(&rpc_handlers); + network_starter.start_network(); + + // Disable proper exit for now. Because RPC server looses waker and can't exit + // in background. + // + // drop_collection.defer(move || { + // const BUSY_WAIT_INTERVAL: Duration = Duration::from_millis(100); + // + // // Busy wait till backend exits + // // TODO: is it the only wait to check that substrate node exited? + // while Arc::strong_count(&backend) != 1 { + // std::thread::sleep(BUSY_WAIT_INTERVAL); + // } + // }); + + tracing::debug!("Started node"); + + Ok(Node { + client, + network_service, + sync_service, + name, + rpc_handle, + dsn, + _destructors: destructors, + _farmer: Default::default(), + task_manager_result_receiver, + maybe_domain, + }) + } +} + +/// Executor dispatch for subspace runtime +pub struct ExecutorDispatch; + +impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { + // /// Only enable the benchmarking host functions when we actually want to + // benchmark. #[cfg(feature = "runtime-benchmarks")] + // type ExtendHostFunctions = ( + // frame_benchmarking::benchmarking::HostFunctions, + // sp_consensus_subspace::consensus::HostFunctions, + // ) + // /// Otherwise we only use the default Substrate host functions. + // #[cfg(not(feature = "runtime-benchmarks"))] + type ExtendHostFunctions = + (sp_consensus_subspace::consensus::HostFunctions, sp_domains_fraud_proof::HostFunctions); + + fn dispatch(method: &str, data: &[u8]) -> Option> { + subspace_runtime::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + subspace_runtime::native_version() + } +} + +/// Chain spec for subspace node +pub type ChainSpec = chain_spec::ChainSpec; +pub(crate) type FullClient = + subspace_service::FullClient; +pub(crate) type NewFull = subspace_service::NewFull; + +/// Node structure +#[derive(Derivative)] +#[derivative(Debug)] +#[must_use = "Node should be closed"] +pub struct Node { + #[derivative(Debug = "ignore")] + client: Arc, + #[derivative(Debug = "ignore")] + sync_service: Arc>, + #[derivative(Debug = "ignore")] + network_service: Arc>, + rpc_handle: sdk_utils::Rpc, + name: String, + dsn: DsnShared, + #[derivative(Debug = "ignore")] + _destructors: DestructorSet, + #[derivative(Debug = "ignore")] + _farmer: std::marker::PhantomData, + #[derivative(Debug = "ignore")] + task_manager_result_receiver: oneshot::Receiver>>, + #[derivative(Debug = "ignore")] + maybe_domain: Option, +} + +impl sdk_traits::Node for Node { + type Client = FullClient; + type Rpc = sdk_utils::Rpc; + type Table = F::Table; + + fn name(&self) -> &str { + &self.name + } + + fn dsn(&self) -> &DsnShared { + &self.dsn + } + + fn rpc(&self) -> &Self::Rpc { + &self.rpc_handle + } +} + +/// Hash type +pub type Hash = ::Hash; +/// Block number +pub type BlockNumber = BlockNumberFor; + +/// Chain info +#[derive(Debug, Clone)] +#[non_exhaustive] +pub struct ChainInfo { + /// Genesis hash of chain + pub genesis_hash: Hash, +} + +/// Node state info +#[derive(Debug, Clone)] +#[non_exhaustive] +pub struct Info { + /// Chain info + pub chain: ChainInfo, + /// Best block hash and number + pub best_block: (Hash, BlockNumber), + /// Finalized block hash and number + pub finalized_block: (Hash, BlockNumber), + /// Block gap which we need to sync + pub block_gap: Option>, + /// Runtime version + pub version: sp_version::RuntimeVersion, + /// Node telemetry name + pub name: String, + /// Number of peers connected to our node + pub connected_peers: u64, + /// Number of nodes that we know of but that we're not connected to + pub not_connected_peers: u64, + /// Total number of pieces stored on chain + pub history_size: HistorySize, +} + +/// New block notification +#[derive(Debug, Clone)] +#[non_exhaustive] +pub struct BlockHeader { + /// Block hash + pub hash: Hash, + /// Block number + pub number: BlockNumber, + /// Parent block hash + pub parent_hash: Hash, + /// Block state root + pub state_root: Hash, + /// Extrinsics root + pub extrinsics_root: Hash, + /// Block pre digest + pub pre_digest: Option>, +} + +impl From
for BlockHeader { + fn from(header: Header) -> Self { + let hash = header.hash(); + let Header { number, parent_hash, state_root, extrinsics_root, digest } = header; + let pre_digest = digest + .log(|it| if let DigestItem::PreRuntime(_, digest) = it { Some(digest) } else { None }) + .map(|pre_digest| { + parity_scale_codec::Decode::decode(&mut pre_digest.as_ref()) + .expect("Pre digest is always scale encoded") + }); + Self { hash, number, parent_hash, state_root, extrinsics_root, pre_digest } + } +} + +/// Syncing status +#[derive(Clone, Copy, Debug)] +pub enum SyncStatus { + /// Importing some block + Importing, + /// Downloading some block + Downloading, +} + +/// Current syncing progress +#[derive(Clone, Copy, Debug)] +pub struct SyncingProgress { + /// Imported this much blocks + pub at: BlockNumber, + /// Number of total blocks + pub target: BlockNumber, + /// Current syncing status + pub status: SyncStatus, +} + +#[pin_project::pin_project] +struct SyncingProgressStream { + #[pin] + inner: S, + at: BlockNumber, + target: BlockNumber, +} + +impl>> Stream for SyncingProgressStream { + type Item = Result; + + fn poll_next( + self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + ) -> std::task::Poll> { + let this = self.project(); + let next = this.inner.poll_next(cx); + if let std::task::Poll::Ready(Some(Ok(SyncingProgress { at, target, .. }))) = next { + *this.at = at; + *this.target = target; + } + next + } + + fn size_hint(&self) -> (usize, Option) { + (self.at as _, Some(self.target as _)) + } +} + +impl Node { + /// New node builder + pub fn builder() -> Builder { + Builder::new() + } + + /// Development configuration + pub fn dev() -> Builder { + Builder::dev() + } + + /// Gemini 3g configuration + pub fn gemini_3g() -> Builder { + Builder::gemini_3g() + } + + /// Devnet configuration + pub fn devnet() -> Builder { + Builder::devnet() + } + + /// Get listening addresses of the node + pub async fn listen_addresses(&self) -> anyhow::Result> { + let peer_id = self.network_service.local_peer_id(); + self.network_service + .network_state() + .await + .map(|state| { + state + .listened_addresses + .into_iter() + .map(|multiaddr| MultiaddrWithPeerId::new(multiaddr, peer_id)) + .collect() + }) + .map_err(|()| anyhow::anyhow!("Network worker exited")) + } + + /// Get listening addresses of the node + pub async fn dsn_listen_addresses(&self) -> anyhow::Result> { + let peer_id = + self.dsn.node.id().to_string().parse().expect("Conversion between 2 libp2p versions"); + Ok(self + .dsn + .node + .listeners() + .into_iter() + .map(|multiaddr| MultiaddrWithPeerId::new(multiaddr, peer_id)) + .collect()) + } + + /// Subscribe for node syncing progress + pub async fn subscribe_syncing_progress( + &self, + ) -> anyhow::Result> + Send + Unpin + 'static> + { + const CHECK_SYNCED_EVERY: Duration = Duration::from_millis(100); + let check_offline_backoff = backoff::ExponentialBackoffBuilder::new() + .with_max_elapsed_time(Some(Duration::from_secs(60))) + .build(); + let check_synced_backoff = backoff::ExponentialBackoffBuilder::new() + .with_initial_interval(Duration::from_secs(1)) + .with_max_elapsed_time(Some(Duration::from_secs(10 * 60))) + .build(); + + backoff::future::retry(check_offline_backoff, || { + futures::future::ready(if self.sync_service.is_offline() { + Err(backoff::Error::transient(())) + } else { + Ok(()) + }) + }) + .await + .map_err(|_| anyhow::anyhow!("Failed to connect to the network"))?; + + let (sender, receiver) = tokio::sync::mpsc::channel(10); + let inner = tokio_stream::wrappers::ReceiverStream::new(receiver); + + let result = backoff::future::retry(check_synced_backoff.clone(), || { + self.sync_service.status().map(|result| match result.map(|status| status.state) { + Ok(SyncState::Importing { target }) => Ok((target, SyncStatus::Importing)), + Ok(SyncState::Downloading { target }) => Ok((target, SyncStatus::Downloading)), + _ if self.sync_service.is_offline() => + Err(backoff::Error::transient(Some(anyhow::anyhow!("Node went offline")))), + Err(()) => Err(backoff::Error::transient(Some(anyhow::anyhow!( + "Failed to fetch networking status" + )))), + Ok(SyncState::Idle | SyncState::Pending) => Err(backoff::Error::transient(None)), + }) + }) + .await; + + let (target, status) = match result { + Ok(result) => result, + Err(Some(err)) => return Err(err), + // We are idle for quite some time + Err(None) => return Ok(SyncingProgressStream { inner, at: 0, target: 0 }), + }; + + let at = self.client.chain_info().best_number; + sender + .send(Ok(SyncingProgress { target, at, status })) + .await + .expect("We are holding receiver, so it will never panic"); + + tokio::spawn({ + let sync = Arc::clone(&self.sync_service); + let client = Arc::clone(&self.client); + async move { + loop { + tokio::time::sleep(CHECK_SYNCED_EVERY).await; + + let result = backoff::future::retry(check_synced_backoff.clone(), || { + sync.status().map(|result| match result.map(|status| status.state) { + Ok(SyncState::Importing { target }) => + Ok(Ok((target, SyncStatus::Importing))), + Ok(SyncState::Downloading { target }) => + Ok(Ok((target, SyncStatus::Downloading))), + Err(()) => + Ok(Err(anyhow::anyhow!("Failed to fetch networking status"))), + Ok(SyncState::Idle | SyncState::Pending) => + Err(backoff::Error::transient(())), + }) + }) + .await; + let Ok(result) = result else { break }; + + if sender + .send(result.map(|(target, status)| SyncingProgress { + target, + at: client.chain_info().best_number, + status, + })) + .await + .is_err() + { + break; + } + } + } + }); + + Ok(SyncingProgressStream { inner, at, target }) + } + + /// Wait till the end of node syncing + pub async fn sync(&self) -> anyhow::Result<()> { + self.subscribe_syncing_progress().await?.for_each(|_| async move {}).await; + Ok(()) + } + + /// Leaves the network and gracefully shuts down + pub async fn close(self) -> anyhow::Result<()> { + if let Some(domain) = self.maybe_domain { + domain.close().await?; + } + self._destructors.async_drop().await?; + let output = self.task_manager_result_receiver.await??; + match output { + TaskOutput::Value(_) => {} + TaskOutput::Cancelled(reason) => { + tracing::warn!("node task manager was cancelled due to reason: {}", reason); + } + } + Ok(()) + } + + /// Tells if the node was closed + pub async fn is_closed(&self) -> bool { + self._destructors.already_ran() + } + + /// Runs `.close()` and also wipes node's state + pub async fn wipe(path: impl AsRef) -> io::Result<()> { + tokio::fs::remove_dir_all(path).await + } + + /// Get node info + pub async fn get_info(&self) -> anyhow::Result { + let NetworkState { connected_peers, not_connected_peers, .. } = self + .network_service + .network_state() + .await + .map_err(|()| anyhow::anyhow!("Failed to fetch node info: node already exited"))?; + let sp_blockchain::Info { + best_hash, + best_number, + genesis_hash, + finalized_hash, + finalized_number, + block_gap, + .. + } = self.client.chain_info(); + let version = self.rpc_handle.runtime_version(Some(best_hash)).await?; + let FarmerProtocolInfo { history_size, .. } = + self.rpc_handle.farmer_app_info().await.map_err(anyhow::Error::msg)?.protocol_info; + Ok(Info { + chain: ChainInfo { genesis_hash }, + best_block: (best_hash, best_number), + finalized_block: (finalized_hash, finalized_number), + block_gap: block_gap.map(|(from, to)| from..to), + version, + name: self.name.clone(), + connected_peers: connected_peers.len() as u64, + not_connected_peers: not_connected_peers.len() as u64, + history_size, + }) + } + + /// Get block hash by block number + pub fn block_hash(&self, number: BlockNumber) -> anyhow::Result> { + use sc_client_api::client::BlockBackend; + + self.client.block_hash(number).context("Failed to get primary node block hash by number") + } + + /// Get block header by hash + pub fn block_header(&self, hash: Hash) -> anyhow::Result> { + self.client + .header(hash) + .context("Failed to get primary node block hash by number") + .map(|opt| opt.map(Into::into)) + } + + /// Subscribe to new heads imported + pub async fn subscribe_new_heads( + &self, + ) -> anyhow::Result + Send + Sync + Unpin + 'static> { + Ok(self + .rpc_handle + .subscribe_new_heads::() + .await + .context("Failed to subscribe to new blocks")? + .map(Into::into)) + } + + /// Subscribe to finalized heads + pub async fn subscribe_finalized_heads( + &self, + ) -> anyhow::Result + Send + Sync + Unpin + 'static> { + Ok(self + .rpc_handle + .subscribe_finalized_heads::() + .await + .context("Failed to subscribe to finalized blocks")? + .map(Into::into)) + } + + /// Get events at some block or at tip of the chain + pub async fn get_events(&self, block: Option) -> anyhow::Result> { + Ok(self + .rpc_handle + .get_events::(block) + .await? + .into_iter() + .map(|event_record| event_record.event) + .collect()) + } +} + +fn get_segment_header_by_segment_indexes( + req: &SegmentHeaderRequest, + segment_headers_store: &SegmentHeadersStore, +) -> Option { + let segment_indexes = match req { + SegmentHeaderRequest::SegmentIndexes { segment_indexes } => segment_indexes.clone(), + SegmentHeaderRequest::LastSegmentHeaders { segment_header_number } => { + let mut segment_headers_limit = *segment_header_number; + if *segment_header_number > SEGMENT_HEADERS_NUMBER_LIMIT { + tracing::debug!(%segment_header_number, "Segment header number exceeded the limit."); + + segment_headers_limit = SEGMENT_HEADERS_NUMBER_LIMIT; + } + + // Currently segment_headers_store.max_segment_index returns None if only + // genesis block is archived To maintain parity with monorepo + // implementation we are returning SegmentIndex::ZERO in that case. + let max_segment_index = + segment_headers_store.max_segment_index().unwrap_or(SegmentIndex::ZERO); + (SegmentIndex::ZERO..=max_segment_index) + .rev() + .take(segment_headers_limit as usize) + .collect::>() + } + }; + + let maybe_segment_headers = segment_indexes + .iter() + .map(|segment_index| segment_headers_store.get_segment_header(*segment_index)) + .collect::>>(); + + match maybe_segment_headers { + Some(segment_headers) => Some(SegmentHeaderResponse { segment_headers }), + None => { + tracing::error!("Segment header collection contained empty segment headers."); + None + } + } +} + +fn get_piece_by_index( + &PieceByIndexRequest { piece_index }: &PieceByIndexRequest, + weak_readers_and_pieces: std::sync::Weak< + parking_lot::Mutex>, + >, + farmer_piece_cache: Arc>>, +) -> impl std::future::Future> { + async move { + // Have to clone due to RAII guard is not `Send`, no impact on + // behaviour/performance as `FarmerPieceCache` uses `Arc` and + // `mpsc::Sender` underneath. + let maybe_farmer_piece_cache = farmer_piece_cache.read().clone(); + if let Some(farmer_piece_cache) = maybe_farmer_piece_cache { + let piece = + F::get_piece_by_index(piece_index, &farmer_piece_cache, &weak_readers_and_pieces) + .await; + Some(PieceByIndexResponse { piece }) + } else { + None + } + } + .in_current_span() +} diff --git a/sdk/rust-toolchain.toml b/sdk/rust-toolchain.toml new file mode 100644 index 00000000..fdd1b119 --- /dev/null +++ b/sdk/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +channel = "nightly-2023-10-16" +components = ["rust-src"] +targets = ["wasm32-unknown-unknown"] +profile = "default" \ No newline at end of file diff --git a/sdk/rustfmt.toml b/sdk/rustfmt.toml new file mode 100644 index 00000000..291ac807 --- /dev/null +++ b/sdk/rustfmt.toml @@ -0,0 +1,12 @@ +edition = "2021" +format_code_in_doc_comments = true +format_macro_bodies = true +format_macro_matchers = true +format_strings = true +group_imports = "StdExternalCrate" +imports_granularity = "Module" +match_arm_blocks = false +reorder_impl_items = true +use_field_init_shorthand = true +use_small_heuristics = "Max" +wrap_comments = true diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs new file mode 100644 index 00000000..843a53bc --- /dev/null +++ b/sdk/src/lib.rs @@ -0,0 +1,47 @@ +//! Subspace SDK for easy running of both Subspace node and farmer + +#![warn( + missing_docs, + clippy::dbg_macro, + clippy::unwrap_used, + clippy::disallowed_types, + unused_features +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + +/// Module related to the farmer +pub use sdk_farmer::{Builder as FarmerBuilder, FarmDescription, Info as FarmerInfo}; +pub use sdk_node::{chain_spec, Builder as NodeBuilder, Info as NodeInfo}; +pub use sdk_utils::{ByteSize, Multiaddr, MultiaddrWithPeerId, PublicKey, Ss58ParsingError}; +use subspace_proof_of_space::chia::ChiaTable; + +static_assertions::assert_impl_all!(Node: Send, Sync); +static_assertions::assert_impl_all!(Farmer: Send, Sync); +static_assertions::assert_impl_all!(Farm: Send, Sync); + +/// Subspace farmer type +pub type Farmer = sdk_farmer::Farmer; +/// Subspace farmer's plot +pub type Farm = sdk_farmer::Farm; +/// Subspace primary node +pub type Node = sdk_node::Node; + +/// Farmer related things located here +pub mod farmer { + pub use sdk_farmer::FarmDescription; + + pub use super::{Farm, Farmer}; +} + +/// Node related things located here +pub mod node { + pub use sdk_dsn::*; + pub use sdk_node::chain_spec::ChainSpec; + pub use sdk_node::{ + chain_spec, BlockNumber, DomainConfigBuilder, Event, Hash, RewardsEvent, SubspaceEvent, + SyncingProgress, + }; + pub use sdk_substrate::*; + + pub use super::Node; +} diff --git a/sdk/substrate/Cargo.toml b/sdk/substrate/Cargo.toml new file mode 100644 index 00000000..579fa7c7 --- /dev/null +++ b/sdk/substrate/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "sdk-substrate" +version = "0.1.0" +edition = "2021" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +bytesize = "1.1" +derivative = "2.2.0" +derive_builder = "0.12" +derive_more = "0.99" +names = { version = "0.14.0", default-features = false } +sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-informant = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } +sc-state-db = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } +sdk-utils = { path = "../utils" } +serde = { version = "1", features = ["derive"] } +serde_json = "1" +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +tokio = { version = "1.34.0", features = ["fs", "rt", "tracing"] } + +[features] +default = [] +integration-test = [ + "sdk-utils/integration-test" +] diff --git a/sdk/substrate/build.rs b/sdk/substrate/build.rs new file mode 100644 index 00000000..364bd6f5 --- /dev/null +++ b/sdk/substrate/build.rs @@ -0,0 +1,5 @@ +fn main() { + let output = std::process::Command::new("git").args(["rev-parse", "HEAD"]).output().unwrap(); + let git_hash = String::from_utf8(output.stdout).unwrap(); + println!("cargo:rustc-env=GIT_HASH={git_hash}"); +} diff --git a/sdk/substrate/src/lib.rs b/sdk/substrate/src/lib.rs new file mode 100644 index 00000000..38307eba --- /dev/null +++ b/sdk/substrate/src/lib.rs @@ -0,0 +1,452 @@ +//! Crate with abstraction over substrate logic + +#![warn( + missing_docs, + clippy::dbg_macro, + clippy::unwrap_used, + clippy::disallowed_types, + unused_features +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![feature(concat_idents)] + +use std::net::{IpAddr, Ipv4Addr, SocketAddr}; +use std::path::Path; + +use derivative::Derivative; +use derive_builder::Builder; +use sc_executor::{WasmExecutionMethod, WasmtimeInstantiationStrategy}; +use sc_network::config::{NodeKeyConfig, Secret}; +use sc_service::config::{KeystoreConfig, NetworkConfiguration, TransportConfig}; +use sc_service::{BasePath, Configuration, DatabaseSource, TracingReceiver}; +use sdk_utils::{Multiaddr, MultiaddrWithPeerId}; +use serde::{Deserialize, Serialize}; +pub use types::*; + +mod types; + +#[doc(hidden)] +#[derive(Debug, Clone, Derivative, Builder, Deserialize, Serialize, PartialEq)] +#[derivative(Default)] +#[builder(pattern = "owned", build_fn(private, name = "_build"), name = "BaseBuilder")] +#[non_exhaustive] +pub struct Base { + /// Force block authoring + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub force_authoring: bool, + /// Set node role + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub role: Role, + /// Blocks pruning options + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub blocks_pruning: BlocksPruning, + /// State pruning options + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub state_pruning: PruningMode, + /// Implementation name + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub impl_name: ImplName, + /// Implementation version + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub impl_version: ImplVersion, + /// Rpc settings + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub rpc: Rpc, + /// Network settings + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub network: Network, + /// Offchain worker settings + #[builder(setter(into), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub offchain_worker: OffchainWorker, + /// Enable color for substrate informant + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub informant_enable_color: bool, + /// Additional telemetry endpoints + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub telemetry: Vec<(Multiaddr, u8)>, + /// Dev key seed + #[builder(setter(strip_option), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub dev_key_seed: Option, +} + +#[doc(hidden)] +#[macro_export] +macro_rules! derive_base { + ( + $(< $( $lt:tt $( : $clt:tt $(+ $dlt:tt )* )? ),+ >)? @ $base:ty => $builder:ident { + $( + #[doc = $doc:literal] + $field:ident : $field_ty:ty + ),+ + $(,)? + } + ) => { + impl $(< $( $lt $( : $clt $(+ $dlt )* )? ),+ >)? $builder $(< $($lt),+ >)? { + $( + #[doc = $doc] + pub fn $field(mut self, $field: impl Into<$field_ty>) -> Self { + self.base = self.base.$field($field.into()); + self + } + )* + } + }; + + ( $(< $( $lt:tt $( : $clt:tt $(+ $dlt:tt )* )? ),+ >)? @ $base:ty => $builder:ident ) => { + $crate::derive_base!( + $(< $( $lt $( : $clt $(+ $dlt )* )? ),+ >)? @ $base => $builder { + /// Force block authoring + force_authoring: bool, + /// Set node role + role: $crate::Role, + /// Blocks pruning options + blocks_pruning: $crate::BlocksPruning, + /// State pruning options + state_pruning: $crate::PruningMode, + /// Implementation name + impl_name: $crate::ImplName, + /// Implementation version + impl_version: $crate::ImplVersion, + /// Rpc settings + rpc: $crate::Rpc, + /// Network settings + network: $crate::Network, + /// Offchain worker settings + offchain_worker: $crate::OffchainWorker, + /// Enable color for substrate informant + informant_enable_color: bool, + /// Additional telemetry endpoints + telemetry: Vec<(sdk_utils::Multiaddr, u8)>, + /// Dev key seed + dev_key_seed: String + }); + } +} + +impl Base { + const NODE_NAME_MAX_LENGTH: usize = 64; + + pub async fn configuration( + self, + directory: impl AsRef, + chain_spec: CS, + ) -> Configuration + where + CS: sc_chain_spec::ChainSpec + + serde::Serialize + + serde::de::DeserializeOwned + + sp_runtime::BuildStorage + + 'static, + { + const NODE_KEY_ED25519_FILE: &str = "secret_ed25519"; + const DEFAULT_NETWORK_CONFIG_PATH: &str = "network"; + + let Self { + force_authoring, + role, + blocks_pruning, + state_pruning, + impl_name: ImplName(impl_name), + impl_version: ImplVersion(impl_version), + rpc: + Rpc { + addr: rpc_addr, + port: rpc_port, + max_connections: rpc_max_connections, + cors: rpc_cors, + methods: rpc_methods, + max_request_size: rpc_max_request_size, + max_response_size: rpc_max_response_size, + max_subs_per_conn: rpc_max_subs_per_conn, + }, + network, + offchain_worker, + informant_enable_color, + telemetry, + dev_key_seed, + } = self; + + let base_path = BasePath::new(directory.as_ref()); + let config_dir = base_path.config_dir(chain_spec.id()); + + let mut network = { + let Network { + listen_addresses, + boot_nodes, + force_synced, + name, + client_id, + enable_mdns, + allow_private_ip, + allow_non_globals_in_dht, + } = network; + let name = name.unwrap_or_else(|| { + names::Generator::with_naming(names::Name::Numbered) + .next() + .filter(|name| name.chars().count() < Self::NODE_NAME_MAX_LENGTH) + .expect("RNG is available on all supported platforms; qed") + }); + + let client_id = client_id.unwrap_or_else(|| format!("{impl_name}/v{impl_version}")); + let config_dir = config_dir.join(DEFAULT_NETWORK_CONFIG_PATH); + let listen_addresses = listen_addresses.into_iter().map(Into::into).collect::>(); + + NetworkConfiguration { + listen_addresses, + boot_nodes: chain_spec + .boot_nodes() + .iter() + .cloned() + .chain(boot_nodes.into_iter().map(Into::into)) + .collect(), + force_synced, + transport: TransportConfig::Normal { enable_mdns, allow_private_ip }, + allow_non_globals_in_dht, + ..NetworkConfiguration::new( + name, + client_id, + NodeKeyConfig::Ed25519(Secret::File(config_dir.join(NODE_KEY_ED25519_FILE))), + Some(config_dir), + ) + } + }; + + // Increase default value of 25 to improve success rate of sync + network.default_peers_set.out_peers = 50; + // Full + Light clients + network.default_peers_set.in_peers = 25 + 100; + let keystore = KeystoreConfig::InMemory; + + // HACK: Tricky way to add extra endpoints as we can't push into telemetry + // endpoints + let telemetry_endpoints = match chain_spec.telemetry_endpoints() { + Some(endpoints) => { + let Ok(serde_json::Value::Array(extra_telemetry)) = + serde_json::to_value(&telemetry) + else { + unreachable!("Will always return an array") + }; + let Ok(serde_json::Value::Array(telemetry)) = serde_json::to_value(endpoints) + else { + unreachable!("Will always return an array") + }; + + serde_json::from_value(serde_json::Value::Array( + telemetry.into_iter().chain(extra_telemetry).collect::>(), + )) + .expect("Serialization is always valid") + } + None => sc_service::config::TelemetryEndpoints::new( + telemetry.into_iter().map(|(endpoint, n)| (endpoint.to_string(), n)).collect(), + ) + .expect("Never returns an error"), + }; + + Configuration { + impl_name, + impl_version, + tokio_handle: tokio::runtime::Handle::current(), + transaction_pool: Default::default(), + network, + keystore, + database: DatabaseSource::ParityDb { path: config_dir.join("paritydb").join("full") }, + trie_cache_maximum_size: Some(67_108_864), + state_pruning: Some(state_pruning.into()), + blocks_pruning: blocks_pruning.into(), + wasm_method: WasmExecutionMethod::Compiled { + instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite, + }, + wasm_runtime_overrides: None, + rpc_addr, + rpc_port: rpc_port.unwrap_or_default(), + rpc_methods: rpc_methods.into(), + rpc_max_connections: rpc_max_connections.unwrap_or_default() as u32, + rpc_cors, + rpc_max_request_size: rpc_max_request_size.unwrap_or_default() as u32, + rpc_max_response_size: rpc_max_response_size.unwrap_or_default() as u32, + rpc_id_provider: None, + rpc_max_subs_per_conn: rpc_max_subs_per_conn.unwrap_or_default() as u32, + prometheus_config: None, + telemetry_endpoints: Some(telemetry_endpoints), + default_heap_pages: None, + offchain_worker: offchain_worker.into(), + force_authoring, + disable_grandpa: false, + dev_key_seed, + tracing_targets: None, + tracing_receiver: TracingReceiver::Log, + chain_spec: Box::new(chain_spec), + max_runtime_instances: 8, + announce_block: true, + role: role.into(), + base_path, + data_path: config_dir, + informant_output_format: sc_informant::OutputFormat { + enable_color: informant_enable_color, + }, + runtime_cache_size: 2, + } + } +} + +/// Node RPC builder +#[derive(Debug, Clone, Derivative, Builder, Deserialize, Serialize, PartialEq, Eq)] +#[derivative(Default)] +#[builder(pattern = "owned", build_fn(private, name = "_build"), name = "RpcBuilder")] +#[non_exhaustive] +pub struct Rpc { + /// Rpc address + #[builder(setter(strip_option), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub addr: Option, + /// RPC port + #[builder(setter(strip_option), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub port: Option, + /// Maximum number of connections for RPC server. `None` if default. + #[builder(setter(strip_option), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub max_connections: Option, + /// CORS settings for HTTP & WS servers. `None` if all origins are + /// allowed. + #[builder(setter(strip_option), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub cors: Option>, + /// RPC methods to expose (by default only a safe subset or all of + /// them). + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub methods: RpcMethods, + /// Maximum payload of a rpc request + #[builder(setter(strip_option), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub max_request_size: Option, + /// Maximum payload of a rpc request + #[builder(setter(strip_option), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub max_response_size: Option, + /// Maximum allowed subscriptions per rpc connection + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub max_subs_per_conn: Option, +} + +impl RpcBuilder { + /// Dev configuration + pub fn dev() -> Self { + Self::default() + } + + /// Local test configuration to have rpc exposed locally + pub fn local_test(port: u16) -> Self { + Self::dev() + .addr(SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), port)) + .port(port) + .max_connections(100) + .max_request_size(10 * 1024) + .max_response_size(10 * 1024) + .max_subs_per_conn(Some(100)) + } + + /// Gemini 3g configuration + pub fn gemini_3g() -> Self { + Self::new().addr("127.0.0.1:9944".parse().expect("hardcoded value is true")).cors(vec![ + "http://localhost:*".to_owned(), + "http://127.0.0.1:*".to_owned(), + "https://localhost:*".to_owned(), + "https://127.0.0.1:*".to_owned(), + "https://polkadot.js.org".to_owned(), + ]) + } + + /// Devnet configuration + pub fn devnet() -> Self { + Self::new().addr("127.0.0.1:9944".parse().expect("hardcoded value is true")).cors(vec![ + "http://localhost:*".to_owned(), + "http://127.0.0.1:*".to_owned(), + "https://localhost:*".to_owned(), + "https://127.0.0.1:*".to_owned(), + "https://polkadot.js.org".to_owned(), + ]) + } +} + +/// Node network builder +#[derive(Debug, Default, Clone, Builder, Deserialize, Serialize, PartialEq)] +#[builder(pattern = "owned", build_fn(private, name = "_build"), name = "NetworkBuilder")] +#[non_exhaustive] +pub struct Network { + /// Listen on some address for other nodes + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub enable_mdns: bool, + /// Listen on some address for other nodes + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub allow_private_ip: bool, + /// Allow non globals in network DHT + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub allow_non_globals_in_dht: bool, + /// Listen on some address for other nodes + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub listen_addresses: Vec, + /// Boot nodes + #[builder(default)] + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub boot_nodes: Vec, + /// Force node to think it is synced + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub force_synced: bool, + /// Node name + #[builder(setter(into, strip_option), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub name: Option, + /// Client id for telemetry (default is `{IMPL_NAME}/v{IMPL_VERSION}`) + #[builder(setter(into, strip_option), default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub client_id: Option, +} + +impl NetworkBuilder { + /// Dev chain configuration + pub fn dev() -> Self { + Self::default().force_synced(true).allow_private_ip(true) + } + + /// Gemini 3g configuration + pub fn gemini_3g() -> Self { + Self::default() + .listen_addresses(vec![ + "/ip6/::/tcp/30333".parse().expect("hardcoded value is true"), + "/ip4/0.0.0.0/tcp/30333".parse().expect("hardcoded value is true"), + ]) + .enable_mdns(true) + } + + /// Dev network configuration + pub fn devnet() -> Self { + Self::default() + .listen_addresses(vec![ + "/ip6/::/tcp/30333".parse().expect("hardcoded value is true"), + "/ip4/0.0.0.0/tcp/30333".parse().expect("hardcoded value is true"), + ]) + .enable_mdns(true) + } +} + +sdk_utils::generate_builder!(Base, Rpc, Network); diff --git a/sdk/substrate/src/types.rs b/sdk/substrate/src/types.rs new file mode 100644 index 00000000..f60bddd1 --- /dev/null +++ b/sdk/substrate/src/types.rs @@ -0,0 +1,222 @@ +use derivative::Derivative; +use derive_builder::Builder; +use derive_more::{Deref, DerefMut, Display, From}; +use sdk_utils::ByteSize; +use serde::{Deserialize, Serialize}; + +/// Block pruning settings. +#[derive(Debug, Clone, Copy, PartialEq, Default, Serialize, Deserialize, Eq, PartialOrd, Ord)] +pub enum BlocksPruning { + #[default] + /// Keep full block history, of every block that was ever imported. + KeepAll, + /// Keep full finalized block history. + KeepFinalized, + /// Keep N recent finalized blocks. + Some(u32), +} + +impl From for BlocksPruning { + fn from(value: sc_service::BlocksPruning) -> Self { + match value { + sc_service::BlocksPruning::KeepAll => Self::KeepAll, + sc_service::BlocksPruning::KeepFinalized => Self::KeepFinalized, + sc_service::BlocksPruning::Some(n) => Self::Some(n), + } + } +} + +impl From for sc_service::BlocksPruning { + fn from(value: BlocksPruning) -> Self { + match value { + BlocksPruning::KeepAll => Self::KeepAll, + BlocksPruning::KeepFinalized => Self::KeepFinalized, + BlocksPruning::Some(n) => Self::Some(n), + } + } +} + +/// Pruning constraints. If none are specified pruning is +#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] +pub struct Constraints { + /// Maximum blocks. Defaults to 0 when unspecified, effectively keeping + /// only non-canonical states. + pub max_blocks: Option, +} + +impl From for sc_state_db::Constraints { + fn from(Constraints { max_blocks }: Constraints) -> Self { + Self { max_blocks } + } +} + +impl From for Constraints { + fn from(sc_state_db::Constraints { max_blocks }: sc_state_db::Constraints) -> Self { + Self { max_blocks } + } +} + +/// Pruning mode. +#[derive(Debug, Clone, Eq, PartialEq, Default, Serialize, Deserialize)] +pub enum PruningMode { + /// No pruning. Canonicalization is a no-op. + #[default] + ArchiveAll, + /// Canonicalization discards non-canonical nodes. All the canonical + /// nodes are kept in the DB. + ArchiveCanonical, + /// Maintain a pruning window. + Constrained(Constraints), +} + +impl From for sc_service::PruningMode { + fn from(value: PruningMode) -> Self { + match value { + PruningMode::ArchiveAll => Self::ArchiveAll, + PruningMode::ArchiveCanonical => Self::ArchiveCanonical, + PruningMode::Constrained(c) => Self::Constrained(c.into()), + } + } +} + +impl From for PruningMode { + fn from(value: sc_service::PruningMode) -> Self { + match value { + sc_service::PruningMode::ArchiveAll => Self::ArchiveAll, + sc_service::PruningMode::ArchiveCanonical => Self::ArchiveCanonical, + sc_service::PruningMode::Constrained(c) => Self::Constrained(c.into()), + } + } +} + +/// Type wrapper with default value for implementation name +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct ImplName( + #[derivative(Default(value = "env!(\"CARGO_PKG_NAME\").to_owned()"))] pub String, +); + +/// Type wrapper with default value for implementation version +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct ImplVersion( + #[derivative(Default( + value = "format!(\"{}-{}\", env!(\"CARGO_PKG_VERSION\"), env!(\"GIT_HASH\"))" + ))] + pub String, +); + +/// Storage monitor +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)] +pub struct StorageMonitor { + /// How much space do we want to reserve + pub threshold: ByteSize, + /// Polling period for threshold + pub polling_period: std::time::Duration, +} + +impl From for sc_storage_monitor::StorageMonitorParams { + fn from(StorageMonitor { threshold, polling_period }: StorageMonitor) -> Self { + Self { + threshold: (threshold.as_u64() / bytesize::MIB).max(1), + polling_period: polling_period.as_secs().max(1) as u32, + } + } +} + +/// Wrapper with default value for max subscriptions per connection +#[derive( + Debug, Clone, Derivative, Deserialize, Serialize, PartialEq, Eq, From, Deref, DerefMut, Display, +)] +#[derivative(Default)] +#[serde(transparent)] +pub struct MaxSubsPerConn(#[derivative(Default(value = "1024"))] pub usize); + +/// Offchain worker config +#[derive(Debug, Clone, Derivative, Builder, Deserialize, Serialize, PartialEq, Eq)] +#[derivative(Default)] +#[builder(pattern = "owned", build_fn(name = "_build"), name = "OffchainWorkerBuilder")] +#[non_exhaustive] +pub struct OffchainWorker { + /// Is enabled + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub enabled: bool, + /// Is indexing enabled + #[builder(default)] + #[serde(default, skip_serializing_if = "sdk_utils::is_default")] + pub indexing_enabled: bool, +} + +impl OffchainWorkerBuilder { + /// Dev chain configuration + pub fn dev() -> Self { + Self::default() + } + + /// Gemini 3g configuration + pub fn gemini_3g() -> Self { + Self::default().enabled(true) + } + + /// Devnet configuration + pub fn devnet() -> Self { + Self::default().enabled(true) + } +} + +impl From for sc_service::config::OffchainWorkerConfig { + fn from(OffchainWorker { enabled, indexing_enabled }: OffchainWorker) -> Self { + Self { enabled, indexing_enabled } + } +} + +sdk_utils::generate_builder!(OffchainWorker); + +/// Role of the local node. +#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize, PartialEq, Eq)] +pub enum Role { + #[default] + /// Regular full node. + Full, + /// Actual authority. + Authority, +} + +impl From for sc_service::Role { + fn from(value: Role) -> Self { + match value { + Role::Full => sc_service::Role::Full, + Role::Authority => sc_service::Role::Authority, + } + } +} + +/// Available RPC methods. +#[derive(Debug, Copy, Clone, Default, Serialize, Deserialize, PartialEq, Eq)] +pub enum RpcMethods { + /// Expose every RPC method only when RPC is listening on `localhost`, + /// otherwise serve only safe RPC methods. + #[default] + Auto, + /// Allow only a safe subset of RPC methods. + Safe, + /// Expose every RPC method (even potentially unsafe ones). + Unsafe, +} + +impl From for sc_service::RpcMethods { + fn from(value: RpcMethods) -> Self { + match value { + RpcMethods::Auto => Self::Auto, + RpcMethods::Safe => Self::Safe, + RpcMethods::Unsafe => Self::Unsafe, + } + } +} diff --git a/sdk/tests/integration/common.rs b/sdk/tests/integration/common.rs new file mode 100644 index 00000000..44e08dab --- /dev/null +++ b/sdk/tests/integration/common.rs @@ -0,0 +1,184 @@ +use std::num::NonZeroU8; +use std::path::PathBuf; +use std::sync::Arc; + +use derive_builder::Builder; +use derive_more::{Deref, DerefMut}; +use sdk_node::DomainConfigBuilder; +use sdk_utils::ByteSize; +use subspace_sdk::farmer::FarmDescription; +use subspace_sdk::node::{chain_spec, ChainSpec, DsnBuilder, NetworkBuilder, Role}; +use subspace_sdk::MultiaddrWithPeerId; +use tempfile::TempDir; +use tracing_subscriber::layer::SubscriberExt; +use tracing_subscriber::util::SubscriberInitExt; +use tracing_subscriber::Layer; + +pub fn setup() { + #[cfg(tokio_unstable)] + let registry = tracing_subscriber::registry().with(console_subscriber::spawn()); + #[cfg(not(tokio_unstable))] + let registry = tracing_subscriber::registry(); + + let _ = registry + .with( + tracing_subscriber::fmt::layer().with_test_writer().with_filter( + "debug,parity-db=info,cranelift_codegen=info,wasmtime_cranelift=info,\ + subspace_sdk=trace,subspace_farmer=trace,subspace_service=trace,\ + subspace_farmer::utils::parity_db_store=debug,trie-cache=info,\ + wasm_overrides=info,jsonrpsee_core=info,libp2p_gossipsub::behaviour=info,\ + libp2p_core=info,libp2p_tcp=info,multistream_select=info,yamux=info,\ + libp2p_swarm=info,libp2p_ping=info,subspace_networking::node_runner=info,\ + subspace_networking::utils::piece_announcement=info,\ + subspace_farmer::utils::farmer_provider_record_processor=debug,\ + subspace_farmer::utils::farmer_piece_cache=debug,wasmtime_jit=info,\ + wasm-runtime=info" + .parse::() + .expect("Env filter directives are correct"), + ), + ) + .try_init(); +} + +#[derive(Builder)] +#[builder(pattern = "immutable", build_fn(private, name = "_build"), name = "NodeBuilder")] +pub struct InnerNode { + #[builder(default)] + not_force_synced: bool, + #[builder(default)] + boot_nodes: Vec, + #[builder(default)] + dsn_boot_nodes: Vec, + #[builder(default)] + not_authority: bool, + #[builder(default = "chain_spec::dev_config()")] + chain: ChainSpec, + #[builder(default = "TempDir::new().map(Arc::new).unwrap()")] + path: Arc, + #[cfg(feature = "core-payments")] + #[builder(default)] + enable_core: bool, +} + +#[derive(Deref, DerefMut)] +pub struct Node { + #[deref] + #[deref_mut] + node: subspace_sdk::Node, + pub path: Arc, + pub chain: ChainSpec, +} + +impl NodeBuilder { + pub async fn build(self, enable_domains: bool) -> Node { + let InnerNode { + not_force_synced, + boot_nodes, + dsn_boot_nodes, + not_authority, + chain, + path, + #[cfg(feature = "core-payments")] + enable_core, + } = self._build().expect("Infallible"); + let node = subspace_sdk::Node::dev() + .dsn( + DsnBuilder::dev() + .listen_addresses(vec!["/ip4/127.0.0.1/tcp/0".parse().unwrap()]) + .boot_nodes(dsn_boot_nodes), + ) + .network( + NetworkBuilder::dev() + .force_synced(!not_force_synced) + .listen_addresses(vec!["/ip4/127.0.0.1/tcp/0".parse().unwrap()]) + .boot_nodes(boot_nodes), + ) + .role(if not_authority { Role::Full } else { Role::Authority }) + .is_timekeeper(!not_authority); + + let node = if enable_domains { + node.domain(Some(DomainConfigBuilder::dev().configuration())) + } else { + node + }; + + #[cfg(all(feature = "core-payments", feature = "executor"))] + let node = if enable_core { + node.system_domain(subspace_sdk::node::domains::ConfigBuilder::new().core_payments( + subspace_sdk::node::domains::core_payments::ConfigBuilder::new().build(), + )) + } else { + node + }; + + let node = node.build(path.path().join("node"), chain.clone()).await.unwrap(); + + Node { node, path, chain } + } +} + +impl Node { + pub fn dev() -> NodeBuilder { + NodeBuilder::default() + } + + pub fn path(&self) -> Arc { + Arc::clone(&self.path) + } + + pub async fn close(self) { + self.node.close().await.unwrap(); + } +} + +#[derive(Builder)] +#[builder(pattern = "immutable", build_fn(private, name = "_build"), name = "FarmerBuilder")] +pub struct InnerFarmer { + #[builder(default)] + reward_address: subspace_sdk::PublicKey, + #[builder(default = "50")] + pieces_in_sector: u16, +} + +#[derive(Deref, DerefMut)] +pub struct Farmer { + #[deref] + #[deref_mut] + farmer: subspace_sdk::Farmer, + pub path: Arc, +} + +impl FarmerBuilder { + pub async fn build(self, node: &Node, space_pledged: ByteSize) -> Farmer { + let InnerFarmer { reward_address, pieces_in_sector } = self._build().expect("Infallible"); + let farmer = subspace_sdk::Farmer::builder() + .max_pieces_in_sector(Some(pieces_in_sector)) + .build( + reward_address, + &**node, + &[FarmDescription::new( + node.path().path().join("plot"), + // TODO: account for overhead here + space_pledged, + )], + NonZeroU8::new(20).expect("Static value should not fail; qed"), + ) + .await + .unwrap(); + Farmer { farmer, path: node.path() } + } +} + +impl Farmer { + pub fn dev() -> FarmerBuilder { + FarmerBuilder::default() + } + + pub fn plot_dir(&self) -> PathBuf { + self.path.path().join("plot") + } + + pub async fn close(self) { + self.farmer.close().await.unwrap() + } +} diff --git a/sdk/tests/integration/domains.rs b/sdk/tests/integration/domains.rs new file mode 100644 index 00000000..6461400b --- /dev/null +++ b/sdk/tests/integration/domains.rs @@ -0,0 +1,34 @@ +use futures::prelude::*; +use sdk_utils::ByteSize; + +use crate::common::{Farmer, Node}; + +#[tokio::test(flavor = "multi_thread")] +async fn core_start() { + crate::common::setup(); + + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node = Node::dev().enable_core(true).build().await; + let farmer = Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .await; + + node.system_domain() + .unwrap() + .payments() + .unwrap() + .subscribe_new_heads() + .await + .unwrap() + .next() + .await + .unwrap(); + + farmer.close().await; + node.close().await; +} diff --git a/sdk/tests/integration/farmer.rs b/sdk/tests/integration/farmer.rs new file mode 100644 index 00000000..ba359805 --- /dev/null +++ b/sdk/tests/integration/farmer.rs @@ -0,0 +1,138 @@ +use futures::prelude::*; +use sdk_utils::ByteSize; + +use crate::common::{Farmer, Node}; + +#[tokio::test(flavor = "multi_thread")] +#[ignore = "We need api from single disk plot to calculate precise target sector count"] +async fn track_progress() { + crate::common::setup(); + + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node = Node::dev().build(true).await; + let farmer = Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .await; + + let progress = farmer + .iter_farms() + .await + .next() + .unwrap() + .subscribe_initial_plotting_progress() + .await + .collect::>() + .await; + assert_eq!(progress.len(), number_of_sectors); + + farmer.close().await; + node.close().await; +} + +#[tokio::test(flavor = "multi_thread")] +async fn new_solution() { + crate::common::setup(); + + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node = Node::dev().build(true).await; + let farmer = Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .await; + + farmer + .iter_farms() + .await + .next() + .unwrap() + .subscribe_new_solutions() + .await + .next() + .await + .expect("Farmer should send new solutions"); + + farmer.close().await; + node.close().await; +} + +#[tokio::test(flavor = "multi_thread")] +async fn progress_restart() { + crate::common::setup(); + + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node = Node::dev().build(true).await; + let farmer = Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .await; + + let plot = farmer.iter_farms().await.next().unwrap(); + + plot.subscribe_initial_plotting_progress().await.for_each(|_| async {}).await; + + tokio::time::timeout( + std::time::Duration::from_secs(5), + plot.subscribe_initial_plotting_progress().await.for_each(|_| async {}), + ) + .await + .unwrap(); + + farmer.close().await; + node.close().await; +} + +#[tokio::test(flavor = "multi_thread")] +#[ignore = "Stack overflows for now"] +async fn farmer_restart() { + crate::common::setup(); + + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node = Node::dev().build(true).await; + + for _ in 0..10 { + Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .await + .close() + .await; + } + + node.close().await; +} + +#[tokio::test(flavor = "multi_thread")] +async fn farmer_close() { + crate::common::setup(); + + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node = Node::dev().build(true).await; + let farmer = Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .await; + + farmer.close().await; + node.close().await; +} diff --git a/sdk/tests/integration/main.rs b/sdk/tests/integration/main.rs new file mode 100644 index 00000000..6d1f1b02 --- /dev/null +++ b/sdk/tests/integration/main.rs @@ -0,0 +1,19 @@ +pub mod common; +#[cfg(all(feature = "core-payments", feature = "executor"))] +mod domains; +mod farmer; +mod node; + +#[cfg(all( + target_arch = "x86_64", + target_vendor = "unknown", + target_os = "linux", + target_env = "gnu" +))] +#[global_allocator] +static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc; + +#[test] +fn pubkey_parse() { + "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY".parse::().unwrap(); +} diff --git a/sdk/tests/integration/node.rs b/sdk/tests/integration/node.rs new file mode 100644 index 00000000..d6233a26 --- /dev/null +++ b/sdk/tests/integration/node.rs @@ -0,0 +1,205 @@ +use std::sync::Arc; + +use futures::prelude::*; +use sdk_utils::ByteSize; +use tempfile::TempDir; +use tracing_futures::Instrument; + +use crate::common::{Farmer, Node}; + +async fn sync_block_inner() { + crate::common::setup(); + + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node = Node::dev().build(true).await; + let farmer = Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .await; + + let farm_blocks = 5; + + node.subscribe_new_heads() + .await + .unwrap() + .skip_while(|notification| futures::future::ready(notification.number < farm_blocks)) + .next() + .await + .unwrap(); + + farmer.close().await; + + let other_node = Node::dev() + .chain(node.chain.clone()) + .boot_nodes(node.listen_addresses().await.unwrap()) + .not_force_synced(true) + .not_authority(true) + .build(false) + .await; + + other_node.subscribe_syncing_progress().await.unwrap().for_each(|_| async {}).await; + assert_eq!(other_node.get_info().await.unwrap().best_block.1, farm_blocks); + + node.close().await; + other_node.close().await; +} + +#[tokio::test(flavor = "multi_thread")] +//#[cfg_attr(any(tarpaulin, not(target_os = "linux")), ignore = "Slow tests are +//#[cfg_attr(any(tarpaulin, run only on linux")] +async fn sync_block() { + tokio::time::timeout(std::time::Duration::from_secs(60 * 60), sync_block_inner()).await.unwrap() +} + +async fn sync_farm_inner() { + crate::common::setup(); + + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node_span = tracing::trace_span!("node 1"); + let node = Node::dev().build(true).instrument(node_span.clone()).await; + + let farmer = Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .instrument(node_span.clone()) + .await; + + let farm_blocks = 4; + + node.subscribe_new_heads() + .await + .unwrap() + .skip_while(|notification| futures::future::ready(notification.number < farm_blocks)) + .next() + .await + .unwrap(); + + let other_node_span = tracing::trace_span!("node 2"); + let other_node = Node::dev() + .dsn_boot_nodes(node.dsn_listen_addresses().await.unwrap()) + .boot_nodes(node.listen_addresses().await.unwrap()) + .not_force_synced(true) + .chain(node.chain.clone()) + .build(false) + .instrument(other_node_span.clone()) + .await; + + while other_node.get_info().await.unwrap().best_block.1 + < node.get_info().await.unwrap().best_block.1 + { + tokio::time::sleep(std::time::Duration::from_secs(1)).await; + } + + let other_farmer = Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&other_node, ByteSize::b(space_pledged as u64)) + .instrument(other_node_span.clone()) + .await; + + let farm = other_farmer.iter_farms().await.next().unwrap(); + farm.subscribe_initial_plotting_progress().await.for_each(|_| async {}).await; + farmer.close().await; + + farm.subscribe_new_solutions().await.next().await.expect("Solution stream never ends"); + + node.close().await; + other_node.close().await; + other_farmer.close().await; +} + +#[tokio::test(flavor = "multi_thread")] +//#[cfg_attr(any(tarpaulin, not(target_os = "linux")), ignore = "Slow tests are +//#[cfg_attr(any(tarpaulin, run only on linux")] +async fn sync_farm() { + tokio::time::timeout(std::time::Duration::from_secs(60 * 60), sync_farm_inner()).await.unwrap() +} + +#[tokio::test(flavor = "multi_thread")] +#[ignore = "Substrate rpc server doesn't let node to properly exit"] +async fn node_restart() { + crate::common::setup(); + let dir = Arc::new(TempDir::new().unwrap()); + + for i in 0..4 { + tracing::error!(i, "Running new node"); + Node::dev().path(dir.clone()).build(true).await.close().await; + } +} + +#[tokio::test(flavor = "multi_thread")] +//#[cfg_attr(any(tarpaulin, not(target_os = "linux")), ignore = "Slow tests are +//#[cfg_attr(any(tarpaulin, run only on linux")] +async fn node_events() { + crate::common::setup(); + + tokio::time::timeout(std::time::Duration::from_secs(30 * 60), async { + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node = Node::dev().build(true).await; + let farmer = Farmer::dev() + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .await; + + let events = node + .subscribe_new_heads() + .await + .unwrap() + // Skip genesis + .skip(1) + .then(|_| node.get_events(None).boxed()) + .take(1) + .next() + .await + .unwrap() + .unwrap(); + + assert!(!events.is_empty()); + + farmer.close().await; + node.close().await; + }) + .await + .unwrap(); +} + +#[tokio::test(flavor = "multi_thread")] +//#[cfg_attr(any(tarpaulin, not(target_os = "linux")), ignore = "Slow tests are +//#[cfg_attr(any(tarpaulin, run only on linux")] +async fn fetch_block_author() { + crate::common::setup(); + + tokio::time::timeout(std::time::Duration::from_secs(30 * 60), async { + let number_of_sectors = 10; + let pieces_in_sector = 50u16; + let sector_size = subspace_farmer_components::sector::sector_size(pieces_in_sector as _); + let space_pledged = sector_size * number_of_sectors; + + let node = Node::dev().build(false).await; + let reward_address = Default::default(); + let farmer = Farmer::dev() + .reward_address(reward_address) + .pieces_in_sector(pieces_in_sector) + .build(&node, ByteSize::b(space_pledged as u64)) + .await; + + let block = node.subscribe_new_heads().await.unwrap().skip(1).take(1).next().await.unwrap(); + assert_eq!(block.pre_digest.unwrap().solution().reward_address, reward_address); + + farmer.close().await; + node.close().await; + }) + .await + .unwrap(); +} diff --git a/sdk/traits/Cargo.toml b/sdk/traits/Cargo.toml new file mode 100644 index 00000000..d9bcdc8f --- /dev/null +++ b/sdk/traits/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "sdk-traits" +version = "0.1.0" +edition = "2021" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +async-trait = "0.1" +parking_lot = "0.12" +sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sdk-dsn = { path = "../dsn" } +subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e", default-features = false } +subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } + +[features] +default = [] +integration-test = [ + "sdk-dsn/integration-test" +] diff --git a/sdk/traits/src/lib.rs b/sdk/traits/src/lib.rs new file mode 100644 index 00000000..a8ea2bdf --- /dev/null +++ b/sdk/traits/src/lib.rs @@ -0,0 +1,47 @@ +//! Crate with interfaces for SDK + +#![warn( + missing_docs, + clippy::dbg_macro, + clippy::unwrap_used, + clippy::disallowed_types, + unused_features +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + +use subspace_farmer::piece_cache::PieceCache as FarmerPieceCache; + +/// Trait which abstracts farmer for node +#[async_trait::async_trait] +pub trait Farmer { + /// Proof of space table + type Table: subspace_proof_of_space::Table; + + /// Fetch piece by its hash + async fn get_piece_by_index( + piece_index: subspace_core_primitives::PieceIndex, + piece_cache: &FarmerPieceCache, + weak_readers_and_pieces: &std::sync::Weak< + parking_lot::Mutex< + Option, + >, + >, + ) -> Option; +} + +/// Trait which abstracts node for farmer +pub trait Node { + /// Client for aux store for DSN + type Client: sc_client_api::AuxStore + Send + Sync + 'static; + /// Proof of space table type + type Table: subspace_proof_of_space::Table; + /// Rpc implementation + type Rpc: subspace_farmer::node_client::NodeClient + Clone; + + /// Node name in telemetry + fn name(&self) -> &str; + /// Shared dsn configuration + fn dsn(&self) -> &sdk_dsn::DsnShared; + /// Rpc + fn rpc(&self) -> &Self::Rpc; +} diff --git a/sdk/utils/Cargo.toml b/sdk/utils/Cargo.toml new file mode 100644 index 00000000..c3554c8e --- /dev/null +++ b/sdk/utils/Cargo.toml @@ -0,0 +1,46 @@ +[package] +name = "sdk-utils" +version = "0.1.0" +edition = "2021" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1" +async-trait = "0.1" +base58 = "0.2" +blake2 = "0.10.5" +bytesize = "1" +bytesize-serde = "0.2" +derivative = "2.2.0" +derive_more = "0.99" +frame-support = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +futures = "0.3" +jsonrpsee-core = "0.16" +libp2p-core = { git = "https://github.com/subspace/rust-libp2p", rev = "d6339da35589d86bae6ecb25a5121c02f2e5b90e" } +parity-scale-codec = "3.6.3" +sc-consensus-subspace-rpc = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } +sc-rpc = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } +sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } +sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } +serde = { version = "1", features = ["derive"] } +serde_json = "1.0.106" +sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sp-core-hashing = { version = "9.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +sp-storage = { version = "13.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } +ss58-registry = "1.33" +# Unused for now. TODO: add `serde` feature to `subspace-core-primitives` in `subspace-archiver` +subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e", default-features = false } +subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "bd435100200b3dcce6d6f50534d52e3cd039ca8e" } +thiserror = "1" +tokio = { version = "1.34.0", features = ["fs", "rt", "tracing", "macros", "parking_lot", "rt-multi-thread", "signal"] } +tracing = "0.1" + +[features] +default = [] +integration-test = [] diff --git a/sdk/utils/src/lib.rs b/sdk/utils/src/lib.rs new file mode 100644 index 00000000..34e58149 --- /dev/null +++ b/sdk/utils/src/lib.rs @@ -0,0 +1,998 @@ +//! Utilities crate shared across all SDK crates + +#![warn( + missing_docs, + clippy::dbg_macro, + clippy::unwrap_used, + clippy::disallowed_types, + unused_features +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + +use std::pin::Pin; +use std::sync::Arc; +use std::vec::Drain; + +use anyhow::{anyhow, Context, Result}; +use derive_more::{Deref, DerefMut, Display, From, FromStr, Into}; +use frame_system::pallet_prelude::{BlockNumberFor, HeaderFor}; +use futures::prelude::*; +use jsonrpsee_core::client::{ + BatchResponse, ClientT, Subscription, SubscriptionClientT, SubscriptionKind, +}; +use jsonrpsee_core::params::BatchRequestBuilder; +use jsonrpsee_core::server::rpc_module::RpcModule; +use jsonrpsee_core::traits::ToRpcParams; +use jsonrpsee_core::Error; +use parity_scale_codec::{Decode, Encode}; +pub use parse_ss58::Ss58ParsingError; +use sc_consensus_subspace_rpc::SubspaceRpcApiClient; +use sc_rpc_api::state::StateApiClient; +use serde::de::DeserializeOwned; +use serde::{Deserialize, Serialize}; +use subspace_core_primitives::{Piece, PieceIndex, SegmentHeader, SegmentIndex, PUBLIC_KEY_LENGTH}; +use subspace_farmer::jsonrpsee::tracing; +use subspace_farmer::node_client::{Error as NodeClientError, NodeClient}; +use subspace_rpc_primitives::{ + FarmerAppInfo, NodeSyncStatus, RewardSignatureResponse, RewardSigningInfo, SlotInfo, + SolutionResponse, +}; + +/// Output that indicates whether the task was cancelled or successfully +/// completed +pub enum TaskOutput { + /// Task completed with value of type `T` + Value(T), + /// Task was cancelled due to reason `E` + Cancelled(E), +} + +/// Rpc implementation over jsonrpsee_core debug rpc module +#[derive(Clone, Debug)] +pub struct Rpc { + inner: Arc>, +} + +impl Rpc { + /// Constructor for our rpc from substrate rpc handlers + pub fn new(handlers: &sc_service::RpcHandlers) -> Self { + let inner = handlers.handle(); + Self { inner } + } + + /// Subscribe to new block headers + pub async fn subscribe_new_heads<'a, 'b, T>( + &'a self, + ) -> Result> + Send + Sync + Unpin + 'static, Error> + where + T: frame_system::Config + sp_runtime::traits::GetRuntimeBlockType, + T::RuntimeBlock: serde::de::DeserializeOwned + sp_runtime::DeserializeOwned + 'static, + HeaderFor: serde::de::DeserializeOwned + sp_runtime::DeserializeOwned + 'static, + 'a: 'b, + { + let stream = sc_rpc::chain::ChainApiClient::< + BlockNumberFor, + T::Hash, + HeaderFor, + sp_runtime::generic::SignedBlock, + >::subscribe_new_heads(self) + .await? + .filter_map(|result| futures::future::ready(result.ok())); + + Ok(stream) + } + + /// Subscribe to new finalized block headers + pub async fn subscribe_finalized_heads<'a, 'b, T>( + &'a self, + ) -> Result> + Send + Sync + Unpin + 'static, Error> + where + T: frame_system::Config + sp_runtime::traits::GetRuntimeBlockType, + T::RuntimeBlock: serde::de::DeserializeOwned + sp_runtime::DeserializeOwned + 'static, + HeaderFor: serde::de::DeserializeOwned + sp_runtime::DeserializeOwned + 'static, + 'a: 'b, + { + let stream = sc_rpc::chain::ChainApiClient::< + BlockNumberFor, + T::Hash, + HeaderFor, + sp_runtime::generic::SignedBlock, + >::subscribe_finalized_heads(self) + .await? + .filter_map(|result| futures::future::ready(result.ok())); + + Ok(stream) + } + + /// Get substrate events for some block + pub async fn get_events( + &self, + block: Option, + ) -> anyhow::Result>> + where + T: frame_system::Config, + T::Hash: serde::ser::Serialize + serde::de::DeserializeOwned + Send + Sync + 'static, + Vec>: parity_scale_codec::Decode, + { + match self + .get_storage::(StorageKey::events(), block) + .await + .context("Failed to get events from storage")? + { + Some(sp_storage::StorageData(events)) => + parity_scale_codec::DecodeAll::decode_all(&mut events.as_ref()) + .context("Failed to decode events"), + None => Ok(vec![]), + } + } +} + +#[async_trait::async_trait] +impl NodeClient for Rpc { + async fn farmer_app_info(&self) -> Result { + Ok(self.get_farmer_app_info().await?) + } + + async fn subscribe_slot_info( + &self, + ) -> Result + Send + 'static>>, NodeClientError> { + Ok(Box::pin( + SubspaceRpcApiClient::subscribe_slot_info(self) + .await? + .filter_map(|result| futures::future::ready(result.ok())), + )) + } + + async fn submit_solution_response( + &self, + solution_response: SolutionResponse, + ) -> Result<(), NodeClientError> { + Ok(SubspaceRpcApiClient::submit_solution_response(self, solution_response).await?) + } + + async fn subscribe_reward_signing( + &self, + ) -> Result + Send + 'static>>, NodeClientError> + { + Ok(Box::pin( + SubspaceRpcApiClient::subscribe_reward_signing(self) + .await? + .filter_map(|result| futures::future::ready(result.ok())), + )) + } + + async fn submit_reward_signature( + &self, + reward_signature: RewardSignatureResponse, + ) -> Result<(), NodeClientError> { + Ok(SubspaceRpcApiClient::submit_reward_signature(self, reward_signature).await?) + } + + async fn subscribe_archived_segment_headers( + &self, + ) -> Result + Send + 'static>>, NodeClientError> { + Ok(Box::pin( + SubspaceRpcApiClient::subscribe_archived_segment_header(self) + .await? + .filter_map(|result| futures::future::ready(result.ok())), + )) + } + + async fn subscribe_node_sync_status_change( + &self, + ) -> Result + Send + 'static>>, NodeClientError> { + Ok(Box::pin( + SubspaceRpcApiClient::subscribe_node_sync_status_change(self) + .await? + .filter_map(|result| futures::future::ready(result.ok())), + )) + } + + async fn segment_headers( + &self, + segment_indexes: Vec, + ) -> Result>, NodeClientError> { + Ok(SubspaceRpcApiClient::segment_headers(self, segment_indexes).await?) + } + + async fn piece(&self, piece_index: PieceIndex) -> Result, NodeClientError> { + let result = SubspaceRpcApiClient::piece(self, piece_index).await?; + + if let Some(bytes) = result { + let piece = Piece::try_from(bytes.as_slice()) + .map_err(|_| format!("Cannot convert piece. PieceIndex={}", piece_index))?; + + return Ok(Some(piece)); + } + + Ok(None) + } + + async fn acknowledge_archived_segment_header( + &self, + segment_index: SegmentIndex, + ) -> Result<(), NodeClientError> { + Ok(SubspaceRpcApiClient::acknowledge_archived_segment_header(self, segment_index).await?) + } +} + +#[async_trait::async_trait] +impl ClientT for Rpc { + async fn notification(&self, method: &str, params: Params) -> Result<(), Error> + where + Params: ToRpcParams + Send, + { + self.inner.call(method, params).await + } + + async fn request(&self, method: &str, params: Params) -> Result + where + R: DeserializeOwned, + Params: ToRpcParams + Send, + { + self.inner.call(method, params).await + } + + #[allow(clippy::diverging_sub_expression)] + async fn batch_request<'a, R>( + &self, + _batch: BatchRequestBuilder<'a>, + ) -> Result, Error> + where + R: DeserializeOwned + std::fmt::Debug + 'a, + { + unreachable!("It isn't called at all") + } +} + +#[async_trait::async_trait] +impl SubscriptionClientT for Rpc { + async fn subscribe<'a, Notif, Params>( + &self, + subscribe_method: &'a str, + params: Params, + _unsubscribe_method: &'a str, + ) -> Result, Error> + where + Params: ToRpcParams + Send, + Notif: DeserializeOwned, + { + let mut subscription = Arc::clone(&self.inner).subscribe(subscribe_method, params).await?; + let kind = subscription.subscription_id().clone().into_owned(); + let (to_back, _) = futures::channel::mpsc::channel(10); + let (mut notifs_tx, notifs_rx) = futures::channel::mpsc::channel(10); + tokio::spawn(async move { + while let Some(result) = subscription.next().await { + let Ok((item, _)) = result else { break }; + if notifs_tx.send(item).await.is_err() { + break; + } + } + }); + + Ok(Subscription::new(to_back, notifs_rx, SubscriptionKind::Subscription(kind))) + } + + #[allow(clippy::diverging_sub_expression)] + async fn subscribe_to_method<'a, Notif>( + &self, + _method: &'a str, + ) -> Result, Error> + where + Notif: DeserializeOwned, + { + unreachable!("It isn't called") + } +} + +/// Useful predicate for serde, which allows to skip type during serialization +pub fn is_default(t: &T) -> bool { + t == &T::default() +} + +struct Defer(Option); + +impl Defer { + pub fn new(f: F) -> Self { + Self(Some(f)) + } +} + +impl Drop for Defer { + fn drop(&mut self) { + (self.0.take().expect("Always set"))(); + } +} + +/// Useful type which will ensure that things will be dropped +#[derive(Default, derivative::Derivative)] +#[derivative(Debug)] +struct DropCollection { + #[derivative(Debug = "ignore")] + vec: Vec>, +} + +impl DropCollection { + /// Constructor + pub fn new() -> Self { + Self::default() + } + + /// Run closure during drop + pub fn defer(&mut self, f: F) { + self.push(Defer::new(f)) + } + + /// Add something to drop collection + pub fn push(&mut self, t: T) { + self.vec.push(Box::new(t)) + } + + /// Drain the underlying vector + pub fn drain(&mut self) -> Drain<'_, Box> { + self.vec.drain(..) + } +} + +impl FromIterator for DropCollection { + fn from_iter>(iter: I) -> Self { + let mut me = Self::new(); + for item in iter { + me.push(item); + } + me + } +} + +impl Extend for DropCollection { + fn extend>(&mut self, iter: I) { + for item in iter { + self.push(item); + } + } +} + +/// Type for dropping things asynchronously +#[derive(Default, derivative::Derivative)] +#[derivative(Debug)] +struct AsyncDropFutures { + #[derivative(Debug = "ignore")] + vec: Vec + Send + Sync>>>, +} + +impl AsyncDropFutures { + /// Constructor + pub fn new() -> Self { + Self::default() + } + + /// Push some future + pub fn push + Send + Sync + 'static>(&mut self, fut: F) { + self.vec.push(Box::pin(fut)) + } + + /// Drain the underlying vector + pub fn drain(&mut self) -> Drain<'_, Pin + Send + Sync>>> { + self.vec.drain(..) + } +} + +/// Enum identifying which of the item we should be destructing +#[derive(derivative::Derivative)] +#[derivative(Debug)] +enum ToDestruct { + Sync, + Async, + Item, +} + +/// A General purpose set of destructors consist of sync destructor, async +/// destructor and normal object it invokes destructors and destroy normal in +/// reverse order +#[derive(Default, derivative::Derivative)] +#[derivative(Debug)] +pub struct DestructorSet { + name: String, + items_to_drop: DropCollection, + sync_destructors: DropCollection, + async_destructors: AsyncDropFutures, + order: Vec, + already_ran: bool, + allow_async: bool, +} + +impl Drop for DestructorSet { + fn drop(&mut self) { + // already closed, nothing to do. + if self.already_ran { + return; + } + + if self.allow_async { + tracing::warn!( + "Destructor set: {} with async allowed is being dropped. Async destructors won't \ + run. Are you missing the `async_drop` call?", + self.name + ); + } + + // Try to drop as much stuff as we could + let mut sync_fns_drain = self.sync_destructors.drain().rev(); + let mut async_fns_drain = self.async_destructors.drain().rev(); + let mut items_drain = self.items_to_drop.drain().rev(); + let order_drain = self.order.drain(..).rev(); + + for order in order_drain { + match order { + ToDestruct::Sync => { + let sync_fn = sync_fns_drain.next().expect("sync fn always set"); + drop(sync_fn); + } + ToDestruct::Async => { + let async_fn = async_fns_drain.next().expect("async fn always set"); + // We cannot run async function here, we can only drop them. + drop(async_fn); + } + ToDestruct::Item => { + let item = items_drain.next().expect("item always set"); + drop(item); + } + } + } + } +} + +impl DestructorSet { + /// Creates an empty Destructors object with async destructors allowed + pub fn new(name: impl Into) -> DestructorSet { + DestructorSet { + name: name.into(), + items_to_drop: DropCollection::new(), + sync_destructors: DropCollection::new(), + async_destructors: AsyncDropFutures::new(), + order: vec![], + already_ran: false, + allow_async: true, + } + } + + /// Returns a bool indicating if the destructor set has already ran + pub fn already_ran(&self) -> bool { + self.already_ran + } + + /// Creates an empty Destructors object with async destructors not allowed + pub fn new_without_async(name: impl Into) -> DestructorSet { + DestructorSet { + name: name.into(), + items_to_drop: DropCollection::new(), + sync_destructors: DropCollection::new(), + async_destructors: AsyncDropFutures::new(), + order: vec![], + already_ran: false, + allow_async: false, + } + } + + /// Add sync destructor in the sync destructor collection + pub fn add_sync_destructor(&mut self, f: F) -> Result<()> { + if self.already_ran { + return Err(anyhow!("Destructor set: {} has been run already", self.name)); + } + self.order.push(ToDestruct::Sync); + self.sync_destructors.defer(f); + Ok(()) + } + + /// Add async destructor in the async destructor collection + pub fn add_async_destructor + Send + Sync + 'static>( + &mut self, + fut: F, + ) -> Result<()> { + if self.already_ran { + return Err(anyhow!("Destructor set: {} has been run already", self.name)); + } + if !self.allow_async { + return Err(anyhow!("async destructors are disabled in Destructor set: {}", self.name)); + } + self.order.push(ToDestruct::Async); + self.async_destructors.push(fut); + Ok(()) + } + + /// Add normal object to drop + pub fn add_items_to_drop(&mut self, t: T) -> Result<()> { + if self.already_ran { + return Err(anyhow!("Destructor set: {} has been run already", self.name)); + } + self.order.push(ToDestruct::Item); + self.items_to_drop.push(t); + Ok(()) + } + + /// run the destructors + pub async fn async_drop(mut self) -> Result<()> { + // already closed, nothing to do. + if self.already_ran { + return Err(anyhow!("Destructor set: {} has been run already", self.name)); + } + + if !self.allow_async { + return Err(anyhow!( + "Destructor set: {} is only configured to run sync destructors. To run them drop \ + this instance.", + self.name + )); + } + + let mut sync_fns_drain = self.sync_destructors.drain().rev(); + let mut async_fns_drain = self.async_destructors.drain().rev(); + let mut items_drain = self.items_to_drop.drain().rev(); + let order_drain = self.order.drain(..).rev(); + + for order in order_drain { + match order { + ToDestruct::Sync => { + let sync_fn = sync_fns_drain.next().expect("sync fn always set"); + drop(sync_fn); + } + ToDestruct::Async => { + let async_fn = async_fns_drain.next().expect("async fn always set"); + async_fn.await; + } + ToDestruct::Item => { + let item = items_drain.next().expect("item always set"); + drop(item); + } + } + } + self.already_ran = true; + Ok(()) + } +} + +/// Container for number of bytes. +#[derive( + Clone, + Copy, + Debug, + Default, + Deref, + DerefMut, + Deserialize, + Display, + Eq, + From, + FromStr, + Into, + Ord, + PartialEq, + PartialOrd, + Serialize, +)] +#[serde(transparent)] +pub struct ByteSize(#[serde(with = "bytesize_serde")] pub bytesize::ByteSize); + +impl ByteSize { + /// Constructor for bytes + pub const fn b(n: u64) -> Self { + Self(bytesize::ByteSize::b(n)) + } + + /// Constructor for kilobytes + pub const fn kb(n: u64) -> Self { + Self(bytesize::ByteSize::kb(n)) + } + + /// Constructor for kibibytes + pub const fn kib(n: u64) -> Self { + Self(bytesize::ByteSize::kib(n)) + } + + /// Constructor for megabytes + pub const fn mb(n: u64) -> Self { + Self(bytesize::ByteSize::mb(n)) + } + + /// Constructor for mibibytes + pub const fn mib(n: u64) -> Self { + Self(bytesize::ByteSize::mib(n)) + } + + /// Constructor for gigabytes + pub const fn gb(n: u64) -> Self { + Self(bytesize::ByteSize::gb(n)) + } + + /// Constructor for gibibytes + pub const fn gib(n: u64) -> Self { + Self(bytesize::ByteSize::gib(n)) + } + + /// Convert to u64 + pub fn to_u64(&self) -> u64 { + self.0.as_u64() + } +} + +/// Multiaddr is a wrapper around libp2p one +#[derive( + Clone, + Debug, + Deref, + DerefMut, + Deserialize, + Display, + Eq, + From, + FromStr, + Into, + PartialEq, + Serialize, +)] +#[serde(transparent)] +pub struct Multiaddr(pub libp2p_core::Multiaddr); + +impl From for sc_network::Multiaddr { + fn from(value: Multiaddr) -> Self { + value.0.to_string().parse().expect("Conversion between 2 libp2p versions is always right") + } +} + +impl From for Multiaddr { + fn from(value: sc_network::Multiaddr) -> Self { + value.to_string().parse().expect("Conversion between 2 libp2p versions is always right") + } +} + +/// Multiaddr with peer id +#[derive( + Debug, Clone, Deserialize, Serialize, PartialEq, From, Into, FromStr, Deref, DerefMut, Display, +)] +#[serde(transparent)] +pub struct MultiaddrWithPeerId(pub sc_service::config::MultiaddrWithPeerId); + +impl MultiaddrWithPeerId { + /// Constructor for peer id + pub fn new(multiaddr: impl Into, peer_id: sc_network::PeerId) -> Self { + Self(sc_service::config::MultiaddrWithPeerId { + multiaddr: multiaddr.into().into(), + peer_id, + }) + } +} + +impl From for libp2p_core::Multiaddr { + fn from(value: MultiaddrWithPeerId) -> Self { + value.0.to_string().parse().expect("Conversion between 2 libp2p versions is always right") + } +} + +impl From for sc_network::Multiaddr { + fn from(multiaddr: MultiaddrWithPeerId) -> Self { + multiaddr.to_string().parse().expect("Conversion between 2 libp2p versions is always right") + } +} + +impl From for Multiaddr { + fn from(multiaddr: MultiaddrWithPeerId) -> Self { + multiaddr.to_string().parse().expect("Conversion between 2 libp2p versions is always right") + } +} + +/// Spawn task with provided name (if possible) +#[cfg(not(tokio_unstable))] +pub fn task_spawn(name: impl AsRef, future: F) -> tokio::task::JoinHandle +where + F: Future + Send + 'static, + F::Output: Send + 'static, +{ + let _ = name; + tokio::task::spawn(future) +} + +/// Spawn task with provided name (if possible) +#[cfg(tokio_unstable)] +pub fn task_spawn(name: impl AsRef, future: F) -> tokio::task::JoinHandle +where + F: Future + Send + 'static, + F::Output: Send + 'static, +{ + tokio::task::Builder::new() + .name(name.as_ref()) + .spawn(future) + .expect("Spawning task never fails") +} + +/// Spawn task with provided name (if possible) +#[cfg(not(tokio_unstable))] +pub fn task_spawn_blocking(name: impl AsRef, f: F) -> tokio::task::JoinHandle +where + F: FnOnce() -> R + Send + 'static, + R: Send + 'static, +{ + let _ = name; + tokio::task::spawn_blocking(f) +} + +/// Spawn task with provided name (if possible) +#[cfg(tokio_unstable)] +pub fn task_spawn_blocking(name: impl AsRef, f: F) -> tokio::task::JoinHandle +where + F: FnOnce() -> R + Send + 'static, + R: Send + 'static, +{ + tokio::task::Builder::new() + .name(name.as_ref()) + .spawn_blocking(f) + .expect("Spawning task never fails") +} + +/// Substrate storage key abstraction +pub struct StorageKey(pub Vec); + +impl StorageKey { + /// Constructor which accepts storage keys + pub fn new(keys: IT) -> Self + where + IT: IntoIterator, + K: AsRef<[u8]>, + { + Self(keys.into_iter().flat_map(|key| sp_core_hashing::twox_128(key.as_ref())).collect()) + } + + /// Storage key for events + pub fn events() -> Self { + Self::new(["System", "Events"]) + } +} + +impl Rpc { + pub(crate) async fn get_storage( + &self, + StorageKey(key): StorageKey, + block: Option, + ) -> anyhow::Result> + where + H: Send + Sync + 'static + serde::ser::Serialize + serde::de::DeserializeOwned, + { + self.storage(sp_storage::StorageKey(key), block) + .await + .context("Failed to fetch storage entry") + } +} + +/// Public key type +#[derive( + Debug, + Default, + Decode, + Encode, + Copy, + Clone, + PartialEq, + Eq, + Ord, + PartialOrd, + Hash, + Deref, + DerefMut, + Serialize, + Deserialize, +)] +#[serde(transparent)] +pub struct PublicKey(pub subspace_core_primitives::PublicKey); + +impl PublicKey { + /// Construct public key from raw bytes + pub fn new(raw: [u8; PUBLIC_KEY_LENGTH]) -> Self { + Self(subspace_core_primitives::PublicKey::from(raw)) + } +} + +impl From<[u8; PUBLIC_KEY_LENGTH]> for PublicKey { + fn from(key: [u8; PUBLIC_KEY_LENGTH]) -> Self { + Self::new(key) + } +} + +impl From for PublicKey { + fn from(account_id: sp_core::crypto::AccountId32) -> Self { + From::<[u8; PUBLIC_KEY_LENGTH]>::from(*account_id.as_ref()) + } +} + +impl From for sp_core::crypto::AccountId32 { + fn from(account_id: PublicKey) -> Self { + Self::new(*account_id.0) + } +} + +impl std::fmt::Display for PublicKey { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.0.fmt(f) + } +} + +mod parse_ss58 { + // Copyright (C) 2017-2022 Parity Technologies (UK) Ltd. + // Copyright (C) 2022 Subspace Labs, Inc. + // SPDX-License-Identifier: Apache-2.0 + + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + //! Modified version of SS58 parser extracted from Substrate in order to not + //! pull the whole `sp-core` into farmer application + + use base58::FromBase58; + use blake2::digest::typenum::U64; + use blake2::digest::FixedOutput; + use blake2::{Blake2b, Digest}; + use ss58_registry::Ss58AddressFormat; + use subspace_core_primitives::{PublicKey, PUBLIC_KEY_LENGTH}; + use thiserror::Error; + + const PREFIX: &[u8] = b"SS58PRE"; + const CHECKSUM_LEN: usize = 2; + + /// An error type for SS58 decoding. + #[derive(Debug, Error)] + pub enum Ss58ParsingError { + /// Base 58 requirement is violated + #[error("Base 58 requirement is violated")] + BadBase58, + /// Length is bad + #[error("Length is bad")] + BadLength, + /// Invalid SS58 prefix byte + #[error("Invalid SS58 prefix byte")] + InvalidPrefix, + /// Disallowed SS58 Address Format for this datatype + #[error("Disallowed SS58 Address Format for this datatype")] + FormatNotAllowed, + /// Invalid checksum + #[error("Invalid checksum")] + InvalidChecksum, + } + + /// Some if the string is a properly encoded SS58Check address. + pub(crate) fn parse_ss58_reward_address(s: &str) -> Result { + let data = s.from_base58().map_err(|_| Ss58ParsingError::BadBase58)?; + if data.len() < 2 { + return Err(Ss58ParsingError::BadLength); + } + let (prefix_len, ident) = match data[0] { + 0..=63 => (1, data[0] as u16), + 64..=127 => { + // weird bit manipulation owing to the combination of LE encoding and missing + // two bits from the left. + // d[0] d[1] are: 01aaaaaa bbcccccc + // they make the LE-encoded 16-bit value: aaaaaabb 00cccccc + // so the lower byte is formed of aaaaaabb and the higher byte is 00cccccc + let lower = (data[0] << 2) | (data[1] >> 6); + let upper = data[1] & 0b00111111; + (2, (lower as u16) | ((upper as u16) << 8)) + } + _ => return Err(Ss58ParsingError::InvalidPrefix), + }; + if data.len() != prefix_len + PUBLIC_KEY_LENGTH + CHECKSUM_LEN { + return Err(Ss58ParsingError::BadLength); + } + let format: Ss58AddressFormat = ident.into(); + if format.is_reserved() { + return Err(Ss58ParsingError::FormatNotAllowed); + } + + let hash = ss58hash(&data[0..PUBLIC_KEY_LENGTH + prefix_len]); + let checksum = &hash[0..CHECKSUM_LEN]; + if data[PUBLIC_KEY_LENGTH + prefix_len..PUBLIC_KEY_LENGTH + prefix_len + CHECKSUM_LEN] + != *checksum + { + // Invalid checksum. + return Err(Ss58ParsingError::InvalidChecksum); + } + + let bytes: [u8; PUBLIC_KEY_LENGTH] = data[prefix_len..][..PUBLIC_KEY_LENGTH] + .try_into() + .map_err(|_| Ss58ParsingError::BadLength)?; + + Ok(PublicKey::from(bytes)) + } + + fn ss58hash(data: &[u8]) -> [u8; 64] { + let mut state = Blake2b::::new(); + state.update(PREFIX); + state.update(data); + state.finalize_fixed().into() + } + + impl std::str::FromStr for super::PublicKey { + type Err = Ss58ParsingError; + + fn from_str(s: &str) -> Result { + parse_ss58_reward_address(s).map(Self) + } + } +} + +pub mod chain_spec { + //! Subspace chain spec related utilities + + use frame_support::traits::Get; + use sc_service::Properties; + use serde_json::map::Map; + use serde_json::Value; + use sp_core::crypto::AccountId32; + use sp_core::{sr25519, Pair, Public}; + use sp_runtime::traits::IdentifyAccount; + use sp_runtime::MultiSigner; + use subspace_runtime::SS58Prefix; + use subspace_runtime_primitives::DECIMAL_PLACES; + + /// Shared chain spec properties related to the coin. + pub fn chain_spec_properties() -> Properties { + let mut properties = Properties::new(); + + properties.insert("dsnBootstrapNodes".to_string(), Vec::::new().into()); + properties.insert("ss58Format".to_string(), >::get().into()); + properties.insert("tokenDecimals".to_string(), DECIMAL_PLACES.into()); + properties.insert("tokenSymbol".to_string(), "tSSC".into()); + let domains_bootstrap_nodes = Map::::new(); + properties.insert("domainsBootstrapNodes".to_string(), domains_bootstrap_nodes.into()); + + properties + } + + /// Get public key from keypair seed. + pub fn get_public_key_from_seed( + seed: &'static str, + ) -> ::Public { + TPublic::Pair::from_string(&format!("//{seed}"), None) + .expect("Static values are valid; qed") + .public() + } + + /// Generate an account ID from seed. + pub fn get_account_id_from_seed(seed: &'static str) -> AccountId32 { + MultiSigner::from(get_public_key_from_seed::(seed)).into_account() + } +} + +/// Useful macro to generate some common methods and trait implementations for +/// builders +#[macro_export] +macro_rules! generate_builder { + ( $name:ident ) => { + impl concat_idents!($name, Builder) { + /// Constructor + pub fn new() -> Self { + Self::default() + } + + #[doc = concat!("Build ", stringify!($name))] + pub fn build(self) -> $name { + self._build().expect("Infallible") + } + } + + impl From for $name { + fn from(value: concat_idents!($name, Builder)) -> Self { + value.build() + } + } + }; + ( $name:ident, $($rest:ident),+ ) => { + $crate::generate_builder!($name); + $crate::generate_builder!($($rest),+); + }; +}