Skip to content

Import electrsd and rename corepc-node back to bitcoind#542

Merged
tcharding merged 12 commits intorust-bitcoin:masterfrom
tcharding:push-zmvsryxpluvy
Apr 15, 2026
Merged

Import electrsd and rename corepc-node back to bitcoind#542
tcharding merged 12 commits intorust-bitcoin:masterfrom
tcharding:push-zmvsryxpluvy

Conversation

@tcharding
Copy link
Copy Markdown
Member

@tcharding tcharding commented Apr 8, 2026

Just so its clear. Here we import electrsd and bump the version so we can release it. We also re-name corepc-node back to the original name bitcoind and bump the version so it can be released also.

Tested with cargo publish -p bitcoind --dry-run

This is another attempt at #403. That one was so long ago I'm keeping it for the record and opening a new one.

This was done while electrsd is at commit: d2fd8af upgrade electrs esplora. The full commit hash is in the git log.

@tcharding
Copy link
Copy Markdown
Member Author

This will need #541 before electrsd can be released.

@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Apr 8, 2026

cc @RCasatta when you have time please mate (after I get CI green though). Needs explicit concept ACK too please same as on the old one (#403).

Are you ok to do the releases of electrsd and bitcoind if/when this merges?

Copy link
Copy Markdown
Collaborator

@RCasatta RCasatta left a comment

Choose a reason for hiding this comment

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

Concept ACK a8e89e4

@tcharding About the publishing, note you are already an owner of electrsd on crates.io and I sent you an invite for bitcoind , so you can also publish

Copy link
Copy Markdown
Collaborator

@jamillambert jamillambert left a comment

Choose a reason for hiding this comment

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

I had a look and got it to pass CI with the below fixes and then updating the lock files.

justfile:9 and contrib/update-lock-files.sh:13 replace node with bitcoind
integration_test/tests/signer.rs:72 and bitcoind/README.md:31 replace Node with BitcoinD

In .github/workflows/rust.yaml

  • Replace all cases of corepc-node with bitcoind
  • AI fix for test-electrs-no-download error (the Install LLVM and Clang bit):
  test-electrs-no-download:
    name: Test Electrs no auto-download features
    runs-on: ubuntu-24.04
    env:
      CARGO_TERM_COLOR: always
      ELECTRS_EXEC: "/home/runner/.cargo-install/electrs/bin/electrs"
    steps:
      - uses: dtolnay/rust-toolchain@stable
      - name: Install LLVM and Clang
        run: |
          sudo apt-get update -y
          sudo apt-get install -y clang libclang-dev llvm-dev

          llvm_config="$(command -v llvm-config || true)"
          if [[ -z "$llvm_config" ]]; then
            llvm_config="$(command -v llvm-config-18 || true)"
          fi

          if [[ -z "$llvm_config" ]]; then
            echo "llvm-config not found after installing LLVM packages" >&2
            exit 1
          fi

          echo "LLVM_CONFIG_PATH=$llvm_config" >> "$GITHUB_ENV"
          echo "LIBCLANG_PATH=$($llvm_config --libdir)" >> "$GITHUB_ENV"
      - name: Install electrs
        # Automatically cache installed binaries to avoid compiling them each run
        uses: baptiste0928/cargo-install@v2
        with:
          crate: electrs
      - run: "echo $ELECTRS_EXEC"
      - name: Checkout Crate
        uses: actions/checkout@v3
      - uses: Swatinem/rust-cache@v2
      - run: cd electrsd && cargo test --features 'bitcoind_25_2'

@tcharding
Copy link
Copy Markdown
Member Author

About the publishing, note you are already an owner of electrsd on crates.io and I sent you an invite for bitcoind , so you can also publish

Accepted, cheers. Would you like me to wait for you to ack release tracking PRs or are you ok for me and @jamillambert to just hack wildly and handle what we can?

@tcharding tcharding force-pushed the push-zmvsryxpluvy branch 5 times, most recently from 12ff84b to f68d6ec Compare April 10, 2026 02:16
This repository already has `corepc-node` (formerly `bitcoind`) for
integration testing. BDK users do integration testing with `electrsd`
as well and the two crates are coupled but during migration of
`bitcoind` here I did not realise this. In an attempt to remedy this
mistake import `electrsd` here as well. Next we will revert the name
change of `corepc-node` back to `bitcoind`.

Details of import:

repository: https://github.com/RCasatta/electrsd
commit: `d2fd8af upgrade electrs esplora`
full hash: d2fd8afc3b5b79304dd669250df325a54024f374

Import excludes the `.git` and `.github` directories. Which means git
history and CI. CI will be re-added manually.

Note crate is excluded from the workspace in this patch.
`corepc-node` and `corepc-client` `v0.12.0` were just released, use
them. While we are at it use `path` dependency.
Copy the CI jobs from the old `electrsd` repository. Modify the calls
to `cargo` to first `cd electsd`.

This is a dirty hack but we have a re-write of CI to use `cargo rbmt`
in flight anyways.
Add a feature to use `node` Core 30.2 support.
When the `corepc-` nomenclature was adopted we renamed `bitcoind` to
`corepc-node` (and the main type from `BitcoinD` to `Node`). In
hindsight this was a bad move because it broke the API uniformity
between `bitcoind` and `electrsd` and hurt users that used both.

Revert the name changes back to `bitcoind` and `BitcoinD`.

While we are at it bump the version number to `0.37.0` ready for
release.
We use `path =` in all the manifests to pick up local deps. No need
for the `patch` section anymore.
In preparation for release bump the version. FWIW the version of
`bitcoind` has already been bumped to `0.37.0` also.
For `electrs` to build in CI it needs a `contrib` directory.
No code changes required. Just document it in the manifest. This is
the same MSRV as the rest of the repository.

Includes usage of `bitreq` instead of `minreq` because `bitreq` is on
the same MSRV (and it lives in this repo). FTR `bitreq` is our fork of
`minreq`.
Install LLVM and Clang as suggested by an LLM.
@tcharding tcharding changed the title Import electrsd crate Import electrsd and rename corepc-node back to bitcoind Apr 15, 2026
@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Apr 15, 2026

Want to review and sanity check this pls @jamillambert. Holla at me if there is anything going on that you don't understand. After this merges we can release electrsd and bitcoind then update the README of corepc-node to explain the rename so it shows up on crates.io (we can do this in a point release).

If you could have a little look around to see I didn't miss any mentions of corepc-node that would be super useful to please. I did leave all local varibles to be let node = ..., since bitcoind is a node still it seems ok.

@jamillambert jamillambert requested a review from Copilot April 15, 2026 08:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR brings the electrsd crate into the repository and reverts the corepc-node crate rename back to bitcoind, updating internal integration tests, scripts, and CI to match the new crate name and release versions.

Changes:

  • Rename corepc-node crate to bitcoind (and Node type to BitcoinD), update integration tests and tooling references accordingly.
  • Import electrsd crate (including build-time auto-download support and CI coverage).
  • Update workspace membership/excludes and refresh minimal/recent lockfiles for release prep.

Reviewed changes

Copilot reviewed 30 out of 68 changed files in this pull request and generated no comments.

Show a summary per file
File Description
justfile Update scripted “specific features” crate list to use bitcoind instead of node.
contrib/update-lock-files.sh Update lockfile update script to reference bitcoind crate.
integration_test/Cargo.toml Switch dependency/features from corepc-node to bitcoind; remove patch overrides.
integration_test/src/lib.rs Re-export BitcoinD and rename extension trait from NodeExt to BitcoinDExt.
integration_test/tests/zmq.rs Update test imports and constructors to BitcoinD/bitcoind.
integration_test/tests/util.rs Update test imports and constructors to BitcoinD/bitcoind.
integration_test/tests/signer.rs Update test imports and constructors to BitcoinD/bitcoind.
integration_test/tests/raw_transactions.rs Update test imports and helper signatures to BitcoinD/bitcoind.
integration_test/tests/network.rs Update test imports and constructors to BitcoinD/bitcoind.
integration_test/tests/mining.rs Update test imports and helper signatures to BitcoinD/bitcoind.
integration_test/tests/hidden.rs Update test imports and constructors to BitcoinD/bitcoind.
integration_test/tests/generating.rs Update test imports and constructors to BitcoinD/bitcoind.
integration_test/tests/control.rs Update test imports and constructors to BitcoinD/bitcoind.
integration_test/tests/blockchain.rs Update test imports and constructors to BitcoinD/bitcoind.
electrsd/Cargo.toml Add imported electrsd crate manifest with features for electrs/bitcoind version selection.
electrsd/README.md Add imported electrsd documentation.
electrsd/LICENSE Add electrsd license file.
electrsd/build.rs Add build-script logic for optional binary download/verification.
electrsd/sha256 Add expected SHA256 list for electrs binaries.
electrsd/contrib/test_vars.sh Add imported test-vars helper for electrsd.
electrsd/src/lib.rs Add main electrsd implementation to spawn/manage electrs + client wiring.
electrsd/src/ext.rs Add helper “wait” utilities for electrs indexing.
electrsd/src/error.rs Add electrsd error type.
electrsd/src/versions.rs Add feature-based electrs version naming logic.
bitcoind/Cargo.toml Rename crate to bitcoind, bump version, and adjust metadata.
bitcoind/README.md Update bitcoind crate README references (partial).
bitcoind/LICENSE Add/refresh license file for bitcoind crate directory.
bitcoind/CHANGELOG.md Add changelog file for the renamed crate.
bitcoind/build.rs Add build-script logic for optional Bitcoin Core binary download/verification.
bitcoind/contrib/test_vars.sh Add per-crate test-vars helper for bitcoind.
bitcoind/contrib/extra_tests.sh Add per-crate extra test runner for version matrix.
bitcoind/src/versions.rs Add compile-time version selection via crate features.
bitcoind/src/client_versions.rs Add version-gated re-exports of client + versioned JSON types (vtype).
bitcoind/src/lib.rs Rename Node to BitcoinD and update public API/docs/tests accordingly.
bitcoind/sha256/bitcoin-core-30.2-SHA256SUMS Add checksum list for Core 30.2 downloads.
bitcoind/sha256/bitcoin-core-30.0-SHA256SUMS Add checksum list for Core 30.0 downloads.
bitcoind/sha256/bitcoin-core-29.0-SHA256SUMS Add checksum list for Core 29.0 downloads.
bitcoind/sha256/bitcoin-core-28.2-SHA256SUMS Add checksum list for Core 28.2 downloads.
bitcoind/sha256/bitcoin-core-28.1-SHA256SUMS Add checksum list for Core 28.1 downloads.
bitcoind/sha256/bitcoin-core-28.0-SHA256SUMS Add checksum list for Core 28.0 downloads.
bitcoind/sha256/bitcoin-core-27.2-SHA256SUMS Add checksum list for Core 27.2 downloads.
bitcoind/sha256/bitcoin-core-27.1-SHA256SUMS Add checksum list for Core 27.1 downloads.
bitcoind/sha256/bitcoin-core-27.0-SHA256SUMS Add checksum list for Core 27.0 downloads.
bitcoind/sha256/bitcoin-core-26.2-SHA256SUMS Add checksum list for Core 26.2 downloads.
bitcoind/sha256/bitcoin-core-26.1-SHA256SUMS Add checksum list for Core 26.1 downloads.
bitcoind/sha256/bitcoin-core-26.0-SHA256SUMS Add checksum list for Core 26.0 downloads.
bitcoind/sha256/bitcoin-core-25.2-SHA256SUMS Add checksum list for Core 25.2 downloads.
bitcoind/sha256/bitcoin-core-25.1-SHA256SUMS Add checksum list for Core 25.1 downloads.
bitcoind/sha256/bitcoin-core-25.0-SHA256SUMS Add checksum list for Core 25.0 downloads.
bitcoind/sha256/bitcoin-core-24.2-SHA256SUMS Add checksum list for Core 24.2 downloads.
bitcoind/sha256/bitcoin-core-24.1-SHA256SUMS Add checksum list for Core 24.1 downloads.
bitcoind/sha256/bitcoin-core-24.0.1-SHA256SUMS Add checksum list for Core 24.0.1 downloads.
bitcoind/sha256/bitcoin-core-23.2-SHA256SUMS Add checksum list for Core 23.2 downloads.
bitcoind/sha256/bitcoin-core-23.1-SHA256SUMS Add checksum list for Core 23.1 downloads.
bitcoind/sha256/bitcoin-core-23.0-SHA256SUMS Add checksum list for Core 23.0 downloads.
bitcoind/sha256/bitcoin-core-22.1-SHA256SUMS Add checksum list for Core 22.1 downloads.
bitcoind/sha256/bitcoin-core-22.0-SHA256SUMS Add checksum list for Core 22.0 downloads.
bitcoind/sha256/bitcoin-core-0.21.2-SHA256SUMS.asc Add checksum list for Core 0.21.2 downloads.
bitcoind/sha256/bitcoin-core-0.20.2-SHA256SUMS.asc Add checksum list for Core 0.20.2 downloads.
bitcoind/sha256/bitcoin-core-0.19.1-SHA256SUMS.asc Add checksum list for Core 0.19.1 downloads.
bitcoind/sha256/bitcoin-core-0.18.1-SHA256SUMS.asc Add checksum list for Core 0.18.1 downloads.
bitcoind/sha256/bitcoin-core-0.17.2-SHA256SUMS.asc Add checksum list for Core 0.17.2 downloads.
Cargo.toml Update workspace members/excludes to reflect bitcoind rename and electrsd import strategy.
Cargo-recent.lock Refresh lock snapshot with bitcoind crate rename/version bump.
Cargo-minimal.lock Refresh MSRV/minimal lock snapshot with bitcoind crate rename/version bump.
.gitignore Ignore additional import artifacts (e.g., .idea/, bin/).
.github/workflows/rust.yaml Add CI jobs to run electrsd tests across feature matrices.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@jamillambert jamillambert left a comment

Choose a reason for hiding this comment

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

ACK 4b080fc

All looks good to me.

@tcharding tcharding merged commit 5656141 into rust-bitcoin:master Apr 15, 2026
40 checks passed
@tcharding
Copy link
Copy Markdown
Member Author

Tagged and published bitcoind-0.37.0 and electrsd-0.37.0. cc @RCasatta

tcharding added a commit to tcharding/corepc that referenced this pull request Apr 16, 2026
A few things going on here:

- Implying Jamil as 2IC in all crates except `bitreq`.
- Leaving RCassatta and apoelstra at the head of the list for their
  respective crates out of respect but Jamil and I are doing the
  maintenance work [0].
- Add `integration_test` and `verify` for completeness.

Note `bitreq` lists owners who are doing reviews but I'm still
responsible for the doing the merging and releasing. We need an
additional owner on crates.io for `bitreq` because of bus factor.

For `bitcoind` and `electrsd` RCasatta has already ack'd this in public
on rust-bitcoin#542. For `jsonrpc` this PR needs ack from apoelstra to publicly
ack what he told me in private.

Onwards and upwards team!
@tcharding tcharding mentioned this pull request Apr 16, 2026
tcharding added a commit that referenced this pull request Apr 23, 2026
80b3e15 Update codeowners (Tobin C. Harding)

Pull request description:

  A few things going on here:

  - Implying Jamil as 2IC in all crates except `bitreq`.
  - Leaving RCassatta and apoelstra at the head of the list for their respective crates out of respect but Jamil and I are doing the maintenance work [0].
  - Add `integration_test` and `verify` for completeness.

  Note `bitreq` lists owners who are doing reviews but I'm still responsible for the doing the merging and releasing. We need an additional owner on crates.io for `bitreq` because of bus factor.

  For `bitcoind` and `electrsd` RCasatta has already ack'd this in public on #542. For `jsonrpc` this PR needs ack from apoelstra to publicly ack what he told me in private.

  Onwards and upwards team!

ACKs for top commit:
  jamillambert:
    ACK 80b3e15
  tnull:
    ACK 80b3e15

Tree-SHA512: aa50df842d218345c4995070c434045ab17946857d55eec2bbd0b05247fb2381a86e2d7777e27b61ead385a475ac82665552cc34537e88f9bbb681cc788f338e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants