From d6f4c0ac19c04668e26ea8acaf20f124bf4ee324 Mon Sep 17 00:00:00 2001 From: nym21 Date: Tue, 19 May 2026 11:01:07 +0200 Subject: [PATCH] changelog: updated --- docs/CHANGELOG.md | 194 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 7da6144bb..bc52f0f47 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,6 +4,200 @@ All notable changes to the Bitcoin Research Kit (BRK) project will be documented > *This changelog was generated by Claude Code* +## [v0.3.0](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.3.0) - 2026-05-18 + +### Highlights (v0.2.5 → v0.3.0) + +The headlines of the v0.3.0 cycle, written for users rather than as a diff: + +- **BRK is now a drop-in mempool.space backend.** Every `/api/...` and `/api/v1/...` route returns the same JSON as mempool.space, so existing tools and dashboards point at a self-hosted BRK without code changes. Address activity, block info, fee estimates, RBF and CPFP trees, raw tx submission, merkle proofs, recent mempool txs, and historical prices are all covered. +- **The projected next block is Bitcoin Core's own template.** Instead of BRK reimplementing block selection, the next-block view is now byte-for-byte what your node would mine via `getblocktemplate`. A new `/api/v1/mempool/block-template/diff/{hash}` endpoint lets clients pull incremental updates by hash, so a live mempool UI does not refetch the whole template every second. +- **UTXO realized-price distribution (URPD).** A new family of endpoints exposes the cost-basis distribution of the live UTXO set, with per-bucket supply, realized cap, and unrealized PnL, per cohort, per date, and at multiple aggregation levels (`raw`, `lin200/500/1000`, `log10/50/100/200`). The older `cost-basis` routes still work but are marked deprecated with a 2027-01-01 sunset. +- **A pure on-chain BTC/USD price oracle, with no external feed.** BRK derives price from output-value clustering, so prices are reproducible from the chain alone. The v2 algorithm extends coverage back to block 525,000 (was 550,000), narrows the excluded-output set to taproot only, and screens out OP_RETURN-carrying transactions for tighter signal. +- **A built-in block explorer ships with the website.** Open BRK in a browser and you get an isometric 3D-cube chain view, dedicated `/block/{...}`, `/tx/{...}`, and `/address/{...}` pages with deep links, infinite scroll in both directions, click-to-select, and a full block-details side pane. Replaces the previous single-page UI. +- **Interactive API docs bundled with the server.** A Scalar viewer ships under `/scalar` so anyone running BRK can browse and try the API without external tooling. The OpenAPI document is served in compact and full variants so the viewer loads instantly. +- **Two new CLI tools ship with the project.** `blk` reads Bitcoin Core's `blk*.dat` files directly and emits NDJSON, TSV, or pretty JSON with field selectors and height ranges, useful for scripting block inspection without an RPC round-trip. `mmpl` is a sidecar that prints live mempool events (tx enter / leave, new tip, new block, fee changes, per-address activity) as an NDJSON stream you can pipe into anything. +- **Reads near the tip are now race-free.** A pipeline-wide "safe lengths" snapshot replaced the previous stamp-then-write window where readers could occasionally see a height that was not yet readable. The same fix removed a stale cached tip hash that could lag across reorgs. +- **Reorg-safe iteration.** `BlockIterator` now yields `Result` instead of `Option`, so a reorg in the middle of a scan surfaces as an error instead of a silent end-of-stream. Any tool that walks block ranges can react properly instead of believing the chain ended. +- **Stale-while-revalidate baked into the JS client.** Every generated method now accepts `{ signal, onUpdate }`. You render once from cache, then again with fresh data when it arrives, and you can cancel in-flight requests via the `AbortSignal`. Text and CSV endpoints share the same pipeline that JSON had. +- **Server tunables for self-hosters.** A new `ServerConfig` block (matching `brk_cli` flags) exposes `cdn_cache_mode` (Live vs Aggressive for the CDN-control headers), separate `max_weight` budgets for localhost vs public callers, a `cache_size` knob, and a 5-second default request timeout. Useful if you put BRK behind a CDN or expose it publicly. +- **Cleaner install path.** Pre-built GitHub release binaries are gone. Installation is now `cargo install --locked brk_cli`, and updates are a re-run of the same command (indexed data is reused when the format is unchanged, otherwise resynced automatically). + +**Things to know before upgrading:** + +- The indexer storage format changed (VERSION 25 → 26). On first run, BRK will rebuild any vecs that moved or were added (new fields include per-block / per-tx blk-file positions, coinbase tags, segwit counts, and per-tx sigop cost). +- The oracle algorithm changed (VERSION 1 → 2). Historical prices below the new 525,000 start height will shift, and the bin tally now drops OP_RETURN transactions, so values across the full history will differ slightly from prior releases. +- Cost-basis API consumers should migrate to the new `/api/urpd/...` routes before 2027-01-01. + +### Breaking Changes + +#### `release` + +- Removed the `cargo-dist`-driven `.github/workflows/release.yml` GitHub Actions pipeline (296 lines). Pre-built binaries for `aarch64-apple-darwin`, `aarch64-unknown-linux-gnu`, and `x86_64-unknown-linux-gnu` are no longer published per release. End users install via `cargo install --locked brk_cli` instead. The `[profile.dist]` and `[workspace.metadata.dist]` blocks in the root `Cargo.toml` and the `[package.metadata.dist]` block in `crates/brk_cli/Cargo.toml` are removed accordingly ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0/Cargo.toml)) + +### New Features + +#### `brk_cli` + +- New `Update` section in the README documents that updating is a re-run of `cargo install --locked brk_cli`: the binary is overwritten in place, and on-disk indexed data is reused when the storage format is unchanged or reset and resynced automatically when it is not ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0/crates/brk_cli/README.md)) + +### Internal Changes + +#### `repo` + +- Moved `docs/LICENSE.md` to the top-level `LICENSE` so GitHub picks it up as the repository's license file. The copyright holder line in the MIT text was also updated from `bitcoinresearchkit` to `Bitcoin Research Kit` to match the project's display name ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0/LICENSE)) +- Deleted the obsolete root `CLAUDE.md` reminder file ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0/Cargo.toml)) + +#### `deps` + +- `fjall` was bumped from the pinned `=3.0.4` to `3.1.4` and unpinned (now a normal caret range), `tower-http` from `0.6.10` to `0.6.11`, and `quickmatch` from `0.4.0` to `0.5.0`. The website search pane was updated to import `quickmatch-js` `0.5.0` alongside the Rust bump ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0/Cargo.toml)) +- Workspace and per-crate versions stepped to `0.3.0`. The `brk_client::BrkClient::VERSION` constant was refreshed from `v0.3.0-beta.9` to `v0.3.0-beta.11` in the prep snapshot and then to the final value via the auto-generated client regeneration ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0/crates/brk_client/src/lib.rs)) + +#### `clients` + +- Regenerated the auto-generated `modules/brk-client` (npm) and `packages/brk_client` (PyPI) bindings for the v0.3.0 schema ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0/modules/brk-client/index.js)) + +[View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.3.0-beta.11...v0.3.0) + +## [v0.3.0-beta.11](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.3.0-beta.11) - 2026-05-17 + +### Bug Fixes + +#### `scripts` + +- Fixed `scripts/rust-publish.sh` to reflect the v0.3.0-beta.10 crate reorganization. `brk_mempool` was moved to publish after `brk_oracle` (its new dependency ordering), and the new `blk` and `mmpl` binary crates were appended to the publish list so the next `cargo publish` pass uploads them to crates.io ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.11/scripts/rust-publish.sh)) + +### Internal Changes + +#### `clients` + +- Regenerated the auto-generated `modules/brk-client` (npm) and `packages/brk_client` (PyPI) bindings against the v0.3.0-beta.11 schema. Pure documentation regeneration with no API surface change beyond the version stamp ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.11/modules/brk-client/docs/classes/BrkClient.md)) + +#### `deps` + +- Workspace and per-crate versions stepped to `0.3.0-beta.11` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.11/Cargo.toml)) + +[View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.3.0-beta.10...v0.3.0-beta.11) + +## [v0.3.0-beta.10](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.3.0-beta.10) - 2026-05-17 + +### Breaking Changes + +#### `brk_rpc` + +- Removed the wrapper structs `BlockInfo`, `BlockHeaderInfo`, `TxOutInfo` and `RawTx`. The crate now re-exports `corepc_types::v17::{GetBlockHeaderVerbose, GetBlockVerboseOne, GetTxOut}` directly, so downstream consumers must switch to the upstream shapes. The `RawTx { hex, blockhash }` aggregate is gone: callers fetch the hex and the containing-block hash through `get_raw_transaction(txid)` and `get_block_hash` separately ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_rpc/src/lib.rs)) +- `Client::fetch_mempool_state()` now returns `(MempoolState, Vec)` from a single batched call that issues `getblocktemplate` + `getrawmempool false` + `getmempoolinfo`. `MempoolState` no longer carries verbose entries: it exposes `live_txids: FxHashSet`, `min_fee: FeeRate`, `tip_hash: BlockHash`, `tip_height: Height`. Old consumers that read full `MempoolEntryInfo` per cycle must call the new `fetch_new_pool_data(txids)` batched fetch (`getmempoolentry` + `getrawtransaction` per txid) for the deltas they care about ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_rpc/src/methods.rs)) +- `BlockTemplateTx` now carries the full transaction body (`{ txid, fee, weight, depends, tx }`) instead of just an identifier, so the rebuild path can copy Core's projected block into the snapshot without a second RPC pass ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_rpc/src/methods.rs)) + +#### `brk_oracle` + +- `VERSION` bumped to `2`. The pure on-chain BTC/USD oracle algorithm changed in three ways: `START_HEIGHT` lowered from `550_000` to `525_000`, the excluded-output set narrowed from `{P2TR, P2WSH}` to `{P2TR}` only, and per-transaction OP_RETURN screening was added so any tx that contains an OP_RETURN output is dropped from the bin tally entirely. Prior databases must rebuild the price vec; clients reading historical oracle values will see the values shift below the new start height ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_oracle/src/config.rs)) +- The input surface was simplified to a single `process_histogram(&Histogram) -> Option` entry point. The new `Histogram([u32; NUM_BINS])` newtype owns the per-bin counters with `Histogram::zeros()` and `Histogram::increment(bin)`, and the new `default_eligible_bin(sats, output_type) -> Option` helper carries the eligibility decision (compile-time bitmask over `OutputType`). Configuration constants moved to `config.rs` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_oracle/src/lib.rs)) + +#### `brk_types` + +- `MempoolEntryInfo` was slimmed to match the fields BRK actually consumes: removed `ancestor_count`, `ancestor_size`, `ancestor_fee`, `descendant_size`, `descendant_fee`, `chunk_fee`, `chunk_weight`, and the `chunk_rate()` method. The remaining shape is `{ txid, vsize, weight, fee, first_seen, depends }`. The struct's doc comment now points at Bitcoin Core's `getmempoolentry` as the authoritative source. CPFP/chunk consumers must compute these values themselves via the snapshot's chunk-rate map instead of reading them off the entry ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_types/src/mempool_entry_info.rs)) +- Moved the SFL chunking primitives from `brk_mempool` into `brk_types::cpfp`: new `chunk_input.rs` holds the borrowed `ChunkInput<'a>`, new `linearize.rs` holds the Single Fee Linearization implementation, and a new `find_seed_chunk()` helper is exposed in `cluster_chunk.rs`. A new `CPFP_CHAIN_LIMIT: usize = 25` constant is exported. `brk_query::impl::cpfp` and the rebuild pipeline now import from `brk_types` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_types/src/cpfp/linearize.rs)) + +#### `brk_mempool` + +- Crate-level `chunking.rs` (162 lines) and `cpfp.rs` (305 lines) are deleted; both moved into `brk_types::cpfp`. External code that imported `brk_mempool::chunking::linearize` or `brk_mempool::cpfp::CpfpInfo` must switch to the `brk_types::cpfp` re-exports ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_types/src/cpfp/mod.rs)) +- `state.rs` was split into a `state/` module (`mod.rs` + `tx_entry.rs`). `TxEntry` now carries `size: u64` and an `rbf: bool` flag in addition to the previous fields, so signal-aware reasoning (BIP-125 trees, eviction policy) reads off the entry instead of re-parsing the body ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/state/tx_entry.rs)) +- `Mempool::start_with` now takes a batched prevout resolver `Fn(&[(Txid, Vout)]) -> FxHashMap<(Txid, Vout), TxOut> + Send` instead of a per-input lookup. Callers driving the cycle must adapt: the previous `Box Option>` signature is gone. `brk_query::indexer_prevout_resolver()` was rewritten to return the batched form ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/driver.rs)) +- The `diagnostics` counter set drops the `skip_cleans` field. Consumers reading `MempoolStats` must remove the field reference ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/diagnostics.rs)) + +### New Features + +#### `mmpl` (new crate) + +- New `mmpl` CLI binary that streams live mempool events as NDJSON on stdout. The `Event` enum covers `Enter` (tx admitted), `Leave` (tx evicted or mined), `AddrEnter` / `AddrLeave` (per-address presence changes), `Tip` (block tip moved), `Block` (new block connected), `Fees` (recommended fee tiers refreshed), and `Cycle` (full cycle diff summary). Depends on `brk_error`, `brk_mempool`, `brk_rpc`, `brk_types`. Useful as a thin observability sidecar against a running BRK node without polling the HTTP API ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/mmpl/src/event.rs)) + +#### `brk_types` + +- New `BlockTemplate { hash: NextBlockHash, stats: BlockStats, transactions: Vec }` describing the projected next block exactly as Bitcoin Core would mine it ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_types/src/block_template.rs)) +- New `BlockTemplateDiff { hash, since, order, removed }` and `BlockTemplateDiffEntry` (untagged JSON enum of `Retained(u32)` index references and `New(Transaction)` bodies) for incremental client updates against a known template hash ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_types/src/block_template_diff.rs)) +- New `NextBlockHash(u64)` opaque hash type identifying a specific projected block; clients pass it back via `/diff/{hash}` and receive a `NotFound` when their `since` has aged out of the buffer ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_types/src/next_block_hash.rs)) +- New mutator `Transaction::refresh_sigops()` recomputes `total_sigop_cost` after in-place mutation of script witness data, used by the rebuild path when fixing up template-supplied transactions ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_types/src/tx.rs)) + +#### `brk_mempool` + +- New `api/` module surface: `addr.rs`, `block_template.rs`, `fees.rs`, `histogram.rs`, `rbf.rs`, `tx.rs`. New methods include `block_template() -> BlockTemplate`, `block_template_diff(since: NextBlockHash) -> Option`, `live_histogram() -> Histogram`, `live_effective_fee_rate(txid)`, `graveyard_fee_rate(txid)` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/api/block_template.rs)) +- New `cycle/` module: `AddedKind` (Fresh / Revived), `AddrTransitions` (with same-cycle enter/leave cancellation so a tx that enters and leaves within one cycle never emits to subscribers), `CycleDiff`, `Cycle` event aggregate, plus `TxAdded` and `TxRemoved` payloads. Drives the `mmpl` event stream ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/cycle/mod.rs)) +- New `snapshot/` module: `block_stats.rs` (`CORE_PERCENTILES` 0..=100 for `blocks[0]`, `PROJECTED_PERCENTILES` 5..=95 for `blocks[1..]`), `builder.rs` (per-cluster `refresh_chunk_rates`), `cluster.rs`, `cpfp.rs`, `fees.rs`, `partition.rs`, `rebuilder.rs`, `snap_tx.rs`, `tx_index.rs`. The snapshot now carries `{ txs, blocks, block_stats, fees, next_block_hash, prefix_to_idx }`, with `block0_txids()`, `hash_next_block()`, `chunk_rate_for(txid)` helpers ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/snapshot/builder.rs)) +- New `driver.rs` runs a 1-second `PERIOD` cycle loop. `start()` uses the default RPC resolver, `start_with(resolver)` accepts a custom batched resolver. Panics if started twice on the same `Mempool` to surface misuse early ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/driver.rs)) +- New `steps/prevouts.rs` backfills `prevout: None` entries from same-cycle in-mempool parents first, then from the caller-supplied resolver for confirmed ancestors ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/steps/prevouts.rs)) + +#### `brk_rpc` + +- New batched `Client::fetch_new_pool_data(txids)` issues `getmempoolentry` + `getrawtransaction` in one round-trip per delta set, replacing the per-tx loop that the apply step used to drive ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_rpc/src/methods.rs)) +- New `Client::get_blockchain_info()` and `Client::get_network()` are reintroduced as proper wrappers (after the v0.3.0-beta.9 removal). The wrappers are not behind a `cfg(debug)` gate, per the keep-public-API rule, so external integrations can call them directly ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_rpc/src/lib.rs)) + +#### `brk_server` + +- Added `/api/v1/mempool/block-template` returning the current projected block and `/api/v1/mempool/block-template/diff/{hash}` returning the incremental update since a known template hash. The mempool-hash response type was changed from `u64` to `NextBlockHash` for type safety on the wire ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_server/src/api/mempool.rs)) +- New `NextBlockHashParam { hash: NextBlockHash }` axum extractor parses the diff route's path parameter ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_server/src/params/next_block_hash_param.rs)) +- New `X-Method` response header derived from a `Method` extension placed on the response by the API layer, so reverse proxies and access logs see which BRK method served a given request without inspecting the URL ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_server/src/lib.rs)) + +#### `brk_query` + +- New `block_template()` and `block_template_diff(since: NextBlockHash) -> Result` query methods. `block_template_diff` returns `Error::NotFound` when the `since` hash has aged out of the in-memory buffer, signalling the client to fall back to a full template fetch ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_query/src/impl/mempool.rs)) + +#### `brk_logger` + +- New `install_panic_hook()` registers a `std::panic::set_hook` that captures the panic message, source location and a `std::backtrace::Backtrace` and routes them through `tracing::error!`, so panics in worker threads land in the same log sink as normal errors instead of being lost on stderr ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_logger/src/lib.rs)) + +#### `blk` + +- New `coinbase_hex` field on the per-block JSON: emits the raw coinbase scriptSig hex, useful for miner-tag extraction without re-deriving from `tx.0.vin.0.script_sig` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/blk/src/main.rs)) +- New `BLOCK_FIELDS`, `TX_FIELDS`, `VIN_FIELDS`, `VOUT_FIELDS` constant arrays drive selector validation and bash completion. Args validation now rejects duplicate `--field` flags and unknown long flags, and `Mode::pick` enforces that `--pretty` and `--compact` are mutually exclusive ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/blk/src/args.rs)) +- Selectors pre-resolve the chain tip exactly once per invocation, so `tip` and ranges that resolve relative to tip do not issue an RPC call per output row ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/blk/src/main.rs)) +- A bare `tx`, `vin`, or `vout` selector now returns the matching sub-object as JSON instead of bailing on the missing leaf; `bits` is formatted as a hex string to match `bitcoin-cli`. `Ctx::new(block, network)` now takes the network alongside the block so address rendering picks the right human-readable prefix ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/blk/src/main.rs)) + +### Bug Fixes + +#### `brk_server` + +- The health endpoint no longer round-trips to `bitcoind` to compute its response. It now reports liveness from the local indexer state directly, so a slow or unresponsive Bitcoin Core node does not flap the BRK liveness probe. A separate `/api/server/sync` endpoint exposes the real chain-tip lag for callers that actually need that signal ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_server/src/api/server.rs)) +- The axum middleware stack was reordered so `CatchPanic` is layered above `response_time_layer`. A panic in a handler is now converted into a 500 response that still records its timing, instead of bypassing the response-time layer and producing a zero-duration error log line ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_server/src/lib.rs)) + +#### `brk_indexer` + +- Removed the `tip_blockhash: Arc>` field on `Indexer`. The field could lag behind the on-disk `blockhash` vec across reorgs, so a reader observing a fresh `safe_lengths` against a stale cached tip could see a hash from the abandoned branch. `Indexer::tip_blockhash()` now reads `blockhash.collect_one(safe_lengths().height - 1)` directly, eliminating the cache and the `parking_lot::RwLock` import ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_indexer/src/lib.rs)) + +#### `brk_query` + +- `height_by_hash` now clamps its scan to the current `safe_lengths()` snapshot. A reader that races a reorg-and-rewrite no longer hits the stamp-before-write window where the in-flight vec has a stamp but the data for the highest position is not yet readable ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_query/src/impl/block/info.rs)) + +### Internal Changes + +#### `brk_computer` + +- `prices/compute.rs` switched to per-transaction grouping: a `tx_starts` array records each tx's output range, and any transaction that contains at least one OP_RETURN output is dropped from the bin tally before counters are summed. Histogram allocation now goes through `brk_oracle::Histogram::zeros()`. `feed_blocks` was unified into a single public function that takes an optional `cap: Option<&Lengths>` for bounded replays, replacing the previous capped/uncapped pair ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_computer/src/prices/compute.rs)) +- `distribution/vecs.rs` `VERSION` is now sourced from `brk_oracle::VERSION` so the oracle algorithm bump cascades to the distribution snapshot without a manual version edit ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_computer/src/distribution/vecs.rs)) + +#### `brk_iterator` / `brk_reader` + +- Both crates adapted to the new `get_block_header_info()` return shape, using `(height + 1) as u64` for the next-block hint instead of reading a now-removed field on the wrapper. The change is internal and does not affect public iteration / canonical-read APIs ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_iterator/src/lib.rs)) + +#### `brk_mempool` + +- New `test_support.rs` extracts the test-only helpers (builder fixtures, cluster factories) that used to live inline in test modules, so the unit tests across the new `snapshot/` and `cycle/` submodules share a single fixture surface ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/test_support.rs)) +- The lib-doc was rewritten to describe the new 5-step pipeline (Fetcher then Preparer then Applier then Prevouts then Rebuilder) and to drop references to the deleted block-builder ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/crates/brk_mempool/src/lib.rs)) + +#### `clients` + +- Regenerated the auto-generated `modules/brk-client` (npm) and `packages/brk_client` (PyPI) bindings to pick up the new `BlockTemplate`, `BlockTemplateDiff`, `BlockTemplateDiffEntry`, `NextBlockHash` types, the slimmed `MempoolEntryInfo`, and the two new `/api/v1/mempool/block-template*` routes ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/modules/brk-client/index.js)) + +#### `website` + +- Snapshots across `src/explorer/chain`, `src/explorer/mempool`, `src/options/full`, `src/utils/price`, `src/utils/theme`, and `src/explorer/chain/cube` to render the projected block template and consume the new diff endpoint ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/website/src/explorer/mempool)) + +#### `deps` + +- Workspace and per-crate versions stepped to `0.3.0-beta.10` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.0-beta.10/Cargo.toml)) + +[View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.3.0-beta.9...v0.3.0-beta.10) + ## [v0.3.0-beta.9](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.3.0-beta.9) - 2026-05-08 ### Breaking Changes