diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index bc52f0f47..3d4f56acb 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,9 +1,117 @@ + + # Changelog All notable changes to the Bitcoin Research Kit (BRK) project will be documented in this file. > *This changelog was generated by Claude Code* +## [v0.3.1](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.3.1) - 2026-06-01 + +### Breaking Changes + +#### `brk_oracle` + +- Replaced the version 2 oracle algorithm with version 3. BTC/USD price discovery now starts from on-chain data at height 340,000, runs a slow cold-start EMA until height 508,000, and then switches to the fast mature-market EMA. Existing oracle-derived price data must be recomputed, and historical values from height 340,000 onward can differ from v0.3.0 ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/src/config.rs)) +- Removed the old `Config`-controlled per-output filter surface (`min_sats`, `exclude_common_round_values`, `excluded_output_types`, and `Oracle::output_to_bin`). Library callers now use `eligible_bin` for per-output checks or `for_each_round_dollar_bin` for full transaction filtering, which applies the shared dust, round-BTC, P2TR, OP_RETURN, and early batch-payout rules ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/src/filter.rs)) +- Replaced the crate-local `Histogram` type with `HistogramRaw`, `HistogramEma`, and `HistogramEmaCompact` aliases backed by the shared `brk_types::Histogram` type. External callers that constructed `brk_oracle::Histogram` must switch to the new aliases ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/src/scale.rs)) + +#### `brk_types` + +- Removed the old `OracleBins` and `OracleBinsV2` public exports. Consumers that used those phase-histogram structs should use `Histogram` directly or the `brk_oracle` histogram aliases for oracle wire and compute buffers ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_types/src/histogram.rs)) + +#### `brk_mempool` + +- Renamed the live oracle histogram accessor to `live_eligible_histogram()` and added `live_raw_histogram()`. Callers using the old `live_histogram()` method must switch to the eligible histogram when feeding the oracle, or to the raw histogram when they need every live output binned without payment filtering ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_mempool/src/api/histogram.rs)) + +### New Features + +#### `brk_oracle` + +- Added a shared transaction-level payment filter that drops transactions with more than 100 outputs before height 630,000. This removes exchange-sweep and mixer-style batch payouts from the thin early-chain signal while leaving later dense-chain blocks uncapped ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/src/filter.rs)) +- Added `Oracle::ema()` and `Oracle::reconfigure()`, letting query paths inspect the smoothed histogram and letting the compute path hand off from the slow cold-start regime to the fast regime without losing the recent raw histogram window ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/src/lib.rs)) + +#### `brk_types` + +- Added a generic fixed-length `Histogram` wire type with flat-array serialization, schema generation, bin incrementing for raw counts, compact quantization for EMA values, and binwise add/divide helpers for per-day averages ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_types/src/histogram.rs)) +- Added `log500`, `log1000`, and `log2000` URPD aggregation modes, giving clients finer logarithmic realized-price buckets for heatmaps and detailed distribution views ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_types/src/urpd_aggregation.rs)) + +#### `brk_computer` + +- Added segmented oracle price computation that uses the v3 slow regime for early on-chain history, switches to the fast regime at height 508,000, and reuses the shared `for_each_round_dollar_bin` filter so stored prices match query-side and mempool-side histogram reconstruction ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_computer/src/prices/compute.rs)) + +#### `brk_mempool` + +- Added `LiveHistograms`, which maintains two per-bin mempool histograms incrementally as transactions enter and leave: an oracle-eligible histogram for live BTC/USD blending and a raw output-value histogram for the new raw histogram endpoint ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_mempool/src/stores/live_histograms.rs)) + +#### `brk_query` + +- Added oracle query methods for live BTC/USD price, live payment histogram, confirmed payment histogram by height, confirmed payment histogram by day, live raw output histogram, confirmed raw output histogram by height, and confirmed raw output histogram by day. Confirmed reads are capped by safe lengths so callers do not observe in-flight indexer writes ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_query/src/impl/oracle.rs)) +- Added cached live-oracle warm-up at the current tip, then blended the forming mempool block through `live_eligible_histogram()`. The `/api/mempool/price` value and `/api/oracle/price` now share the same v3 live-price path ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_query/src/impl/oracle.rs)) + +#### `brk_server` + +- Added `/api/oracle/price`, `/api/oracle/histogram/payments/live`, `/api/oracle/histogram/payments/{point}`, `/api/oracle/histogram/outputs/live`, and `/api/oracle/histogram/outputs/{point}`. The `{point}` parameter accepts either a block height or a `YYYY-MM-DD` date, so clients can fetch one confirmed block or a daily aggregate through the same route shape ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_server/src/api/oracle.rs)) +- Added OpenAPI documentation under an `Oracle` tag describing the pure on-chain price source, payment-vs-raw histogram semantics, and the relationship between `/api/oracle/price`, `/api/mempool/price`, and `/api/vecs/height-to-price` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_server/src/api/openapi/mod.rs)) + +#### `brk_bindgen` + +- Added a generated JavaScript GET option `cache?: boolean`. Passing `cache: false` skips the in-memory/browser-cache path, sends the request with `no-store`, still honors `AbortSignal`, and still emits `onValue` once the fresh response is parsed ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_bindgen/src/generators/javascript/client.rs)) + +#### `brk_client` + +- Added Rust client methods for the new oracle API: `get_oracle_price`, `get_oracle_histogram_payments_live`, `get_oracle_histogram_payments`, `get_oracle_histogram_outputs_live`, and `get_oracle_histogram_outputs` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_client/src/lib.rs)) + +#### `clients` + +- Added the new oracle methods to the generated JavaScript and Python clients, including typed `HeightOrDateParam` support and the expanded URPD aggregation literals used by high-resolution distribution heatmaps ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/modules/brk-client/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/packages/brk_client/brk_client/__init__.py)) + +#### `website` + +- Added a heatmap pane to the app shell with selectable heatmap options, a dedicated canvas renderer, date-range controls, y-axis min/max controls, hover/tap tooltips, and incremental dirty-column repainting for responsive interaction while data streams in ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/website/src/heatmap/index.js)) +- Added `Heatmaps` to the option tree. Users can now open output-value heatmaps for all outputs or oracle-eligible payments, and URPD heatmaps for supply, realized capital, and unrealized PnL across all coins, STH, LTH, and age-band cohorts ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/website/scripts/options/partial.js)) +- Added parallel per-day heatmap loading with abortable range changes and stale-while-revalidate client callbacks, so switching ranges or options cancels obsolete requests and paints available dates as soon as they arrive ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/website/src/heatmap/loader.js)) + +### Bug Fixes + +#### `brk_computer` + +- Fixed clean distribution resumes by calling rollback only when the resume height is below the current height. A normal restart at the existing checkpoint no longer fails because periodic flushes did not create rollback metadata ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_computer/src/distribution/vecs.rs)) + +#### `website` + +- Fixed chart scale selector replacement by tracking the selector element per pane before inserting a new one. Rebuilding a pane no longer depends on a fragile `.field` lookup and does not leave stale radio controls behind after the shared form helpers changed shape ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/website/scripts/utils/chart/index.js)) + +### Internal Changes + +#### `brk_oracle` + +- Split the oracle implementation into explicit `filter`, `scale`, `shape`, `stencil`, and `window` modules. The split makes the v3 behavior testable at the payment filter, EMA window, shape-anchor, and stencil-search layers without duplicating logic across compute and query paths ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/src/lib.rs)) +- Shortened the bundled bootstrap price table to the pre-height-340,000 seed range because v3 computes later prices from chain data. This reduces the amount of static exchange-derived data shipped with the crate and makes height 339,999 the final seed point before on-chain computation begins ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/src/lib.rs)) +- Rewrote the oracle README for version 3, including the 340,000 start height, slow/fast EMA handoff, early batch-payout filter, revised UTXOracle comparison, and revised accuracy tables ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/README.md)) +- Added `dump_hist` for offline raw output exports and `report_from` for replaying external CSV dumps through oracle experiments. Removed obsolete sweep and validation examples whose assumptions no longer match the v3 filter and EMA model ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/examples/dump_hist.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_oracle/examples/report_from.rs)) + +#### `brk_computer` + +- Added `feed_blocks_for_warmup` and `feed_blocks_with`, so query code can reconstruct EMA windows and average per-day payment histograms without copying the block-output extraction and filtering path ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_computer/src/prices/compute.rs)) + +#### `brk_server` + +- Added `HeightOrDateParam` and `HeightOrDate`, giving oracle routes one parser for height-or-date path segments and matching cache strategies for per-height and per-date responses ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/crates/brk_server/src/params/height_or_date_param.rs)) + +#### `website` + +- Extended option processing with `kind: "heatmap"` so heatmap entries can live in the same navigation tree as chart, explorer, URL, and group options ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/website/scripts/options/full.js)) +- Changed shared DOM helpers so radio controls render as `fieldset`s and select controls return `{ element, get, set }`. Heatmap range controls use this to keep paired `from`/`to` and `min`/`max` selects in valid order while persisting choices per heatmap ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/website/scripts/utils/dom.js)) +- Added the `#heatmap` container and stylesheet import to the app shell, changed the page title branding to `bitview`, preloaded the Lilex font file used by the site, and removed the unused Satoshi font face and asset ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/website/index.html), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/website/styles/fonts.css)) + +#### `workspace` + +- Removed the scheduled outdated-dependency GitHub Actions workflow, so CI no longer runs a weekly dependency-drift job that can fail independently of code changes. +- Pinned the Rust toolchain to `1.96.0`, so source builds use the compiler release expected by this workspace ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.3.1/rust-toolchain.toml)) + +[View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.3.0...v0.3.1) + ## [v0.3.0](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.3.0) - 2026-05-18 ### Highlights (v0.2.5 → v0.3.0) diff --git a/docs/claude/changelog.md b/docs/claude/changelog.md index 9d8d60b8f..0232f8777 100644 --- a/docs/claude/changelog.md +++ b/docs/claude/changelog.md @@ -1,4 +1,4 @@ -# Changelog Generation for Claude Code +# Changelog Generation for AI **TASK**: Update docs/CHANGELOG.md for ALL latest releases missing from the file. @@ -110,7 +110,7 @@ Where PREVIOUS is the previous release tag and CURRENT is the current release ta ### File Header (if missing): ```markdown - + ``` ### Release Entry Format: