]> Untitled Git - bdk/commitdiff
ci: fix actions versions and pinned deps for MSRV
authorSteve Myers <steve@notmandatory.org>
Mon, 21 Oct 2024 14:24:36 +0000 (09:24 -0500)
committerSteve Myers <steve@notmandatory.org>
Tue, 22 Oct 2024 00:31:31 +0000 (19:31 -0500)
.github/workflows/audit.yml
.github/workflows/code_coverage.yml
.github/workflows/cont_integration.yml
.github/workflows/nightly_docs.yml
Cargo.toml
README.md
examples/electrum_backend.rs
src/database/mod.rs
src/keys/mod.rs
src/wallet/tx_builder.rs

index 3c61162dfa0be557d52fb1bade121f00c1a5425f..8a41b88462153cf7ef861cd843be1a1dcaff54b1 100644 (file)
@@ -16,7 +16,7 @@ jobs:
   security_audit:
     runs-on: ubuntu-20.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - uses: actions-rs/audit-check@v1
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
index 9ec5965c08b5d1dd885a1541328b603f4106194c..bf47a7e249301570001af207955207b834d1a75a 100644 (file)
@@ -21,19 +21,16 @@ jobs:
 
     steps:
       - name: Checkout
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
       - name: Install lcov tools
         run: sudo apt-get install lcov -y
-      - name: Install rustup
-        run: curl https://sh.rustup.rs -sSf | sh -s -- -y
-      - name: Set default toolchain
-        run: rustup default nightly
-      - name: Set profile
-        run: rustup set profile minimal
-      - name: Add llvm tools
-        run: rustup component add llvm-tools-preview
-      - name: Update toolchain
-        run: rustup update
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: nightly
+          override: true
+          components: llvm-tools-preview
+          profile: minimal
       - name: Cache cargo
         uses: actions/cache@v3
         with:
@@ -52,7 +49,7 @@ jobs:
         # For more info, see:
         # - https://github.com/bitcoindevkit/bdk/issues/696
         # - https://github.com/bitcoindevkit/bdk/pull/748#issuecomment-1242721040
-        run: cargo test --features all-keys,compact_filters,compiler,key-value-db,sqlite,sqlite-bundled,test-electrum,test-rpc,verify
+        run: cargo test --features all-keys,compact_filters,compiler,key-value-db,sqlite,sqlite-bundled,test-electrum,test-rpc,verify -- --test-threads=1
       - name: Run grcov
         run: mkdir coverage; grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '/*' -o ./coverage/lcov.info
       - name: Generate HTML coverage report
@@ -63,7 +60,7 @@ jobs:
         with:
           github-token: ${{ secrets.GITHUB_TOKEN }}
       - name: Upload artifact
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v4
         with:
           name: coverage-report
           path: coverage-report.html
index a3ae6f167cb20a9a2a6d14741676c6d52f05dfe6..44dd5fd158c6090a61b6ed4ef8810d8001117810 100644 (file)
@@ -39,31 +39,32 @@ jobs:
           - sqlite-bundled
     steps:
       - name: checkout
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
       - name: Generate cache key
         run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
       - name: cache
-        uses: actions/cache@v2
+        uses: actions/cache@v4
         with:
           path: |
             ~/.cargo/registry
             ~/.cargo/git
             target
           key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
-      - name: Set default toolchain
-        run: rustup default ${{ matrix.rust.version }}
-      - name: Set profile
-        run: rustup set profile minimal
-      - name: Add clippy
-        if: ${{ matrix.rust.clippy }}
-        run: rustup component add clippy
-      - name: Update toolchain
-        run: rustup update
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: ${{ matrix.rust.version }}
+          override: true
+          components: clippy
+          profile: minimal
       - name: Pin dependencies for MSRV
         if: matrix.rust.version == '1.63.0'
         run: |
-          cargo update -p regex --precise "1.7.3"
+          cargo update -p tokio --precise "1.38.1"
+          cargo update -p tokio-util --precise "0.7.11"
           cargo update -p home --precise "0.5.5"
+          cargo update -p regex --precise "1.7.3"
+          cargo update -p security-framework-sys --precise "2.11.1"
       - name: Build
         run: cargo build --features bitcoin/std,miniscript/std,${{ matrix.features }} --no-default-features
       - name: Clippy
@@ -77,21 +78,22 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: checkout
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
       - name: cache
-        uses: actions/cache@v2
+        uses: actions/cache@v4
         with:
           path: |
             ~/.cargo/registry
             ~/.cargo/git
             target
           key: ${{ runner.os }}-cargo-test-md-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
-      - name: Set default toolchain
-        run: rustup default nightly
-      - name: Set profile
-        run: rustup set profile minimal
-      - name: Update toolchain
-        run: rustup update
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: nightly
+          override: true
+          components: clippy
+          profile: minimal
       - name: Test
         run: cargo test --features bitcoin/std,miniscript/std,test-md-docs --no-default-features -- doctest::ReadmeDoctests
 
@@ -100,6 +102,7 @@ jobs:
     runs-on: ubuntu-20.04
     strategy:
       fail-fast: false
+      max-parallel: 1
       matrix:
         blockchain:
           - name: electrum
@@ -119,22 +122,23 @@ jobs:
             features: test-esplora,use-esplora-blocking,verify,bitcoin/std,miniscript/std
     steps:
       - name: Checkout
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
       - name: Cache
-        uses: actions/cache@v2
+        uses: actions/cache@v4
         with:
           path: |
             ~/.cargo/registry
             ~/.cargo/git
             target
           key: ${{ runner.os }}-cargo-${{ github.job }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
-      - name: Setup rust toolchain
+      - name: Install Rust toolchain
         uses: actions-rs/toolchain@v1
         with:
           toolchain: stable
           override: true
+          profile: minimal
       - name: Test
-        run: cargo test --no-default-features --features bitcoin/std,miniscript/std,${{ matrix.blockchain.features }} ${{ matrix.blockchain.testprefix }}::bdk_blockchain_tests
+        run: cargo test --no-default-features --features bitcoin/std,miniscript/std,${{ matrix.blockchain.features }} ${{ matrix.blockchain.testprefix }}::bdk_blockchain_tests -- --test-threads=1
 
   check-wasm:
     name: Check WASM
@@ -144,9 +148,9 @@ jobs:
       CFLAGS: -I/usr/include
     steps:
       - name: Checkout
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
       - name: Cache
-        uses: actions/cache@v2
+        uses: actions/cache@v4
         with:
           path: |
             ~/.cargo/registry
@@ -158,14 +162,14 @@ jobs:
       - run: sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" || exit 1
       - run: sudo apt-get update || exit 1
       - run: sudo apt-get install -y libclang-common-10-dev clang-10 libc6-dev-i386 || exit 1
-      - name: Set default toolchain
-        run: rustup default stable
-      - name: Set profile
-        run: rustup set profile minimal
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: stable
+          override: true
+          profile: minimal
       - name: Add target wasm32
         run: rustup target add wasm32-unknown-unknown
-      - name: Update toolchain
-        run: rustup update
       - name: Check
         run: cargo check --target wasm32-unknown-unknown --features bitcoin/no-std,miniscript/no-std,async-interface,use-esplora-async,dev-getrandom-wasm --no-default-features
 
@@ -174,15 +178,14 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v2
-      - name: Set default toolchain
-        run: rustup default nightly
-      - name: Set profile
-        run: rustup set profile minimal
-      - name: Add rustfmt
-        run: rustup component add rustfmt
-      - name: Update toolchain
-        run: rustup update
+        uses: actions/checkout@v4
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: stable
+          override: true
+          components: rustfmt
+          profile: minimal
       - name: Check fmt
         run: cargo fmt --all -- --config format_code_in_doc_comments=true --check
 
@@ -206,16 +209,19 @@ jobs:
         python-version: '3.9'
     - name: Install python dependencies
       run: pip install hwi==2.1.1 protobuf==3.20.1
-    - name: Set default toolchain
-      run: rustup default ${{ matrix.rust.version }}
-    - name: Set profile
-      run: rustup set profile minimal
-    - name: Update toolchain
-      run: rustup update
+    - name: Install Rust toolchain
+      uses: actions-rs/toolchain@v1
+      with:
+        toolchain: ${{ matrix.rust.version }}
+        override: true
+        profile: minimal
     - name: Pin dependencies for MSRV
       if: matrix.rust.version == '1.63.0'
       run: |
-        cargo update -p regex --precise "1.7.3"
+        cargo update -p tokio --precise "1.38.1"
+        cargo update -p tokio-util --precise "0.7.11"
         cargo update -p home --precise "0.5.5"
+        cargo update -p regex --precise "1.7.3"
+        cargo update -p security-framework-sys --precise "2.11.1"
     - name: Test
       run: cargo test --features test-hardware-signer
index f122d068fa808b9eaff1288c4ab741523035f4f4..ff52ed41c8597882c755d8ceb0657f084f6100bb 100644 (file)
@@ -16,25 +16,26 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout sources
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
       - name: Setup cache
-        uses: actions/cache@v2
+        uses: actions/cache@v4
         with:
           path: |
             ~/.cargo/registry
             ~/.cargo/git
             target
           key: nightly-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
-      - name: Set default toolchain
-        run: rustup default nightly-2022-12-14
-      - name: Set profile
-        run: rustup set profile minimal
-      - name: Update toolchain
-        run: rustup update
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: nightly
+          override: true
+          components: clippy
+          profile: minimal
       - name: Build docs
         run: cargo rustdoc --verbose --features=compiler,electrum,esplora,use-esplora-blocking,compact_filters,rpc,key-value-db,sqlite,all-keys,verify,hardware-signer -- --cfg docsrs -Dwarnings
       - name: Upload artifact
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v4
         with:
           name: built-docs
           path: ./target/doc/*
@@ -46,7 +47,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout `bitcoindevkit.org`
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
         with:
           ssh-key: ${{ secrets.DOCS_PUSH_SSH_KEY }}
           repository: bitcoindevkit/bitcoindevkit.org
index a2deaaba0e6267a96e85ab49a3f2b7251e5fee50..50f3fd22d27271d7a14c989133c5b7e79f798d64 100644 (file)
@@ -111,7 +111,7 @@ miniscript = { version = "10.0", features = ["std"] }
 bitcoin = { version = "0.30", features = ["std"] }
 lazy_static = "1.4"
 env_logger = { version = "0.7", default-features = false }
-electrsd = "0.24"
+electrsd = "0.24.0"
 assert_matches = "1.5.0"
 
 [[example]]
@@ -130,7 +130,7 @@ path = "examples/policy.rs"
 [[example]]
 name = "rpcwallet"
 path = "examples/rpcwallet.rs"
-required-features = ["keys-bip39", "key-value-db", "rpc", "electrsd/bitcoind_22_0"]
+required-features = ["keys-bip39", "key-value-db", "rpc", "electrsd/bitcoind_23_0"]
 
 [[example]]
 name = "psbt_signer"
index 39a1b8ea5845c4601871085951e282624983db0b..68202814b3f17e2fdc8c7c6cf90c7a584efc423a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -209,6 +209,9 @@ This library should compile with any combination of features with Rust 1.63.0.
 To build with the MSRV you will need to pin dependencies as follows:
 
 ```shell
-cargo update -p regex --precise "1.7.3"
+cargo update -p tokio --precise "1.38.1"
+cargo update -p tokio-util --precise "0.7.11"
 cargo update -p home --precise "0.5.5"
+cargo update -p regex --precise "1.7.3"
+cargo update -p security-framework-sys --precise "2.11.1"
 ```
index af81eb18e39bd976f1de3fcfacfca6f2eabd250d..8aa084c7864a182df4fe7a84ecc57c8c273144d2 100644 (file)
@@ -83,5 +83,5 @@ fn run(network: &Network, electrum_url: &str, xpriv: &str) {
         .map_err(bdk::Error::Generic)
         .unwrap();
 
-    println!("------\nWallet Backup: {}", export.to_string());
+    println!("------\nWallet Backup: {}", export);
 }
index ab5075d12fba28b02287611135e2a0cc32674ebd..27d6e4dbfbea7e67b9065b81eaf65fb1bfac652f 100644 (file)
@@ -114,7 +114,7 @@ pub trait BatchOperations {
 pub trait Database: BatchOperations {
     /// Read and checks the descriptor checksum for a given keychain.
     ///
-    /// Should return [`Error::ChecksumMismatch`](crate::error::Error::ChecksumMismatch) if the
+    /// Should return [`Error::ChecksumMismatch`] if the
     /// checksum doesn't match. If there's no checksum in the database, simply store it for the
     /// next time.
     fn check_descriptor_checksum<B: AsRef<[u8]>>(
index ee81e8e85d2d2da36cffe8bfea36ee3faf549b5f..140f7dfdcea02c31c143decf0a6f8c8e0d9c5905 100644 (file)
@@ -410,7 +410,7 @@ impl<Ctx: ScriptContext> From<bip32::ExtendedPrivKey> for ExtendedKey<Ctx> {
 /// }
 /// ```
 ///
-/// Types that don't internally encode the [`Network`](bitcoin::Network) in which they are valid need some extra
+/// Types that don't internally encode the [`Network`] in which they are valid need some extra
 /// steps to override the set of valid networks, otherwise only the network specified in the
 /// [`ExtendedPrivKey`] or [`ExtendedPubKey`] will be considered valid.
 ///
index 990578743937ab2bf33ddc5291c386bbad6cdecf..16488ac2adadee75b08495a6a480eb99e23df933 100644 (file)
@@ -504,7 +504,7 @@ impl<'a, D: BatchDatabase, Cs: CoinSelectionAlgorithm<D>, Ctx: TxBuilderContext>
 
     /// Choose the coin selection algorithm
     ///
-    /// Overrides the [`DefaultCoinSelectionAlgorithm`](super::coin_selection::DefaultCoinSelectionAlgorithm).
+    /// Overrides the [`DefaultCoinSelectionAlgorithm`].
     ///
     /// Note that this function consumes the builder and returns it so it is usually best to put this as the first call on the builder.
     pub fn coin_selection<P: CoinSelectionAlgorithm<D>>(