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
17 changes: 17 additions & 0 deletions .github/workflows/weekly-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,20 @@ jobs:
toolchain: ${{ matrix.toolchain }}
components: clippy,rustfmt
- run: just check
# Sync signet end-to-end against the latest published hintsfile.
signet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: "Install Bitcoin dependencies"
run: |
sudo apt-get update
sudo apt-get install build-essential cmake pkgconf python3 libevent-dev libboost-dev capnproto libcapnp-dev
- name: "Build node"
run: cargo build --release -p node --bin ibd
- name: "Sync signet"
timeout-minutes: 30
working-directory: node
run: just signet
9 changes: 9 additions & 0 deletions node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,17 @@ Arguments:
stream until the connection is killed.
```

Or use the [`just`](https://github.com/casey/just) shortcuts from this directory:

```bash
just mainnet # download the latest bitcoin.hints and sync mainnet
just signet # download the latest signet.hints and sync signet
```

If IBD completes, or you experience a bug, you will need to remove the kernel directories from this repository to run the binary again:

```
rm -rf blocks chainstate
```

Or equivalently, `just delete`.
11 changes: 9 additions & 2 deletions node/justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
ibd:
cargo run --bin ibd ./bitcoin.hints --release
# Download the latest mainnet hintsfile and run a fresh sync to its stop height
mainnet:
curl -fsSL -o bitcoin.hints https://utxohints.store/hints/bitcoin
cargo run --release --bin ibd -- --hintsfile bitcoin.hints --network bitcoin

# Download the latest signet hintsfile and run a fresh sync to its stop height
signet:
curl -fsSL -o signet.hints https://utxohints.store/hints/signet
cargo run --release --bin ibd -- --hintsfile signet.hints --network signet

delete:
rm -rf blocks chainstate blockfiles
3 changes: 3 additions & 0 deletions node/src/bin/ibd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,7 @@ fn main() {
let acc_result = acc_task.join().unwrap();
tracing::info!("Verified: {acc_result}");
elapsed_time(main_routine_time);
if !acc_result {
std::process::exit(1);
}
}
Loading