From e325bc2f4cfb506d6c284fe42e5fb9935b35d565 Mon Sep 17 00:00:00 2001 From: Gaurav Chaudhary Date: Tue, 28 Jul 2026 20:50:58 +0530 Subject: [PATCH] Added support for Bitcoin Core 31.1 Signed-off-by: Gaurav Chaudhary --- .github/workflows/rust.yaml | 1 + Cargo.toml | 1 + bitcoind/Cargo.toml | 3 ++- bitcoind/sha256/bitcoin-core-31.1-SHA256SUMS | 28 ++++++++++++++++++++ bitcoind/src/versions.rs | 6 ++++- client/src/client_sync/v31/mod.rs | 2 +- integration_test/Cargo.toml | 3 ++- integration_test/README.md | 1 + 8 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 bitcoind/sha256/bitcoin-core-31.1-SHA256SUMS diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index c945506b3..3f8f565bd 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -130,6 +130,7 @@ jobs: matrix: version: [ + "31_1", "31_0", "30_2", # No `30_0` or `30_1` because of wallet migration bug. diff --git a/Cargo.toml b/Cargo.toml index 948eb4914..d8615fddd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ stable = "1.94.1" [workspace.metadata.rbmt.integration] package = "integration-test" versions = [ + "31_1", "31_0", "30_2", "30_0", diff --git a/bitcoind/Cargo.toml b/bitcoind/Cargo.toml index 555e9c321..25184852c 100644 --- a/bitcoind/Cargo.toml +++ b/bitcoind/Cargo.toml @@ -42,11 +42,12 @@ zip = { version = "0.6.6", default-features = false, features = ["bzip2", "defla # - `cargo test --no-default-features` does not build, you MUST enable a version feature. [features] default = ["0_17_2"] -latest = ["31_0"] +latest = ["31_1"] download = ["anyhow", "bitcoin_hashes", "flate2", "tar", "bitreq", "zip"] # We support all minor releases of the latest three versions. +31_1 = ["31_0"] 31_0 = ["30_2"] 30_2 = ["29_0"] # No `30_0` or `30_1` because of wallet migration bug. diff --git a/bitcoind/sha256/bitcoin-core-31.1-SHA256SUMS b/bitcoind/sha256/bitcoin-core-31.1-SHA256SUMS new file mode 100644 index 000000000..c5b2c41c5 --- /dev/null +++ b/bitcoind/sha256/bitcoin-core-31.1-SHA256SUMS @@ -0,0 +1,28 @@ +e99a0a897815d23b456509aef01b183b79b3d3fe4e7086642f49f409444c3d33 bitcoin-31.1-aarch64-linux-gnu-debug.tar.gz +dcf1873f2208ba4f962f3398d47e154c39c0084be8f4553e05c940d0ace3d004 bitcoin-31.1-aarch64-linux-gnu.tar.gz +094dfd2c7e93b1abb021c428aff0cdffd5a3f9607e39db0204b45c37633dc77b bitcoin-31.1-arm-linux-gnueabihf-debug.tar.gz +66b2b45359efa161031a49898f96aa7cf1455db46ca6102acd16a7197dc3b96f bitcoin-31.1-arm-linux-gnueabihf.tar.gz +16a097c09fbd7eb78b240ce1dae123663ea2e5e377cfd6a951e71e227e23cf2f bitcoin-31.1-arm64-apple-darwin.tar.gz +f6e7c185c4b81d5f53fb7471a438f58cc1b55c10c407095afef340e03289b504 bitcoin-31.1-arm64-apple-darwin.zip +27a6a590570011771318ff9530f75ac073a9a031a6eff102fb94d9f0ed9d1785 bitcoin-31.1-arm64-apple-darwin-codesigning.tar.gz +a0ded7d1146d7fa6e8f4d1dc2567192bbfc27bf7f772809655470747e964942d bitcoin-31.1-arm64-apple-darwin-unsigned.tar.gz +799e66a08a1b488d1dd21c0a3f57ca6333ccae33fa72cfc0554b855ae5c5593e bitcoin-31.1-arm64-apple-darwin-unsigned.zip +aaf63d66df3841036d487835460f84ce51af06612a74fd1b388ae9dd9d3e293b bitcoin-31.1-codesignatures-31.1.tar.gz +50411d5b43c7e4c90099394759eb6c2add6e7c2dbe728840893d638b6fc6afc9 bitcoin-31.1.tar.gz +1091c04d800f6ff56973458144332095eb46aba9558be270ca6f8ac13c5e2dd8 bitcoin-31.1-powerpc64-linux-gnu-debug.tar.gz +f81dd017a551c5af7fa2d6fa67b885077a8353322a8019e8fd538366bae1eff7 bitcoin-31.1-powerpc64-linux-gnu.tar.gz +709312b965c4068b0aa965f658b81ed0f0d7904daeb4b96d5269894b22615051 bitcoin-31.1-riscv64-linux-gnu-debug.tar.gz +8a9213348a111438472653b8bd46c12184c60cc35ce0c2af02b853de4297cf94 bitcoin-31.1-riscv64-linux-gnu.tar.gz +bc506958d0f387c1ea770bdc7c7192a505fa645ff62cabcc7761fa7eb89e867e bitcoin-31.1-x86_64-apple-darwin.tar.gz +4715aaf04731eab1406f3b92977668a2ae191299f9bacb06b4f95f170fbaac2b bitcoin-31.1-x86_64-apple-darwin.zip +0157d4110ae9e6bc4e854ee7e6dfefe34c17f8c29a5083b7a92d6a89e80c4823 bitcoin-31.1-x86_64-apple-darwin-codesigning.tar.gz +b3c2804fb9e5bee281d7fb2851696eda9291f7774855681e670b2b98c2ea1316 bitcoin-31.1-x86_64-apple-darwin-unsigned.tar.gz +8e2288dee080ed78d1e0ff55f3b0b9c057605e9ee7eb9caca139f4b8b46373b2 bitcoin-31.1-x86_64-apple-darwin-unsigned.zip +63a1cee7ba8d01408d647b7e7af4de7e05d8cbaff9ad11ccf7dd3e3e5d994020 bitcoin-31.1-x86_64-linux-gnu-debug.tar.gz +b80d9c3e04da78fb6f0569685673418cf686fadba9042d926d13fb87ff503f9e bitcoin-31.1-x86_64-linux-gnu.tar.gz +d0c6d0f3cd08689472a6f53c4ce33a5f059c092758c32c42541b47db4e193458 bitcoin-31.1-win64-setup.exe +c99ef173471c58e6766d9eebd12e6c35349082eeed3939bc99eed58ef57db587 bitcoin-31.1-win64.zip +ea96df42d6165d70c0323beda8b17920c627508b9a6dc6d80ab1a5f318046d36 bitcoin-31.1-win64-codesigning.tar.gz +74ba21883268371a9560992f82f5e193e55f074ce1e2346259a9a4bf155a4e98 bitcoin-31.1-win64-debug.zip +a8b6c8f738881bf5503a84581b418f22fdeba2dfae4912e11b95c083e481d704 bitcoin-31.1-win64-setup-unsigned.exe +a80ea8ec9e2e69cb29b4dd4bea0a04bf9c3183a08295f6ed1d204356526bd3ba bitcoin-31.1-win64-unsigned.zip diff --git a/bitcoind/src/versions.rs b/bitcoind/src/versions.rs index 4a08d91ab..035e88e94 100644 --- a/bitcoind/src/versions.rs +++ b/bitcoind/src/versions.rs @@ -3,7 +3,11 @@ #[cfg(not(feature = "0_17_2"))] // Remember: later version features enable earlier ones. compile_error!("enable a feature in order to select the version of Bitcoin Core to use"); -#[cfg(feature = "31_0")] +#[cfg(feature = "31_1")] +#[allow(dead_code)] // Triggers in --all-features builds. +pub const VERSION: &str = "31.1"; + +#[cfg(all(feature = "31_0", not(feature = "31_1")))] #[allow(dead_code)] // Triggers in --all-features builds. pub const VERSION: &str = "31.0"; diff --git a/client/src/client_sync/v31/mod.rs b/client/src/client_sync/v31/mod.rs index 3501f922e..d41cd988b 100644 --- a/client/src/client_sync/v31/mod.rs +++ b/client/src/client_sync/v31/mod.rs @@ -29,7 +29,7 @@ pub use crate::client_sync::{ }; crate::define_jsonrpc_bitreq_client!("v31"); -crate::impl_client_check_expected_server_version!({ [310000] }); +crate::impl_client_check_expected_server_version!({ [310000, 310100] }); // == Blockchain == crate::impl_client_v29__dump_tx_out_set!(); diff --git a/integration_test/Cargo.toml b/integration_test/Cargo.toml index c9e1ee1a8..41d2cfc69 100644 --- a/integration_test/Cargo.toml +++ b/integration_test/Cargo.toml @@ -13,10 +13,11 @@ edition = "2021" [features] download = ["bitcoind/download"] -latest = ["31_0"] +latest = ["31_1"] # Enable the same feature in `bitcoind` and the version feature here. # All minor releases of the latest three versions. +31_1 = ["v31_and_below", "bitcoind/31_1"] 31_0 = ["v31_and_below", "bitcoind/31_0"] 30_2 = ["v30_and_below", "bitcoind/30_2"] # No `30_0` or `30_1` because of wallet migration bug. diff --git a/integration_test/README.md b/integration_test/README.md index 513daab50..5c0f03199 100644 --- a/integration_test/README.md +++ b/integration_test/README.md @@ -32,6 +32,7 @@ alias test27='BITCOIND_EXE=/opt/bitcoin-27.2/bin/bitcoind cargo test --features= alias test28='BITCOIND_EXE=/opt/bitcoin-28.2/bin/bitcoind cargo test --features=28_2' alias test29='BITCOIND_EXE=/opt/bitcoin-29.0/bin/bitcoind cargo test --features=29_0' alias test30='BITCOIND_EXE=/opt/bitcoin-30.2/bin/bitcoind cargo test --features=30_2' +alias test311='BITCOIND_EXE=/opt/bitcoin-31.1/bin/bitcoind cargo test --features=31_1' alias test31='BITCOIND_EXE=/opt/bitcoin-31.0/bin/bitcoind cargo test --features=31_0' ```