Skip to content

feat: header timestamp consensus rules, index reorg rollback, mempool policy, fuzz targets #587

feat: header timestamp consensus rules, index reorg rollback, mempool policy, fuzz targets

feat: header timestamp consensus rules, index reorg rollback, mempool policy, fuzz targets #587

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: never
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
# Full-node production feature set: all four storage backends plus the
# bitcoinkernel script-verification engine (the kernel is the default build).
FULL_NODE_FEATURES: "rocksdb,fjall,redb,mdbx,kernel"
jobs:
wallet-no-seckey:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
! grep -r 'SecretKey\|secp256k1::Secret\|seckey' crates/wallet/src
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.95.0
with:
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.95.0
with:
components: clippy
- uses: Swatinem/rust-cache@v2
# The kernel engine is built from C++ (cmake + libboost-dev); the default
# feature set now includes it, so every production lane installs the
# prerequisites up front.
- run: sudo apt-get update && sudo apt-get install -y libboost-dev cmake
# In a virtual workspace (no root [package]), `--features` flags are not
# forwarded to library crates; use `-p bitcoin-rs` so the binary's feature
# table propagates all backends and the kernel to bitcoin-rs-node and its deps.
- run: |
cargo clippy -p bitcoin-rs --all-targets \
--no-default-features --features "${FULL_NODE_FEATURES}" \
-- -D warnings
# -p bitcoin-rs-node catches test-target lints invisible to the line above
# (virtual workspace: -p bitcoin-rs does not forward features to node's own
# test targets, so their lints are silently skipped without this step).
cargo clippy -p bitcoin-rs-node --all-targets -- -D warnings
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.95.0
- uses: Swatinem/rust-cache@v2
# The kernel engine is built from C++ (cmake + libboost-dev); the default
# feature set now includes it, so every production lane installs the
# prerequisites up front.
- run: sudo apt-get update && sudo apt-get install -y libboost-dev cmake
# Library unit tests run with each crate's own default features.
- run: cargo test --workspace --no-fail-fast
# Node / binary tests run with the full-node feature set. -p is
# required because `--workspace --features` silently ignores --features in
# a virtual workspace (no root [package] section in the top-level Cargo.toml).
- run: |
cargo test -p bitcoin-rs --no-fail-fast \
--no-default-features --features "${FULL_NODE_FEATURES}"
bench-smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.95.0
- uses: Swatinem/rust-cache@v2
# The kernel engine is built from C++ (cmake + libboost-dev); the default
# feature set now includes it, so every production lane installs the
# prerequisites up front.
- run: sudo apt-get update && sudo apt-get install -y libboost-dev cmake
- run: |
cargo bench -p bitcoin-rs --no-run \
--no-default-features --features "${FULL_NODE_FEATURES}"
# Crate-level bench targets are unreachable from -p bitcoin-rs; compile
# them in both allocator configurations so bench-mimalloc breakage is
# visible to CI.
- run: cargo bench -p bitcoin-rs-coinstats -p bitcoin-rs-utxo --no-run
- run: |
cargo bench -p bitcoin-rs-coinstats -p bitcoin-rs-utxo --no-run \
--features bench-mimalloc
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
rust-version: "1.95.0"
arguments: --workspace --no-default-features --features ${{ env.FULL_NODE_FEATURES }}
# Kernel-default parity gate (plan 2026-06-10-001 R5): the consensus parity
# suite (committed fixture corpus, --include-ignored by design) and clippy on
# both package roots — all under the production default build.
# The kernel is the default engine, so no special feature selection is needed
# on this lane; binary tests and the four-backend storage surface are covered
# by the `test` job and the no-C++ posture by `portable-check` below.
kernel-parity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install -y libboost-dev cmake
- uses: dtolnay/rust-toolchain@1.95.0
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: |
cargo test -p bitcoin-rs-consensus --no-fail-fast -- --include-ignored
- run: cargo clippy -p bitcoin-rs --all-targets -- -D warnings
- run: cargo clippy -p bitcoin-rs-consensus --all-targets -- -D warnings
# Explicit no-C++ lane: proves the workspace still compiles and tests with
# the kernel engine disabled (per-crate `--no-default-features`). Deliberately
# no apt step — its point is that this lane needs no CMake/Boost toolchain.
portable-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.95.0
- uses: Swatinem/rust-cache@v2
- run: cargo check -p bitcoin-rs-consensus --no-default-features
- run: cargo test -p bitcoin-rs-consensus --no-default-features
- run: cargo test -p bitcoin-rs-script
- run: cargo check -p bitcoin-rs-node --no-default-features --features fjall