diff --git a/.github/workflows/check_lint_build.yaml b/.github/workflows/check_lint_build.yaml index dbc2822..0e71e1f 100644 --- a/.github/workflows/check_lint_build.yaml +++ b/.github/workflows/check_lint_build.yaml @@ -17,7 +17,7 @@ jobs: name: Check, Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive @@ -28,8 +28,9 @@ jobs: components: rustfmt, clippy - name: Rust Cache - uses: Swatinem/rust-cache@v2.5.1 + uses: Swatinem/rust-cache@v2.9.1 with: + cache-bin: false shared-key: x86_64-unknown-linux-gnu - name: Rustfmt @@ -91,8 +92,9 @@ jobs: toolchain: nightly target: x86_64-pc-windows-gnu - name: Rust Cache (electrs) - uses: Swatinem/rust-cache@v2 + uses: Swatinem/rust-cache@v2.9.1 with: + cache-bin: false prefix-key: "v0-rust-electrs" workspaces: ../electrs -> target - name: Install electrs @@ -100,12 +102,13 @@ jobs: pushd ../electrs cargo build --locked --release popd - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: "recursive" - name: Rust Cache - uses: Swatinem/rust-cache@v2 + uses: Swatinem/rust-cache@v2.9.1 with: + cache-bin: false shared-key: x86_64-unknown-linux-gnu - name: Build (debug) run: cargo build @@ -120,7 +123,7 @@ jobs: export BITNAMES_APP='target/debug/plain_bitnames_app' cargo run --example integration_tests - build-release: + test-build-release: strategy: fail-fast: false matrix: @@ -141,13 +144,13 @@ jobs: name: x86_64-pc-windows-gnu binary-suffix: .exe rustflags: "-C linker=/usr/bin/x86_64-w64-mingw32-gcc" - name: Build, Release ((${{ matrix.name }})) + name: Test, Build, Release ((${{ matrix.name }})) runs-on: ${{ matrix.os }} permissions: contents: write timeout-minutes: 20 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: recursive @@ -158,14 +161,18 @@ jobs: target: ${{ matrix.name }} - name: Rust Cache - uses: Swatinem/rust-cache@v2.5.1 + uses: Swatinem/rust-cache@v2.9.1 with: + cache-bin: false key: ${{ matrix.name }} - name: Install windows-specific deps run: sudo apt install mingw-w64 if: ${{ matrix.name == 'x86_64-pc-windows-gnu' }} + - name: Test + run: cargo test --tests + - name: Build run: cargo build --release --target ${{ matrix.name }} env: @@ -189,7 +196,7 @@ jobs: popd - name: 'Upload Artifacts (bitnames)' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: ${{ env.BITNAMES_APP_FILENAME }} if-no-files-found: error @@ -197,6 +204,19 @@ jobs: target/${{ matrix.name }}/release/${{ env.BITNAMES_APP_FILENAME }} target/${{ matrix.name }}/release/${{ env.BITNAMES_CLI_FILENAME }} + - name: Extract Git tag name + id: git-tag-name + if: startsWith(github.ref, 'refs/tags/') + run: | + echo "git_tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + + - name: Parse Git tag name as semver + uses: madhead/semver-utils@v5.0.0 + if: startsWith(github.ref, 'refs/tags/') + id: parse-git-tag-name-semver + with: + version: ${{ steps.git-tag-name.outputs.git_tag_name }} + - name: Release uses: softprops/action-gh-release@v2.0.2 if: startsWith(github.ref, 'refs/tags/') @@ -205,15 +225,34 @@ jobs: target/${{ matrix.name }}/release/${{ env.BITNAMES_APP_FILENAME }} target/${{ matrix.name }}/release/${{ env.BITNAMES_CLI_FILENAME }} fail_on_unmatched_files: true + prerelease: ${{ steps.parse-git-tag-name-semver.outputs.prerelease != '' }} + + parse-semver: + name: Parse version info + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + outputs: + prerelease: ${{ steps.parse-git-tag-name-semver.outputs.prerelease }} + steps: + - name: Extract Git tag name + id: git-tag-name + run: | + echo "git_tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + + - name: Parse Git tag name as semver + uses: madhead/semver-utils@v5.0.0 + id: parse-git-tag-name-semver + with: + version: ${{ steps.git-tag-name.outputs.git_tag_name }} upload-releases-to-releases-drivechain-info: name: Upload releases to releases.drivechain.info runs-on: ubuntu-latest - needs: [build-release, integration-test] - if: startsWith(github.ref, 'refs/tags/') + needs: [integration-test, test-build-release, parse-semver] + if: startsWith(github.ref, 'refs/tags/') && needs.parse-semver.outputs.prerelease == '' steps: - name: Download release assets - uses: robinraju/release-downloader@v1.9 + uses: robinraju/release-downloader@v1.13 with: tag: ${{ github.ref_name }} diff --git a/Cargo.lock b/Cargo.lock index 0384398..e863b48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -297,7 +297,7 @@ dependencies = [ "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", - "windows-sys 0.60.2", + "windows-sys 0.52.0", "x11rb", ] @@ -683,9 +683,9 @@ dependencies = [ [[package]] name = "bdk_electrum" -version = "0.23.2" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b59a3f7fbe678874fa34354097644a171276e02a49934c13b3d61c54610ddf39" +checksum = "00a9846105bf6e751adbb6946b000ff919ce24a15a941cbfe68485549b552a9c" dependencies = [ "bdk_core", "electrum-client", @@ -742,7 +742,7 @@ dependencies = [ [[package]] name = "bip300301_enforcer_integration_tests" version = "0.3.4" -source = "git+https://github.com/LayerTwo-Labs/bip300301_enforcer?rev=57bf4f8ace4454eddaec83dbc634dc706fc71516#57bf4f8ace4454eddaec83dbc634dc706fc71516" +source = "git+https://github.com/LayerTwo-Labs/bip300301_enforcer?rev=a4197ad2ae9d35252d12008ff616bce710b647d2#a4197ad2ae9d35252d12008ff616bce710b647d2" dependencies = [ "anyhow", "bdk_wallet", @@ -775,7 +775,7 @@ dependencies = [ [[package]] name = "bip300301_enforcer_lib" version = "0.3.4" -source = "git+https://github.com/LayerTwo-Labs/bip300301_enforcer?rev=57bf4f8ace4454eddaec83dbc634dc706fc71516#57bf4f8ace4454eddaec83dbc634dc706fc71516" +source = "git+https://github.com/LayerTwo-Labs/bip300301_enforcer?rev=a4197ad2ae9d35252d12008ff616bce710b647d2#a4197ad2ae9d35252d12008ff616bce710b647d2" dependencies = [ "aes-gcm", "argon2", @@ -809,11 +809,9 @@ dependencies = [ "ouroboros", "parking_lot", "prost", - "prost-build", "prost-types", - "protox", "rand 0.10.1", - "reqwest 0.13.3", + "reqwest 0.13.4", "rusqlite", "rusqlite_migration", "rusty-leveldb", @@ -827,14 +825,12 @@ dependencies = [ "tokio-util", "tonic", "tonic-prost", - "tonic-prost-build", "tracing", "tracing-appender", "tracing-subscriber", "transitive", "url", "uuid", - "zeromq", ] [[package]] @@ -865,14 +861,13 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitcoin" -version = "0.32.8" +version = "0.32.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e499f9fc0407f50fe98af744ab44fa67d409f76b6772e1689ec8485eb0c0f66" +checksum = "39581299241111285f3268ba75ddf372746fd041620918b145c1af9d75e91b6c" dependencies = [ "base58ck", "base64 0.21.7", "bech32", - "bitcoin-internals", "bitcoin-io", "bitcoin-units", "bitcoin_hashes", @@ -887,9 +882,6 @@ name = "bitcoin-internals" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30bdbe14aa07b06e6cfeffc529a1f099e5fbe249524f8125358604df99a4bed2" -dependencies = [ - "serde", -] [[package]] name = "bitcoin-io" @@ -932,11 +924,10 @@ dependencies = [ [[package]] name = "bitcoin-units" -version = "0.1.2" +version = "0.1.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5285c8bcaa25876d07f37e3d30c303f2609179716e11d688f51e8f1fe70063e2" +checksum = "57bad157b78d0d1b22c4cbb6a35a566211fc4d14866a37f2c780652b50f3b845" dependencies = [ - "bitcoin-internals", "serde", ] @@ -1549,7 +1540,7 @@ dependencies = [ [[package]] name = "cusf-enforcer-mempool" version = "0.3.0" -source = "git+https://github.com/LayerTwo-Labs/cusf-enforcer-mempool.git?rev=b2efa1a916c4d71ea5f3437e3aa3d5e6c6fc2df8#b2efa1a916c4d71ea5f3437e3aa3d5e6c6fc2df8" +source = "git+https://github.com/LayerTwo-Labs/cusf-enforcer-mempool.git?rev=5f4de6440b159c4d9cb65d6acc47d3b0d38239e3#5f4de6440b159c4d9cb65d6acc47d3b0d38239e3" dependencies = [ "anyhow", "async-trait", @@ -1571,7 +1562,7 @@ dependencies = [ "tracing", "typewit", "ulid", - "zeromq", + "zeromq 0.6.0", ] [[package]] @@ -1680,7 +1671,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -1932,15 +1923,15 @@ dependencies = [ [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "electrum-client" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5059f13888a90486e7268bbce59b175f5f76b1c55e5b9c568ceaa42d2b8507c" +checksum = "1970c5d7bd9de6d4041cbfc3e46faa3e85fe7efcea2b0eb06750d3ae1ef577b7" dependencies = [ "bitcoin", "byteorder", @@ -2064,7 +2055,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3420,9 +3411,9 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jiff" -version = "0.2.24" +version = "0.2.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00b5dbd620d61dfdcb6007c9c1f6054ebd75319f163d886a9055cec1155073d" +checksum = "4603d3033e49e2b0e31229fcab20a5d40089c607d975cd9c80551dc69eed9102" dependencies = [ "jiff-static", "portable-atomic", @@ -3431,9 +3422,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.24" +version = "0.2.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e000de030ff8022ea1da3f466fbb0f3a809f5e51ed31f6dd931c35181ad8e6d7" +checksum = "782d32378dddf207193ac91cefb848ad41abb58195c95168e1291227a0832b47" dependencies = [ "proc-macro2", "quote", @@ -3912,9 +3903,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.180" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libes" @@ -4249,9 +4240,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" dependencies = [ "libc", "wasi", @@ -4445,7 +4436,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4785,9 +4776,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.80" +version = "0.10.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45fa2aa886c42762255da344f0a0d313e254066c46aad76f300c3d3da62d967" +checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" dependencies = [ "bitflags 2.10.0", "cfg-if", @@ -4816,9 +4807,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-sys" -version = "0.9.116" +version = "0.9.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28a22dc7140cda5f096e5e7724a6962ca81a7f8bfd2979f9b18c11af56318c4" +checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695" dependencies = [ "cc", "libc", @@ -5154,7 +5145,7 @@ dependencies = [ "transitive", "utoipa", "x25519-dalek", - "zeromq", + "zeromq 0.5.0", ] [[package]] @@ -5694,7 +5685,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -5964,9 +5955,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64 0.22.1", "bytes", @@ -5995,9 +5986,9 @@ dependencies = [ [[package]] name = "reserve-port" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21918d6644020c6f6ef1993242989bf6d4952d2e025617744f184c02df51c356" +checksum = "94070964579245eb2f76e62a7668fe87bd9969ed6c41256f3bf614e3323dd3cc" dependencies = [ "thiserror 2.0.18", ] @@ -6090,7 +6081,7 @@ dependencies = [ "errno 0.3.14", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6170,7 +6161,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 1.0.5", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6393,9 +6384,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "itoa", "memchr", @@ -6508,7 +6499,7 @@ version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ - "errno 0.3.14", + "errno 0.2.8", "libc", ] @@ -6669,12 +6660,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -6902,7 +6893,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix 1.1.3", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -7077,9 +7068,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.50.0" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "bytes", "libc", @@ -7094,9 +7085,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", @@ -8108,6 +8099,17 @@ dependencies = [ "safe_arch", ] +[[package]] +name = "win_uds" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd30a1a28a3799479cbf4e17284a220ea9ff6bad098a9d0224543a5d1efe1da" +dependencies = [ + "async-io", + "futures-io", + "socket2", +] + [[package]] name = "winapi" version = "0.3.9" @@ -8130,7 +8132,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -8289,15 +8291,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", -] - [[package]] name = "windows-sys" version = "0.61.2" @@ -8331,30 +8324,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -8367,12 +8343,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -8385,12 +8355,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -8403,24 +8367,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -8433,12 +8385,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -8451,12 +8397,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -8469,12 +8409,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -8487,12 +8421,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - [[package]] name = "winit" version = "0.30.12" @@ -8949,6 +8877,31 @@ dependencies = [ "uuid", ] +[[package]] +name = "zeromq" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2c254fd8f366755335c9e43b865f8484fe3bd717d65ffe7c3f28852863030" +dependencies = [ + "async-trait", + "asynchronous-codec", + "bytes", + "crossbeam-queue", + "futures", + "log", + "num-traits", + "once_cell", + "parking_lot", + "rand 0.9.4", + "regex", + "scc", + "thiserror 1.0.69", + "tokio", + "tokio-util", + "uuid", + "win_uds", +] + [[package]] name = "zerotrie" version = "0.2.3" diff --git a/Cargo.toml b/Cargo.toml index f669a39..5750f23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,12 +95,12 @@ zeromq = "0.5.0" [workspace.dependencies.bip300301_enforcer_lib] default-features = false git = "https://github.com/LayerTwo-Labs/bip300301_enforcer" -rev = "57bf4f8ace4454eddaec83dbc634dc706fc71516" +rev = "a4197ad2ae9d35252d12008ff616bce710b647d2" [workspace.dependencies.bip300301_enforcer_integration_tests] default-features = false git = "https://github.com/LayerTwo-Labs/bip300301_enforcer" -rev = "57bf4f8ace4454eddaec83dbc634dc706fc71516" +rev = "a4197ad2ae9d35252d12008ff616bce710b647d2" [workspace.dependencies.l2l-openapi] git = "https://github.com/Ash-L2L/l2l-openapi" diff --git a/lib/node/mainchain_task.rs b/lib/node/mainchain_task.rs index 1df9449..51b76c2 100644 --- a/lib/node/mainchain_task.rs +++ b/lib/node/mainchain_task.rs @@ -65,9 +65,9 @@ impl From<&Response> for Request { #[derive(Debug, Error)] enum Error { #[error("Send response error")] - SendResponse(Response), + SendResponse(Box), #[error("Send response error (oneshot)")] - SendResponseOneshot(Response), + SendResponseOneshot(Box), } struct MainchainTask { @@ -182,12 +182,15 @@ where let response = Response::AncestorInfos(main_block_hash, res); if let Some(response_tx) = response_tx { - response_tx - .send(response) - .map_err(Error::SendResponseOneshot)?; + response_tx.send(response).map_err(|resp| { + Error::SendResponseOneshot(Box::new(resp)) + })?; } else { self.response_tx.unbounded_send(response).map_err( - |err| Error::SendResponse(err.into_inner()), + |err| { + let resp = err.into_inner(); + Error::SendResponse(Box::new(resp)) + }, )?; } }