Import electrsd and rename corepc-node back to bitcoind#542
Import electrsd and rename corepc-node back to bitcoind#542tcharding merged 12 commits intorust-bitcoin:masterfrom
electrsd and rename corepc-node back to bitcoind#542Conversation
|
This will need #541 before |
9945ec2 to
a8e89e4
Compare
RCasatta
left a comment
There was a problem hiding this comment.
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
jamillambert
left a comment
There was a problem hiding this comment.
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-nodewithbitcoind - AI fix for
test-electrs-no-downloaderror (theInstall LLVM and Clangbit):
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'
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? |
12ff84b to
f68d6ec
Compare
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.
f68d6ec to
4b080fc
Compare
electrsd crate electrsd and rename corepc-node back to bitcoind
|
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 If you could have a little look around to see I didn't miss any mentions of |
There was a problem hiding this comment.
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-nodecrate tobitcoind(andNodetype toBitcoinD), update integration tests and tooling references accordingly. - Import
electrsdcrate (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.
jamillambert
left a comment
There was a problem hiding this comment.
ACK 4b080fc
All looks good to me.
|
Tagged and published |
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!
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
Just so its clear. Here we import
electrsdand bump the version so we can release it. We also re-namecorepc-nodeback to the original namebitcoindand bump the version so it can be released also.Tested with
cargo publish -p bitcoind --dry-runThis 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
electrsdis at commit:d2fd8af upgrade electrs esplora. The full commit hash is in the git log.