Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/0fc-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/cache@v4
with:
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-31.1-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-32.1-${{ runner.os }}-${{ runner.arch }}
- name: Enable caching for electrs
id: cache-electrs
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/cache@v4
with:
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-31.1-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-32.1-${{ runner.os }}-${{ runner.arch }}
- name: Enable caching for electrs
id: cache-electrs
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hrn-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/cache@v4
with:
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-31.1-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-32.1-${{ runner.os }}-${{ runner.arch }}
- name: Enable caching for electrs
id: cache-electrs
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postgres-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: actions/cache@v4
with:
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-31.1-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-32.1-${{ runner.os }}-${{ runner.arch }}
- name: Enable caching for electrs
id: cache-electrs
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
uses: actions/cache@v4
with:
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-31.1-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-32.1-${{ runner.os }}-${{ runner.arch }}
- name: Enable caching for electrs
id: cache-electrs
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vss-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/cache@v4
with:
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-31.1-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-32.1-${{ runner.os }}-${{ runner.arch }}
- name: Enable caching for electrs
id: cache-electrs
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vss-no-auth-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/cache@v4
with:
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-31.1-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-32.1-${{ runner.os }}-${{ runner.arch }}
- name: Enable caching for electrs
id: cache-electrs
uses: actions/cache@v4
Expand Down
6 changes: 3 additions & 3 deletions scripts/download_bitcoind_electrs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ HOST_PLATFORM="$(rustc --version --verbose | grep "host:" | awk '{ print $2 }')"
ELECTRS_DL_ENDPOINT="https://github.com/RCasatta/electrsd/releases/download/electrs_releases"
ELECTRS_VERSION="esplora_a33e97e1a1fc63fa9c20a116bb92579bbf43b254"
BITCOIND_DL_ENDPOINT="https://bitcoincore.org/bin/"
BITCOIND_VERSION="31.1"
BITCOIND_VERSION="32.1"
if [[ "$HOST_PLATFORM" == *linux* ]]; then
ELECTRS_DL_FILE_NAME=electrs_linux_"$ELECTRS_VERSION".zip
ELECTRS_DL_HASH="865e26a96e8df77df01d96f2f569dcf9622fc87a8d99a9b8fe30861a4db9ddf1"
BITCOIND_DL_FILE_NAME=bitcoin-"$BITCOIND_VERSION"-x86_64-linux-gnu.tar.gz
BITCOIND_DL_HASH="b80d9c3e04da78fb6f0569685673418cf686fadba9042d926d13fb87ff503f9e"
BITCOIND_DL_HASH="61545c17c3120fb7412f896d248b11993af04ec8817aad3649c55b2afb044963"
elif [[ "$HOST_PLATFORM" == *darwin* ]]; then
ELECTRS_DL_FILE_NAME=electrs_macos_"$ELECTRS_VERSION".zip
ELECTRS_DL_HASH="2d5ff149e8a2482d3658e9b386830dfc40c8fbd7c175ca7cbac58240a9505bcd"
BITCOIND_DL_FILE_NAME=bitcoin-"$BITCOIND_VERSION"-x86_64-apple-darwin.tar.gz
BITCOIND_DL_HASH="bc506958d0f387c1ea770bdc7c7192a505fa645ff62cabcc7761fa7eb89e867e"
BITCOIND_DL_HASH="53b1e6ffd92843ca82ef4a737d7a53cb0a9fab15816a417a41f12fc954071447"
else
printf "\n\n"
echo "Unsupported platform: $HOST_PLATFORM Exiting.."
Expand Down
2 changes: 1 addition & 1 deletion tests/docker/docker-compose-cln.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
bitcoin:
image: blockstream/bitcoind:31.1
image: blockstream/bitcoind:32.1
platform: linux/amd64
command:
[
Expand Down
2 changes: 1 addition & 1 deletion tests/docker/docker-compose-eclair.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
# causing Eclair to fall behind the chain tip. Host networking avoids
# this by keeping all inter-process communication on localhost.
bitcoin:
image: blockstream/bitcoind:31.1
image: blockstream/bitcoind:32.1
platform: linux/amd64
network_mode: host
command:
Expand Down
4 changes: 2 additions & 2 deletions tests/docker/docker-compose-lnd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
bitcoin:
image: blockstream/bitcoind:31.1
image: blockstream/bitcoind:32.1
platform: linux/amd64
command:
[
Expand Down Expand Up @@ -53,7 +53,7 @@ services:
- bitcoin-electrs

lnd:
image: lightninglabs/lnd:v0.20.1-beta
image: lightninglabs/lnd:v0.21.8-beta
container_name: ldk-node-lnd
depends_on:
bitcoin:
Expand Down
2 changes: 1 addition & 1 deletion tests/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
bitcoin:
image: blockstream/bitcoind:31.1
image: blockstream/bitcoind:32.1
platform: linux/amd64
command:
[
Expand Down
43 changes: 16 additions & 27 deletions tests/integration_tests_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9621,36 +9621,25 @@ async fn open_channel_variants_reserve_funds_for_anchor_peers() {
let (bitcoind, electrsd) = setup_bitcoind_and_electrsd();
let chain_source = random_chain_source(&bitcoind, &electrsd);

let exact_variants = [
OpenChannelVariant::Standard,
OpenChannelVariant::Announced,
OpenChannelVariant::ZeroReserve,
];
let with_all_variants = [
OpenChannelVariant::StandardWithAll,
OpenChannelVariant::AnnouncedWithAll,
OpenChannelVariant::ZeroReserveWithAll,
// Each node pair covers one exact-amount and one all-funds variant, as every node holds
// connections to bitcoind, which only accepts a limited number of HTTP clients.
let variants = [
(OpenChannelVariant::Standard, OpenChannelVariant::StandardWithAll),
(OpenChannelVariant::Announced, OpenChannelVariant::AnnouncedWithAll),
(OpenChannelVariant::ZeroReserve, OpenChannelVariant::ZeroReserveWithAll),
];

let premine_amount_sat = 1_000_000;
let exact_channel_amount_sat = premine_amount_sat - 10_000;
let anchor_reserve_sat = 25_000;

let mut addresses = Vec::new();
let mut exact_cases = Vec::new();
for variant in exact_variants {
let mut cases = Vec::new();
for (exact_variant, with_all_variant) in variants {
let (node_a, node_b) = setup_two_nodes(&chain_source, false, false);
addresses.push(node_a.onchain_payment().new_address().unwrap());
addresses.push(node_b.onchain_payment().new_address().unwrap());
exact_cases.push((variant, node_a, node_b));
}

let mut with_all_cases = Vec::new();
for variant in with_all_variants {
let (node_a, node_b) = setup_two_nodes(&chain_source, false, false);
addresses.push(node_a.onchain_payment().new_address().unwrap());
addresses.push(node_b.onchain_payment().new_address().unwrap());
with_all_cases.push((variant, node_a, node_b));
cases.push((exact_variant, with_all_variant, node_a, node_b));
}

premine_and_distribute_funds(
Expand All @@ -9661,26 +9650,26 @@ async fn open_channel_variants_reserve_funds_for_anchor_peers() {
)
.await;

for (_, node_a, node_b) in exact_cases.iter().chain(with_all_cases.iter()) {
for (_, _, node_a, node_b) in cases.iter() {
node_a.sync_wallets().unwrap();
node_b.sync_wallets().unwrap();
assert_eq!(node_a.list_balances().spendable_onchain_balance_sats, premine_amount_sat);
assert_eq!(node_b.list_balances().spendable_onchain_balance_sats, premine_amount_sat);
}

for (variant, node_a, node_b) in exact_cases {
for (exact_variant, _, node_a, node_b) in cases.iter() {
assert_eq!(
Err(NodeError::InsufficientFunds),
open_channel_variant(variant, &node_a, &node_b, exact_channel_amount_sat),
open_channel_variant(*exact_variant, node_a, node_b, exact_channel_amount_sat),
"{} should require funds for the channel amount plus anchor reserve",
variant.label()
exact_variant.label()
);
node_a.stop().unwrap();
node_b.stop().unwrap();
assert!(node_a.list_channels().is_empty());
assert_eq!(node_a.list_balances().spendable_onchain_balance_sats, premine_amount_sat);
}

let mut opened_with_all_cases = Vec::new();
for (variant, node_a, node_b) in with_all_cases {
for (_, variant, node_a, node_b) in cases {
open_channel_variant(variant, &node_a, &node_b, 0)
.unwrap_or_else(|e| panic!("{} failed: {e:?}", variant.label()));

Expand Down
Loading