diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1fa97439..ddb91a96 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,15 +18,17 @@ jobs: packages: write strategy: matrix: - platform: + build: - arch: linux/amd64 - profile: production + image: subcoin # Subcoin Node + suffix: ubuntu-x86_64-${{ github.ref_name }} + image-suffix: '' + - arch: linux/amd64 + image: snapcake suffix: ubuntu-x86_64-${{ github.ref_name }} image-suffix: '' - dockerfile-suffix: '' # TODO: https://github.com/subcoin-project/subcoin/issues/13 # - arch: linux/arm64 - # profile: production # suffix: ubuntu-aarch64-${{ github.ref_name }} # image-suffix: '-aarch64' # dockerfile-suffix: '.aarch64' @@ -58,21 +60,21 @@ jobs: uses: docker/metadata-action@v3 with: images: | - ghcr.io/subcoin-project/subcoin + ghcr.io/subcoin-project/${{ matrix.build.image }} tags: | type=ref,event=branch type=ref,event=tag - type=sha + # type=sha flavor: | latest=false - suffix=${{ matrix.platform.image-suffix }} + suffix=${{ matrix.build.image-suffix }} - name: Build and push image id: build uses: docker/build-push-action@v6 with: - file: Dockerfile${{ matrix.platform.dockerfile-suffix }} - platforms: ${{ matrix.platform.arch }} + file: docker/${{ matrix.build.image }}.Dockerfile + platforms: ${{ matrix.build.arch }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache push: ${{ github.event_name != 'pull_request' }} @@ -83,7 +85,6 @@ jobs: provenance: false build-args: | SUBSTRATE_CLI_GIT_COMMIT_HASH=${{ github.sha }} - PROFILE=${{ matrix.platform.profile }} - name: Image digest run: echo ${{ steps.build.outputs.digest }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89991cb0..8ab00356 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,31 +19,26 @@ jobs: - os: ubuntu-latest os_prefix: ubuntu target: aarch64-unknown-linux-gnu - artifact_name: subcoin command: cross - os: ubuntu-latest os_prefix: ubuntu target: x86_64-unknown-linux-gnu - artifact_name: subcoin command: cargo - os: macos-latest os_prefix: macos target: x86_64-apple-darwin - artifact_name: subcoin command: cargo - os: macos-14 os_prefix: macos target: aarch64-apple-darwin - artifact_name: subcoin command: cargo - os: windows-latest os_prefix: windows target: x86_64-pc-windows-msvc - artifact_name: subcoin.exe command: cargo steps: @@ -88,10 +83,14 @@ jobs: target/ key: ${{ runner.os }}-${{ matrix.build.target }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Build binary + - name: Build subcoin binary run: | ${{ matrix.build.command }} build --profile production --bin subcoin --locked --target ${{ matrix.build.target }} + - name: Build snapcake binary + run: | + ${{ matrix.build.command }} build --profile production --package subcoin-snapcake --locked --target ${{ matrix.build.target }} + - name: Get version without v prefix (Ubuntu/macOS) run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV if: ${{ matrix.build.os != 'windows-latest' }} @@ -102,11 +101,20 @@ jobs: echo "VERSION=$version" >> $env:GITHUB_ENV if: ${{ matrix.build.os == 'windows-latest' }} - - name: Upload binaries to release + - name: Upload subcoin binary to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/${{ matrix.build.target }}/production/subcoin${{ matrix.build.os == 'windows-latest' && '.exe' || '' }} + tag: ${{ github.ref }} + asset_name: subcoin-${{ env.VERSION }}-${{ matrix.build.target }}${{ matrix.build.os == 'windows-latest' && '.exe' || '' }} + prerelease: true + + - name: Upload snapcake binary to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/${{ matrix.build.target }}/production/${{ matrix.build.artifact_name }} + file: target/${{ matrix.build.target }}/production/snapcake${{ matrix.build.os == 'windows-latest' && '.exe' || '' }} tag: ${{ github.ref }} - asset_name: ${{ matrix.build.artifact_name }}-${{ env.VERSION }}-${{ matrix.build.target }} + asset_name: snapcake-${{ env.VERSION }}-${{ matrix.build.target }}${{ matrix.build.os == 'windows-latest' && '.exe' || '' }} prerelease: true diff --git a/Cargo.lock b/Cargo.lock index 910de031..f554f848 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -874,7 +874,7 @@ checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" [[package]] name = "binary-merkle-tree" version = "13.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "hash-db", "log", @@ -1981,7 +1981,7 @@ dependencies = [ [[package]] name = "cumulus-client-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2003,7 +2003,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.7.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2019,7 +2019,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.7.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2033,7 +2033,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-proof-size-hostfunction" version = "0.2.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "sp-externalities 0.25.0 (git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4)", "sp-runtime-interface 24.0.0 (git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4)", @@ -2043,7 +2043,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.7.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2062,7 +2062,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.7.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2882,7 +2882,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "12.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", ] @@ -2915,7 +2915,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "frame-support", "frame-support-procedural", @@ -2939,7 +2939,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "32.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "Inflector", "array-bytes", @@ -3039,7 +3039,7 @@ dependencies = [ [[package]] name = "frame-support" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "aquamarine", "array-bytes", @@ -3082,7 +3082,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "23.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "Inflector", "cfg-expr", @@ -3102,7 +3102,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "10.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.1.0", @@ -3114,7 +3114,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "11.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "proc-macro2", "quote", @@ -3124,7 +3124,7 @@ dependencies = [ [[package]] name = "frame-system" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "cfg-if", "docify", @@ -3144,7 +3144,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "docify", "parity-scale-codec", @@ -3154,7 +3154,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.34.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "frame-support", "parity-scale-codec", @@ -5948,7 +5948,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pallet-balances" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "docify", "frame-benchmarking", @@ -6004,7 +6004,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "frame-benchmarking", "frame-support", @@ -6326,7 +6326,7 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polkadot-core-primitives" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "scale-info", @@ -6337,7 +6337,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "bs58", "futures", @@ -6356,7 +6356,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -6381,7 +6381,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "bitvec", "bounded-vec", @@ -6407,7 +6407,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "bitvec", @@ -6436,7 +6436,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "futures", @@ -6458,7 +6458,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" version = "6.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "bounded-collections", "derive_more 0.99.18", @@ -6474,7 +6474,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "bitvec", "hex-literal", @@ -6511,7 +6511,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -6899,7 +6899,7 @@ checksum = "f8650aabb6c35b860610e9cff5dc1af886c9e25073b7b1712a68972af4281302" dependencies = [ "bytes", "heck 0.5.0", - "itertools 0.12.1", + "itertools 0.13.0", "log", "multimap", "once_cell", @@ -6932,7 +6932,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf0c195eebb4af52c752bec4f52f645da98b6e92077a04110c7f349477ae5ac" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.87", @@ -7691,7 +7691,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "23.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "log", "sp-core", @@ -7702,7 +7702,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.34.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "futures", @@ -7731,7 +7731,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.33.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "sp-api", @@ -7746,7 +7746,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "docify", @@ -7773,7 +7773,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "11.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -7784,7 +7784,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.36.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "chrono", @@ -7826,7 +7826,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "fnv", "futures", @@ -7853,7 +7853,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.35.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "hash-db", "kvdb", @@ -7879,7 +7879,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.33.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "futures", @@ -7930,7 +7930,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.32.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -7953,7 +7953,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.29.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "polkavm", "sc-allocator", @@ -7966,7 +7966,7 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.29.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "log", "polkavm", @@ -7977,7 +7977,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.29.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "anyhow", "cfg-if", @@ -7995,7 +7995,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.33.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "console", "futures", @@ -8012,7 +8012,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "25.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "parking_lot 0.12.3", @@ -8026,7 +8026,7 @@ dependencies = [ [[package]] name = "sc-mixnet" version = "0.4.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "arrayvec 0.7.4", @@ -8055,7 +8055,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.34.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -8106,7 +8106,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.33.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -8124,7 +8124,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.33.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -8145,7 +8145,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.33.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -8182,7 +8182,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.33.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "futures", @@ -8201,7 +8201,7 @@ dependencies = [ [[package]] name = "sc-network-types" version = "0.10.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "bs58", "bytes", @@ -8220,7 +8220,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "29.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "futures", "jsonrpsee", @@ -8252,7 +8252,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.33.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -8272,7 +8272,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "11.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "dyn-clone", "forwarded-header-value", @@ -8296,7 +8296,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.34.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "futures", @@ -8327,7 +8327,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.35.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "directories", @@ -8391,7 +8391,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.30.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "log", "parity-scale-codec", @@ -8402,7 +8402,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.16.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "clap", "fs4", @@ -8415,7 +8415,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "27.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "derive_more 0.99.18", "futures", @@ -8436,7 +8436,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "15.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "chrono", "futures", @@ -8456,7 +8456,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "chrono", "console", @@ -8484,7 +8484,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "11.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -8495,7 +8495,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "futures", @@ -8526,7 +8526,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "futures", @@ -8542,7 +8542,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "14.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-channel 1.9.0", "futures", @@ -9297,7 +9297,7 @@ dependencies = [ [[package]] name = "sp-api" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "docify", "hash-db", @@ -9319,7 +9319,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "15.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "Inflector", "blake2 0.10.6", @@ -9333,7 +9333,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "30.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "scale-info", @@ -9345,7 +9345,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "23.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "docify", "integer-sqrt", @@ -9377,7 +9377,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "scale-info", @@ -9389,7 +9389,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "sp-api", "sp-inherents", @@ -9399,7 +9399,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "futures", "parity-scale-codec", @@ -9418,7 +9418,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.32.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "futures", @@ -9433,7 +9433,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.32.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "parity-scale-codec", @@ -9451,7 +9451,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "13.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "finality-grandpa", "log", @@ -9468,7 +9468,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.32.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "scale-info", @@ -9479,7 +9479,7 @@ dependencies = [ [[package]] name = "sp-core" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "bandersnatch_vrfs", @@ -9526,7 +9526,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#e98c1ac6994766411f96bd7c14e8049cc5284396" +source = "git+https://github.com/paritytech/polkadot-sdk#08ec8cdbfdbdd29c7921a8a141187e04354a449e" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -9560,7 +9560,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "blake2b_simd", "byteorder", @@ -9573,7 +9573,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "quote", "sp-crypto-hashing 0.1.0 (git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4)", @@ -9583,7 +9583,7 @@ dependencies = [ [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -9592,7 +9592,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "proc-macro2", "quote", @@ -9602,7 +9602,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#e98c1ac6994766411f96bd7c14e8049cc5284396" +source = "git+https://github.com/paritytech/polkadot-sdk#08ec8cdbfdbdd29c7921a8a141187e04354a449e" dependencies = [ "proc-macro2", "quote", @@ -9612,7 +9612,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "environmental", "parity-scale-codec", @@ -9622,7 +9622,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#e98c1ac6994766411f96bd7c14e8049cc5284396" +source = "git+https://github.com/paritytech/polkadot-sdk#08ec8cdbfdbdd29c7921a8a141187e04354a449e" dependencies = [ "environmental", "parity-scale-codec", @@ -9632,7 +9632,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.8.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "scale-info", @@ -9644,7 +9644,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9657,7 +9657,7 @@ dependencies = [ [[package]] name = "sp-io" version = "30.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "bytes", "docify", @@ -9683,7 +9683,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "31.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "sp-core", "sp-runtime", @@ -9693,7 +9693,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.34.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -9704,7 +9704,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "thiserror", "zstd 0.12.4", @@ -9713,7 +9713,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.6.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "frame-metadata 16.0.0", "parity-scale-codec", @@ -9723,7 +9723,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.4.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "scale-info", @@ -9734,7 +9734,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "sp-api", "sp-core", @@ -9744,7 +9744,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "backtrace", "regex", @@ -9753,7 +9753,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "rustc-hash 1.1.0", "serde", @@ -9763,7 +9763,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "31.0.1" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "binary-merkle-tree", "docify", @@ -9792,7 +9792,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -9811,7 +9811,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#e98c1ac6994766411f96bd7c14e8049cc5284396" +source = "git+https://github.com/paritytech/polkadot-sdk#08ec8cdbfdbdd29c7921a8a141187e04354a449e" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -9830,7 +9830,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "Inflector", "expander", @@ -9843,7 +9843,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#e98c1ac6994766411f96bd7c14e8049cc5284396" +source = "git+https://github.com/paritytech/polkadot-sdk#08ec8cdbfdbdd29c7921a8a141187e04354a449e" dependencies = [ "Inflector", "expander", @@ -9856,7 +9856,7 @@ dependencies = [ [[package]] name = "sp-session" version = "27.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "scale-info", @@ -9870,7 +9870,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9883,7 +9883,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.35.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "hash-db", "log", @@ -9903,7 +9903,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "10.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "aes-gcm", "curve25519-dalek", @@ -9927,17 +9927,17 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#e98c1ac6994766411f96bd7c14e8049cc5284396" +source = "git+https://github.com/paritytech/polkadot-sdk#08ec8cdbfdbdd29c7921a8a141187e04354a449e" [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9949,7 +9949,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#e98c1ac6994766411f96bd7c14e8049cc5284396" +source = "git+https://github.com/paritytech/polkadot-sdk#08ec8cdbfdbdd29c7921a8a141187e04354a449e" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9961,7 +9961,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "parity-scale-codec", @@ -9973,7 +9973,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "tracing", @@ -9984,7 +9984,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#e98c1ac6994766411f96bd7c14e8049cc5284396" +source = "git+https://github.com/paritytech/polkadot-sdk#08ec8cdbfdbdd29c7921a8a141187e04354a449e" dependencies = [ "parity-scale-codec", "tracing", @@ -9995,7 +9995,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "sp-api", "sp-runtime", @@ -10004,7 +10004,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "26.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "async-trait", "parity-scale-codec", @@ -10018,7 +10018,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "29.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "ahash", "hash-db", @@ -10040,7 +10040,7 @@ dependencies = [ [[package]] name = "sp-version" version = "29.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10057,7 +10057,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "13.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "parity-scale-codec", "proc-macro-warning 1.0.2", @@ -10069,7 +10069,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -10081,7 +10081,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#e98c1ac6994766411f96bd7c14e8049cc5284396" +source = "git+https://github.com/paritytech/polkadot-sdk#08ec8cdbfdbdd29c7921a8a141187e04354a449e" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -10092,7 +10092,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "27.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -10158,7 +10158,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-xcm" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "array-bytes", "bounded-collections", @@ -10574,7 +10574,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.4.7" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -10586,12 +10586,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" [[package]] name = "substrate-frame-rpc-system" version = "28.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "docify", "frame-system-rpc-runtime-api", @@ -10611,7 +10611,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "http-body-util", "hyper 1.4.1", @@ -10625,7 +10625,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "17.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "build-helper", "cargo_metadata", @@ -11286,7 +11286,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "coarsetime", "polkadot-primitives", @@ -11297,7 +11297,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "5.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "expander", "proc-macro-crate 3.1.0", @@ -12508,7 +12508,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "7.0.0" -source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b83487588db83d94042cce973bdc38f746078380" +source = "git+https://github.com/subcoin-project/polkadot-sdk?branch=subcoin-v4#b4153b97fd4d6e328e5d447c2cca74614651c497" dependencies = [ "Inflector", "proc-macro2", diff --git a/crates/subcoin-network/src/lib.rs b/crates/subcoin-network/src/lib.rs index 350d7bb5..7fbe9a21 100644 --- a/crates/subcoin-network/src/lib.rs +++ b/crates/subcoin-network/src/lib.rs @@ -233,6 +233,8 @@ pub struct Config { pub seednode_only: bool, /// Whether to accept the peer in ipv4 only. pub ipv4_only: bool, + /// Target block of the chain sync. + pub sync_target: Option, /// Maximum number of outbound peer connections. pub max_outbound_peers: usize, /// Maximum number of inbound peer connections. @@ -450,6 +452,7 @@ where max_outbound_peers, sync_strategy, block_sync, + sync_target, .. } = config; @@ -496,6 +499,7 @@ where max_outbound_peers, enable_block_sync, peer_store: Arc::new(persistent_peer_store_handle), + sync_target, }, registry.as_ref(), ) diff --git a/crates/subcoin-network/src/network_processor.rs b/crates/subcoin-network/src/network_processor.rs index d306a907..fd24d9ba 100644 --- a/crates/subcoin-network/src/network_processor.rs +++ b/crates/subcoin-network/src/network_processor.rs @@ -67,6 +67,7 @@ pub struct Params { /// Whether to enable block sync on start. pub enable_block_sync: bool, pub peer_store: Arc, + pub sync_target: Option, } /// [`NetworkProcessor`] is responsible for processing the network events. @@ -102,6 +103,7 @@ where max_outbound_peers, enable_block_sync, peer_store, + sync_target, } = params; let config = Config::new(); @@ -129,6 +131,7 @@ where is_major_syncing, enable_block_sync, peer_store.clone(), + sync_target, ); Self { @@ -671,7 +674,7 @@ where }, SyncAction::SwitchToBlocksFirstSync => { if let Some(SyncAction::Request(SyncRequest::Inventory(request))) = - self.chain_sync.attempt_blocks_first_sync() + self.chain_sync.start_blocks_first_sync() { self.send_get_blocks_message(request); } diff --git a/crates/subcoin-network/src/sync.rs b/crates/subcoin-network/src/sync.rs index 1e6f9b33..a2bc8a0c 100644 --- a/crates/subcoin-network/src/sync.rs +++ b/crates/subcoin-network/src/sync.rs @@ -188,6 +188,8 @@ pub(crate) struct ChainSync { rng: fastrand::Rng, /// Handle of peer store. peer_store: Arc, + /// Target block of the syncing process. + sync_target: Option, _phantom: PhantomData, } @@ -197,6 +199,7 @@ where Client: HeaderBackend + AuxStore, { /// Constructs a new instance of [`ChainSync`]. + #[allow(clippy::too_many_arguments)] pub(super) fn new( client: Arc, header_verifier: HeaderVerifier, @@ -205,6 +208,7 @@ where is_major_syncing: Arc, enable_block_sync: bool, peer_store: Arc, + sync_target: Option, ) -> Self { Self { client, @@ -217,6 +221,7 @@ where enable_block_sync, rng: fastrand::Rng::new(), peer_store, + sync_target, _phantom: Default::default(), } } @@ -363,12 +368,14 @@ where tracing::debug!(?reason, prior_peer = ?prior_peer_id, ?new_peer, "🔄 Sync restarted"); new_peer.state = PeerSyncState::DownloadingNew { start: our_best }; + let target_block_number = target_block_number(self.sync_target, new_peer.best_number); + match &mut self.syncing { Syncing::BlocksFirst(strategy) => { - strategy.restart(new_peer.peer_id, new_peer.best_number); + strategy.restart(new_peer.peer_id, target_block_number); } Syncing::HeadersFirst(strategy) => { - strategy.restart(new_peer.peer_id, new_peer.best_number); + strategy.restart(new_peer.peer_id, target_block_number); } Syncing::Idle => {} } @@ -460,7 +467,8 @@ where // Update sync peer if the latency improvement is significant. if current_latency / best_latency > LATENCY_IMPROVEMENT_THRESHOLD { let peer_id = best_sync_peer.peer_id; - let target_block_number = best_sync_peer.best_number; + let target_block_number = + target_block_number(self.sync_target, best_sync_peer.best_number); let sync_peer_updated = match &mut self.syncing { Syncing::BlocksFirst(strategy) => { @@ -531,6 +539,12 @@ where let our_best = self.client.best_number(); + if let Some(sync_target) = self.sync_target { + if our_best >= sync_target { + return SyncAction::None; + } + } + let find_best_available_peer = || { self.peers .iter() @@ -583,6 +597,8 @@ where let peer_best = next_peer.best_number; let require_major_sync = peer_best - our_best > MAJOR_SYNC_GAP; + let target_block_number = target_block_number(self.sync_target, peer_best); + // Start major syncing if the gap is significant. let (new_syncing, sync_action) = if require_major_sync { let blocks_first = our_best >= crate::checkpoint::last_checkpoint_height() @@ -596,21 +612,21 @@ where if blocks_first { let (sync_strategy, sync_action) = - BlocksFirstStrategy::new(client, next_peer_id, peer_best, peer_store); + BlocksFirstStrategy::new(client, next_peer_id, target_block_number, peer_store); (Syncing::BlocksFirst(Box::new(sync_strategy)), sync_action) } else { let (sync_strategy, sync_action) = HeadersFirstStrategy::new( client, self.header_verifier.clone(), next_peer_id, - peer_best, + target_block_number, peer_store, ); (Syncing::HeadersFirst(Box::new(sync_strategy)), sync_action) } } else { let (sync_strategy, sync_action) = - BlocksFirstStrategy::new(client, next_peer_id, peer_best, peer_store); + BlocksFirstStrategy::new(client, next_peer_id, target_block_number, peer_store); (Syncing::BlocksFirst(Box::new(sync_strategy)), sync_action) }; @@ -620,8 +636,8 @@ where sync_action } - pub(super) fn attempt_blocks_first_sync(&mut self) -> Option { - if self.syncing.is_major_syncing() { + pub(super) fn start_blocks_first_sync(&mut self) -> Option { + if matches!(self.syncing, Syncing::BlocksFirst(_)) { return None; } @@ -724,7 +740,7 @@ where return; } - let (hashes, blocks) = block_downloader.prepare_blocks_for_import(); + let (hashes, blocks) = block_downloader.prepare_blocks_for_import(self.sync_target); tracing::trace!( blocks = ?hashes, @@ -743,3 +759,17 @@ where }); } } + +/// Determines the target block number for syncing based on the provided sync target +/// and the peer's best block number. +/// +/// Bitcoin Core only supports snapshots at specific block heights (e.g., 840000 as of writing). +/// To avoid syncing past a block that may have been pruned or is unavailable in pruning mode +/// when running a snapshot node, this function ensures that we do not sync beyond a certain +/// block height, as determined by the `sync_target` or the peer's best block height. +fn target_block_number(sync_target: Option, peer_best: u32) -> u32 { + match sync_target { + Some(target) => peer_best.min(target), + None => peer_best, + } +} diff --git a/crates/subcoin-network/src/sync/block_downloader.rs b/crates/subcoin-network/src/sync/block_downloader.rs index 17d76de3..c02a331c 100644 --- a/crates/subcoin-network/src/sync/block_downloader.rs +++ b/crates/subcoin-network/src/sync/block_downloader.rs @@ -323,20 +323,27 @@ impl BlockDownloader { } /// Takes downloaded blocks and prepares them for import. - pub(crate) fn prepare_blocks_for_import(&mut self) -> (Vec, Vec) { + pub(crate) fn prepare_blocks_for_import( + &mut self, + max_block_number: Option, + ) -> (Vec, Vec) { let mut blocks = self .downloaded_blocks .drain(..) - .map(|block| { + .filter_map(|block| { let block_hash = block.block_hash(); let block_number = self.queued_blocks.block_number(block_hash).expect( "Corrupted state, number for {block_hash} not found in `queued_blocks`", ); - self.blocks_in_queue.insert(block_hash, block_number); + if max_block_number.map_or(false, |target_block| block_number > target_block) { + None + } else { + self.blocks_in_queue.insert(block_hash, block_number); - (block_number, block) + Some((block_number, block)) + } }) .collect::>(); diff --git a/crates/subcoin-network/src/sync/strategy/blocks_first.rs b/crates/subcoin-network/src/sync/strategy/blocks_first.rs index b4b0b0dc..61ea83bd 100644 --- a/crates/subcoin-network/src/sync/strategy/blocks_first.rs +++ b/crates/subcoin-network/src/sync/strategy/blocks_first.rs @@ -131,7 +131,7 @@ where pub(crate) fn new( client: Arc, peer_id: PeerId, - peer_best: u32, + target_block_number: u32, peer_store: Arc, ) -> (Self, SyncAction) { let best_number = client.best_number(); @@ -139,7 +139,7 @@ where let inv_requester = InventoryRequester { client: client.clone(), peer_id, - target_block_number: peer_best, + target_block_number, last_locator_request_start: 0u32, _phantom: Default::default(), }; @@ -147,7 +147,7 @@ where let mut blocks_first_sync = Self { peer_id, client, - target_block_number: peer_best, + target_block_number, state: State::Idle, inv_requester, block_downloader: BlockDownloader::new(peer_id, best_number, peer_store), @@ -204,6 +204,11 @@ where return self.inventory_request_action(); } + if self.client.best_number() == self.target_block_number { + self.state = State::Completed; + return SyncAction::SetIdle; + } + if self.block_downloader.queue_status.is_overloaded() { // If the queue was overloaded, evalute the current queue status again. let is_ready = self @@ -247,18 +252,13 @@ where } } - if self.client.best_number() == self.target_block_number { - self.state = State::Completed; - return SyncAction::SetIdle; - } - SyncAction::None } - pub(crate) fn restart(&mut self, new_peer: PeerId, peer_best: u32) { + pub(crate) fn restart(&mut self, new_peer: PeerId, target_block_number: u32) { self.state = State::Restarting; self.peer_id = new_peer; - self.target_block_number = peer_best; + self.target_block_number = target_block_number; self.block_downloader.restart(new_peer); self.inv_requester.peer_id = new_peer; self.inv_requester.last_locator_request_start = 0u32; diff --git a/crates/subcoin-network/src/sync/strategy/headers_first.rs b/crates/subcoin-network/src/sync/strategy/headers_first.rs index 1f232c07..60ba56e9 100644 --- a/crates/subcoin-network/src/sync/strategy/headers_first.rs +++ b/crates/subcoin-network/src/sync/strategy/headers_first.rs @@ -297,6 +297,11 @@ where return self.start_block_download_on_header_download_completion(start, end); } + if self.client.best_number() == self.target_block_number { + self.state = State::Completed; + return SyncAction::SetIdle; + } + if self.block_downloader.queue_status.is_overloaded() { let is_ready = self .block_downloader @@ -333,7 +338,7 @@ where SyncAction::None } - pub(crate) fn restart(&mut self, new_peer: PeerId, peer_best: u32) { + pub(crate) fn restart(&mut self, new_peer: PeerId, target_block_number: u32) { if let Some((start, end)) = self.header_requester.completed_range { self.state = State::RestartingBlocks { start, end }; } else { @@ -341,7 +346,7 @@ where self.state = State::RestartingHeaders; } self.peer_id = new_peer; - self.target_block_number = peer_best; + self.target_block_number = target_block_number; self.block_downloader.restart(new_peer); self.header_requester.peer_id = new_peer; self.header_requester.last_locator_request_start = 0u32; diff --git a/crates/subcoin-network/src/tests.rs b/crates/subcoin-network/src/tests.rs index 32701127..1bd74bde 100644 --- a/crates/subcoin-network/src/tests.rs +++ b/crates/subcoin-network/src/tests.rs @@ -287,6 +287,7 @@ impl TestNode { seednodes, seednode_only: true, ipv4_only: true, + sync_target: None, max_outbound_peers: 10, max_inbound_peers: 10, persistent_peer_latency_threshold: 200, diff --git a/crates/subcoin-node/src/commands/run.rs b/crates/subcoin-node/src/commands/run.rs index 17412d16..73c13e2d 100644 --- a/crates/subcoin-node/src/commands/run.rs +++ b/crates/subcoin-node/src/commands/run.rs @@ -41,6 +41,14 @@ pub struct Run { #[clap(long, default_value = "headers-first")] pub sync_strategy: SyncStrategy, + /// Specify the target block height for the initial block download. + /// + /// The syncing process will stop once the best block height reaches the specified target. + /// This flag is only used when syncing a snapshot node, which will steadily serve the state + /// at specified block height for other node to do a state sync and UTXO snapshot download. + #[clap(long)] + pub sync_target: Option, + /// Do not run the finalizer which will finalize the blocks on confirmation depth. #[clap(long)] pub no_finalizer: bool, @@ -96,6 +104,7 @@ impl Run { seednodes: self.network_params.seednodes.clone(), seednode_only: self.network_params.seednode_only, ipv4_only: self.network_params.ipv4_only, + sync_target: self.sync_target, max_outbound_peers: self.network_params.max_outbound_peers, max_inbound_peers: self.network_params.max_inbound_peers, persistent_peer_latency_threshold: self diff --git a/crates/subcoin-snapcake/src/cli.rs b/crates/subcoin-snapcake/src/cli.rs index 75d95b91..e4f35cf9 100644 --- a/crates/subcoin-snapcake/src/cli.rs +++ b/crates/subcoin-snapcake/src/cli.rs @@ -161,7 +161,7 @@ pub struct ConfigurationValues; impl sc_cli::DefaultConfigurationValues for ConfigurationValues { fn p2p_listen_port() -> u16 { - 20222 + 30333 } fn rpc_listen_port() -> u16 { diff --git a/docker/snapcake.Dockerfile b/docker/snapcake.Dockerfile new file mode 100644 index 00000000..e744f833 --- /dev/null +++ b/docker/snapcake.Dockerfile @@ -0,0 +1,57 @@ +# This is a base image to build Subcoin Snapcake +FROM ubuntu:22.04 AS builder + +ARG PROFILE=production +ARG SUBSTRATE_CLI_GIT_COMMIT_HASH + +# Incremental compilation here isn't helpful +ENV CARGO_INCREMENTAL=0 + +WORKDIR /src + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates \ + clang \ + cmake \ + curl \ + git \ + llvm \ + protobuf-compiler \ + make && \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ + rm -rf /var/lib/apt/lists/* # Clean up apt cache to reduce image size + +# Set the PATH to include Cargo binary directory +ENV PATH="/root/.cargo/bin:${PATH}" + +# Copy the source code +COPY . . + +# Compile the binary and move it to /snapcake. +RUN cargo build \ + --locked \ + --package subcoin-snapcake \ + --profile=$PROFILE \ + --target $(uname -p)-unknown-linux-gnu && \ + mv target/*/*/snapcake /snapcake && \ + rm -rf target + +# This is the 2nd stage: a very small image where we copy the binary. +FROM ubuntu:22.04 + +LABEL org.opencontainers.image.source="https://github.com/subcoin-project/subcoin" +LABEL org.opencontainers.image.description="Multistage Docker image for Subcoin Snapcake" + +# Copy the snapcake binary. +COPY --from=builder /snapcake /snapcake + +RUN mkdir /node-data && chown nobody:nogroup /node-data + +VOLUME ["/node-data"] + +USER nobody:nogroup + +EXPOSE 30333 9933 9944 9615 + +ENTRYPOINT ["/snapcake"] diff --git a/Dockerfile b/docker/subcoin.Dockerfile similarity index 86% rename from Dockerfile rename to docker/subcoin.Dockerfile index 19c486fe..bf297736 100644 --- a/Dockerfile +++ b/docker/subcoin.Dockerfile @@ -19,13 +19,17 @@ RUN apt-get update && \ llvm \ protobuf-compiler \ make && \ - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ + rm -rf /var/lib/apt/lists/* # Clean up apt cache to reduce image size + +# Set the PATH to include Cargo binary directory +ENV PATH="/root/.cargo/bin:${PATH}" # Copy the source code COPY . . # Compile the binary and move it to /subcoin. -RUN /root/.cargo/bin/cargo build \ +RUN cargo build \ --locked \ --bin subcoin \ --profile=$PROFILE \