diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 141e01cd9d..0000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Docs - -on: - push: - branches: [ master ] - -jobs: - build: - name: Build docs - runs-on: ubuntu-latest - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Cache cargo registry & git sources - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/ - ~/.cargo/git/db/ - key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }} - ${{ runner.os }}-cargo-docs- - ${{ runner.os }}-cargo- - - - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.9 - - - name: Install Rust toolchain - run: make setup - - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Pages - uses: actions/configure-pages@v5 - - - name: Build website - run: | - cd docs - npm install - npm run build - - - name: Build rustdocs - uses: actions-rs/cargo@v1 - with: - command: doc - args: --all --no-deps - - - name: Copy rustdocs - run: | - cp -r ./target/doc docs/.vitepress/dist/rustdocs - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: 'docs/.vitepress/dist' - - deploy: - name: Deploy docs - needs: build - - permissions: - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source - - # Deploy to the github-pages environment - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - # Specify runner + deployment step - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.yml index 8151a5e31d..5e9848aa47 100644 --- a/.github/workflows/editorconfig.yml +++ b/.github/workflows/editorconfig.yml @@ -5,10 +5,8 @@ on: branches: - master - 'polkadot-v**' + - 'frontier-stable**-otf-patches' pull_request: - branches: - - master - - 'polkadot-v**' jobs: check: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c316a7d680..e95ce97efe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,12 +5,10 @@ on: branches: - master - 'polkadot-v**' + - 'frontier-stable**-otf-patches' paths-ignore: - "**.md" pull_request: - branches: - - master - - 'polkadot-v**' paths-ignore: - "**.md" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1c98e823f..9dde07b3b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,10 +5,8 @@ on: branches: - master - 'polkadot-v**' + - 'frontier-stable**-otf-patches' pull_request: - branches: - - master - - 'polkadot-v**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/Cargo.lock b/Cargo.lock index 201a4e8085..b8bbf1aad6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -883,7 +883,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "binary-merkle-tree" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "hash-db", "log", @@ -1899,7 +1899,7 @@ dependencies = [ [[package]] name = "cumulus-client-parachain-inherent" version = "0.18.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1909,7 +1909,7 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sc-consensus-babe", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-inherents", "sp-runtime", "sp-state-machine", @@ -1920,7 +1920,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.21.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1957,7 +1957,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -1968,7 +1968,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-weight-reclaim" version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "cumulus-primitives-storage-weight-reclaim", "derive-where", @@ -1987,7 +1987,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2004,7 +2004,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2018,7 +2018,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-proof-size-hostfunction" version = "0.13.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "sp-externalities", "sp-runtime-interface", @@ -2028,7 +2028,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-storage-weight-reclaim" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-proof-size-hostfunction", @@ -2045,7 +2045,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.24.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2065,7 +2065,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2693,6 +2693,16 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "env_filter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +dependencies = [ + "log", + "regex", +] + [[package]] name = "env_logger" version = "0.10.2" @@ -2940,6 +2950,36 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "fc-aura" +version = "1.0.0-dev" +dependencies = [ + "fc-rpc", + "fp-storage", + "sc-client-api", + "sc-consensus-aura", + "sp-api", + "sp-consensus-aura", + "sp-inherents", + "sp-runtime", + "sp-timestamp", +] + +[[package]] +name = "fc-babe" +version = "1.0.0-dev" +dependencies = [ + "fc-rpc", + "sc-client-api", + "sc-consensus-babe", + "sp-api", + "sp-blockchain", + "sp-consensus-babe", + "sp-inherents", + "sp-runtime", + "sp-timestamp", +] + [[package]] name = "fc-cli" version = "1.0.0-dev" @@ -3077,7 +3117,6 @@ dependencies = [ "sc-block-builder", "sc-client-api", "sc-client-db", - "sc-consensus-aura", "sc-network", "sc-network-sync", "sc-rpc", @@ -3090,7 +3129,6 @@ dependencies = [ "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-consensus-aura", "sp-core", "sp-externalities", "sp-inherents", @@ -3118,7 +3156,7 @@ dependencies = [ "rustc-hex", "serde", "serde_json", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", ] [[package]] @@ -3299,7 +3337,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", ] @@ -3427,8 +3465,8 @@ checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" [[package]] name = "frame-benchmarking" -version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "41.0.1" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-support", "frame-support-procedural", @@ -3451,8 +3489,8 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "49.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "49.1.0" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "Inflector", "array-bytes 6.2.3", @@ -3461,6 +3499,7 @@ dependencies = [ "comfy-table", "cumulus-client-parachain-inherent", "cumulus-primitives-proof-size-hostfunction", + "env_filter", "frame-benchmarking", "frame-storage-access-test-runtime", "frame-support", @@ -3499,6 +3538,7 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", + "sp-runtime-interface", "sp-state-machine", "sp-storage", "sp-timestamp", @@ -3529,7 +3569,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "16.1.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -3540,7 +3580,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3556,8 +3596,8 @@ dependencies = [ [[package]] name = "frame-executive" -version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "41.0.1" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "aquamarine", "frame-support", @@ -3610,7 +3650,7 @@ dependencies = [ [[package]] name = "frame-metadata-hash-extension" version = "0.9.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "const-hex", @@ -3626,7 +3666,7 @@ dependencies = [ [[package]] name = "frame-storage-access-test-runtime" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "cumulus-pallet-parachain-system", "parity-scale-codec", @@ -3640,7 +3680,7 @@ dependencies = [ [[package]] name = "frame-support" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "aquamarine", "array-bytes 6.2.3", @@ -3681,7 +3721,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "Inflector", "cfg-expr", @@ -3694,14 +3734,14 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "syn 2.0.104", ] [[package]] name = "frame-support-procedural-tools" version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.3.0", @@ -3713,7 +3753,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "proc-macro2", "quote", @@ -3723,7 +3763,7 @@ dependencies = [ [[package]] name = "frame-system" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "cfg-if", "docify", @@ -3742,7 +3782,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -3756,7 +3796,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "parity-scale-codec", @@ -3766,7 +3806,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.47.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-support", "parity-scale-codec", @@ -3782,6 +3822,7 @@ dependencies = [ "clap", "cumulus-primitives-proof-size-hostfunction", "fc-api", + "fc-aura", "fc-cli", "fc-consensus", "fc-db", @@ -3837,6 +3878,8 @@ dependencies = [ "sp-session", "sp-timestamp", "sp-transaction-pool", + "stc-shield", + "stp-shield", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", @@ -3888,6 +3931,7 @@ dependencies = [ "sp-session", "sp-transaction-pool", "sp-version", + "stp-shield", "substrate-wasm-builder", ] @@ -4328,14 +4372,20 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.4", +] + [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] [[package]] name = "heck" @@ -4590,6 +4640,15 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" +[[package]] +name = "hybrid-array" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2d35805454dc9f8662a98d6d61886ffe26bd465f5960e0e55345c70d5c0d2a9" +dependencies = [ + "typenum", +] + [[package]] name = "hyper" version = "0.14.32" @@ -5304,6 +5363,16 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "kem" +version = "0.3.0-pre.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b8645470337db67b01a7f966decf7d0bafedbae74147d33e641c67a91df239f" +dependencies = [ + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "keystream" version = "1.0.0" @@ -5880,9 +5949,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ "cc", "pkg-config", @@ -6305,7 +6374,7 @@ dependencies = [ "c2-chacha", "curve25519-dalek", "either", - "hashlink", + "hashlink 0.8.4", "lioness", "log", "parking_lot 0.12.4", @@ -6317,6 +6386,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ml-kem" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de49b3df74c35498c0232031bb7e85f9389f913e2796169c8ab47a53993a18f" +dependencies = [ + "hybrid-array", + "kem", + "rand_core 0.6.4", + "sha3", + "zeroize", +] + [[package]] name = "mockall" version = "0.13.1" @@ -6963,7 +7045,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pallet-asset-conversion" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6981,7 +7063,7 @@ dependencies = [ [[package]] name = "pallet-asset-rate" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6995,7 +7077,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-support", "frame-system", @@ -7011,7 +7093,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-support", "frame-system", @@ -7026,7 +7108,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-support", "frame-system", @@ -7039,7 +7121,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7062,7 +7144,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "frame-benchmarking", @@ -7092,7 +7174,7 @@ dependencies = [ [[package]] name = "pallet-broker" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bitvec", "frame-benchmarking", @@ -7127,7 +7209,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7382,7 +7464,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "frame-benchmarking", @@ -7400,7 +7482,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7437,7 +7519,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "enumflags2", "frame-benchmarking", @@ -7453,7 +7535,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "44.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "environmental", "frame-benchmarking", @@ -7472,7 +7554,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "log", "parity-scale-codec", @@ -7484,7 +7566,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-support", "frame-system", @@ -7505,7 +7587,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7527,7 +7609,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "log", "sp-arithmetic", @@ -7536,7 +7618,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "frame-benchmarking", @@ -7551,7 +7633,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "frame-benchmarking", @@ -7569,7 +7651,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7584,7 +7666,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "44.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7600,7 +7682,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7612,7 +7694,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "frame-benchmarking", @@ -7631,7 +7713,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7646,7 +7728,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7972,7 +8054,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "scale-info", @@ -7983,7 +8065,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bs58", "futures", @@ -8000,7 +8082,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -8025,7 +8107,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bitvec", "bounded-vec", @@ -8049,7 +8131,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "derive_more 0.99.20", @@ -8077,7 +8159,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "futures", @@ -8097,7 +8179,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bounded-collections", "derive_more 0.99.20", @@ -8113,7 +8195,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bitvec", "bounded-collections", @@ -8142,7 +8224,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bitvec", "frame-benchmarking", @@ -8192,7 +8274,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bs58", "frame-benchmarking", @@ -8203,8 +8285,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "20.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "20.0.2" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -8252,7 +8334,7 @@ dependencies = [ [[package]] name = "polkadot-sdk-frame" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "frame-benchmarking", @@ -8287,7 +8369,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8556,7 +8638,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "syn 2.0.104", "trybuild", ] @@ -9597,7 +9679,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "32.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "log", "sp-core", @@ -9608,7 +9690,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.51.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "futures", @@ -9639,7 +9721,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "futures", "log", @@ -9654,13 +9736,14 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", + "stp-shield", "substrate-prometheus-endpoint", ] [[package]] name = "sc-block-builder" version = "0.45.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "sp-api", @@ -9675,7 +9758,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "44.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "docify", @@ -9690,7 +9773,7 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-genesis-builder", "sp-io", "sp-runtime", @@ -9701,7 +9784,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -9711,8 +9794,8 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.53.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "0.53.1" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "chrono", @@ -9754,7 +9837,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "fnv", "futures", @@ -9780,7 +9863,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.47.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "hash-db", "kvdb", @@ -9808,7 +9891,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "futures", @@ -9831,7 +9914,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.51.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "futures", @@ -9860,7 +9943,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.51.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "fork-tree", @@ -9885,7 +9968,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-slots", "sp-core", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-inherents", "sp-keystore", "sp-runtime", @@ -9896,7 +9979,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9909,7 +9992,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.36.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "ahash", "array-bytes 6.2.3", @@ -9943,7 +10026,7 @@ dependencies = [ "sp-consensus", "sp-consensus-grandpa", "sp-core", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", @@ -9953,7 +10036,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.52.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "assert_matches", "async-trait", @@ -9988,7 +10071,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "futures", @@ -10011,7 +10094,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "parking_lot 0.12.4", @@ -10034,7 +10117,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.39.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "polkavm 0.24.0", "sc-allocator", @@ -10047,7 +10130,7 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.36.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "log", "polkavm 0.24.0", @@ -10058,7 +10141,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.39.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "anyhow", "log", @@ -10074,7 +10157,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "console", "futures", @@ -10090,7 +10173,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "parking_lot 0.12.4", @@ -10104,7 +10187,7 @@ dependencies = [ [[package]] name = "sc-mixnet" version = "0.21.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "arrayvec 0.7.6", @@ -10131,8 +10214,8 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.51.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "0.51.1" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "async-channel 1.9.0", @@ -10182,7 +10265,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -10192,7 +10275,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.51.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "ahash", "futures", @@ -10211,7 +10294,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "async-channel 1.9.0", @@ -10232,7 +10315,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "async-channel 1.9.0", @@ -10267,7 +10350,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "futures", @@ -10286,7 +10369,7 @@ dependencies = [ [[package]] name = "sc-network-types" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bs58", "bytes", @@ -10307,7 +10390,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "46.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bytes", "fnv", @@ -10341,7 +10424,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10350,7 +10433,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "46.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "futures", "jsonrpsee", @@ -10382,7 +10465,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10402,7 +10485,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "dyn-clone", "forwarded-header-value", @@ -10426,7 +10509,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.51.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "futures", @@ -10459,13 +10542,13 @@ dependencies = [ [[package]] name = "sc-runtime-utilities" version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "sc-executor", "sc-executor-common", "sp-core", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-state-machine", "sp-wasm-interface", "thiserror 1.0.69", @@ -10474,7 +10557,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.52.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "directories", @@ -10538,7 +10621,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.39.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "log", "parity-scale-codec", @@ -10549,7 +10632,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "43.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "derive_more 0.99.20", "futures", @@ -10562,14 +10645,14 @@ dependencies = [ "serde", "serde_json", "sp-core", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-io", ] [[package]] name = "sc-telemetry" version = "29.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "chrono", "futures", @@ -10588,7 +10671,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "chrono", "console", @@ -10616,7 +10699,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "11.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -10626,8 +10709,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "40.1.0" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "futures", @@ -10644,7 +10727,7 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-core", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-runtime", "sp-tracing", "sp-transaction-pool", @@ -10658,7 +10741,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "futures", @@ -10675,7 +10758,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-channel 1.9.0", "futures", @@ -11098,6 +11181,18 @@ 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 = "serde_with" version = "3.14.0" @@ -11290,7 +11385,7 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "enumn", "parity-scale-codec", @@ -11473,7 +11568,7 @@ dependencies = [ [[package]] name = "sp-api" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "hash-db", @@ -11495,7 +11590,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "Inflector", "blake2 0.10.6", @@ -11509,7 +11604,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "scale-info", @@ -11521,7 +11616,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "integer-sqrt", @@ -11535,7 +11630,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "scale-info", @@ -11547,7 +11642,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "sp-api", "sp-inherents", @@ -11557,7 +11652,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "futures", "parity-scale-codec", @@ -11576,7 +11671,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "futures", @@ -11590,7 +11685,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "parity-scale-codec", @@ -11606,7 +11701,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "parity-scale-codec", @@ -11624,7 +11719,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "finality-grandpa", "log", @@ -11641,7 +11736,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "scale-info", @@ -11652,7 +11747,7 @@ dependencies = [ [[package]] name = "sp-core" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "ark-vrf", "array-bytes 6.2.3", @@ -11683,7 +11778,7 @@ dependencies = [ "secrecy 0.8.0", "serde", "sha2 0.10.9", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-debug-derive", "sp-externalities", "sp-runtime-interface", @@ -11714,7 +11809,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "blake2b_simd", "byteorder", @@ -11727,17 +11822,17 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "quote", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "syn 2.0.104", ] [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "kvdb", "parking_lot 0.12.4", @@ -11746,7 +11841,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "proc-macro2", "quote", @@ -11756,7 +11851,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.30.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "environmental", "parity-scale-codec", @@ -11766,7 +11861,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.18.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "scale-info", @@ -11778,7 +11873,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11791,7 +11886,7 @@ dependencies = [ [[package]] name = "sp-io" version = "41.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bytes", "docify", @@ -11803,7 +11898,7 @@ dependencies = [ "rustversion", "secp256k1 0.28.2", "sp-core", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-externalities", "sp-keystore", "sp-runtime-interface", @@ -11817,7 +11912,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "sp-core", "sp-runtime", @@ -11827,7 +11922,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.43.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "parking_lot 0.12.4", @@ -11838,7 +11933,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "thiserror 1.0.69", "zstd 0.12.4", @@ -11847,7 +11942,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.11.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "frame-metadata 23.0.0", "parity-scale-codec", @@ -11857,7 +11952,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.15.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "scale-info", @@ -11868,7 +11963,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "log", "parity-scale-codec", @@ -11885,7 +11980,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "scale-info", @@ -11898,7 +11993,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "sp-api", "sp-core", @@ -11908,7 +12003,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "backtrace", "regex", @@ -11917,7 +12012,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "35.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "rustc-hash 1.1.0", "serde", @@ -11927,7 +12022,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "binary-merkle-tree", "docify", @@ -11956,7 +12051,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "30.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11975,7 +12070,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "Inflector", "expander", @@ -11988,7 +12083,7 @@ dependencies = [ [[package]] name = "sp-session" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "scale-info", @@ -12002,7 +12097,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -12015,7 +12110,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.46.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "hash-db", "log", @@ -12035,7 +12130,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "aes-gcm", "curve25519-dalek", @@ -12048,7 +12143,7 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-externalities", "sp-runtime", "sp-runtime-interface", @@ -12059,12 +12154,12 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" [[package]] name = "sp-storage" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12076,7 +12171,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "parity-scale-codec", @@ -12088,7 +12183,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "17.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "tracing", @@ -12099,7 +12194,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "sp-api", "sp-runtime", @@ -12108,7 +12203,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "37.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "async-trait", "parity-scale-codec", @@ -12122,7 +12217,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "ahash", "foldhash", @@ -12147,7 +12242,7 @@ dependencies = [ [[package]] name = "sp-version" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12164,7 +12259,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -12176,7 +12271,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -12188,7 +12283,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "32.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -12233,21 +12328,11 @@ dependencies = [ "der", ] -[[package]] -name = "sqlformat" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" -dependencies = [ - "nom", - "unicode_categories", -] - [[package]] name = "sqlx" -version = "0.7.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" dependencies = [ "sqlx-core", "sqlx-macros", @@ -12256,37 +12341,32 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" dependencies = [ - "ahash", - "atoi", - "byteorder", + "base64 0.22.1", "bytes", "crc", "crossbeam-queue", "either", - "event-listener 2.5.3", - "futures-channel", + "event-listener 5.4.0", "futures-core", "futures-intrusive", "futures-io", "futures-util", - "hashlink", - "hex", + "hashbrown 0.15.4", + "hashlink 0.10.0", "indexmap 2.10.0", "log", "memchr", "native-tls", "once_cell", - "paste", "percent-encoding", "serde", "sha2 0.10.9", "smallvec", - "sqlformat", - "thiserror 1.0.69", + "thiserror 2.0.12", "tokio", "tokio-stream", "tracing", @@ -12295,26 +12375,26 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.7.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 1.0.109", + "syn 2.0.104", ] [[package]] name = "sqlx-macros-core" -version = "0.7.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" dependencies = [ "dotenvy", "either", - "heck 0.4.1", + "heck 0.5.0", "hex", "once_cell", "proc-macro2", @@ -12324,17 +12404,16 @@ dependencies = [ "sha2 0.10.9", "sqlx-core", "sqlx-sqlite", - "syn 1.0.109", - "tempfile", + "syn 2.0.104", "tokio", "url", ] [[package]] name = "sqlx-sqlite" -version = "0.7.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" dependencies = [ "atoi", "flume", @@ -12347,10 +12426,11 @@ dependencies = [ "log", "percent-encoding", "serde", + "serde_urlencoded", "sqlx-core", + "thiserror 2.0.12", "tracing", "url", - "urlencoding", ] [[package]] @@ -12377,7 +12457,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "bounded-collections", @@ -12397,8 +12477,8 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "21.1.0" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "environmental", "frame-support", @@ -12421,8 +12501,8 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "20.0.1" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "environmental", "frame-benchmarking", @@ -12473,6 +12553,39 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "stc-shield" +version = "0.1.0" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" +dependencies = [ + "anyhow", + "async-trait", + "futures", + "hex", + "log", + "ml-kem", + "parity-scale-codec", + "rand 0.8.5", + "sc-client-api", + "sc-service", + "sp-consensus", + "sp-inherents", + "sp-runtime", + "stp-shield", +] + +[[package]] +name = "stp-shield" +version = "0.1.0" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-inherents", + "sp-runtime", +] + [[package]] name = "string-interner" version = "0.17.0" @@ -12533,7 +12646,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -12558,12 +12671,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" [[package]] name = "substrate-frame-rpc-system" version = "45.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "docify", "frame-system-rpc-runtime-api", @@ -12582,8 +12695,8 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.17.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +version = "0.17.6" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -12597,7 +12710,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "async-trait", @@ -12622,7 +12735,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "frame-executive", @@ -12646,7 +12759,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-grandpa", "sp-core", - "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=stable2506)", + "sp-crypto-hashing 0.1.0 (git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7)", "sp-debug-derive", "sp-externalities", "sp-genesis-builder", @@ -12660,6 +12773,7 @@ dependencies = [ "sp-transaction-pool", "sp-trie", "sp-version", + "stp-shield", "substrate-wasm-builder", "tracing", "trie-db", @@ -12668,7 +12782,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "futures", "sc-block-builder", @@ -12686,7 +12800,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "array-bytes 6.2.3", "build-helper", @@ -13473,7 +13587,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "coarsetime", "polkadot-primitives", @@ -13484,7 +13598,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "expander", "proc-macro-crate 3.3.0", @@ -13685,12 +13799,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - [[package]] name = "universal-hash" version = "0.5.1" @@ -13746,12 +13854,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - [[package]] name = "utf-8" version = "0.7.6" @@ -14935,7 +15037,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "11.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=stable2506#b2950c27317b58b844f545998a4ce2eff0128af9" +source = "git+https://github.com/opentensor/polkadot-sdk?rev=7cc54bf2d50ae3921d718736dfeb0de9468539c7#7cc54bf2d50ae3921d718736dfeb0de9468539c7" dependencies = [ "Inflector", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index f1e83159d6..3e1445f7aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,8 @@ members = [ "frame/evm-polkavm/uapi", "frame/hotfix-sufficients", "client/api", + "client/aura", + "client/babe", "client/consensus", "client/rpc-core", "client/rpc", @@ -82,96 +84,101 @@ scale-info = { version = "2.11.6", default-features = false, features = ["derive serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] } serde_json = "1.0" similar-asserts = "1.7.0" -sqlx = { version = "0.7.4", default-features = false, features = ["macros"] } +sqlx = { version = "0.8.2", default-features = false, features = ["macros"] } syn = "2.0.87" thiserror = "2.0" tokio = "1.45.0" # Substrate Client -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-client-db = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-consensus-manual-seal = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -sc-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +sc-basic-authorship = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-block-builder = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-chain-spec = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-cli = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sc-client-api = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-client-db = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sc-consensus = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-consensus-aura = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-consensus-babe = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-consensus-grandpa = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-consensus-manual-seal = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-executor = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-keystore = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-network = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-network-common = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-network-sync = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-offchain = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-rpc = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-rpc-api = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-service = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sc-telemetry = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-transaction-pool = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-transaction-pool-api = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +sc-utils = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } # Substrate Primitive -sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-crypto-hashing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-database = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-externalities = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +sp-api = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-block-builder = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-blockchain = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-consensus = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-consensus-aura = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-consensus-babe = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-core = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-crypto-hashing = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-database = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-externalities = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-genesis-builder = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-inherents = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-io = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-keyring = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-offchain = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-runtime = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-runtime-interface = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-session = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-state-machine = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-std = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-storage = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-timestamp = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-transaction-pool = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-trie = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-version = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +sp-weights = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } # Substrate FRAME -frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +frame-benchmarking = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +frame-executive = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +frame-support = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +frame-system = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +frame-system-benchmarking = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +pallet-aura = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +pallet-balances = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +pallet-grandpa = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +pallet-sudo = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +pallet-timestamp = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +pallet-transaction-payment = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +pallet-utility = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } # Substrate Utility -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -substrate-test-runtime-client = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } -substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506" } +frame-benchmarking-cli = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +substrate-build-script-utils = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +substrate-frame-rpc-system = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +substrate-test-runtime-client = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } +substrate-wasm-builder = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7" } + +stc-shield = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +stp-shield = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } # Polkadot -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +polkadot-runtime-common = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } # Cumulus primitives -cumulus-pallet-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-primitives-proof-size-hostfunction = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } -cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +cumulus-pallet-weight-reclaim = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +cumulus-primitives-proof-size-hostfunction = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } +cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } # XCM -xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2506", default-features = false } +xcm = { package = "staging-xcm", git = "https://github.com/opentensor/polkadot-sdk", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false } # Arkworks ark-bls12-377 = { version = "0.4.0", default-features = false, features = ["curve"] } @@ -183,6 +190,8 @@ ark-std = { version = "0.4.0", default-features = false } # Frontier Client fc-api = { path = "client/api" } +fc-aura = { path = "client/aura" } +fc-babe = { path = "client/babe" } fc-cli = { path = "client/cli", default-features = false } fc-consensus = { path = "client/consensus" } fc-db = { path = "client/db", default-features = false } diff --git a/client/aura/Cargo.toml b/client/aura/Cargo.toml new file mode 100644 index 0000000000..b4c7ab93cd --- /dev/null +++ b/client/aura/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "fc-aura" +version = "1.0.0-dev" +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +description = "Frontier Aura Consensus Data Provider" +authors = { workspace = true } +edition = { workspace = true } +repository = { workspace = true } + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +# Substrate +sc-client-api = { workspace = true } +sc-consensus-aura = { workspace = true } +sp-api = { workspace = true, features = ["default"] } +sp-consensus-aura = { workspace = true, features = ["default"] } +sp-inherents = { workspace = true, features = ["default"] } +sp-runtime = { workspace = true, features = ["default"] } +sp-timestamp = { workspace = true, features = ["default"] } +# Frontier +fc-rpc = { workspace = true } +fp-storage = { workspace = true, features = ["default"] } diff --git a/client/aura/src/lib.rs b/client/aura/src/lib.rs new file mode 100644 index 0000000000..b657bec283 --- /dev/null +++ b/client/aura/src/lib.rs @@ -0,0 +1,61 @@ +use std::{marker::PhantomData, sync::Arc}; + +// Substrate +use sc_client_api::{AuxStore, UsageProvider}; +use sp_api::ProvideRuntimeApi; +use sp_consensus_aura::{ + digests::CompatibleDigestItem, + sr25519::{AuthorityId, AuthoritySignature}, + AuraApi, Slot, SlotDuration, +}; +use sp_inherents::InherentData; +use sp_runtime::{traits::Block as BlockT, Digest, DigestItem}; +use sp_timestamp::TimestampInherentData; +// Frontier +use fc_rpc::pending::ConsensusDataProvider; + +/// Consensus data provider for Aura. +pub struct AuraConsensusDataProvider { + // slot duration + slot_duration: SlotDuration, + // phantom data for required generics + _phantom: PhantomData<(B, C)>, +} + +impl AuraConsensusDataProvider +where + B: BlockT, + C: AuxStore + ProvideRuntimeApi + UsageProvider, + C::Api: AuraApi, +{ + /// Creates a new instance of the [`AuraConsensusDataProvider`], requires that `client` + /// implements [`sp_consensus_aura::AuraApi`] + pub fn new(client: Arc) -> Self { + let slot_duration = sc_consensus_aura::slot_duration(&*client) + .expect("slot_duration is always present; qed."); + Self { + slot_duration, + _phantom: PhantomData, + } + } +} + +impl ConsensusDataProvider for AuraConsensusDataProvider { + fn create_digest( + &self, + _parent: &B::Header, + data: &InherentData, + ) -> Result { + let timestamp = data + .timestamp_inherent_data()? + .expect("Timestamp is always present; qed"); + + let digest_item = >::aura_pre_digest( + Slot::from_timestamp(timestamp, self.slot_duration), + ); + + Ok(Digest { + logs: vec![digest_item], + }) + } +} diff --git a/client/babe/Cargo.toml b/client/babe/Cargo.toml new file mode 100644 index 0000000000..0bebd13efc --- /dev/null +++ b/client/babe/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "fc-babe" +version = "1.0.0-dev" +authors = { workspace = true } +edition = { workspace = true } +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +repository = { workspace = true } +description = "Babe consensus data provider for pending runtime calls" + +[dependencies] +# Substrate +sc-client-api = { workspace = true } +sc-consensus-babe = { workspace = true } +sp-api = { workspace = true } +sp-blockchain = { workspace = true } +sp-consensus-babe = { workspace = true } +sp-inherents = { workspace = true } +sp-runtime = { workspace = true } +sp-timestamp = { workspace = true } +# Frontier +fc-rpc = { workspace = true } diff --git a/client/babe/src/lib.rs b/client/babe/src/lib.rs new file mode 100644 index 0000000000..817abf1581 --- /dev/null +++ b/client/babe/src/lib.rs @@ -0,0 +1,60 @@ +use std::{marker::PhantomData, sync::Arc}; + +use fc_rpc::pending::ConsensusDataProvider; +use sc_client_api::{AuxStore, UsageProvider}; +use sp_api::ProvideRuntimeApi; +use sp_blockchain::Error; +use sp_consensus_babe::{digests::CompatibleDigestItem, BabeApi, BabeConfiguration, Slot}; +use sp_inherents::InherentData; +use sp_runtime::{traits::Block as BlockT, Digest, DigestItem}; +use sp_timestamp::TimestampInherentData; + +pub struct BabeConsensusDataProvider { + babe_config: BabeConfiguration, + _phantom: PhantomData<(B, C)>, +} + +impl BabeConsensusDataProvider +where + B: BlockT, + C: AuxStore + ProvideRuntimeApi + UsageProvider, + C::Api: BabeApi, +{ + /// Creates a new instance of the [`BabeConsensusDataProvider`], requires that `client` + /// implements [`sp_consensus_babe::BabeApi`] + pub fn new(client: Arc) -> Result { + let babe_config = sc_consensus_babe::configuration(&*client)?; + Ok(Self { + babe_config, + _phantom: PhantomData, + }) + } +} + +impl ConsensusDataProvider for BabeConsensusDataProvider { + fn create_digest( + &self, + _parent: &B::Header, + data: &InherentData, + ) -> Result { + let timestamp = data + .timestamp_inherent_data()? + .expect("Timestamp is always present; qed"); + + let slot_duration = self.babe_config.slot_duration(); + let slot = Slot::from_timestamp(timestamp, slot_duration); + + let digest_item = ::babe_pre_digest( + sp_consensus_babe::digests::PreDigest::SecondaryPlain( + sp_consensus_babe::digests::SecondaryPlainPreDigest { + slot, + authority_index: 0, // Use first authority for pending blocks + }, + ), + ); + + Ok(Digest { + logs: vec![digest_item], + }) + } +} diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index 4c94da6074..4be3201517 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -24,14 +24,13 @@ rand = "0.9" rlp = { workspace = true } scale-codec = { workspace = true } schnellru = "0.2.4" -serde = { workspace = true, optional = true } +serde = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["sync"] } # Substrate prometheus-endpoint = { workspace = true } sc-client-api = { workspace = true } -sc-consensus-aura = { workspace = true, optional = true } sc-network = { workspace = true } sc-network-sync = { workspace = true } sc-rpc = { workspace = true } @@ -42,7 +41,6 @@ sp-api = { workspace = true, features = ["default"] } sp-block-builder = { workspace = true, features = ["default"] } sp-blockchain = { workspace = true } sp-consensus = { workspace = true } -sp-consensus-aura = { workspace = true, features = ["default"], optional = true } sp-core = { workspace = true, features = ["default"] } sp-externalities = { workspace = true, features = ["default"] } sp-inherents = { workspace = true, features = ["default"] } @@ -63,7 +61,7 @@ fp-storage = { workspace = true, features = ["default"] } pallet-evm = { workspace = true, features = ["default"] } [dev-dependencies] -tempfile = "3.19.1" +tempfile = "3.20" # Substrate sc-block-builder = { workspace = true } sc-client-db = { workspace = true, features = ["rocksdb"] } @@ -73,16 +71,11 @@ substrate-test-runtime-client = { workspace = true } fc-db = { workspace = true } [features] -default = ["aura", "rocksdb"] -aura = [ - "sc-consensus-aura", - "sp-consensus-aura", - "sp-timestamp", -] +default = ["rocksdb"] rocksdb = [ "sc-service/rocksdb", "fc-db/rocksdb", "fc-mapping-sync/rocksdb", ] -txpool = ["fc-rpc-core/txpool", "serde"] +txpool = ["fc-rpc-core/txpool"] rpc-binary-search-estimate = [] diff --git a/client/rpc/src/eth/pending.rs b/client/rpc/src/eth/pending.rs index 94581bd648..9384b094d7 100644 --- a/client/rpc/src/eth/pending.rs +++ b/client/rpc/src/eth/pending.rs @@ -160,66 +160,3 @@ impl ConsensusDataProvider for () { Ok(Default::default()) } } - -#[cfg(feature = "aura")] -pub use self::aura::AuraConsensusDataProvider; -#[cfg(feature = "aura")] -mod aura { - use super::*; - use sc_client_api::{AuxStore, UsageProvider}; - use sp_consensus_aura::{ - digests::CompatibleDigestItem, - sr25519::{AuthorityId, AuthoritySignature}, - AuraApi, Slot, SlotDuration, - }; - use sp_runtime::generic::DigestItem; - use sp_timestamp::TimestampInherentData; - use std::{marker::PhantomData, sync::Arc}; - - /// Consensus data provider for Aura. - pub struct AuraConsensusDataProvider { - // slot duration - slot_duration: SlotDuration, - // phantom data for required generics - _phantom: PhantomData<(B, C)>, - } - - impl AuraConsensusDataProvider - where - B: BlockT, - C: AuxStore + ProvideRuntimeApi + UsageProvider, - C::Api: AuraApi, - { - /// Creates a new instance of the [`AuraConsensusDataProvider`], requires that `client` - /// implements [`sp_consensus_aura::AuraApi`] - pub fn new(client: Arc) -> Self { - let slot_duration = sc_consensus_aura::slot_duration(&*client) - .expect("slot_duration is always present; qed."); - Self { - slot_duration, - _phantom: PhantomData, - } - } - } - - impl ConsensusDataProvider for AuraConsensusDataProvider { - fn create_digest( - &self, - _parent: &B::Header, - data: &InherentData, - ) -> Result { - let timestamp = data - .timestamp_inherent_data()? - .expect("Timestamp is always present; qed"); - - let digest_item = - >::aura_pre_digest( - Slot::from_timestamp(timestamp, self.slot_duration), - ); - - Ok(Digest { - logs: vec![digest_item], - }) - } - } -} diff --git a/frame/ethereum/src/lib.rs b/frame/ethereum/src/lib.rs index b226092844..94cf563115 100644 --- a/frame/ethereum/src/lib.rs +++ b/frame/ethereum/src/lib.rs @@ -567,32 +567,10 @@ impl Pallet { return Err(InvalidTransaction::BadSigner.into()); } - let priority = match ( - transaction_data.gas_price, - transaction_data.max_fee_per_gas, - transaction_data.max_priority_fee_per_gas, - ) { - // Legacy or EIP-2930 transaction. - // Handle priority here. On legacy transaction everything in gas_price except - // the current base_fee is considered a tip to the miner and thus the priority. - (Some(gas_price), None, None) => { - gas_price.saturating_sub(base_fee).unique_saturated_into() - } - // EIP-1559 transaction without tip. - (None, Some(_), None) => 0, - // EIP-1559 transaction with tip. - (None, Some(max_fee_per_gas), Some(max_priority_fee_per_gas)) => max_fee_per_gas - .saturating_sub(base_fee) - .min(max_priority_fee_per_gas) - .unique_saturated_into(), - // Unreachable because already validated. Gracefully handle. - _ => return Err(InvalidTransaction::Payment.into()), - }; - - // The tag provides and requires must be filled correctly according to the nonce. + // OTF: Uniform priority (1) for all EVM transactions to prevent MEV. let mut builder = ValidTransactionBuilder::default() .and_provides((origin, transaction_nonce)) - .priority(priority); + .priority(1); // In the context of the pool, a transaction with // too high a nonce is still considered valid diff --git a/frame/ethereum/src/tests/eip1559.rs b/frame/ethereum/src/tests/eip1559.rs index 691971f59f..0eec2805be 100644 --- a/frame/ethereum/src/tests/eip1559.rs +++ b/frame/ethereum/src/tests/eip1559.rs @@ -180,7 +180,7 @@ fn transaction_with_to_low_nonce_should_not_work() { .unwrap(), ValidTransactionBuilder::default() .and_provides((alice.address, U256::from(1))) - .priority(0u64) + .priority(1u64) .and_requires((alice.address, U256::from(0))) .build() ); diff --git a/frame/ethereum/src/tests/eip2930.rs b/frame/ethereum/src/tests/eip2930.rs index d1ba78148c..2bcdbb2e10 100644 --- a/frame/ethereum/src/tests/eip2930.rs +++ b/frame/ethereum/src/tests/eip2930.rs @@ -111,7 +111,7 @@ fn transaction_with_to_low_nonce_should_not_work() { .unwrap(), ValidTransactionBuilder::default() .and_provides((alice.address, U256::from(1))) - .priority(0u64) + .priority(1u64) .and_requires((alice.address, U256::from(0))) .build() ); diff --git a/frame/ethereum/src/tests/legacy.rs b/frame/ethereum/src/tests/legacy.rs index 415676df72..4b6cf1e7d3 100644 --- a/frame/ethereum/src/tests/legacy.rs +++ b/frame/ethereum/src/tests/legacy.rs @@ -127,7 +127,7 @@ fn transaction_with_to_low_nonce_should_not_work() { .unwrap(), ValidTransactionBuilder::default() .and_provides((alice.address, U256::from(1))) - .priority(0u64) + .priority(1u64) .and_requires((alice.address, U256::from(0))) .build() ); diff --git a/frame/evm/precompile/dispatch/src/mock.rs b/frame/evm/precompile/dispatch/src/mock.rs index 25cdfe91cd..daa973701e 100644 --- a/frame/evm/precompile/dispatch/src/mock.rs +++ b/frame/evm/precompile/dispatch/src/mock.rs @@ -162,6 +162,7 @@ impl pallet_evm::Config for Test { type CreateInnerOriginFilter = (); type CreateOriginFilter = (); type WeightInfo = (); + type BalanceConverter = (); } pub(crate) struct MockHandle { diff --git a/frame/evm/src/lib.rs b/frame/evm/src/lib.rs index 0cdf991931..89bd714910 100644 --- a/frame/evm/src/lib.rs +++ b/frame/evm/src/lib.rs @@ -207,6 +207,9 @@ pub mod pallet { /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; + /// Balance conversion between Substrate balances and EVM balances + type BalanceConverter: BalanceConverter; + /// EVM config used in the module. fn config() -> &'static EvmConfig { &PECTRA_CONFIG @@ -260,6 +263,7 @@ pub mod pallet { type CreateOriginFilter = (); type CreateInnerOriginFilter = (); type WeightInfo = (); + type BalanceConverter = (); } impl FixedGasWeightMappingAssociatedTypes for TestDefaultConfig { @@ -565,6 +569,22 @@ pub mod pallet { pays_fee: Pays::No, }) } + + #[pallet::call_index(4)] + #[pallet::weight(T::DbWeight::get().writes(1))] + pub fn set_whitelist(origin: OriginFor, new: Vec) -> DispatchResult { + ensure_root(origin)?; + >::put(new); + Ok(()) + } + + #[pallet::call_index(5)] + #[pallet::weight(T::DbWeight::get().writes(1))] + pub fn disable_whitelist(origin: OriginFor, disabled: bool) -> DispatchResult { + ensure_root(origin)?; + >::put(disabled); + Ok(()) + } } #[pallet::event] @@ -612,6 +632,8 @@ pub mod pallet { Undefined, /// Address not allowed to deploy contracts either via CREATE or CALL(CREATE). CreateOriginNotAllowed, + /// Origin is not allowed to perform the operation. + NotAllowed, } impl From for Error { @@ -638,6 +660,8 @@ pub mod pallet { #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub accounts: BTreeMap, + pub whitelisted: Vec, + pub disable_whitelist_check: bool, #[serde(skip)] pub _marker: PhantomData, } @@ -673,6 +697,9 @@ pub mod pallet { >::insert(address, index, value); } } + + >::put(self.whitelisted.clone()); + >::put(self.disable_whitelist_check); } } @@ -686,6 +713,12 @@ pub mod pallet { #[pallet::storage] pub type AccountStorages = StorageDoubleMap<_, Blake2_128Concat, H160, Blake2_128Concat, H256, H256, ValueQuery>; + + #[pallet::storage] + pub type WhitelistedCreators = StorageValue<_, Vec, ValueQuery>; + + #[pallet::storage] + pub type DisableWhitelistCheck = StorageValue<_, bool, ValueQuery>; } /// Utility alias for easy access to the [`AccountProvider::AccountId`] type from a given config. @@ -1002,6 +1035,24 @@ impl Pallet { /// Get the account metadata (hash and size) from storage if it exists, /// or compute it from code and store it if it doesn't exist. pub fn account_code_metadata(address: H160) -> CodeMetadata { + const EMPTY_CODE_HASH: [u8; 32] = + hex_literal::hex!("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"); + + let is_precompile = match T::PrecompilesValue::get().is_precompile(address, 0) { + IsPrecompileResult::Answer { is_precompile, .. } => is_precompile, + IsPrecompileResult::OutOfGas => false, + }; + + // If the address is a precompile, we return size 1 and empty hash. + // Then the contract call bypass the code size check for precompile calls. + // It will make the call like IPrecompile.call successful. + if is_precompile { + return CodeMetadata { + size: 1, + hash: EMPTY_CODE_HASH.into(), + }; + } + if let Some(meta) = >::get(address) { return meta; } @@ -1011,9 +1062,6 @@ impl Pallet { // If code is empty we return precomputed hash for empty code. // We don't store it as this address could get code deployed in the future. if code.is_empty() { - const EMPTY_CODE_HASH: [u8; 32] = hex_literal::hex!( - "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" - ); return CodeMetadata { size: 0, hash: EMPTY_CODE_HASH.into(), @@ -1032,11 +1080,15 @@ impl Pallet { let nonce = T::AccountProvider::account_nonce(&account_id); let balance = T::Currency::reducible_balance(&account_id, Preservation::Preserve, Fortitude::Polite); + let balance_sub = + SubstrateBalance::from(UniqueSaturatedInto::::unique_saturated_into(balance)); + let balance_eth = + T::BalanceConverter::into_evm_balance(balance_sub).unwrap_or(EvmBalance::from(0u64)); ( Account { nonce: U256::from(UniqueSaturatedInto::::unique_saturated_into(nonce)), - balance: U256::from(UniqueSaturatedInto::::unique_saturated_into(balance)), + balance: balance_eth.into(), }, T::DbWeight::get().reads(2), ) @@ -1058,7 +1110,7 @@ pub trait OnChargeEVMTransaction { /// Before the transaction is executed the payment of the transaction fees /// need to be secured. - fn withdraw_fee(who: &H160, fee: U256) -> Result>; + fn withdraw_fee(who: &H160, fee: EvmBalance) -> Result>; /// After the transaction was executed the actual fee can be calculated. /// This function should refund any overpaid fees and optionally deposit @@ -1067,8 +1119,8 @@ pub trait OnChargeEVMTransaction { /// Returns the `NegativeImbalance` - if any - produced by the priority fee. fn correct_and_deposit_fee( who: &H160, - corrected_fee: U256, - base_fee: U256, + corrected_fee: EvmBalance, + base_fee: EvmBalance, already_withdrawn: Self::LiquidityInfo, ) -> Self::LiquidityInfo; @@ -1096,34 +1148,43 @@ where // Kept type as Option to satisfy bound of Default type LiquidityInfo = Option>; - fn withdraw_fee(who: &H160, fee: U256) -> Result> { - if fee.is_zero() { + fn withdraw_fee(who: &H160, fee: EvmBalance) -> Result> { + if fee.0.is_zero() { return Ok(None); } let account_id = T::AddressMapping::into_account_id(*who); + + // Recalculate fee decimals using BalanceConverter + let fee_sub = + T::BalanceConverter::into_substrate_balance(fee).ok_or(Error::::FeeOverflow)?; + let imbalance = C::withdraw( &account_id, - fee.unique_saturated_into(), + fee_sub.0.unique_saturated_into(), WithdrawReasons::FEE, ExistenceRequirement::AllowDeath, ) .map_err(|_| Error::::BalanceLow)?; - Ok(Some(imbalance)) + Ok(Some(imbalance)) // Returns substrate balance } fn correct_and_deposit_fee( who: &H160, - corrected_fee: U256, - base_fee: U256, - already_withdrawn: Self::LiquidityInfo, + corrected_fee: EvmBalance, + base_fee: EvmBalance, + already_withdrawn: Self::LiquidityInfo, // Expects substrate balance ) -> Self::LiquidityInfo { if let Some(paid) = already_withdrawn { let account_id = T::AddressMapping::into_account_id(*who); + // Convert corrected fee into substrate balance + let corrected_fee_sub = T::BalanceConverter::into_substrate_balance(corrected_fee) + .unwrap_or(SubstrateBalance::from(0u64)); + // Calculate how much refund we should return let refund_amount = paid .peek() - .saturating_sub(corrected_fee.unique_saturated_into()); + .saturating_sub(corrected_fee_sub.0.unique_saturated_into()); // refund to the account that paid the fees. If this fails, the // account might have dropped below the existential balance. In // that case we don't refund anything. @@ -1154,15 +1215,20 @@ where .same() .unwrap_or_else(|_| C::NegativeImbalance::zero()); - let (base_fee, tip) = adjusted_paid.split(base_fee.unique_saturated_into()); + // Convert base fee into substrate balance + let base_fee_sub = T::BalanceConverter::into_substrate_balance(base_fee) + .unwrap_or(SubstrateBalance::from(0u64)); + + let (base_fee, tip) = adjusted_paid.split(base_fee_sub.0.unique_saturated_into()); // Handle base fee. Can be either burned, rationed, etc ... OU::on_unbalanced(base_fee); - return Some(tip); + return Some(tip); // Returns substrate balance } None } fn pay_priority_fee(tip: Self::LiquidityInfo) { + // Expects substrate balance // Default Ethereum behaviour: issue the tip to the block author. if let Some(tip) = tip { let account_id = T::AddressMapping::into_account_id(>::find_author()); @@ -1188,35 +1254,44 @@ where // Kept type as Option to satisfy bound of Default type LiquidityInfo = Option, F>>; - fn withdraw_fee(who: &H160, fee: U256) -> Result> { - if fee.is_zero() { + fn withdraw_fee(who: &H160, fee: EvmBalance) -> Result> { + if fee.0.is_zero() { return Ok(None); } let account_id = T::AddressMapping::into_account_id(*who); + + // Recalculate fee decimals using BalanceConverter + let fee_sub = + T::BalanceConverter::into_substrate_balance(fee).ok_or(Error::::FeeOverflow)?; + let imbalance = F::withdraw( &account_id, - fee.unique_saturated_into(), + fee_sub.0.unique_saturated_into(), Precision::Exact, Preservation::Preserve, Fortitude::Polite, ) .map_err(|_| Error::::BalanceLow)?; - Ok(Some(imbalance)) + Ok(Some(imbalance)) // Returns substrate balance } fn correct_and_deposit_fee( who: &H160, - corrected_fee: U256, - base_fee: U256, - already_withdrawn: Self::LiquidityInfo, + corrected_fee: EvmBalance, + base_fee: EvmBalance, + already_withdrawn: Self::LiquidityInfo, // Expects substrate balance ) -> Self::LiquidityInfo { if let Some(paid) = already_withdrawn { let account_id = T::AddressMapping::into_account_id(*who); + // Convert corrected fee into substrate balance + let corrected_fee_sub = T::BalanceConverter::into_substrate_balance(corrected_fee) + .unwrap_or(SubstrateBalance::from(0u64)); + // Calculate how much refund we should return let refund_amount = paid .peek() - .saturating_sub(corrected_fee.unique_saturated_into()); + .saturating_sub(corrected_fee_sub.0.unique_saturated_into()); // refund to the account that paid the fees. let refund_imbalance = F::deposit(&account_id, refund_amount, Precision::BestEffort) .unwrap_or_else(|_| Debt::, F>::zero()); @@ -1227,15 +1302,20 @@ where .same() .unwrap_or_else(|_| Credit::, F>::zero()); - let (base_fee, tip) = adjusted_paid.split(base_fee.unique_saturated_into()); + // Convert base fee into substrate balance + let base_fee_sub = T::BalanceConverter::into_substrate_balance(base_fee) + .unwrap_or(SubstrateBalance::from(0u64)); + + let (base_fee, tip) = adjusted_paid.split(base_fee_sub.0.unique_saturated_into()); // Handle base fee. Can be either burned, rationed, etc ... OU::on_unbalanced(base_fee); - return Some(tip); + return Some(tip); // Returns substrate balance } None } fn pay_priority_fee(tip: Self::LiquidityInfo) { + // Expects substrate balance // Default Ethereum behaviour: issue the tip to the block author. if let Some(tip) = tip { let account_id = T::AddressMapping::into_account_id(>::find_author()); @@ -1254,14 +1334,14 @@ where // Kept type as Option to satisfy bound of Default type LiquidityInfo = Option, T::Currency>>; - fn withdraw_fee(who: &H160, fee: U256) -> Result> { + fn withdraw_fee(who: &H160, fee: EvmBalance) -> Result> { EVMFungibleAdapter::::withdraw_fee(who, fee) } fn correct_and_deposit_fee( who: &H160, - corrected_fee: U256, - base_fee: U256, + corrected_fee: EvmBalance, + base_fee: EvmBalance, already_withdrawn: Self::LiquidityInfo, ) -> Self::LiquidityInfo { as OnChargeEVMTransaction>::correct_and_deposit_fee( @@ -1319,3 +1399,101 @@ impl AccountProvider for FrameSystemAccountProvider let _ = frame_system::Pallet::::dec_sufficients(who); } } + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)] +pub struct SubstrateBalance(U256); + +impl SubstrateBalance { + pub fn new(value: U256) -> Self { + Self(value) + } + + pub fn into_u256(self) -> U256 { + self.0 + } + + pub fn into_u64_saturating(self) -> u64 { + if self.0 > U256::from(u64::MAX) { + u64::MAX + } else { + self.0.as_u64() + } + } +} + +impl From for SubstrateBalance { + fn from(value: u64) -> Self { + Self(U256::from(value)) + } +} + +impl From for SubstrateBalance { + fn from(value: u128) -> Self { + Self(U256::from(value)) + } +} + +impl From for U256 { + fn from(value: SubstrateBalance) -> Self { + value.0 + } +} + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)] +pub struct EvmBalance(U256); + +impl EvmBalance { + pub fn new(value: U256) -> Self { + Self(value) + } + + pub fn into_u256(self) -> U256 { + self.0 + } + + pub fn into_u64_saturating(self) -> u64 { + if self.0 > U256::from(u64::MAX) { + u64::MAX + } else { + self.0.as_u64() + } + } +} + +impl From for EvmBalance { + fn from(value: u64) -> Self { + Self(U256::from(value)) + } +} + +impl From for EvmBalance { + fn from(value: u128) -> Self { + Self(U256::from(value)) + } +} + +impl From for U256 { + fn from(value: EvmBalance) -> Self { + value.0 + } +} + +pub trait BalanceConverter { + /// Convert from Substrate balance to EVM balance with correct decimals. + fn into_evm_balance(value: SubstrateBalance) -> Option; + + /// Convert from EVM balance to Substrate balance with correct decimals. + fn into_substrate_balance(value: EvmBalance) -> Option; +} + +impl BalanceConverter for () { + fn into_evm_balance(value: SubstrateBalance) -> Option { + Some(EvmBalance::from( + UniqueSaturatedInto::::unique_saturated_into(value.0), + )) + } + + fn into_substrate_balance(value: EvmBalance) -> Option { + Some(SubstrateBalance(value.0)) + } +} diff --git a/frame/evm/src/runner/stack.rs b/frame/evm/src/runner/stack.rs index 878fb718fd..8399670580 100644 --- a/frame/evm/src/runner/stack.rs +++ b/frame/evm/src/runner/stack.rs @@ -53,8 +53,9 @@ use fp_evm::{ use super::meter::StorageMeter; use crate::{ runner::Runner as RunnerT, AccountCodes, AccountCodesMetadata, AccountProvider, - AccountStorages, AddressMapping, BalanceOf, BlockHashMapping, Config, EnsureCreateOrigin, - Error, Event, FeeCalculator, OnChargeEVMTransaction, OnCreate, Pallet, RunnerError, + AccountStorages, AddressMapping, BalanceConverter, BalanceOf, BlockHashMapping, Config, + EnsureCreateOrigin, Error, Event, EvmBalance, FeeCalculator, OnChargeEVMTransaction, OnCreate, + Pallet, RunnerError, }; #[cfg(feature = "forbid-evm-reentrancy")] @@ -76,7 +77,6 @@ where value: U256, gas_limit: u64, max_fee_per_gas: Option, - max_priority_fee_per_gas: Option, config: &'config evm::Config, precompiles: &'precompiles T::PrecompilesType, is_transactional: bool, @@ -104,7 +104,6 @@ where value, gas_limit, max_fee_per_gas, - max_priority_fee_per_gas, config, precompiles, is_transactional, @@ -143,7 +142,6 @@ where value, gas_limit, max_fee_per_gas, - max_priority_fee_per_gas, config, precompiles, is_transactional, @@ -165,7 +163,6 @@ where value: U256, mut gas_limit: u64, max_fee_per_gas: Option, - max_priority_fee_per_gas: Option, config: &'config evm::Config, precompiles: &'precompiles T::PrecompilesType, is_transactional: bool, @@ -229,21 +226,12 @@ where } let total_fee_per_gas = if is_transactional { - match (max_fee_per_gas, max_priority_fee_per_gas) { + match max_fee_per_gas { // Zero max_fee_per_gas for validated transactional calls exist in XCM -> EVM // because fees are already withdrawn in the xcm-executor. - (Some(max_fee), _) if max_fee.is_zero() => U256::zero(), - // With no tip, we pay exactly the base_fee - (Some(_), None) => base_fee, - // With tip, we include as much of the tip on top of base_fee that we can, never - // exceeding max_fee_per_gas - (Some(max_fee_per_gas), Some(max_priority_fee_per_gas)) => { - let actual_priority_fee_per_gas = max_fee_per_gas - .saturating_sub(base_fee) - .min(max_priority_fee_per_gas); - - base_fee.saturating_add(actual_priority_fee_per_gas) - } + Some(max_fee) if max_fee.is_zero() => U256::zero(), + // Else, we pay exactly the base_fee + Some(_) => base_fee, _ => { return Err(RunnerError { error: Error::::GasPriceTooLow, @@ -266,7 +254,7 @@ where })?; // Deduct fee from the `source` account. Returns `None` if `total_fee` is Zero. - let fee = T::OnChargeTransaction::withdraw_fee(&source, total_fee) + let fee = T::OnChargeTransaction::withdraw_fee(&source, EvmBalance::new(total_fee)) .map_err(|e| RunnerError { error: e, weight })?; let vicinity = Vicinity { @@ -400,9 +388,9 @@ where let actual_priority_fee = T::OnChargeTransaction::correct_and_deposit_fee( &source, // Actual fee after evm execution, including tip. - actual_fee, + EvmBalance::new(actual_fee), // Base fee. - actual_base_fee, + EvmBalance::new(actual_base_fee), // Fee initially withdrawn. fee, ); @@ -473,6 +461,17 @@ where proof_size_base_cost: Option, evm_config: &evm::Config, ) -> Result<(), RunnerError> { + // OTF: Whitelist check for contract creation (target = None). + if target.is_none() && !crate::DisableWhitelistCheck::::get() { + let whitelist = crate::WhitelistedCreators::::get(); + if !whitelist.contains(&source) { + return Err(RunnerError { + error: Error::::NotAllowed, + weight: Weight::zero(), + }); + } + } + let (base_fee, mut weight) = T::FeeCalculator::min_gas_price(); let (source_account, inner_weight) = Pallet::::account_basic(&source); weight = weight.saturating_add(inner_weight); @@ -564,7 +563,6 @@ where value, gas_limit, max_fee_per_gas, - max_priority_fee_per_gas, config, &precompiles, is_transactional, @@ -644,7 +642,6 @@ where value, gas_limit, max_fee_per_gas, - max_priority_fee_per_gas, config, &precompiles, is_transactional, @@ -728,7 +725,6 @@ where value, gas_limit, max_fee_per_gas, - max_priority_fee_per_gas, config, &precompiles, is_transactional, @@ -1176,13 +1172,16 @@ where fn transfer(&mut self, transfer: Transfer) -> Result<(), ExitError> { let source = T::AddressMapping::into_account_id(transfer.source); let target = T::AddressMapping::into_account_id(transfer.target); + + // Adjust decimals + let value_sub = + T::BalanceConverter::into_substrate_balance(EvmBalance::new(transfer.value)) + .ok_or(ExitError::OutOfFund)?; + T::Currency::transfer( &source, &target, - transfer - .value - .try_into() - .map_err(|_| ExitError::OutOfFund)?, + value_sub.0.unique_saturated_into(), ExistenceRequirement::AllowDeath, ) .map_err(|_| ExitError::OutOfFund) @@ -1473,7 +1472,6 @@ mod tests { U256::default(), 100_000, None, - None, &config, &MockPrecompileSet, false, @@ -1487,7 +1485,6 @@ mod tests { U256::default(), 100_000, None, - None, &config, &MockPrecompileSet, false, @@ -1521,7 +1518,6 @@ mod tests { U256::default(), 100_000, None, - None, &config, &MockPrecompileSet, false, diff --git a/frame/evm/src/tests.rs b/frame/evm/src/tests.rs index cd86537de9..da358fe8cb 100644 --- a/frame/evm/src/tests.rs +++ b/frame/evm/src/tests.rs @@ -926,7 +926,11 @@ pub fn new_test_ext() -> sp_io::TestExternalities { .assimilate_storage(&mut t) .unwrap(); - t.into() + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| { + crate::DisableWhitelistCheck::::put(true); + }); + ext } // pragma solidity ^0.8.2; @@ -1155,11 +1159,11 @@ fn fee_deduction() { assert_eq!(Balances::free_balance(&substrate_addr), 100); // Deduct fees as 10 units - let imbalance = <::OnChargeTransaction as OnChargeEVMTransaction>::withdraw_fee(&evm_addr, U256::from(10)).unwrap(); + let imbalance = <::OnChargeTransaction as OnChargeEVMTransaction>::withdraw_fee(&evm_addr, EvmBalance::from(10u64)).unwrap(); assert_eq!(Balances::free_balance(&substrate_addr), 90); // Refund fees as 5 units - <::OnChargeTransaction as OnChargeEVMTransaction>::correct_and_deposit_fee(&evm_addr, U256::from(5), U256::from(5), imbalance); + <::OnChargeTransaction as OnChargeEVMTransaction>::correct_and_deposit_fee(&evm_addr, EvmBalance::from(5u64), EvmBalance::from(5u64), imbalance); assert_eq!(Balances::free_balance(&substrate_addr), 95); }); } @@ -1208,7 +1212,7 @@ fn ed_0_refund_patch_is_required() { let _ = <::OnChargeTransaction as OnChargeEVMTransaction>::withdraw_fee( &evm_addr, - U256::from(100), + EvmBalance::from(100u64), ) .unwrap(); assert_eq!(Balances::free_balance(&substrate_addr), 0); @@ -1258,8 +1262,10 @@ fn reducible_balance() { }); } +// OTF: Priority fees are disabled, so the author receives no tip +// even when max_priority_fee_per_gas is set. #[test] -fn author_should_get_tip() { +fn author_should_not_get_tip() { new_test_ext().execute_with(|| { let author = EVM::find_author(); let before_tip = EVM::account_basic(&author).0.balance; @@ -1278,7 +1284,8 @@ fn author_should_get_tip() { ); result.expect("EVM can be called"); let after_tip = EVM::account_basic(&author).0.balance; - assert_eq!(after_tip, (before_tip + 21000)); + // Priority fees disabled — author balance unchanged. + assert_eq!(after_tip, before_tip); }); } @@ -1361,15 +1368,12 @@ fn refunds_should_work() { } #[test] +// OTF: Priority fees are disabled, so the tip component is zero. fn refunds_and_priority_should_work() { new_test_ext().execute_with(|| { let author = EVM::find_author(); let before_tip = EVM::account_basic(&author).0.balance; let before_call = EVM::account_basic(&H160::default()).0.balance; - // We deliberately set a base fee + max tip > max fee. - // The effective priority tip will be 1GWEI instead 1.5GWEI: - // (max_fee_per_gas - base_fee).min(max_priority_fee) - // (2 - 1).min(1.5) let tip = U256::from(1_500_000_000); let max_fee_per_gas = U256::from(2_000_000_000); let used_gas = U256::from(21_000); @@ -1387,14 +1391,14 @@ fn refunds_and_priority_should_work() { Vec::new(), ); let (base_fee, _) = ::FeeCalculator::min_gas_price(); - let actual_tip = (max_fee_per_gas - base_fee).min(tip) * used_gas; - let total_cost = (used_gas * base_fee) + actual_tip + U256::from(1); + // Priority disabled — only base fee is charged, no tip. + let total_cost = (used_gas * base_fee) + U256::from(1); let after_call = EVM::account_basic(&H160::default()).0.balance; - // The tip is deducted but never refunded to the caller. assert_eq!(after_call, before_call - total_cost); let after_tip = EVM::account_basic(&author).0.balance; - assert_eq!(after_tip, (before_tip + actual_tip)); + // Author balance unchanged — no priority fee. + assert_eq!(after_tip, before_tip); }); } @@ -1701,3 +1705,166 @@ fn metadata_empty_dont_code_gets_cached() { assert!(>::get(address).is_none()); }); } + +mod whitelist_tests { + use super::*; + + fn create_with_source( + source: H160, + ) -> Result>> { + let gas_limit = 1_000_000u64; + ::Runner::create( + source, + hex::decode(FOO_BAR_CONTRACT_CREATOR_BYTECODE.trim_end()).unwrap(), + U256::zero(), + gas_limit, + Some(FixedGasPrice::min_gas_price().0), + None, + None, + Vec::new(), + Vec::new(), + true, + true, // validate = true, so whitelist check runs + Some(FixedGasWeightMapping::::gas_to_weight( + gas_limit, true, + )), + Some(0), + &::config().clone(), + ) + } + + #[test] + fn create_blocked_when_not_whitelisted() { + new_test_ext().execute_with(|| { + // Enable whitelist check and leave whitelist empty. + crate::DisableWhitelistCheck::::put(false); + crate::WhitelistedCreators::::put(Vec::::new()); + + let result = create_with_source(H160::default()); + match result { + Err(RunnerError { + error: Error::NotAllowed, + .. + }) => (), + _ => panic!("Expected NotAllowed, got {:?}", result), + } + }); + } + + #[test] + fn create_succeeds_when_whitelisted() { + new_test_ext().execute_with(|| { + crate::DisableWhitelistCheck::::put(false); + crate::WhitelistedCreators::::put(vec![H160::default()]); + + assert!(create_with_source(H160::default()).is_ok()); + }); + } + + #[test] + fn create_succeeds_when_whitelist_disabled() { + new_test_ext().execute_with(|| { + crate::DisableWhitelistCheck::::put(true); + crate::WhitelistedCreators::::put(Vec::::new()); + + assert!(create_with_source(H160::default()).is_ok()); + }); + } + + #[test] + fn create_blocked_for_wrong_address() { + new_test_ext().execute_with(|| { + crate::DisableWhitelistCheck::::put(false); + // Only H160::default() is whitelisted, not [4u8; 20]. + crate::WhitelistedCreators::::put(vec![H160::default()]); + + let result = create_with_source(H160::from([4u8; 20])); + match result { + Err(RunnerError { + error: Error::NotAllowed, + .. + }) => (), + _ => panic!("Expected NotAllowed, got {:?}", result), + } + }); + } +} + +mod balance_converter_tests { + use sp_core::U256; + + use crate::{BalanceConverter, EvmBalance, SubstrateBalance}; + + const EVM_DECIMALS_FACTOR: u64 = 1_000_000_000; + + pub struct SubtensorEvmBalanceConverter; + + impl BalanceConverter for SubtensorEvmBalanceConverter { + fn into_evm_balance(value: SubstrateBalance) -> Option { + value + .into_u256() + .checked_mul(U256::from(EVM_DECIMALS_FACTOR)) + .map(EvmBalance::new) + } + + fn into_substrate_balance(value: EvmBalance) -> Option { + value + .into_u256() + .checked_div(U256::from(EVM_DECIMALS_FACTOR)) + .and_then(|v| { + if v <= U256::from(u64::MAX) { + Some(SubstrateBalance::new(v)) + } else { + None + } + }) + } + } + + #[test] + fn round_trip() { + let original = SubstrateBalance::new(U256::from(42)); + let evm = SubtensorEvmBalanceConverter::into_evm_balance(original).unwrap(); + assert_eq!(evm.into_u256(), U256::from(42_000_000_000u64)); + let back = SubtensorEvmBalanceConverter::into_substrate_balance(evm).unwrap(); + assert_eq!(back.into_u256(), original.into_u256()); + } + + #[test] + fn zero() { + let zero = SubstrateBalance::new(U256::zero()); + let evm = SubtensorEvmBalanceConverter::into_evm_balance(zero).unwrap(); + assert_eq!(evm.into_u256(), U256::zero()); + let back = SubtensorEvmBalanceConverter::into_substrate_balance(evm).unwrap(); + assert_eq!(back.into_u256(), U256::zero()); + } + + #[test] + fn truncation() { + // Sub-nano remainder is truncated + let evm = EvmBalance::new(U256::from(1_500_000_000u64)); + let sub = SubtensorEvmBalanceConverter::into_substrate_balance(evm).unwrap(); + assert_eq!(sub.into_u256(), U256::from(1)); + + let evm = EvmBalance::new(U256::from(999_999_999u64)); + let sub = SubtensorEvmBalanceConverter::into_substrate_balance(evm).unwrap(); + assert_eq!(sub.into_u256(), U256::from(0)); + } + + #[test] + fn overflow_substrate_to_evm() { + // U256::MAX / 1e9 is still huge, so into_evm_balance on U256::MAX should overflow the mul + let huge = SubstrateBalance::new(U256::MAX); + assert!(SubtensorEvmBalanceConverter::into_evm_balance(huge).is_none()); + } + + #[test] + fn overflow_evm_to_substrate() { + // A value that after division exceeds u64::MAX + let too_big = EvmBalance::new( + U256::from(u64::MAX) * U256::from(EVM_DECIMALS_FACTOR) + + U256::from(EVM_DECIMALS_FACTOR), + ); + assert!(SubtensorEvmBalanceConverter::into_substrate_balance(too_big).is_none()); + } +} diff --git a/precompiles/tests-external/lib.rs b/precompiles/tests-external/lib.rs index 1f1ccb90ed..bf704707cb 100644 --- a/precompiles/tests-external/lib.rs +++ b/precompiles/tests-external/lib.rs @@ -270,6 +270,7 @@ impl pallet_evm::Config for Runtime { type CreateInnerOriginFilter = (); type CreateOriginFilter = (); type WeightInfo = pallet_evm::weights::SubstrateWeight; + type BalanceConverter = (); } parameter_types! { diff --git a/primitives/self-contained/src/checked_extrinsic.rs b/primitives/self-contained/src/checked_extrinsic.rs index c3202fbd38..6209e58b6b 100644 --- a/primitives/self-contained/src/checked_extrinsic.rs +++ b/primitives/self-contained/src/checked_extrinsic.rs @@ -164,4 +164,8 @@ where } } } + + fn call(&self) -> &Self::Call { + &self.function + } } diff --git a/scripts/update-deps-to-path.sh b/scripts/update-deps-to-path.sh new file mode 100755 index 0000000000..7ae67c02dc --- /dev/null +++ b/scripts/update-deps-to-path.sh @@ -0,0 +1,90 @@ +#!/bin/zsh +# update-deps-to-path.sh goal is to replace git dependencies with path dependencies +# in the target Cargo.toml file. +# +# The script will scan the source repos for packages and build a mapping of package name to path. +# It will then process the target Cargo.toml file line by line and replace git dependencies with path dependencies. +# +# The script will output the new Cargo.toml file to stdout. +# +# The script will exit with a non-zero status if the target Cargo.toml file is not found. +# Usage: ./scripts/update-deps-to-path.sh ./Cargo.toml ../polkadot-sdk-otf > Cargo.toml.new + +set -e + +TARGET_TOML="${1:?Usage: $0 [source-repo-2] ...}" +shift + +if [[ $# -eq 0 ]]; then + echo "Error: At least one source repo path required" >&2 + exit 1 +fi + +# Build package name -> path mapping from all source repos +typeset -A PKG_PATHS + +for SOURCE_PATH in "$@"; do + SOURCE_PATH="$(cd "$SOURCE_PATH" && pwd)" + echo "Scanning $SOURCE_PATH for packages..." >&2 + + for cargo_toml in $(find "$SOURCE_PATH" -name "Cargo.toml" -type f 2>/dev/null); do + pkg_name=$(yq -p toml -o yaml '.package.name // ""' "$cargo_toml" 2>/dev/null | tr -d '"') + + if [[ -n "$pkg_name" && "$pkg_name" != "null" ]]; then + pkg_dir="$(dirname "$cargo_toml")" + PKG_PATHS[$pkg_name]="$pkg_dir" + echo " Found: $pkg_name" >&2 + fi + done +done + +echo "Found ${#PKG_PATHS[@]} total packages" >&2 +echo "" >&2 + +# Process target Cargo.toml line by line +echo "Updating dependencies in $TARGET_TOML..." >&2 + +while IFS= read -r line; do + # Check if this line has a git dependency + if [[ "$line" =~ ^([a-zA-Z0-9_-]+|\"[^\"]+\")\ *=\ *\{.*git\ *=\ *\" ]]; then + # Extract package name (handle both quoted and unquoted) + dep_name=$(echo "$line" | sed -E 's/^"?([a-zA-Z0-9_-]+)"? *=.*/\1/') + + # Check for package alias + if [[ "$line" =~ package\ *=\ *\"([^\"]+)\" ]]; then + lookup_name="${match[1]}" + else + lookup_name="$dep_name" + fi + + # Check if we have this package + if [[ -n "${PKG_PATHS[$lookup_name]}" ]]; then + pkg_path="${PKG_PATHS[$lookup_name]}" + echo " $dep_name -> $pkg_path" >&2 + + # Extract features/default-features/package if present + extras="" + if [[ "$line" =~ default-features\ *=\ *false ]]; then + extras="$extras, default-features = false" + fi + if [[ "$line" =~ package\ *=\ *\"([^\"]+)\" ]]; then + extras="$extras, package = \"${match[1]}\"" + fi + if [[ "$line" =~ features\ *=\ *\[([^\]]*)\] ]]; then + extras="$extras, features = [${match[1]}]" + fi + + # Output new line with just path + echo "${dep_name} = { path = \"${pkg_path}\"${extras} }" + else + # Package not found in sources, keep original + echo "$line" + fi + else + # Not a git dependency, keep as-is + echo "$line" + fi +done < "$TARGET_TOML" + +echo "" >&2 +echo "Done!" >&2 diff --git a/template/node/Cargo.toml b/template/node/Cargo.toml index 2f8e6b580f..60d4f85554 100644 --- a/template/node/Cargo.toml +++ b/template/node/Cargo.toml @@ -64,14 +64,17 @@ frame-benchmarking = { workspace = true, optional = true } frame-benchmarking-cli = { workspace = true, optional = true } frame-system = { workspace = true } pallet-transaction-payment = { workspace = true } +stc-shield.workspace = true +stp-shield.workspace = true # Frontier fc-api = { workspace = true } +fc-aura = { workspace = true } fc-cli = { workspace = true } fc-consensus = { workspace = true } fc-db = { workspace = true } fc-mapping-sync = { workspace = true } -fc-rpc = { workspace = true, features = ["aura"] } +fc-rpc = { workspace = true } fc-rpc-core = { workspace = true } fc-storage = { workspace = true } fp-account = { workspace = true } diff --git a/template/node/src/chain_spec.rs b/template/node/src/chain_spec.rs index 614161fa35..b7cdfa87d8 100644 --- a/template/node/src/chain_spec.rs +++ b/template/node/src/chain_spec.rs @@ -171,7 +171,7 @@ fn testnet_genesis( "aura": { "authorities": initial_authorities.iter().map(|x| (x.0.clone())).collect::>() }, "grandpa": { "authorities": initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect::>() }, "evmChainId": { "chainId": chain_id }, - "evm": { "accounts": evm_accounts }, + "evm": { "accounts": evm_accounts, "disableWhitelistCheck": true }, "manualSeal": { "enable": enable_manual_seal } }) } diff --git a/template/node/src/rpc/eth.rs b/template/node/src/rpc/eth.rs index d86db4990d..640124b293 100644 --- a/template/node/src/rpc/eth.rs +++ b/template/node/src/rpc/eth.rs @@ -91,10 +91,10 @@ where CIDP: CreateInherentDataProviders + Send + 'static, EC: EthConfig, { + use fc_aura::AuraConsensusDataProvider; use fc_rpc::{ - pending::AuraConsensusDataProvider, Debug, DebugApiServer, Eth, EthApiServer, EthDevSigner, - EthFilter, EthFilterApiServer, EthPubSub, EthPubSubApiServer, EthSigner, Net, NetApiServer, - Web3, Web3ApiServer, + Debug, DebugApiServer, Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, + EthPubSub, EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer, }; #[cfg(feature = "txpool")] use fc_rpc::{TxPool, TxPoolApiServer}; diff --git a/template/node/src/service.rs b/template/node/src/service.rs index 30b4a645af..2335bbbc5f 100644 --- a/template/node/src/service.rs +++ b/template/node/src/service.rs @@ -18,6 +18,8 @@ use sp_api::ConstructRuntimeApi; use sp_consensus_aura::sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPair}; use sp_core::{H256, U256}; use sp_runtime::traits::{Block as BlockT, NumberFor}; +use stc_shield::{self, MemoryShieldKeystore}; +use stp_shield::ShieldKeystorePtr; // Runtime use frontier_template_runtime::{ opaque::Block, AccountId, Balance, Nonce, RuntimeApi, TransactionConverter, @@ -132,6 +134,7 @@ where &client, select_chain.clone(), telemetry.as_ref().map(|x| x.handle()), + None, )?; let storage_override = Arc::new(StorageOverrideHandler::::new(client.clone())); @@ -292,7 +295,8 @@ where ::Header: Unpin, RA: ConstructRuntimeApi>, RA: Send + Sync + 'static, - RA::RuntimeApi: RuntimeApiCollection, + RA::RuntimeApi: + RuntimeApiCollection + stp_shield::ShieldApi, HF: HostFunctionsT + 'static, NB: sc_network::NetworkBackend::Hash>, { @@ -351,7 +355,7 @@ where Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( backend.clone(), grandpa_link.shared_authority_set().clone(), - Vec::new(), + sc_consensus_grandpa::warp_proof::HardForks::new_initial_set_id(0), )); Some(WarpSyncConfig::WithProvider(warp_sync)) }; @@ -438,18 +442,24 @@ where prometheus_registry.clone(), )); + let shield_keystore = Arc::new(MemoryShieldKeystore::new()); let slot_duration = sc_consensus_aura::slot_duration(&*client)?; let target_gas_price = eth_config.target_gas_price; - let pending_create_inherent_data_providers = move |_, ()| async move { - let current = sp_timestamp::InherentDataProvider::from_system_time(); - let next_slot = current.timestamp().as_millis() + slot_duration.as_millis(); - let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into()); - let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); - Ok((slot, timestamp, dynamic_fee)) + let pending_create_inherent_data_providers = move |_, ()| { + let keystore = shield_keystore.clone(); + async move { + let current = sp_timestamp::InherentDataProvider::from_system_time(); + let next_slot = current.timestamp().as_millis() + slot_duration.as_millis(); + let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into()); + let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + let dynamic_fee = + fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); + let shield = stc_shield::InherentDataProvider::new(keystore.clone()); + Ok((slot, timestamp, dynamic_fee, shield)) + } }; Box::new(move |subscription_task_executor| { @@ -474,7 +484,8 @@ where fee_history_cache_limit, execute_gas_limit_multiplier, forced_parent_hashes: None, - pending_create_inherent_data_providers, + pending_create_inherent_data_providers: pending_create_inherent_data_providers + .clone(), }; let deps = crate::rpc::FullDeps { client: client.clone(), @@ -525,7 +536,8 @@ where .await; if role.is_authority() { - // manual-seal authorship + let shield_keystore = Arc::new(MemoryShieldKeystore::new()); + if let Some(sealing) = sealing { run_manual_seal_authorship( ð_config, @@ -538,6 +550,7 @@ where prometheus_registry.as_ref(), telemetry.as_ref(), commands_stream, + shield_keystore.clone(), )?; log::info!("Manual Seal Ready"); @@ -550,18 +563,24 @@ where transaction_pool.clone(), prometheus_registry.as_ref(), telemetry.as_ref().map(|x| x.handle()), + shield_keystore.clone(), ); let slot_duration = sc_consensus_aura::slot_duration(&*client)?; let target_gas_price = eth_config.target_gas_price; - let create_inherent_data_providers = move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - let dynamic_fee = fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); - Ok((slot, timestamp, dynamic_fee)) + let create_inherent_data_providers = move |_, ()| { + let keystore = shield_keystore.clone(); + async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + let dynamic_fee = + fp_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); + let shield = stc_shield::InherentDataProvider::new(keystore.clone()); + Ok((slot, timestamp, dynamic_fee, shield)) + } }; let aura = sc_consensus_aura::start_aura::( @@ -654,12 +673,14 @@ fn run_manual_seal_authorship( commands_stream: mpsc::Receiver< sc_consensus_manual_seal::rpc::EngineCommand<::Hash>, >, + shield_keystore: ShieldKeystorePtr, ) -> Result<(), ServiceError> where B: BlockT, RA: ConstructRuntimeApi>, RA: Send + Sync + 'static, - RA::RuntimeApi: RuntimeApiCollection, + RA::RuntimeApi: + RuntimeApiCollection + stp_shield::ShieldApi, HF: HostFunctionsT + 'static, { let proposer_factory = sc_basic_authorship::ProposerFactory::new( @@ -668,6 +689,7 @@ where transaction_pool.clone(), prometheus_registry, telemetry.as_ref().map(|x| x.handle()), + shield_keystore.clone(), ); thread_local!(static TIMESTAMP: RefCell = const { RefCell::new(0) }); diff --git a/template/runtime/Cargo.toml b/template/runtime/Cargo.toml index a84df61c10..704ce9741c 100644 --- a/template/runtime/Cargo.toml +++ b/template/runtime/Cargo.toml @@ -44,6 +44,8 @@ pallet-timestamp = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } +stp-shield.workspace = true + # Frontier fp-account = { workspace = true, features = ["serde"] } fp-evm = { workspace = true, features = ["serde"] } diff --git a/template/runtime/src/lib.rs b/template/runtime/src/lib.rs index 91a6e30bad..0ca4e41069 100644 --- a/template/runtime/src/lib.rs +++ b/template/runtime/src/lib.rs @@ -54,8 +54,10 @@ use fp_evm::weight_per_gas; use fp_rpc::TransactionStatus; use pallet_ethereum::{Call::transact, PostLogContent, Transaction as EthereumTransaction}; use pallet_evm::{ - Account as EVMAccount, EnsureAccountId20, FeeCalculator, IdentityAddressMapping, Runner, + Account as EVMAccount, BalanceConverter, EnsureAccountId20, EvmBalance, FeeCalculator, + IdentityAddressMapping, Runner, SubstrateBalance, }; +use stp_shield::ShieldedTransaction; // A few exports that help ease life for downstream crates. pub use frame_system::Call as SystemCall; @@ -357,6 +359,41 @@ parameter_types! { pub WeightPerGas: Weight = Weight::from_parts(weight_per_gas(BLOCK_GAS_LIMIT, NORMAL_DISPATCH_RATIO, WEIGHT_MILLISECS_PER_BLOCK), 0); } +const EVM_DECIMALS_FACTOR: u64 = 1_000_000_000_u64; +pub struct SubtensorEvmBalanceConverter; + +impl BalanceConverter for SubtensorEvmBalanceConverter { + /// Convert from Substrate balance (u64) to EVM balance (U256) + fn into_evm_balance(value: SubstrateBalance) -> Option { + value + .into_u256() + .checked_mul(U256::from(EVM_DECIMALS_FACTOR)) + .and_then(|evm_value| { + // Ensure the result fits within the maximum U256 value + if evm_value <= U256::MAX { + Some(EvmBalance::new(evm_value)) + } else { + None + } + }) + } + + /// Convert from EVM balance (U256) to Substrate balance (u64) + fn into_substrate_balance(value: EvmBalance) -> Option { + value + .into_u256() + .checked_div(U256::from(EVM_DECIMALS_FACTOR)) + .and_then(|substrate_value| { + // Ensure the result fits within the TAO balance type (u64) + if substrate_value <= U256::from(u64::MAX) { + Some(SubstrateBalance::new(substrate_value)) + } else { + None + } + }) + } +} + impl pallet_evm::Config for Runtime { type AccountProvider = pallet_evm::FrameSystemAccountProvider; type FeeCalculator = BaseFee; @@ -381,6 +418,7 @@ impl pallet_evm::Config for Runtime { type CreateOriginFilter = (); type CreateInnerOriginFilter = (); type WeightInfo = pallet_evm::weights::SubstrateWeight; + type BalanceConverter = SubtensorEvmBalanceConverter; } parameter_types! { @@ -1066,6 +1104,20 @@ impl_runtime_apis! { Ok(batches) } } + + impl stp_shield::ShieldApi for Runtime { + fn try_decode_shielded_tx(_uxt: ::Extrinsic) -> Option { + None + } + + fn is_shielded_using_current_key(_key_hash: &[u8; 16]) -> bool { + false + } + + fn try_unshield_tx(_dec_key_bytes: Vec, _shielded_tx: ShieldedTransaction) -> Option<::Extrinsic> { + None + } + } } #[cfg(test)] diff --git a/ts-tests/package.json b/ts-tests/package.json index 94cd9e519c..a77c2ecc17 100644 --- a/ts-tests/package.json +++ b/ts-tests/package.json @@ -7,7 +7,7 @@ "fmt-check": "prettier ./tests --check", "fmt": "prettier ./tests --write", "build": "truffle compile", - "test": "mocha -r ts-node/register 'tests/**/*.ts'", + "test": "mocha -r ts-node/register 'tests/test-balance.ts'", "test-sql": "FRONTIER_BACKEND_TYPE='sql' mocha -r ts-node/register 'tests/**/*.ts'" }, "author": "", diff --git a/ts-tests/tests/config.ts b/ts-tests/tests/config.ts index 1753c849b2..79c60d4189 100644 --- a/ts-tests/tests/config.ts +++ b/ts-tests/tests/config.ts @@ -1,6 +1,6 @@ export const GENESIS_ACCOUNT = "0x6be02d1d3665660d22ff9624b7be0551ee1ac91b"; export const GENESIS_ACCOUNT_PRIVATE_KEY = "0x99B3C12287537E38C90A9219D4CB074A89A16E9CDB20BF85728EBD97C343E342"; -export const GENESIS_ACCOUNT_BALANCE = "340282366920938463463374607431768211455"; +export const GENESIS_ACCOUNT_BALANCE = "340282366920938463463374607431768211455000000000"; export const FIRST_CONTRACT_ADDRESS = "0xc2bf5f29a4384b1ab0c063e1c666f02121b6084a"; @@ -17,6 +17,13 @@ export const EXISTENTIAL_DEPOSIT = 0; // The minimum amount required to keep an export const ETH_BLOCK_GAS_LIMIT = 75000000; // The same configuration as runtime export const ETH_BLOCK_POV_LIMIT = 5 * 1024 * 1024; // The same configuration as runtime +const EVM_DECIMALS_FACTOR = BigInt(10 ** 9); + +/** Convert a substrate-scale value to EVM balance (18 decimals). */ +export function toEvmBalance(value: number | bigint | string): string { + return (BigInt(value) * EVM_DECIMALS_FACTOR).toString(); +} + // ERC20 used to test pov size transfer tests, not meant to be interacted with export const TEST_ERC20_BYTECODE = "0x60806040526001600560146101000a81548160ff0219169083151502179055503480156200002c57600080fd5b50604051" + diff --git a/ts-tests/tests/test-balance.ts b/ts-tests/tests/test-balance.ts index a2faff274d..21624a3fc1 100644 --- a/ts-tests/tests/test-balance.ts +++ b/ts-tests/tests/test-balance.ts @@ -1,13 +1,19 @@ import { expect } from "chai"; import { step } from "mocha-steps"; -import { GENESIS_ACCOUNT, GENESIS_ACCOUNT_PRIVATE_KEY, GENESIS_ACCOUNT_BALANCE, EXISTENTIAL_DEPOSIT } from "./config"; +import { + GENESIS_ACCOUNT, + GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_BALANCE, + EXISTENTIAL_DEPOSIT, + toEvmBalance, +} from "./config"; import { createAndFinalizeBlock, describeWithFrontier, customRequest } from "./util"; describeWithFrontier("Frontier RPC (Balance)", (context) => { const TEST_ACCOUNT = "0xdd33Af49c851553841E94066B54Fd28612522901"; const TEST_ACCOUNT_PRIVATE_KEY = "0x4ca933bffe83185dda76e7913fc96e5c97cdb7ca1fbfcc085d6376e6f564ef71"; - const TRANFER_VALUE = "0x200"; // 512, must be higher than ExistentialDeposit + const TRANSFER_VALUE = "0x200"; // 512, must be higher than ExistentialDeposit const GAS_PRICE = "0x3B9ACA00"; // 1000000000 var nonce = 0; @@ -23,7 +29,7 @@ describeWithFrontier("Frontier RPC (Balance)", (context) => { { from: GENESIS_ACCOUNT, to: TEST_ACCOUNT, - value: TRANFER_VALUE, + value: toEvmBalance(TRANSFER_VALUE), gasPrice: GAS_PRICE, gas: "0x100000", nonce: nonce, @@ -32,17 +38,28 @@ describeWithFrontier("Frontier RPC (Balance)", (context) => { ); await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]); - // GENESIS_ACCOUNT_BALANCE - (21000 * gasPrice) - value; + await createAndFinalizeBlock(context.web3); + + // Priority fees are disabled in the runner, so a legacy tx is charged + // gasUsed * BaseFeePerGas instead of gasUsed * gasPrice. + // pallet_ethereum stores baseFeePerGas after on_finalize runs, so the + // value the runner read during block N+1 is reported on block N (the + // parent), not on the tx-bearing block. + // The fee is then converted to substrate balance, which truncates + // anything below 10^9 wei. + const receipt = await context.web3.eth.getTransactionReceipt(tx.transactionHash); + const txBlock = await context.web3.eth.getBlock(receipt.blockHash); + const parentBlock = await context.web3.eth.getBlock(txBlock.parentHash); + const evmGasCost = BigInt(receipt.gasUsed) * BigInt(parentBlock.baseFeePerGas); + const substrateGranularity = BigInt(1_000_000_000); + const gasCost = (evmGasCost / substrateGranularity) * substrateGranularity; + const expectedGenesisBalance = ( BigInt(GENESIS_ACCOUNT_BALANCE) - - BigInt(21000) * BigInt(GAS_PRICE) - - BigInt(TRANFER_VALUE) + gasCost - + BigInt(toEvmBalance(TRANSFER_VALUE)) ).toString(); - const expectedTestBalance = (Number(TRANFER_VALUE) - EXISTENTIAL_DEPOSIT).toString(); - expect(await context.web3.eth.getBalance(GENESIS_ACCOUNT, "pending")).to.equal(expectedGenesisBalance); - expect(await context.web3.eth.getBalance(TEST_ACCOUNT, "pending")).to.equal(expectedTestBalance); - - await createAndFinalizeBlock(context.web3); + const expectedTestBalance = (BigInt(toEvmBalance(TRANSFER_VALUE)) - BigInt(EXISTENTIAL_DEPOSIT)).toString(); expect(await context.web3.eth.getBalance(GENESIS_ACCOUNT)).to.equal(expectedGenesisBalance); expect(await context.web3.eth.getBalance(TEST_ACCOUNT)).to.equal(expectedTestBalance); @@ -56,7 +73,7 @@ describeWithFrontier("Frontier RPC (Balance)", (context) => { { from: GENESIS_ACCOUNT, to: TEST_ACCOUNT, - value: TRANFER_VALUE, + value: TRANSFER_VALUE, gasPrice: Number(gas_price) - 1, gas: "0x100000", nonce: nonce, diff --git a/ts-tests/tests/test-state-override.ts b/ts-tests/tests/test-state-override.ts index 2c946b5e12..49dec1c267 100644 --- a/ts-tests/tests/test-state-override.ts +++ b/ts-tests/tests/test-state-override.ts @@ -5,7 +5,7 @@ import { AbiItem } from "web3-utils"; import StateOverrideTest from "../build/contracts/StateOverrideTest.json"; import Test from "../build/contracts/Test.json"; -import { GENESIS_ACCOUNT, GENESIS_ACCOUNT_PRIVATE_KEY } from "./config"; +import { GENESIS_ACCOUNT, GENESIS_ACCOUNT_PRIVATE_KEY, toEvmBalance } from "./config"; import { createAndFinalizeBlock, customRequest, describeWithFrontier } from "./util"; chaiUse(chaiAsPromised); @@ -82,7 +82,7 @@ describeWithFrontier("Frontier RPC (StateOverride)", (context) => { }, }, ]); - expect(Web3.utils.hexToNumberString(result)).to.equal("5000"); + expect(Web3.utils.hexToNumberString(result)).to.equal(toEvmBalance(5000)); }); it("should have availableFunds of 100 without state override", async function () { diff --git a/ts-tests/tests/test-transaction-priority.ts b/ts-tests/tests/test-transaction-priority.ts index c57f0c63f9..ffdda59714 100644 --- a/ts-tests/tests/test-transaction-priority.ts +++ b/ts-tests/tests/test-transaction-priority.ts @@ -25,7 +25,10 @@ describeWithFrontier("Frontier RPC (Priority)", (context) => { return tx; } - step("should prioritize transaction with the higher gasPrice", async function () { + // Every EVM transaction is given a uniform pool priority, so the txpool + // does not replace a tx with a higher-gasPrice tx of the same nonce. + // The first arrival wins regardless of gasPrice. + step("uniform priority: first transaction with a given nonce wins", async function () { this.timeout(15000); const gasPrices = [ "0x3B9ACA01", @@ -44,6 +47,6 @@ describeWithFrontier("Frontier RPC (Priority)", (context) => { await createAndFinalizeBlock(context.web3); const block = await context.web3.eth.getBlock("latest", true); expect(block.transactions.length).to.be.eq(1); - expect(block.transactions[0].gasPrice).to.be.eq("1000000007"); + expect(block.transactions[0].gasPrice).to.be.eq("1000000001"); }); });