Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e62de06
Do not add type `UnilateralClose` to payment store
tankyleo Jul 10, 2026
283e328
Use a vec of length 1 to broadcast unrelated txs
tankyleo May 27, 2026
0b1594a
Fix anchor reserves when splicing in all funds
tankyleo Jun 27, 2026
31aaba9
f: DRY with check_sufficient_funds_for_channel
tankyleo Jul 13, 2026
d230d93
Reserve onchain funds for anchor channels when peer sets them optional
tankyleo Jun 26, 2026
1ee8883
f: Avoid log assertion in LSPS2 reserve test
tankyleo Jul 14, 2026
59e5ec9
Remove the ability to disable anchor channels
tankyleo Jun 30, 2026
3ae4384
f: Add pending changelog API note
tankyleo Jul 14, 2026
7778dfc
Use a patched blockstream-electrs in CI
tankyleo May 28, 2026
7fbfecb
Switch cln lnd and eclair interop tests to esplora
tankyleo Jun 24, 2026
097f9ba
Bump Bitcoin Core version used in kotlin and python tests
tankyleo Jun 24, 2026
cba213e
Add configuration knob to enable 0FC channels
tankyleo May 28, 2026
77af309
f: fix broken doc link
tankyleo Jul 14, 2026
534a47c
f: expand docs of the 0FC knob
tankyleo Jul 14, 2026
1c0cef8
f: move 0fc support required to own variable
tankyleo Jul 14, 2026
f0b2bc3
f: split 0fc checks into more bools
tankyleo Jul 14, 2026
034779c
Remove single transaction vecs in wallet broadcast path
tankyleo Jul 13, 2026
80e2d0b
Sort packages received via `BroadcasterInterface`
tankyleo May 27, 2026
f33ea14
f: remove a collect call in into_sorted_transactions
tankyleo Jul 13, 2026
700d3ba
Use helper functions to log broadcast errors
tankyleo Jun 25, 2026
56afedd
f: use slice::from_ref to clean up electrum
tankyleo Jul 13, 2026
e889370
Submit TRUC packages via all chain sources
tankyleo Jun 25, 2026
d8313f0
Read even bits to check the anchor channel type
tankyleo Jun 29, 2026
9ab37b5
Include 0FC channels in anchor channel checks
tankyleo Oct 29, 2025
5f0c38f
Negotiate 0FC channels if configured
tankyleo Jul 1, 2026
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
13 changes: 9 additions & 4 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ jobs:
uses: actions/cache@v4
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind/electrs
if: "(steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
key: electrs-submit-package-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind
if: "steps.cache-bitcoind.outputs.cache-hit != 'true'"
run: |
source ./scripts/download_bitcoind_electrs.sh
source ./scripts/download_bitcoind.sh
mkdir -p bin
mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
- name: Download electrs
if: "steps.cache-electrs.outputs.cache-hit != 'true'"
run: |
source ./scripts/build_electrs.sh
mkdir -p bin
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
- name: Set bitcoind/electrs environment variables
run: |
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/hrn-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,18 @@ jobs:
uses: actions/cache@v4
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind/electrs
if: "steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true'"
key: electrs-submit-package-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind
if: "steps.cache-bitcoind.outputs.cache-hit != 'true'"
run: |
source ./scripts/download_bitcoind_electrs.sh
source ./scripts/download_bitcoind.sh
mkdir -p bin
mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
- name: Download electrs
if: "steps.cache-electrs.outputs.cache-hit != 'true'"
run: |
source ./scripts/build_electrs.sh
mkdir -p bin
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
- name: Set bitcoind/electrs environment variables
run: |
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/postgres-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,18 @@ jobs:
uses: actions/cache@v4
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-esplora_a33e97e1-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind/electrs
if: "steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true'"
key: electrs-submit-package-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind
if: "steps.cache-bitcoind.outputs.cache-hit != 'true'"
run: |
source ./scripts/download_bitcoind_electrs.sh
source ./scripts/download_bitcoind.sh
mkdir -p bin
mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
- name: Download electrs
if: "steps.cache-electrs.outputs.cache-hit != 'true'"
run: |
source ./scripts/build_electrs.sh
mkdir -p bin
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
- name: Set bitcoind/electrs environment variables
run: |
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,30 @@ jobs:
uses: actions/cache@v4
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind/electrs
if: "matrix.platform != 'windows-latest' && (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
key: electrs-submit-package-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind
if: "matrix.platform != 'windows-latest' && steps.cache-bitcoind.outputs.cache-hit != 'true'"
run: |
source ./scripts/download_bitcoind_electrs.sh
source ./scripts/download_bitcoind.sh
mkdir -p bin
mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
- name: Download electrs
if: "matrix.platform != 'windows-latest' && steps.cache-electrs.outputs.cache-hit != 'true'"
run: |
source ./scripts/build_electrs.sh
mkdir -p bin
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
- name: Set bitcoind/electrs environment variables
run: |
echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- name: Build on Rust ${{ matrix.toolchain }}
run: cargo build --verbose --color always
run: |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we add cargo cleans? won't that screw up the cache?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hitting a "disk space exhausted error" on that job in CI, wanted to see if this helps, at the cost of individual CI taking longer yes. cargo build and cargo test seem to rebuild from scratch, no shared artifacts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I presume this is because we are building electrs in CI. Since its cached now, can you remove the cargo cleans? Maybe just put a clean after you upload the electrs binary

cargo build --verbose --color always
- name: Build with UniFFI support on Rust ${{ matrix.toolchain }}
if: matrix.build-uniffi
run: cargo build --features uniffi --verbose --color always
run: |
cargo build --features uniffi --verbose --color always
- name: Check release build on Rust ${{ matrix.toolchain }}
run: cargo check --release --verbose --color always
- name: Check release build with UniFFI support on Rust ${{ matrix.toolchain }}
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/vss-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ jobs:
uses: actions/checkout@v6
with:
path: ldk-node
- name: Enable caching for electrs
id: cache-electrs
uses: actions/cache@v5
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-submit-package-${{ runner.os }}-${{ runner.arch }}
- name: Download electrs
if: "steps.cache-electrs.outputs.cache-hit != 'true'"
run: |
source ./ldk-node/scripts/build_electrs.sh
mkdir -p bin
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
- name: Set electrs environment variable
run: |
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- name: Checkout VSS
uses: actions/checkout@v6
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/vss-no-auth-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ jobs:
uses: actions/checkout@v6
with:
path: ldk-node
- name: Enable caching for electrs
id: cache-electrs
uses: actions/cache@v5
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-submit-package-${{ runner.os }}-${{ runner.arch }}
- name: Download electrs
if: "steps.cache-electrs.outputs.cache-hit != 'true'"
run: |
source ./ldk-node/scripts/build_electrs.sh
mkdir -p bin
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
- name: Set electrs environment variable
run: |
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- name: Checkout VSS
uses: actions/checkout@v6
with:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- `EsploraSyncConfig` and `ElectrumSyncConfig` now support `force_wallet_full_scan`. When set,
the on-chain wallet keeps using BDK `full_scan` instead of incremental sync until a full scan
succeeds, allowing restored wallets to rediscover funds sent to previously-unknown addresses.
- `Config::anchor_channels_config` is no longer optional, hence anchor channels can no longer be
disabled. We still negotiate legacy channels if the peer does not support anchor channels.

## Bug Fixes and Improvements
- Building a fresh node against a Bitcoin Core RPC or REST chain source that fails to return the
Expand Down
9 changes: 2 additions & 7 deletions benches/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,8 @@ fn payment_benchmark(c: &mut Criterion) {
let (bitcoind, electrsd) = setup_bitcoind_and_electrsd();
let chain_source = random_chain_source(&bitcoind, &electrsd);

let (node_a, node_b) = setup_two_nodes_with_store(
&chain_source,
false,
true,
false,
common::TestStoreType::Sqlite,
);
let (node_a, node_b) =
setup_two_nodes_with_store(&chain_source, false, false, common::TestStoreType::Sqlite);

let runtime =
tokio::runtime::Builder::new_multi_thread().worker_threads(4).enable_all().build().unwrap();
Expand Down
1 change: 1 addition & 0 deletions bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ enum NodeError {
"LnurlAuthFailed",
"LnurlAuthTimeout",
"InvalidLnurl",
"ChainSourceNotSupported",
};

typedef dictionary NodeStatus;
Expand Down
35 changes: 35 additions & 0 deletions scripts/build_electrs.sh

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you expand on why this needs to be a separate script now? Why not keep using the old script that sets up both bitcoind and electrs?

@tankyleo tankyleo Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex:

 On your main question: a separate build_electrs.sh file is not strictly necessary, but a separate electrs execution path is. The old combined script plus this condition:

  cache-bitcoind miss || cache-electrs miss

  would always build/download both artifacts when either cache missed. The current split fixes that: download_bitcoind.sh only runs on a bitcoind miss, and build_electrs.sh only runs on an electrs miss.

  So I_d keep the logical split. If you dislike the extra file, the equivalent would be one script with subcommands, e.g. scripts/setup_ci_binary.sh bitcoind and scripts/setup_ci_binary.sh electrs. I would not go back to one
  combined script invoked by the OR condition.

This matches my original intention when I first created this standalone script for the expensive electrs build step.

It looks like we want to avoid building the binary ourselves anyway for easier local development, so I will likely be able to consolidate things again once a binary that supports submitpackage on electrum is served somewhere.

@tnull tnull Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches my original intention when I first created this standalone script for the expensive electrs build step.

Okay, yeah, not too strong of an opinion.

It looks like we want to avoid building the binary ourselves anyway for easier local development, so I will likely be able to consolidate things again once a binary that supports submitpackage on electrum is served somewhere.

Well, given how close this PR is it would be nice to land it for 0.8 still, and not wait indefinitely. Hmm, given that the Forgejo migration is already around the corner, further CI changes will be necessary anyways soon. Maybe we could at least provide a convenience wrapper script here, that sets up bitcoind/electrsd and runs the tests? Or even better just do #660 (comment), i.e., leave the current test setup as is and only test 0fc in a separate new file and workflow, so we don't require the custom electrs for all local tests?

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
Comment thread
benthecarman marked this conversation as resolved.
set -eox pipefail

# Our Esplora-based tests require `electrs` binaries. Here, we
# download the code, build the binaries, and export their location
# via `ELECTRS_EXE` which will be used by the `electrsd` crates in
# our tests.

HOST_PLATFORM="$(rustc --version --verbose | grep "host:" | awk '{ print $2 }')"
ELECTRS_GIT_REPO="https://github.com/tankyleo/blockstream-electrs.git"
ELECTRS_TAG="2026-05-26-electrum-submit-package"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do this, we should use a specific commit revision, not point to a general branch.

@tankyleo tankyleo Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is indeed my intention, and I believe the script currently does this.

See the tag here: https://github.com/tankyleo/blockstream-electrs/releases/tag/2026-05-26-electrum-submit-package

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, I took 2026-05-26-electrum-submit-package to be a branch name, not a tag. Would still be good to pin the specific revision hash here rather than a tag.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done below, the tag remains useful to do a git checkout --depth 1 --branch <tag_name>

ELECTRS_REV="8c06d8010e43f793b1a65f83695ea846e5cd83ed"
if [[ "$HOST_PLATFORM" != *linux* && "$HOST_PLATFORM" != *darwin* ]]; then
printf "\n\n"
echo "Unsupported platform: $HOST_PLATFORM Exiting.."
exit 1
fi

DL_TMP_DIR=$(mktemp -d)
trap 'rm -rf -- "$DL_TMP_DIR"' EXIT

pushd "$DL_TMP_DIR"
git clone --branch "$ELECTRS_TAG" --depth 1 "$ELECTRS_GIT_REPO" blockstream-electrs
cd blockstream-electrs
CURRENT_HEAD=$(git rev-parse HEAD)
if [ "$CURRENT_HEAD" != "$ELECTRS_REV" ]; then
echo "ERROR: HEAD does not match expected commit"
echo "expected: $ELECTRS_REV"
echo "actual: $CURRENT_HEAD"
exit 1
fi
RUSTFLAGS="" cargo build
export ELECTRS_EXE="$DL_TMP_DIR"/blockstream-electrs/target/debug/electrs
chmod +x "$ELECTRS_EXE"
popd
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
#!/bin/bash
set -eox pipefail

# Our Esplora-based tests require `electrs` and `bitcoind`
# binaries. Here, we download the binaries, validate them, and export their
# location via `ELECTRS_EXE`/`BITCOIND_EXE` which will be used by the
# `electrsd`/`bitcoind` crates in our tests.
# Our Esplora-based tests require `bitcoind` binaries. Here, we
# download the binaries, validate them, and export their location
# via `BITCOIND_EXE` which will be used by the `bitcoind` crates
# in our tests.

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="29.0"
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="a681e4f6ce524c338a105f214613605bac6c33d58c31dc5135bbc02bc458bb6c"
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="5bb824fc86a15318d6a83a1b821ff4cd4b3d3d0e1ec3d162b805ccf7cae6fca8"
else
Expand All @@ -31,13 +25,6 @@ DL_TMP_DIR=$(mktemp -d)
trap 'rm -rf -- "$DL_TMP_DIR"' EXIT

pushd "$DL_TMP_DIR"
ELECTRS_DL_URL="$ELECTRS_DL_ENDPOINT"/"$ELECTRS_DL_FILE_NAME"
curl -L -o "$ELECTRS_DL_FILE_NAME" "$ELECTRS_DL_URL"
echo "$ELECTRS_DL_HASH $ELECTRS_DL_FILE_NAME"|shasum -a 256 -c
unzip "$ELECTRS_DL_FILE_NAME"
export ELECTRS_EXE="$DL_TMP_DIR"/electrs
chmod +x "$ELECTRS_EXE"

BITCOIND_DL_URL="$BITCOIND_DL_ENDPOINT"/bitcoin-core-"$BITCOIND_VERSION"/"$BITCOIND_DL_FILE_NAME"
curl -L -o "$BITCOIND_DL_FILE_NAME" "$BITCOIND_DL_URL"
echo "$BITCOIND_DL_HASH $BITCOIND_DL_FILE_NAME"|shasum -a 256 -c
Expand Down
Loading
Loading