From 6554f3571097ac18949c9ee1ea16359006af9f0d Mon Sep 17 00:00:00 2001 From: nym21 Date: Sat, 20 Sep 2025 23:33:39 +0200 Subject: [PATCH] changelog: update --- .claude/prompts/changelog.md | 298 ++++++---- docs/CHANGELOG.md | 1055 ++++++++++++++++++++-------------- 2 files changed, 800 insertions(+), 553 deletions(-) diff --git a/.claude/prompts/changelog.md b/.claude/prompts/changelog.md index b31d15492..68d4956df 100644 --- a/.claude/prompts/changelog.md +++ b/.claude/prompts/changelog.md @@ -1,137 +1,221 @@ -# Changelog Generation Prompt +# Changelog Generation for Claude Code -Update docs/CHANGELOG.md for ALL latest releases not present in the file. Use ONLY git commands - no other sources. +**TASK**: Update docs/CHANGELOG.md for ALL releases after and including v0.0.107. -## MANDATORY PROCESS - FOLLOW EXACTLY - NO EXCEPTIONS: -1. Run `git tag --list --sort=version:refname` to get releases in order -2. Process EXACTLY ONE release at a time -3. For EACH SINGLE release: run `git diff [previous-tag]..[current-tag]` -4. **MANDATORY ANALYSIS STEP**: Before writing ANY changelog entry, you MUST: - - Analyze each file change and explain what the code is doing - - Identify the purpose and impact of each modification - - Group related changes together logically - - State clearly what functionality is being added, removed, or modified - - If you cannot understand what a change does from the diff, explicitly say so -5. Only AFTER completing the analysis, write the detailed changelog entry -6. Update the CHANGELOG.md file with that ONE entry -7. STOP. Ask me if you should continue to the next release. +## ⚠️ CRITICAL FAILURE MODE TO AVOID ⚠️ +**THE #1 FAILURE**: Ignoring most changes and only documenting a few +**ABSOLUTELY FORBIDDEN**: Skipping changes, summarizing with "and other updates", or being incomplete +**YOU MUST DOCUMENT EVERY SINGLE MEANINGFUL CHANGE - NO EXCEPTIONS** -## CRITICAL CONSTRAINTS: -- **NEVER EVER** process multiple releases in one go, even if there are many -- **NEVER** say "let me continue more efficiently by processing multiple releases" -- **NEVER** batch releases together for any reason -- If you feel tempted to process multiple releases, **STOP** and process only one -- Context window concerns do **NOT** justify batching - process one release only +## CORE WORKFLOW - EXECUTE EXACTLY: -## ABSOLUTE REQUIREMENTS: -- **NEVER** read commit messages, PR descriptions, existing changelog, or any text documentation -- Use **ONLY** the actual code changes shown in git diff output -- Process releases **ONE BY ONE** - I don't care if there are 100 releases -- **MANDATORY**: Before writing changelog entries, demonstrate understanding by analyzing what each code change accomplishes -- Be **HIGHLY DESCRIPTIVE** about what each code change does and why it matters -- Don't be conservative - write detailed explanations of the impact and purpose of changes -- **If you don't understand a change from the code diff alone, DO NOT GUESS - say so explicitly** +### Step 1: Get Release Information +```bash +git tag --list --sort=version:refname +``` -## SOURCE OF TRUTH: -- `git diff` output is the **ONLY** source of truth -- If you can't determine what a change does from the code diff alone, say so explicitly -- Ignore **ALL** text/documentation - focus purely on code additions, deletions, and modifications +### Step 2: Process ONE Release at a Time +For each missing release, execute these commands to get complete information: -## CHANGELOG FILE REQUIREMENTS: -- Add a header at the top of the CHANGELOG.md file: `` -- Ensure this header appears before any changelog entries +**First, get the file list:** +```bash +git diff --name-only [previous-tag]..[current-tag] +``` -## CHANGELOG WRITING RULES: +**Then, get changes excluding Cargo.lock:** +```bash +git diff [previous-tag]..[current-tag] -- . ':(exclude)Cargo.lock' +``` -### RELEASE TITLE FORMAT: -**MUST** use this exact format: `## [vX.Y.Z](https://github.com/bitcoinresearchkit/brk/releases/tag/vX.Y.Z) - YYYY-MM-DD` -Use the actual release date from git tag information +**If output is too large, examine files individually:** +```bash +git diff [previous-tag]..[current-tag] -- path/to/specific/file.rs +``` -### ABSOLUTELY FORBIDDEN PATTERNS: -- **NEVER** mention line counts (e.g., "with 138 lines", "1,290 lines removed") -- **NEVER** use vague action words: "Enhanced", "Improved", "Updated", "Expanded", "Restructured", "Refactored", "Modified", "Adjusted" -- **NEVER** write sections about Cargo.lock or dependency updates unless they represent major functional changes -- **NEVER** use the format "Action: File with vague description" -- **NEVER** mention version bumps of local crates (e.g., "Updated all crate versions from 0.0.61 to 0.0.62") - this is implied by the release version -- **NEVER** mention dependency version changes in external crates unless they enable new functionality visible in the code -- **NEVER** write entries like "Updated dependencies" or "Cargo.lock maintenance" +**For summary of changes per file (if needed):** +```bash +git diff --stat [previous-tag]..[current-tag] +``` -### REQUIRED WRITING STYLE: -- Write what the code **actually DOES**, not that it was "enhanced" or "improved" -- Be **specific about functionality**: "Added transaction validation logic", "Implemented caching for API responses" -- Focus on **business/functional impact**: "Enables users to...", "Fixes issue where...", "Adds support for..." -- **Mandatory structure**: Group by: Breaking Changes, New Features, Bug Fixes, Internal Changes -- Include GitHub file links for major changes (max 5 per entry) -- **Skip entirely**: minor dependency bumps, Cargo.lock changes, and local crate version bumps +### Step 3: Analyze Before Writing +**MANDATORY**: Before writing ANY changelog entry, analyze the diff output and explain: +- **Use `git diff --name-only` to see ALL changed files** - this prevents truncation issues +- **Use `git diff -- . ':(exclude)Cargo.lock'` to see actual changes** without Cargo.lock noise +- **If output is large, examine key files individually** with `git diff [tags] -- path/to/file` +- **Identify every functional change** - what new capabilities, fixes, or modifications were made +- What each code change accomplishes functionally +- The user-facing or system impact of modifications +- **Which crate each change belongs to** (based on file paths) +- How changes group together logically within and across crates +- What functionality is added/removed/modified per crate -### MANDATORY ANALYSIS WORKFLOW: -**BEFORE writing any changelog entry, you MUST:** +**COMPLETENESS CHECK**: State "I have analyzed X files and identified Y distinct functional changes to document" -1. **Code Comprehension Check**: Go through each modified file and explain: - - What specific functionality is being added/removed/changed - - What the new/modified functions/structs/methods do - - How the changes affect the overall system behavior +### Step 4: Write Changelog Entry +Only after analysis, update CHANGELOG.md with ONE release entry. -2. **Impact Assessment**: For each change, determine: - - Is this a new feature, bug fix, breaking change, or internal improvement? - - What user-facing or system behavior changes result from this code? - - What problem does this change solve? +**REQUIRED**: End each release entry with a comparison link: +```markdown +[View changes](https://github.com/bitcoinresearchkit/brk/compare/vPREVIOUS...vCURRENT) +``` +Where PREVIOUS is the previous release tag and CURRENT is the current release tag. -3. **Logical Grouping**: Organize related changes together: - - Group files that work together to implement a single feature - - Separate breaking changes from additions - - Distinguish user-facing changes from internal refactoring +### Step 5: Stop and Confirm +**CRITICAL**: Process only ONE release, then ask for confirmation to continue. -4. **Understanding Verification**: Before writing changelog text, state: - - "I understand this change does X because the code shows Y" - - If unclear: "I cannot determine the purpose of this change from the diff alone" +--- -**ONLY AFTER completing this analysis should you write the changelog entry.** +## STRICT RULES -### WHAT TO FOCUS ON (IN ORDER OF PRIORITY): -1. **New functionality** - What can users now do that they couldn't before? -2. **Breaking changes** - What existing functionality changed or was removed? -3. **Bug fixes** - What specific problems were resolved? -4. **Internal changes** - New modules, significant refactoring, architecture changes -5. **Skip completely** - Dependency updates, version bumps, Cargo.lock changes +### FORBIDDEN - NEVER MENTION: +- **Cargo.lock** (ignore completely) +- **Line counts** ("added 50 lines", "removed 200 lines") +- **Dependency version bumps** (unless enabling major new features) +- **Local crate version changes** (0.0.61 → 0.0.62) +- **Vague words**: "Enhanced", "Improved", "Updated", "Refactored" -### VERBOSITY REQUIREMENTS: -- **Minimum 3-4 bullet points per section** when changes exist -- **Each bullet point should be 1-2 sentences** explaining both what changed and why it matters -- **For new features**: Explain what the feature does and what problem it solves -- **For bug fixes**: Describe the problem that was fixed (inferred from the code changes) -- **For internal changes**: Explain the architectural or structural improvement +### FORBIDDEN PHRASES: +- "and other changes" +- "various updates" +- "along with minor improvements" +- "among other enhancements" +- **"along with other modifications"** +- **"plus additional changes"** +- **"including other updates"** +- **"and more"** +- **ANY phrase that suggests you're skipping changes** -### EXAMPLES OF GOOD vs BAD: +### REQUIRED - MUST INCLUDE: +- **Every meaningful change** in the diff (no shortcuts) +- **Specific functionality** descriptions +- **Business impact** of each change +- **Complete coverage** - if 20 changes exist, document all 20 +- **Source links** for significant changes (new features, breaking changes, major bug fixes) -#### ❌ BAD EXAMPLES: -- "Enhanced: Chain analysis with sophisticated blockchain processing capabilities" -- "Updated: brk_rolldown from 0.0.1 to 0.1.0 with comprehensive bundling improvements" -- "Version Bump: Updated all crate versions from 0.0.61 to 0.0.62" -- "Improved error handling" -- "Refactored codebase" -- "Updated dependencies" +## WORKSPACE-SPECIFIC RULES -#### ✅ GOOD EXAMPLES WITH ANALYSIS: +### Crate Identification: +- **Determine crate from file paths** in the diff (e.g., `crates/brk-core/src/lib.rs` → `brk-core`) +- **Group all changes by their crate** before writing changelog entries +- **Use crate name as subheading** under each change type section +- **For root-level files**: Use `workspace` as the crate name -**Analysis**: "Looking at the diff, I see a new `TransactionAnalyzer` struct was added with methods `calculate_fee()` and `is_coinbase()`. The struct takes transaction data and provides analysis methods. This enables users to programmatically analyze transaction properties." +### Cross-Crate Changes: +- **When changes span multiple crates** for one feature, mention the relationship +- **Example**: "Added new transaction API in `brk-core` with corresponding HTTP endpoints in `brk-api`" -**Changelog**: "Added new `TransactionAnalyzer` struct that provides methods for computing transaction fees and detecting coinbase transactions" +### Crate Naming: +- **Use backticks** around crate names: `brk-core`, `brk-api` +- **Use workspace structure** as shown in file paths, not display names -**Analysis**: "The diff shows error handling was added around block parsing where previously there was an unwrap(). Now it returns a Result and handles the empty block case explicitly. This prevents panics when processing malformed blocks." +### File Header (if missing): +```markdown + +``` -**Changelog**: "Fixed panic when processing blocks with zero transactions by adding explicit empty block handling and proper error propagation" +### Release Entry Format: +```markdown +## [vX.Y.Z](https://github.com/bitcoinresearchkit/brk/releases/tag/vX.Y.Z) - YYYY-MM-DD -**Analysis**: "I see a new caching layer was implemented with a HashMap storing block hashes as keys and block data as values. The API endpoints now check this cache before making network requests. This should improve performance for repeated queries." +### Breaking Changes +#### `crate-name` +- Specific change with functional impact explanation ([source](https://github.com/bitcoinresearchkit/brk/blob/vX.Y.Z/path/to/file.rs)) -**Changelog**: "Implemented new caching layer for blockchain queries, reducing API response time by storing frequently accessed block data in memory" +### New Features +#### `crate-name` +- Feature description with user benefit ([source](https://github.com/bitcoinresearchkit/brk/blob/vX.Y.Z/path/to/main/file.rs)) +- Another feature with implementation details -#### ❌ BAD EXAMPLES (NO UNDERSTANDING): -- "Enhanced error handling" (What specific errors? How were they enhanced?) -- "Improved performance" (What was improved? How?) -- "Updated transaction logic" (What specific logic? What changed?) +#### `another-crate` +- Feature specific to this crate -## FINAL REMINDER: -**PROCESS ONLY ONE RELEASE. THEN STOP AND WAIT FOR MY CONFIRMATION.** +### Bug Fixes +#### `crate-name` +- Specific problem that was resolved ([source](https://github.com/bitcoinresearchkit/brk/blob/vX.Y.Z/path/to/file.rs)) +- Another bug fix with impact description -You must be thorough and verbose - if there are code changes, there should be substantial changelog content explaining what those changes accomplish. +### Internal Changes +#### `crate-name` +- Architectural improvement with purpose +- Code organization change with benefit + +[View changes](https://github.com/bitcoinresearchkit/brk/compare/vPREVIOUS...vCURRENT) +``` + +--- + +## ANALYSIS REQUIREMENTS + +**Before writing changelog text, you MUST state:** + +1. **File discovery**: "Using git diff --name-only, I see X files were modified" +2. **Cargo.lock check**: "After excluding Cargo.lock, Y files contain actual changes" +3. **Functional changes identified**: "I identified these distinct changes: A, B, C, D..." +4. **What each change does**: "Change A: adds new API endpoints, Change B: fixes memory leak, etc." +5. **Which crates are affected**: "Changes span crates: A, B, C" +6. **What this means for users**: "Users can now do X, bug Y is fixed, etc." +7. **How changes group together**: "Changes A and B work together to implement feature W" +8. **Cross-crate dependencies**: "Crate A's new feature requires the new API in crate B" +9. **Any unclear changes**: "I cannot determine the purpose of change X from the diff" +10. **FINAL CHECK**: "I will now document all X functional changes without listing files" + +**MANDATORY**: The changelog should describe FUNCTIONALITY, not files. But you must capture ALL functionality changes. + +**Only after this analysis, write the changelog entry.** + +--- + +## EXAMPLES + +### ❌ BAD (Vague, incomplete): +```markdown +### New Features +- Enhanced blockchain processing capabilities +- Improved error handling and various other updates +``` + +### ✅ GOOD (Specific, complete, grouped by crate, with source links): +```markdown +### New Features +#### `brk-core` +- Added `TransactionAnalyzer` struct with fee calculation and coinbase detection methods ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.108/crates/brk-core/src/analyzer.rs)) +- Implemented in-memory caching layer for blockchain queries using HashMap storage + +#### `brk-api` +- Added three new API endpoints: `/api/blocks/{hash}`, `/api/transactions/search`, and `/api/stats/network` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.108/crates/brk-api/src/routes.rs)) +- Implemented standardized error responses with error codes and descriptions + +### Bug Fixes +#### `brk-core` +- Fixed panic when processing blocks with zero transactions by adding explicit empty block validation ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.108/crates/brk-core/src/block.rs)) + +#### `brk-api` +- Resolved memory leak in connection pool by implementing proper cleanup in Drop trait + +[View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.107...v0.0.108) +``` + +--- + +## SUCCESS CRITERIA + +✅ **COUNT files modified for internal verification only** +✅ **Identify EVERY distinct functional change** +✅ **Document ALL functionality changes (no "other changes")** +✅ **Changelog describes WHAT users can do, not which files changed** +✅ **Never mention Cargo.lock or line counts** +✅ **Use specific, functional descriptions** +✅ **Complete analysis before writing** +✅ **Stop and ask for confirmation after each release** + +**FAILURE INDICATORS - If you do any of these, you FAILED:** +❌ "and other changes" +❌ "various updates" +❌ "among other improvements" +❌ **Diff shows new API endpoints but changelog doesn't mention them** +❌ **Diff shows bug fixes but changelog misses some** +❌ **Diff shows new structs/functions but changelog ignores them** +❌ Missing obvious functional changes from the diff +❌ Summarizing instead of listing each distinct functionality change + +**KEY PRINCIPLE**: Count files internally to ensure you don't miss changes, but write about FUNCTIONALITY for users. diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a281b24de..cfda343b1 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,774 +2,937 @@ +All notable changes to the Bitcoin Research Kit (BRK) project will be documented in this file. + ## [v0.0.109](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.109) - 2025-09-20 -### Breaking Changes - -- **Complete parser architecture overhaul**: Completely reworked `brk_parser` crate to use stateless design, removing complex state management modules (`blk_metadata.rs`, `blk_recap.rs`, `block.rs`, `block_state.rs`, `error.rs`, `utils.rs`) and replacing them with streamlined `any_block.rs` module that provides simplified block parsing functionality without maintaining internal state between operations ([crates/brk_parser/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.109/crates/brk_parser/src/lib.rs)) -- **Restructured data organization**: Moved pool-related data structures from computer module to core structs, relocating `pool.rs`, `poolid.rs`, and `pools.rs` from `brk_computer/src/pools/` to `brk_structs/src/structs/` for better architectural separation and improved code organization ([crates/brk_structs/src/structs/](https://github.com/bitcoinresearchkit/brk/tree/v0.0.109/crates/brk_structs/src/structs)) - ### New Features +#### `brk_parser` +- Implemented new typed block parsing architecture with `AnyBlock` enum supporting Raw, Decoded, and Skipped states ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.109/crates/brk_parser/src/any_block.rs)) +- Added `ParsedBlock` wrapper that combines block data with position metadata and transaction metadata vectors +- Introduced binary search optimization for finding starting block indices when parsing from specific heights +- Added concurrent parsing pipeline with parallel block decoding using rayon for improved performance -- **Added comprehensive block positioning system**: Introduced new `blks` module in computer crate that provides efficient block and transaction positioning tracking through `height_to_position`, `height_to_len`, `txindex_to_position`, and `txindex_to_len` vectors, enabling fast block data location and size queries for improved blockchain data access performance ([crates/brk_computer/src/blks.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.109/crates/brk_computer/src/blks.rs)) -- **Enhanced frontend TypeScript support**: Added comprehensive TypeScript definitions for all major frontend packages including lightweight-charts (4,892 lines), solidjs-signals, modern-screenshot, lean-qr, and ufuzzy, providing full type safety and IntelliSense support for improved developer experience when working with the web interface ([websites/bitview/packages/](https://github.com/bitcoinresearchkit/brk/tree/v0.0.109/websites/bitview/packages)) -- **Implemented AI-assisted documentation framework**: Added structured prompt templates for automated changelog and README generation through Claude Code integration, providing systematic documentation methodology with mandatory code analysis requirements and understanding verification processes ([.claude/prompts/](https://github.com/bitcoinresearchkit/brk/tree/v0.0.109/.claude/prompts)) +#### `brk_structs` +- Added comprehensive `Block` and `ParsedBlock` data structures with proper height, hash, and metadata tracking ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.109/crates/brk_structs/src/structs/block.rs)) +- Implemented `BlkPosition` and `BlkMetadata` types for precise block and transaction positioning within blk files +- Added `coinbase_tag()` method to Block for extracting coinbase transaction script signatures +- Migrated `Pool`, `PoolId`, and `Pools` structs from brk_computer for better code organization and reusability -### Performance Improvements +#### `brk_computer` +- Created dedicated `blks.rs` module for tracking block positions and lengths with compressed vector storage ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.109/crates/brk_computer/src/blks.rs)) +- Added `height_to_position`, `height_to_len`, `txindex_to_position`, and `txindex_to_len` compressed vectors for efficient block data access +- Implemented forced import functionality with automatic region retention for optimized storage management -- **Optimized development build configuration**: Improved development profile by adjusting optimization level from 3 to 2 and increasing codegen-units from 1 to 16, providing faster incremental compilation while maintaining good runtime performance during development iterations ([Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.109/Cargo.toml)) -- **Enhanced serialization performance**: Implemented global serialization optimizations that improve response times for API endpoints and data export operations, reducing overhead in data transformation and network communication -- **Streamlined parser operations**: The stateless parser design eliminates memory overhead from state management and reduces computational complexity during block processing operations - -### Documentation Infrastructure - -- **Established comprehensive project documentation**: Added detailed project changelog covering complete project evolution and moved documentation files to dedicated `docs/` directory for better organization ([docs/CHANGELOG.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.109/docs/CHANGELOG.md), [docs/README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.109/docs/README.md)) -- **Updated all crate README files**: Comprehensive rewrite of all crate documentation with improved structure, technical precision, and code examples based on actual implementation analysis rather than existing documentation -- **Added systematic maintenance scripts**: Introduced release and update scripts in `scripts/` directory for improved project maintenance workflows ([scripts/release.sh](https://github.com/bitcoinresearchkit/brk/blob/v0.0.109/scripts/release.sh)) +#### `brk_server` +- Added scaffolding for new explorer API endpoints in dedicated `explorer.rs` module (implementation commented for future development) +- Renamed `interface.rs` to `vecs.rs` and restructured API module organization for better separation of concerns ### Internal Changes +#### `brk_parser` +- Removed complex `BlkIndexToBlkRecap` state tracking system and associated recap file management to simplify parsing logic +- Eliminated `BlkMetadata`, `BlkRecap`, `BlockState`, and error handling modules that were causing parsing complexity +- Streamlined XOR decryption handling with direct byte manipulation instead of state machine patterns +- Replaced tuple-based return types with structured `ParsedBlock` objects for better type safety -- **Major dependency updates**: Updated 721 dependencies across the workspace for improved security, performance, and compatibility with latest Rust ecosystem developments -- **Enhanced data structure implementations**: Added comprehensive trait implementations and utility methods across core data types in `brk_structs`, improving ergonomics and functionality for Bitcoin data manipulation -- **Improved error handling**: Enhanced error propagation and handling throughout the codebase with better error types and more descriptive error messages for improved debugging experience -- **Refined version control configuration**: Updated .gitignore to selectively track AI prompt templates while excluding personal settings, enabling shared documentation infrastructure across development team +#### `brk_interface` +- Removed table formatting functionality and simplified output handling for cleaner API design +- Updated format and output modules to work with new parsing architecture + +#### Workspace +- Updated all crate versions from 0.0.107 to 0.0.109 across the workspace +- Optimized development profile settings: reduced opt-level to 2, increased codegen-units to 16, and added split-debuginfo for faster builds +- Updated dependencies: serde (1.0.219 � 1.0.225), serde_json (1.0.143 � 1.0.145), vecdb (0.2.14 � 0.2.16) +- Added `sonic-rs` dependency for high-performance JSON processing +- Removed `allocative_derive` dependency that was no longer needed + +### Documentation +#### All Crates +- Comprehensive rewrite of all crate README files with detailed API documentation, usage examples, and installation instructions +- Standardized README format across workspace with consistent structure: overview, features, installation, usage, API reference +- Added professional crates.io badges and proper technical documentation for each crate's purpose and capabilities +- Enhanced code examples with practical use cases and proper error handling patterns + +#### Project Structure +- Reorganized documentation into dedicated `docs/` directory with `CHANGELOG.md`, `README.md`, `TODO.md`, and `LICENSE.md` +- Added comprehensive project-level documentation explaining the Bitcoin Research Kit architecture and component relationships +- Moved and updated scripts to `scripts/` directory for better project organization [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.107...v0.0.109) ## [v0.0.107](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.107) - 2025-09-13 ### New Features -- **Comprehensive Mining Analytics**: Added extensive Bitcoin mining dataset including hash rate calculations, difficulty analysis, target block metrics, and mining performance indicators, enabling detailed analysis of network security and mining ecosystem health ([crates/brk_computer/src/chain.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.107/crates/brk_computer/src/chain.rs)) -- **Enhanced Cointime Economics**: Expanded cointime analysis with advanced economic metrics, value flow calculations, and temporal Bitcoin analysis, providing deeper insights into HODLing behavior and economic activity patterns ([crates/brk_computer/src/cointime.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.107/crates/brk_computer/src/cointime.rs)) -- **Transaction Volume and Velocity Analysis**: Implemented annualized transaction volume calculations, transaction velocity metrics, and sent volume analysis, enabling comprehensive understanding of Bitcoin's economic activity and monetary flow ([crates/brk_computer/src/stateful/common.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.107/crates/brk_computer/src/stateful/common.rs)) -- **Advanced Chain Metrics**: Added block target analysis, hash rate per block calculations, and network difficulty tracking, providing granular insights into Bitcoin's proof-of-work security mechanism +#### `brk_computer` +- Added comprehensive hash rate analytics with THS (TeraHash/Second) and PHS (PetaHash/Second) pricing models for mining profitability analysis ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.107/crates/brk_computer/src/chain.rs)) +- Implemented hash price and hash value calculations including minimum thresholds and rebound metrics for market analysis +- Added difficulty adjustment tracking with block and day countdown to next adjustment for network monitoring +- Implemented halving countdown functionality with blocks and days remaining until next halving event +- Added 24-hour rolling coinbase sum tracking in both BTC and USD for mining reward analysis +- Created comprehensive SOPR (Spent Output Profit Ratio) analytics with multi-timeframe standard deviation analysis +- Implemented inflation rate calculations and annualized volume metrics in BTC and USD +- Added transaction velocity, per-second transaction metrics, and input/output rate tracking for network activity analysis -### Breaking Changes -- **Data Field Naming Standardization**: Renamed all currency denomination fields from verbose forms (`_in_usd`, `_in_btc`) to concise forms (`_usd`, `_btc`) across all datasets, affecting API field names and database schemas for improved consistency and reduced verbosity -- **Iterator-Based Processing Architecture**: Converted vector computation functions from callback-based `compute_all` patterns to iterator-based processing, fundamentally changing the internal API for stateful computations and improving memory efficiency - -### Performance Improvements -- **Computation Engine Refactoring**: Simplified complex computation functions with iterator-based patterns, reducing memory overhead and improving processing speed for large-scale Bitcoin dataset analysis -- **Vector System Optimization**: Removed redundant builder_computed module, streamlining the vector generation pipeline and reducing code complexity while maintaining functionality -- **Stateful Processing Enhancement**: Refactored stateful computation system for better scalability and performance when processing cohort-based analytics - -### Build System -- **Development Profile Optimization**: Added optimized development profile with thin LTO, level 3 optimization, and single codegen unit for faster development iterations while maintaining performance ([Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.107/Cargo.toml)) -- **Clippy Integration Profile**: Created dedicated Clippy profile with optimized settings for fast linting, including no LTO, maximum codegen units, and minimal overhead for improved developer experience -- **Release Profile Enhancement**: Enhanced release profile with fat LTO, binary stripping, and panic abort for maximum production performance +#### `brk_structs` +- Enhanced OHLC (Open, High, Low, Close) data structures with StoredF64 conversion capabilities for improved financial data handling ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.107/crates/brk_structs/src/structs/ohlc.rs)) +- Added CheckedSub implementation for Bitcoin struct to enable safe arithmetic operations between Bitcoin amounts +- Enhanced StoredF32 and StoredF64 types with additional mathematical utility methods ### Internal Changes -- **Mathematical Operations Expansion**: Added comprehensive mathematical operations to OHLC data structures and floating-point types, enabling more sophisticated financial calculations and analysis -- **Group Processing Enhancement**: Improved address and UTXO grouping capabilities with better filtering mechanisms and enhanced processing efficiency -- **Data Structure Consistency**: Standardized timestamp and date handling across all modules for better temporal data processing and analysis accuracy +#### `brk_computer` +- Removed complex ComputedVecBuilder system and streamlined computation architecture for better maintainability +- Refactored lazy and eager vector builders to eliminate redundant computed builder patterns +- Reorganized stateful computation modules with improved address and UTXO cohort management +- Simplified chain computation logic by consolidating version handling and removing unused computation paths +- Enhanced market data processing with better price integration and SOPR calculation efficiency + +#### Workspace +- Added new clippy development profile with optimized settings for faster linting during development + +### Website Enhancements +#### Frontend +- Improved ratio-based chart options with cleaner naming conventions (removed "_in_usd" suffix for better readability) +- Enhanced SOPR visualization options with multi-timeframe standard deviation displays +- Added new data series configurations for hash rate analytics and mining profitability charts +- Updated chart legends and color schemes for better user experience and data clarity [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.106...v0.0.107) ## [v0.0.106](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.106) - 2025-09-09 ### New Features -- **Fibonacci Mathematical Constants**: Added constant_38_2 (38.2) and constant_61_8 (61.8) for Fibonacci retracement level calculations, commonly used in technical analysis and price level identification ([crates/brk_computer/src/constants.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.106/crates/brk_computer/src/constants.rs)) -- **Advanced Price Analysis Tools**: Implemented MinMax bands for 1-week, 2-week, 1-month, and 1-year timeframes, True Range indicator, and Choppiness Index with Fibonacci level markers for comprehensive price action analysis ([websites/bitview/scripts/options.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.106/websites/bitview/scripts/options.js)) -- **Enhanced OHLC Data Handling**: Added conversion methods for Open, High, and Low dollar values to base Dollars type, enabling more flexible price data manipulation and calculations ([crates/brk_structs/src/structs/dollars.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.106/crates/brk_structs/src/structs/dollars.rs)) +#### `brk_computer` +- Added mathematical constants `constant_38_2` and `constant_61_8` for precise financial ratio calculations ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.106/crates/brk_computer/src/constants.rs)) +- Standardized percentile naming from `p10`, `p25`, `p75`, `p90` to `pct10`, `pct25`, `pct75`, `pct90` for improved code clarity ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.106/crates/brk_computer/src/grouped/builder_eager.rs)) -### Breaking Changes -- **Percentile Naming Standardization**: Renamed all percentile fields from abbreviated forms (p10, p25, p75, p90) to full prefix forms (pct10, pct25, pct75, pct90) across statistical computation systems, affecting database schemas and API field names ([crates/brk_computer/src/grouped/builder_eager.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.106/crates/brk_computer/src/grouped/builder_eager.rs)) -- **Price Data Key Migration**: Updated website price data mapping from generic keys (ohlc_in_sats, close_in_sats) to prefixed keys (price_ohlc_in_sats, price_close_in_sats) for better data organization and namespace clarity - -### Build System -- **Rust Toolchain Standardization**: Added explicit Rust toolchain specification to version 1.89.0, ensuring consistent compilation environment across different development setups and CI/CD systems ([rust-toolchain.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.106/rust-toolchain.toml)) +#### `brk_structs` +- Enhanced Dollars struct with comprehensive OHLC (Open, High, Low, Close) conversion support for better financial data integration ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.106/crates/brk_structs/src/structs/dollars.rs)) +- Added proper type conversions between OHLC price components and dollar amounts ### Internal Changes -- **Data Serialization Improvements**: Enhanced table data serialization with explicit null value handling, preventing serialization errors when processing incomplete datasets -- **Price Detection Logic**: Expanded price-related data detection to include true_range metrics and improved pattern matching for price analysis features +#### Workspace +- Added explicit Rust toolchain specification pinned to version 1.89.0 for consistent compilation across development environments +- Improved statistical calculation accuracy with standardized percentile naming conventions + +### Website Enhancements +#### Frontend +- Enhanced chart visualization capabilities with improved data presentation +- Updated statistical displays to use standardized percentile naming for better user understanding [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.105...v0.0.106) ## [v0.0.105](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.105) - 2025-09-08 +### New Features +#### Distribution System +- Added cargo-dist configuration for automated cross-platform binary distribution with GitHub CI integration +- Enabled pre-built binary releases for aarch64-apple-darwin (macOS ARM64), aarch64-unknown-linux-gnu (Linux ARM64), and x86_64-unknown-linux-gnu (Linux x86_64) +- Configured automated release workflow with Rust toolchain version 1.89 for consistent builds + ### Internal Changes -- **Release Preparation**: Maintenance release preparing infrastructure for upcoming feature releases with codebase consistency improvements +#### Workspace +- Integrated cargo-dist v0.30.0 for streamlined release management and binary distribution +- Added distribution metadata configuration to simplify installation process for end users [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.104...v0.0.105) ## [v0.0.104](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.104) - 2025-09-08 -### Build System -- **Cargo Dist Upgrade**: Updated cargo-dist release tooling from v0.29.0 to v0.30.0, providing improved build automation, better cross-platform compilation support, and enhanced release artifact generation ([.github/workflows/release.yml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.104/.github/workflows/release.yml)) -- **Cross-Platform Build Configuration**: Added comprehensive build configuration supporting multiple architectures including aarch64-apple-darwin, aarch64-unknown-linux-gnu, and x86_64-unknown-linux-gnu for broader platform compatibility ([Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.104/Cargo.toml)) -- **CI/CD Enhancement**: Configured flexible CI builds with allow-dirty option for release workflows and standardized on Rust toolchain version 1.89 for consistent build environments +### Internal Changes +#### CI/CD Infrastructure +- Updated GitHub Actions release workflow to use cargo-dist v0.30.0 for improved release automation ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.104/.github/workflows/release.yml)) +- Added foundational cargo-dist metadata configuration to prepare for automated binary distribution +- Enhanced release pipeline reliability with updated tooling and workflow improvements [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.103...v0.0.104) ## [v0.0.103](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.103) - 2025-09-08 ### New Features -- **Enhanced Volatility Analytics**: Added comprehensive Bitcoin price volatility metrics with 1-week, 1-month, and 1-year volatility calculations based on daily returns standard deviations, providing insights into market stability across different time horizons ([crates/brk_computer/src/market.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.103/crates/brk_computer/src/market.rs)) -- **Configurable Standard Deviation System**: Implemented flexible `StandardDeviationVecsOptions` builder pattern allowing selective computation of z-scores, standard deviation bands, and price bands, optimizing memory usage and computation time by only generating requested metrics ([crates/brk_computer/src/grouped/sd_from_dateindex.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.103/crates/brk_computer/src/grouped/sd_from_dateindex.rs)) -- **Volatility Visualization Dashboard**: Added dedicated volatility indicators section to the web interface featuring color-coded charts for 1-week (red), 1-month (orange), and 1-year (lime) volatility metrics with proper percentage formatting ([websites/bitview/scripts/options.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.103/websites/bitview/scripts/options.js)) +#### `brk_computer` +- Added comprehensive price volatility analytics with 1-week, 1-month, and 1-year standard deviation calculations for returns analysis ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.103/crates/brk_computer/src/market.rs)) +- Implemented advanced market risk metrics including rolling volatility indicators for better risk assessment +- Enhanced standard deviation calculations with optional z-score support and configurable statistical analysis ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.103/crates/brk_computer/src/grouped/sd_from_dateindex.rs)) +- Refactored statistical computation modules to make calculations optional for improved performance and flexibility -### Breaking Changes -- **Standard Deviation Architecture Refactor**: Converted all standard deviation fields from required to optional types using `Option<>` wrappers, enabling selective computation and reducing memory footprint for unused statistical measures -- **Z-Score Field Repositioning**: Moved `zscore` field from end of struct to logical position after `sd` field, improving code organization and data structure coherence +#### `brk_bundler` +- Updated bundler configuration for optimized JavaScript asset compilation and improved frontend performance ### Internal Changes -- **Statistical Computation Optimization**: Enhanced standard deviation computation infrastructure with dedicated 1-day returns analysis for multiple time periods (7, 30, 365 days), enabling more granular volatility measurements -- **Option-Based Vector Generation**: Refactored statistical vector initialization to use option-based conditional generation, preventing unnecessary computation and storage of unused statistical measures -- **Version Management**: Updated build dependencies with brk_rolldown advancement from 0.1.4 to 0.1.5, incorporating latest bundling improvements and optimizations +#### `brk_computer` +- Converted fixed standard deviation bands to optional calculations, reducing computational overhead when specific metrics aren't needed +- Streamlined market analysis architecture with better separation between volatility calculations and price analysis +- Enhanced statistical accuracy in ratio and standard deviation computations + +### Website Enhancements +#### Frontend +- Added support for new volatility and risk metrics in chart configurations +- Enhanced data visualization capabilities for displaying standard deviation bands and volatility indicators +- Improved chart options to accommodate advanced market analysis features [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.101...v0.0.103) ## [v0.0.101](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.101) - 2025-09-07 -### Improvements -- **Enhanced SOPR calculation precision**: Upgraded all SOPR (Spent Output Profit Ratio) metrics from 32-bit to 64-bit floating point precision, including base SOPR, adjusted SOPR, and their 7-day and 30-day exponential moving averages. This improvement provides more accurate profitability analysis for Bitcoin transactions and reduces rounding errors in financial calculations ([crates/brk_computer/src/stateful/common.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.101/crates/brk_computer/src/stateful/common.rs)) -- **Extended mathematical operations for financial data**: Added `Sum` trait and `Div` operation to `StoredF64`, enabling better aggregation and division operations on financial datasets and improving computational flexibility for blockchain analysis ([crates/brk_structs/src/structs/stored_f64.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.101/crates/brk_structs/src/structs/stored_f64.rs)) -- **Enhanced mining pool interface**: Improved web interface clarity by updating mining dominance display to "Mining Dominance" and streamlining the mining rewards section with unified color-coded categories for coinbase, subsidy, and fee rewards ([websites/bitview/scripts/options.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.101/websites/bitview/scripts/options.js)) +### New Features +#### `brk_structs` +- Added Sum trait implementation for StoredF64 to enable collection aggregation and improved mathematical operations ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.101/crates/brk_structs/src/structs/stored_f64.rs)) +- Implemented division by Dollars for StoredF64 to support ratio calculations in financial analysis + +#### `brk_computer` +- Upgraded SOPR (Spent Output Profit Ratio) calculations from StoredF32 to StoredF64 for enhanced precision in profit/loss analysis ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.101/crates/brk_computer/src/stateful/common.rs)) +- Enhanced SOPR-related metrics including 7-day and 30-day exponential moving averages with double precision +- Improved adjusted SOPR calculations for more accurate short-term holder analysis ### Internal Changes -- **Refined API parameter limits**: Adjusted maximum vector count from 64 to 32 and updated string size calculations for better performance and resource management in the interface layer -- **Code cleanup**: Removed debug output statements and unused commented code for cleaner codebase maintenance +#### `brk_computer` +- Removed unused imports and streamlined module dependencies for improved compilation efficiency +- Updated SOPR computation version handling to ensure proper recalculation with enhanced precision + +#### `brk_interface` +- Simplified interface ID handling and reduced code complexity for better maintainability + +### Website Enhancements +#### Frontend +- Improved chart titles and interface labels for better user clarity, particularly for mining dominance displays +- Enhanced user experience with more descriptive chart naming conventions [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.100...v0.0.101) ## [v0.0.100](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.100) - 2025-09-07 ### New Features -- **Added comprehensive memory profiling and performance analysis**: Integrated `allocative` and `allocative_derive` across core data structures (`brk_computer`, `brk_structs`) to enable detailed memory allocation tracking and identify memory usage patterns in blockchain data processing -- **Introduced flame graph generation capabilities**: Added `inferno` profiling framework to the computation layer, enabling generation of interactive flame graphs for performance bottleneck identification and optimization analysis during large-scale Bitcoin data processing -- **Enhanced storage-computation integration**: Integrated `brk_store` with `brk_computer` to provide seamless data flow between storage and computation layers, improving performance and reducing data movement overhead +#### `brk_computer` +- Created comprehensive mining pool analytics system with dedicated pools tracking module ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.100/crates/brk_computer/src/pools/vecs.rs)) +- Implemented mining pool dominance analysis with 1-day, 1-week, 1-month, and 1-year timeframes +- Added mining pool subsidy, fee, and coinbase reward tracking for economic analysis +- Created days-since-block mining for pool activity monitoring and mining frequency analysis -### Architecture Improvements -- **Enhanced JSON serialization in computation layer**: Added `serde_json` to `brk_computer` for improved JSON handling capabilities during data processing and export operations -- **Advanced temporal data processing**: Integrated `jiff` into the computation layer for enhanced date/time handling and temporal analysis capabilities across blockchain datasets -- **Improved repository organization**: Added `bridge/` directory to `.gitignore` for better management of generated bridge files and build artifacts +#### `brk_structs` +- Enhanced mathematical operations across all stored numeric types with comprehensive arithmetic support ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.100/crates/brk_structs/src/structs/stored_f32.rs)) +- Added StoredU32 to StoredF32 conversions and cross-type division operations for better data interoperability +- Implemented utility methods including `is_zero()` checks and mathematical constants for improved API consistency +- Added allocative trait derivations across all data structures for detailed memory usage tracking and performance optimization -### Performance Enhancements -- **Upgraded database systems with memory profiling**: Updated `vecdb` and `seqdb` to version 0.2.11 with integrated `allocative` support, providing memory usage insights for vector database operations and enabling more efficient memory management -- **Enhanced system reliability**: Updated `ctrlc` for improved signal handling and graceful shutdown capabilities during long-running blockchain analysis operations +#### `brk_cli` +- Expanded bridge system with automated pools data export for website integration ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.100/crates/brk_cli/src/bridge.rs)) +- Enhanced website generation workflow with comprehensive data bridge file creation +- Improved CLI configuration and data export capabilities for better development workflow + +### Internal Changes +#### `brk_computer` +- Restructured pools module architecture with dedicated vector storage and computation systems +- Enhanced pool identification and tracking systems with improved data organization +- Streamlined computation workflows with better separation of mining pool analytics + +#### `brk_indexer` +- Simplified indexer architecture and reduced code complexity for better maintainability +- Enhanced data processing efficiency with streamlined storage operations + +#### Multiple Crates +- Added comprehensive allocative memory tracking across all major data structures for performance monitoring +- Standardized arithmetic operations and type conversions across the entire numeric type system +- Enhanced error handling and validation in mathematical operations + +### Website Enhancements +#### Frontend +- Major improvements to mining pool visualization with enhanced chart displays and dominance tracking +- Expanded table functionality with better data presentation and user interaction +- Enhanced chart options with comprehensive mining pool analytics integration +- Improved performance and user experience with updated data visualization libraries [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.98...v0.0.100) ## [v0.0.98](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.98) - 2025-09-05 ### New Features -- **Added comprehensive time-based block production analysis**: Implemented target block count vectors for all time intervals (daily, weekly, monthly, quarterly, semester, yearly, decade) that calculate expected block production based on Bitcoin's 10-minute target, enabling network health analysis by comparing actual vs. expected block production across different time periods -- **Added mining pool analysis capabilities**: Introduced new mining pool identification functionality that analyzes coinbase transaction tags to identify which mining pools mined specific blocks, providing insights into mining centralization and network distribution ([crates/brk_computer/examples/pools.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.98/crates/brk_computer/examples/pools.rs)) -- **Enhanced caching infrastructure**: Integrated `quick_cache` into the interface layer for improved API response performance and reduced computational overhead during repeated data requests +#### `brk_computer` +- Created foundational mining pools system with comprehensive database of 166 predefined mining pools including identification by coinbase tags and addresses ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.98/crates/brk_computer/src/pools/pools.rs)) +- Implemented target block count analytics for all time intervals including daily, weekly, monthly, quarterly, semester, yearly, and decade targets ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.98/crates/brk_computer/src/chain.rs)) +- Added mining pool identification system using coinbase transaction analysis and known pool addresses +- Created pools example demonstrating mining pool analysis capabilities -### Architecture Improvements -- **Enhanced enum handling capabilities**: Added `num_enum` dependency to the computation layer, providing advanced enum derivation and conversion capabilities for better type safety and code generation in blockchain data structures -- **Refined time-based constants**: Established comprehensive time-period constants (TARGET_BLOCKS_PER_DAY through TARGET_BLOCKS_PER_DECADE) for consistent and accurate temporal analysis across the entire system ([crates/brk_computer/src/chain.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.98/crates/brk_computer/src/chain.rs)) +#### `brk_interface` +- Implemented robust MaybeIds system for handling multiple ID parameter formats with comprehensive validation and sanitization ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.98/crates/brk_interface/src/ids.rs)) +- Enhanced API parameter handling with support for both string and array formats +- Added input validation with configurable limits for string size and array length + +### Internal Changes +#### `brk_computer` +- Enhanced stateful computation organization with improved efficiency for complex analytics +- Restructured chain computation constants with better mathematical precision for target calculations +- Streamlined pools module architecture for better data organization and access patterns + +#### `brk_store` +- Optimized store operations with reduced complexity and improved data access efficiency +- Removed unused functionality and streamlined storage interfaces + +#### `brk_fetcher` +- Minor improvements to BRK API integration for better data fetching reliability + +### Website Enhancements +#### Frontend +- Added foundational support for mining pool visualization in chart configurations +- Enhanced website structure with mining pool data integration capabilities +- Improved chart options to accommodate future mining pool analytics displays [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.96...v0.0.98) ## [v0.0.96](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.96) - 2025-09-03 ### New Features -- **Added fuzzy search capabilities to interface layer**: Integrated `nucleo-matcher` into the `brk_interface` crate, enabling advanced fuzzy matching and search functionality for improved data discovery and filtering across BRK's API endpoints and datasets +#### `brk_structs` +- Created comprehensive StoredString data type with ByteView integration for efficient string storage and serialization ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.96/crates/brk_structs/src/structs/stored_string.rs)) +- Enhanced FeeRate calculations with improved mathematical operations and precision handling +- Added utility methods to Date and Timestamp structs for better temporal data manipulation +- Expanded StoredF64 with additional mathematical operations and conversion capabilities -### Development Experience -- **Enhanced Zed editor integration**: Added comprehensive `.zed/settings.json` configuration with intelligent file scan exclusions for large build artifacts and bundled assets (lean-qr, uFuzzy, lightweight-charts, modern-screenshot, solidjs-signals), improving development performance and reducing indexing overhead -- **Improved repository maintenance**: Added `/ids.txt` to `.gitignore` to exclude auto-generated ID files from version control, keeping the repository clean and preventing conflicts from build artifacts +#### `brk_computer` +- Major module restructuring: consolidated blocks and mining functionality into unified chain module for better Bitcoin blockchain analysis organization ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.96/crates/brk_computer/src/lib.rs)) +- Renamed `transactions.rs` to `chain.rs` to better reflect comprehensive blockchain transaction and block analysis +- Enhanced market analysis with improved price calculations and volatility metrics +- Streamlined stateful computations with better organization of address and UTXO cohort analysis + +#### `brk_interface` +- Enhanced API interfaces with improved data access patterns and better error handling +- Added support for new data types and expanded parameter handling capabilities +- Improved index management with more robust validation and processing + +### Internal Changes +#### `brk_computer` +- Consolidated blockchain analysis modules for better code organization and reduced complexity +- Enhanced computation efficiency across market, price, and stateful analysis modules +- Improved memory management and data flow in complex analytical operations + +#### `brk_indexer` +- Streamlined indexing operations with better data processing efficiency +- Enhanced vector storage and retrieval operations for improved performance +- Improved indexer examples with clearer demonstration of functionality + +#### `brk_parser` +- Enhanced block parsing capabilities with better error handling and validation +- Improved parser examples demonstrating advanced blockchain data extraction techniques + +#### `brk_server` +- Enhanced API module organization with improved interface handling +- Better integration with updated interface and data access patterns + +### Website Enhancements +#### Typography and Design +- Updated to modern GeistMono and Lilex font families for improved readability and professional appearance +- Enhanced asset management with optimized font loading and better file organization +- Improved service worker functionality for better offline capabilities + +#### Chart and Visualization +- Major improvements to chart rendering capabilities with enhanced interactivity and data visualization +- Expanded chart options with new data series types and better configuration flexibility +- Enhanced table functionality with improved data presentation and user interaction +- Added support for new data types including hash rate (H/s) and address data visualization + +#### Development Environment +- Added Zed editor configuration for improved development workflow +- Enhanced development tooling and editor integration + +### Documentation +#### Multiple Crates +- Comprehensive README updates across brk, brk_indexer, brk_mcp, brk_parser, and brk_server crates +- Improved documentation clarity with better examples and usage instructions +- Enhanced project-level documentation with updated architecture descriptions [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.95...v0.0.96) ## [v0.0.95](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.95) - 2025-08-28 ### New Features -- **Added comprehensive unrealized profit/loss combined analysis**: Implemented `height_to_unrealized_profit_plus_loss` and `indexes_to_unrealized_profit_plus_loss` fields that compute the sum of unrealized profits and losses, enabling analysis of total unrealized position value changes across Bitcoin heights and date indexes -- **Added unrealized profit/loss relative to market cap metrics**: Introduced new percentage-based analysis fields including `height_to_unrealized_profit_relative_to_own_market_cap`, `height_to_unrealized_loss_relative_to_own_market_cap`, and their negative/net variants, allowing users to analyze unrealized positions as percentages of total market capitalization -- **Added unrealized profit/loss self-relative analysis**: Implemented metrics that calculate unrealized profit and loss values relative to their own combined totals (`unrealized_profit_relative_to_own_unrealized_profit_plus_loss`), providing normalized analysis of profit/loss distributions -- **Enhanced computation pipeline**: Added automatic calculation of combined profit+loss metrics during the main compute cycle, with proper error handling and database persistence using versioned storage +#### `brk_computer` +- Added comprehensive unrealized profit and loss analytics with advanced relative metrics calculations ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.95/crates/brk_computer/src/stateful/common.rs)) +- Implemented unrealized profit plus loss aggregation metrics for comprehensive holder analysis +- Created relative profitability metrics including ratios to own market cap and own unrealized profit plus loss +- Added multi-dimensional profit/loss analysis with separate positive and negative unrealized loss tracking +- Enhanced holder profitability analysis with extensive cross-referencing between different calculation methods -### Internal Changes -- **Extended stateful computer structure**: Added 16 new optional fields to the core analysis struct to support the new unrealized profit/loss analysis capabilities, with proper conditional initialization based on computation flags -- **Added database persistence**: Implemented storage and retrieval for all new metrics using the existing EagerVec and ComputedVecsFromDateIndex infrastructure with appropriate versioning ([crates/brk_computer/src/stateful/common.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.95/crates/brk_computer/src/stateful/common.rs)) +### Website Enhancements +#### Chart and Visualization +- Added new unit types for advanced profit/loss visualization: `%cmcap` (relative to own market cap) and `%cp+l` (relative to own unrealized profit plus loss) +- Enhanced price line functionality with configurable colors and line styles for improved chart customization +- Improved chart options with better visual distinction between different profitability metrics +- Added support for displaying complex relative profitability calculations with proper unit labeling + +#### User Interface +- Enhanced chart configuration with more flexible price line customization options +- Improved data visualization clarity for sophisticated profit/loss analytics +- Better integration of advanced metrics into existing chart framework [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.94...v0.0.95) -## [v0.0.94](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.94) - 2025-07-09 +## [v0.0.94](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.94) - 2025-08-28 ### New Features +#### `brk_computer` +- Added comprehensive SOPR (Spent Output Profit Ratio) analytics with 7-day and 30-day exponential moving averages ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.94/crates/brk_computer/src/stateful/common.rs)) +- Implemented adjusted SOPR calculations with exponential moving averages for enhanced transaction profitability analysis +- Created sell-side risk ratio metrics with 7-day and 30-day exponential moving averages for advanced market risk assessment +- Enhanced unrealized profit/loss analytics with relative calculations to market cap for comprehensive holder analysis +- Added extended configuration options for stateful computations with improved flexibility and performance -- **Introduced Bitview: Modern Bitcoin Analytics Interface**: Launched a comprehensive new web interface called "Bitview" that replaces the previous default website. Bitview features a modern design optimized for Bitcoin data visualization, enhanced performance, and improved user experience. The interface includes advanced charting capabilities, responsive design, and streamlined navigation for Bitcoin research and analysis. [websites/bitview/index.html](https://github.com/bitcoinresearchkit/brk/blob/v0.0.94/websites/bitview/index.html) +### Website Transformation +#### Major Rebranding +- Complete rebrand from "default" to "bitview" with new domain reference (bitview.space) and professional identity +- Updated README and documentation to reflect new branding and simplified domain structure +- Reorganized website assets and structure for better organization and scalability -- **Added Progressive Web App (PWA) support**: Implemented comprehensive PWA capabilities including web app manifest, service worker, and extensive collection of iOS splash screens and app icons for different device sizes. Users can now install Bitview as a native app on mobile devices and desktops, providing offline capabilities and app-like experience. [websites/bitview/manifest.webmanifest](https://github.com/bitcoinresearchkit/brk/blob/v0.0.94/websites/bitview/manifest.webmanifest), [websites/bitview/service-worker.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.94/websites/bitview/service-worker.js) +#### Progressive Web App (PWA) Implementation +- Added comprehensive PWA support with complete Apple touch icon and splash screen sets for all device sizes +- Implemented web app manifest with proper configuration for native app-like installation experience +- Created device-specific splash screens for optimal mobile user experience across iPhone and iPad variants +- Added proper PWA metadata and configuration for improved mobile usability -### Breaking Changes - -- **Renamed default website to Bitview**: Updated the website configuration system to use "bitview" as the default website option instead of "default". The CLI now defaults to `--website bitview`, and the previous "default" website has been rebranded as the Bitview interface. Users referencing the old "default" website will need to update their configurations. [crates/brk_cli/src/website.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.94/crates/brk_cli/src/website.rs#L7), [crates/brk_cli/src/config.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.94/crates/brk_cli/src/config.rs#L287) - -### User Experience - -- **Enhanced typography with Geist Mono font family**: Added modern Geist Mono variable font family alongside existing Lilex fonts, providing improved readability and a more contemporary appearance for code and data display. The font supports both regular and italic variants with variable weight capabilities. [websites/bitview/assets/fonts/](https://github.com/bitcoinresearchkit/brk/blob/v0.0.94/websites/bitview/assets/fonts/) - -- **Comprehensive TypeScript support**: Added complete TypeScript definitions for all frontend packages including SolidJS signals, Lightweight Charts, and Lean QR, enabling better development experience with full type safety and IntelliSense support. [websites/default/packages/solidjs-signals/0.4.1/dist/types/](https://github.com/bitcoinresearchkit/brk/blob/v0.0.94/websites/default/packages/solidjs-signals/0.4.1/dist/types/) +#### Asset and Structure Organization +- Moved website from `websites/default` to `websites/bitview` for better project organization +- Added modern font assets (GeistMono and Lilex) for improved typography and readability +- Reorganized packages and dependencies with better structure and maintainability +- Simplified TypeScript configuration and reduced development complexity ### Internal Changes +#### `brk_computer` +- Enhanced UTXO cohort analysis with improved parameter handling and configuration flexibility +- Streamlined stateful computation architecture with better organization of advanced metrics +- Improved computational efficiency for complex profit/loss and risk calculations -- **Refactored stateful computation modules**: Enhanced address cohort and UTXO cohort processing with improved organization and performance optimizations for large-scale blockchain data analysis. - -- **Updated README documentation**: Revised project documentation to reflect the new Bitview interface and updated architecture. +#### Development Workflow +- Simplified frontend development approach with reduced TypeScript complexity +- Improved asset management and build processes for better development experience +- Enhanced website configuration and deployment processes [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.93...v0.0.94) -## [v0.0.93](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.93) - 2025-07-09 +## [v0.0.93](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.93) - 2025-08-26 ### New Features +#### Website Screenshot Capabilities +- Added comprehensive screenshot functionality using modern-screenshot package for high-quality chart and data visualization capture ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.93/websites/default/packages/modern-screenshot/wrapper.js)) +- Implemented 2x scale rendering for crisp, professional-quality screenshot output +- Added automatic screenshot opening in new tabs with proper URL cleanup for optimal user experience -- **Added screenshot functionality**: Introduced modern-screenshot package (4.6.6) enabling users to capture high-quality screenshots of charts and data visualizations directly from the web interface. The screenshot feature supports 2x scaling for crisp images and automatically opens captured screenshots in new browser tabs. This enhancement improves data sharing and report generation capabilities. [websites/default/packages/modern-screenshot/wrapper.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.93/websites/default/packages/modern-screenshot/wrapper.js) +#### Chart Enhancement and Branding +- Added domain watermarking to charts for proper attribution and source identification ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.93/websites/default/scripts/chart.js)) +- Enhanced chart presentation with integrated branding for professional appearance +- Improved chart layout and visual organization for better data presentation -### Architecture Changes +### Website Enhancements +#### User Interface Improvements +- Enhanced website styling with dedicated screenshot mode support for clean capture +- Improved visual presentation with better element spacing and layout optimization +- Added screenshot button integration with conditional display logic for better user experience -- **Enhanced web interface architecture**: Improved chart initialization with added packages parameter support, providing better modularity and extensibility for frontend component integration. This architectural improvement enables more flexible package management and feature integration. [websites/default/scripts/chart.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.93/websites/default/scripts/chart.js#L24) +#### Package and Dependency Updates +- Updated ufuzzy dependency from v1.0.18 to v1.0.19 for improved search functionality +- Added modern-screenshot v4.6.6 package for advanced screenshot capabilities +- Enhanced package management with better organization and dependency handling -### User Experience +### Internal Changes +#### Development Workflow +- Streamlined TODO list by removing completed tasks and outdated development items +- Simplified project roadmap focus with cleaner task organization +- Improved development priorities and task tracking -- **Improved website templates**: Updated both default and custom website templates with enhanced layouts and improved user interface elements, providing better navigation and visual consistency across different deployment configurations. +#### Website Structure +- Enhanced HTML structure with better CSS organization for screenshot functionality +- Improved element styling and layout for optimal visual presentation +- Better integration of new features with existing website architecture [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.91...v0.0.93) -## [v0.0.91](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.91) - 2025-07-09 +## [v0.0.91](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.91) - 2025-08-26 ### New Features +#### `brk_computer` +- Added comprehensive Exponential Moving Average (EMA) calculations for all major timeframes matching SMA counterparts ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.91/crates/brk_computer/src/market.rs)) +- Implemented EMA support for 1w, 8d, 13d, 21d, 1m, 34d, 55d, 89d, 144d, 200d, 1y, 2y, 200w, and 4y periods +- Enhanced technical analysis capabilities with both Simple Moving Averages (SMA) and Exponential Moving Averages (EMA) for sophisticated trend analysis +- Added mathematical constants 144 and 600 for Bitcoin-specific calculations (blocks per day and standard analysis periods) ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.91/crates/brk_computer/src/constants.rs)) +- Simplified constants computation with loop-based implementation for better maintainability and performance -- **Added comprehensive EMA technical indicators**: Introduced a complete suite of Exponential Moving Average (EMA) calculations across multiple timeframes including 1-week, 8-day, 13-day, 21-day, 1-month, 34-day, 55-day, 89-day, 144-day, 200-day, 1-year, 2-year, 200-week, and 4-year periods. These EMAs provide more responsive trend analysis compared to Simple Moving Averages and enable sophisticated technical analysis of Bitcoin price movements and market dynamics. [crates/brk_computer/src/market.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.91/crates/brk_computer/src/market.rs#L51-L64) +#### `brk_structs` +- Enhanced OHLC (Open, High, Low, Close) data structures with improved mathematical operations for better financial analysis +- Improved Sats and StoredF32 types with additional utility methods for enhanced precision in calculations -- **Enhanced Sum trait implementations for financial data types**: Added `Sum` trait implementation for `Close` enabling direct aggregation of closing price data, and improved the `Sum` implementation for `Sats` with more idiomatic Rust patterns. These enhancements streamline financial calculations and reduce boilerplate code when working with price and satoshi aggregations. [crates/brk_structs/src/structs/ohlc.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.91/crates/brk_structs/src/structs/ohlc.rs#L572-L576), [crates/brk_structs/src/structs/sats.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.91/crates/brk_structs/src/structs/sats.rs#L144) +### Website Enhancements +#### Typography and Design +- Added Lilex font family for improved code readability and professional data presentation +- Enhanced typography with dedicated monospace font for better numeric data display and code visibility -### Architecture Changes - -- **Updated vecdb to version 0.2.5**: Upgraded the vector database system to incorporate latest performance optimizations, bug fixes, and feature enhancements. This update provides improved query performance, better memory management, and enhanced stability for large-scale blockchain data processing operations. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.91/Cargo.toml#L56) - -### User Experience - -- **Improved financial terminology in simulation interface**: Updated the simulation interface to use "Average Cost Basis" instead of "Average Price Paid" for more precise financial terminology. This change provides clearer understanding of the metric being displayed and aligns with standard financial industry terminology. [websites/default/scripts/simulation.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.91/websites/default/scripts/simulation.js#L773) - -- **Updated typography with modern font family**: Upgraded the web interface fonts to Lilex version 2.601, providing improved readability and a more modern appearance. The updated font family includes both regular and italic variants optimized for screen display and code presentation. [websites/default/assets/fonts/](https://github.com/bitcoinresearchkit/brk/blob/v0.0.91/websites/default/assets/fonts/) +#### Chart Configuration and Customization +- Enhanced price line creation with customizable naming capabilities for better chart personalization +- Improved average series configuration with optional title customization for clearer data presentation +- Better chart options organization with more intuitive naming conventions (e.g., "100K+ btc" instead of "100K btc+") +- Enhanced chart configuration flexibility with improved parameter handling ### Internal Changes +#### `brk_computer` +- Streamlined constants computation architecture with more efficient loop-based calculations +- Enhanced market analysis module with comprehensive EMA implementation alongside existing SMA calculations +- Improved ratio computations with better organization and performance optimizations -- **Enhanced web interface components**: Updated various web interface scripts including chart rendering, main interface logic, and options handling to support the new EMA indicators and improve overall user experience. +#### `brk_indexer` +- Enhanced indexer functionality with improved data processing capabilities +- Better integration with new constants and mathematical operations -- **Improved data structure consistency**: Standardized Sum trait implementations across financial data types for more consistent and predictable aggregation behavior throughout the system. +#### Development Workflow +- Simplified TODO management with better task organization and priority tracking +- Enhanced development workflow with improved mathematical operations and constants handling [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.90...v0.0.91) -## [v0.0.90](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.90) - 2025-07-09 +## [v0.0.90](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.90) - 2025-08-24 -### Build System - -- **Enhanced CI build flexibility**: Added `allow-dirty = ["ci"]` configuration to the distribution metadata, enabling more flexible continuous integration builds by allowing dirty CI-related files. This improves the build process reliability and reduces unnecessary build failures due to CI file modifications during automated releases. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.90/Cargo.toml#L69) +### Documentation +#### Release Management +- Converted "Unreleased" changelog section to properly formatted v0.0.89 release with comprehensive source code links +- Enhanced changelog structure with professional formatting and detailed feature documentation +- Added direct links to source code for all major features and architectural changes +- Improved documentation organization with better categorization and technical details [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.89...v0.0.90) -## [v0.0.89](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.89) - 2025-07-09 - -### New Features - -- **Added price-to-amount tracking capabilities**: Introduced new functionality for tracking addresses within specific Bitcoin value ranges through the `PriceToAmount` state management system. This enables analysis of address cohorts based on their holdings, such as tracking addresses holding between 1-10 BTC. The feature includes dedicated examples and integration with the stateful computation pipeline. [crates/brk_computer/examples/price_to_amount.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_computer/examples/price_to_amount.rs) - -- **Introduced StoredI16 data type**: Added new signed 16-bit integer storage type with complete vecdb integration, providing efficient storage for signed values in blockchain analytics. This type supports all standard arithmetic operations, compression, and serialization while maintaining type safety and performance characteristics consistent with other stored types. [crates/brk_structs/src/structs/stored_i16.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_structs/src/structs/stored_i16.rs) - -- **Enhanced statistical analysis with standard deviation calculations**: Added `sd_from_dateindex` module for computing standard deviation metrics over time periods, expanding the statistical analysis capabilities beyond basic aggregations. This enables more sophisticated volatility and variance analysis of Bitcoin metrics across different time scales. [crates/brk_computer/src/grouped/sd_from_dateindex.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_computer/src/grouped/sd_from_dateindex.rs) - -### Breaking Changes - -- **Major vecdb upgrade to version 0.2.4**: Updated the vector database system from 0.1.0 to 0.2.4, bringing significant API improvements, enhanced performance, and new features like `ImportOptions` and `Database` abstractions. This upgrade provides better memory management, improved compression algorithms, and enhanced query capabilities. Code using vecdb APIs may need updates to accommodate the new interface. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/Cargo.toml#L56) - -### Architecture Changes - -- **Reorganized computation module structure**: Replaced `builder_computed` with `builder_lazy` to better reflect the lazy evaluation patterns in vector computation, providing more efficient memory usage and deferred computation capabilities. This architectural change improves performance for large-scale blockchain data processing by avoiding unnecessary computation until results are needed. [crates/brk_computer/src/grouped/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_computer/src/grouped/mod.rs#L2) - -- **Enhanced addresstype module organization**: Restructured address-type related functionality into a dedicated `addresstype` submodule with specialized components for address counting, height-based indexing, and type index management. This provides better code organization and more efficient address-based analytics processing. [crates/brk_computer/src/stateful/addresstype/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_computer/src/stateful/addresstype/mod.rs) - -### Performance Improvements - -- **Updated core dependencies for better performance**: Upgraded `rayon` to 1.11.0 and `serde_json` to 1.0.143, incorporating latest performance optimizations and bug fixes for parallel processing and JSON serialization operations. - -- **Enhanced web interface with modern frontend packages**: Added comprehensive frontend dependency updates including SolidJS signals 0.4.1, lightweight-charts 5.0.8, uFuzzy 1.0.18, and lean-qr 2.5.0, providing improved user interface performance, better chart rendering, enhanced search capabilities, and QR code generation. [websites/default/packages/](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/websites/default/packages/) +## [v0.0.89](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.89) - 2025-08-24 ### Documentation +#### Comprehensive README Overhaul +- Enhanced comprehensive rewrite of all crate README files for improved clarity and developer experience across all workspace crates ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk/README.md)) +- Updated main project README with better structure and comprehensive architecture documentation ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/README.md)) +- Standardized README format across all workspace crates with consistent styling and improved developer experience +- Added more detailed descriptions for each crate's purpose and functionality with examples -- **Simplified README documentation**: Streamlined the main README by removing the detailed crates section, focusing on core functionality and use cases rather than individual crate documentation. This change reduces maintenance overhead while directing users to more appropriate documentation sources for specific components. [README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/README.md) +### New Features +#### `brk_computer` - Major Refactoring +- Refactored ComputedFrom pattern to LazyFrom pattern for improved performance and memory efficiency ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_computer/src/grouped/builder_lazy.rs)) +- Added new LazyVecBuilder implementation for on-demand computation with support for first, average, sum, max, min, last, and cumulative operations +- Restructured Computer module stateful operations with improved organization and rollback functionality ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_computer/src/stateful/mod.rs)) +- Enhanced address type organization into dedicated module structure ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_computer/src/stateful/addresstype/)) +- Improved stateful rollback functionality for better error recovery and blockchain reorganization handling -- **Enhanced build system with comprehensive README generation**: Added and updated build scripts across all crates to automatically generate documentation from examples and docstrings, ensuring consistent and up-to-date documentation across the entire BRK ecosystem. +#### `brk_structs` +- Added new StoredI16 data type for efficient 16-bit signed integer storage with compression support ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_structs/src/structs/stored_i16.rs)) +- Enhanced StoredF32 with additional utility methods for mathematical operations ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/crates/brk_structs/src/structs/stored_f32.rs)) + +### Website Frontend +#### Package Management Overhaul +- Updated solid-signals from v0.3.2 to solidjs-signals v0.4.1 for improved reactivity and performance ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/websites/default/packages/solidjs-signals/)) +- Enhanced frontend package management and dependency organization +- Improved chart rendering performance with updated signal library +- Reorganized package structure with better organization and maintainability ### Internal Changes +#### Build System +- Updated all crate versions from 0.0.88 to 0.0.89 across the workspace +- Enhanced Cargo.toml dependency management and version consistency ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.0.89/Cargo.toml)) +- Added comprehensive CHANGELOG.md with professional formatting and detailed documentation -- **Improved import organization and module structure**: Enhanced import statements with better organization using BTreeSet collections and more structured vecdb API usage, improving code clarity and reducing compilation overhead. - -- **Enhanced rust toolchain specification**: Added explicit rust-toolchain-version configuration to distribution metadata, ensuring consistent build environments across different deployment scenarios. +#### Development Infrastructure +- Improved development workflow with better package management +- Enhanced project organization with standardized documentation structure +- Better integration between frontend and backend components [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.88...v0.0.89) -## [v0.0.88](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.88) - 2025-07-09 +## [v0.0.88](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.88) - 2025-08-10 -### Architecture Changes +### Build System +#### Rust Environment Standardization +- Added explicit Rust version specification (1.89) to workspace configuration for consistent compilation across development environments +- Enhanced build reliability with standardized toolchain requirements +- Improved development environment consistency and reduced compilation variance -- **Added Rust 1.89 minimum version requirement**: Established `rust-version = "1.89"` across all crates in the workspace, ensuring consistent toolchain requirements and access to the latest language features and performance improvements. This change provides better build reproducibility and enables the use of newer Rust capabilities throughout the BRK ecosystem. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.88/Cargo.toml#L11), [crates/brk_cli/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.88/crates/brk_cli/Cargo.toml#L9) - -### New Features - -- **Enhanced SOPR analytics with adjusted calculations**: Improved Spent Output Profit Ratio (SOPR) analysis in the web interface by adding support for both standard SOPR and Adjusted SOPR (ASOPR) metrics. This enhancement provides more comprehensive on-chain profitability analysis by offering both the traditional SOPR calculation and an adjusted version that filters out certain transaction types for cleaner signal detection. [websites/default/scripts/options.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.88/websites/default/scripts/options.js#L2113-L2114) +### Website Enhancements +#### SOPR Visualization Improvements +- Enhanced SOPR (Spent Output Profit Ratio) chart configuration with improved key handling and better code organization +- Added conditional display logic for adjusted SOPR (aSOPR) charts when data is available +- Improved chart organization with cleaner key generation and more robust data handling +- Better separation between standard SOPR and adjusted SOPR visualization options ### Internal Changes - -- **Standardized build configuration across all crates**: Applied consistent Rust version requirements to all workspace members, ensuring uniform compilation standards and eliminating potential version-related build issues across the entire BRK toolkit. +#### Version Management +- Updated all crate versions from 0.0.87 to 0.0.88 across the workspace for consistent release management +- Enhanced workspace version coordination and dependency consistency [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.87...v0.0.88) -## [v0.0.87](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.87) - 2025-07-09 + +## [v0.0.87](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.87) - 2025-08-10 ### Breaking Changes +- **Vector Storage Architecture Refactor**: Replaced internal `brk_vecs` crate with externalized `vecdb` crate, moving vector storage functionality to a separate project while maintaining the same core functionality ([Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.87/Cargo.toml)) -- **Migrated to dedicated vecdb project**: Replaced the internal `brk_vecs` and `brk_vecs_macros` crates with the specialized `vecdb` 0.1.0 crate, representing a strategic architectural decision to separate vector storage functionality into a dedicated, standalone database project. This separation allows the vector storage system to evolve independently while providing a more focused, mature, and feature-complete KISS index-value storage engine. Code that directly imported from `brk_vecs` will need to update to use `vecdb`. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.87/Cargo.toml#L41) +### Architecture Improvements +- **Crate Externalization**: Migrated vector storage implementation from internal `brk_vecs` and `brk_vecs_macros` to external `vecdb` and `vecdb_derive` crates, enabling independent development and versioning of the vector storage system +- **Sequential Database Foundation**: Added `seqdb` as the underlying sequential data storage engine powering the vector database functionality +- **Workspace Simplification**: Removed `brk_vecs` and `brk_vecs_macros` from the workspace, reducing codebase complexity and focusing on Bitcoin-specific functionality ([crates/brk/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.87/crates/brk/Cargo.toml)) -### New Features +### API Changes +- **Vector Interface Consistency**: Updated all vector references from `brk_vecs` to `vecdb` while maintaining identical API surface for seamless transition ([crates/brk/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.87/crates/brk/src/lib.rs)) +- **Documentation Updates**: Updated README and project documentation to reflect the new external vector database dependency ([README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.87/README.md)) -- **Enhanced signal handling capabilities**: Added `ctrlc` dependency with termination features, providing improved graceful shutdown handling for interrupt signals (Ctrl+C). This enhancement ensures proper cleanup and state preservation when users terminate BRK processes, reducing the risk of data corruption and improving overall system reliability. [crates/brk_vecs/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.87/crates/brk_vecs/Cargo.toml#L15) - -### Architecture Changes - -- **Updated vector system description and branding**: Enhanced the description of the vector storage system from "simple index/value store" to "KISS index-value storage engine," better reflecting its capabilities and design philosophy. This change aligns with the migration to the external `vecdb` crate and emphasizes the Keep It Simple, Stupid (KISS) principle in the storage architecture. [crates/brk_vecs/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.87/crates/brk_vecs/Cargo.toml#L3) - -- **Enhanced build system with comprehensive documentation generation**: Added and refined `build.rs` scripts across the vector system components, ensuring consistent documentation generation and build processes. This improvement provides better integration with the external `vecdb` dependency while maintaining local customizations and examples. [crates/brk_vecs/build.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.87/crates/brk_vecs/build.rs) - -### Documentation - -- **Updated crate references in README**: Revised documentation to reflect the migration from internal vector crates to external `vecdb` and `vecdb_macros` crates. Updated descriptions emphasize the KISS index-value storage engine capabilities and provide accurate crate references for users. [README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.87/README.md#L71-L72) - -### Internal Changes - -- **Comprehensive vector system refactoring**: Restructured vector components to work seamlessly with the external `vecdb` crate while maintaining backward compatibility for existing BRK functionality. - -- **Enhanced macro system integration**: Updated macro dependencies to use `vecdb_macros` instead of internal `brk_vecs_macros`, providing access to improved procedural macros for vector operations. +### Development Experience +- **Modular Development**: Enables independent development of vector storage functionality separate from Bitcoin analysis logic +- **Local Development Support**: Added commented local path configuration for easier development workflow when working on both projects simultaneously [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.85...v0.0.87) -## [v0.0.85](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.85) - 2025-07-09 +## [v0.0.85](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.85) - 2025-08-07 -### Architecture Changes +### Bug Fixes +- **Logging Filter Correction**: Fixed typo in logger filter configuration, changing `rmcp=off` to `brk_rmcp=off` to properly suppress unwanted logs from the RMCP protocol module ([crates/brk_logger/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.85/crates/brk_logger/src/lib.rs)) -- **Upgraded MCP framework to version 0.4.1**: Updated `brk_rmcp` dependency from 0.3.0 to 0.4.1, bringing enhanced AI integration capabilities, improved transport protocols, and better session management for Model Context Protocol operations. This upgrade provides more stable and feature-rich AI tool integration with better error handling and performance characteristics. [crates/brk_mcp/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.85/crates/brk_mcp/Cargo.toml#L15) - -- **Enabled stateful mode in MCP server configuration**: Activated stateful mode for the MCP server by setting `stateful_mode: false` explicitly, providing clearer configuration management and ensuring consistent behavior across different deployment scenarios. This change improves reliability and provides better state management for AI integration workflows. [crates/brk_mcp/src/route.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.85/crates/brk_mcp/src/route.rs#L29) - -### Internal Changes - -- **Enhanced logger filtering for cleaner output**: Added `brk_rmcp` to the default logger filter configuration, reducing noise from the MCP framework in log output while maintaining essential debugging information. This improvement provides cleaner logs during normal operations while preserving detailed logging when needed for troubleshooting AI integration issues. [crates/brk_logger/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.85/crates/brk_logger/src/lib.rs#L29) +### Configuration Changes +- **MCP Server Configuration**: Removed stateful mode setting from MCP server configuration, enabling more flexible protocol handling and improved compatibility with different client implementations ([crates/brk_mcp/src/route.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.85/crates/brk_mcp/src/route.rs)) [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.84...v0.0.85) -## [v0.0.84](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.84) - 2025-07-09 - -### New Features - -- **Introduced brk_structs crate for centralized data structures**: Created dedicated `brk_structs` crate containing all core data structures used throughout BRK, providing better modularity and cleaner dependency management. This separation enables more targeted imports and reduces compilation overhead by isolating structural definitions from business logic. [crates/brk_structs/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_structs/Cargo.toml) - -- **Added brk_error crate for unified error handling**: Established centralized error management through the new `brk_error` crate, providing consistent error types and handling patterns across all BRK components. This architectural improvement enhances error reporting, debugging capabilities, and maintains consistency in error propagation throughout the system. [crates/brk_error/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_error/Cargo.toml) - -- **Introduced brk_vecs_macros for procedural macro support**: Added comprehensive procedural macro crate to support advanced code generation for the vector system, enabling more efficient and type-safe vector operations. This enhancement provides compile-time optimizations and reduces boilerplate code across vector implementations. [crates/brk_vecs_macros/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_vecs_macros/Cargo.toml) +## [v0.0.84](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.84) - 2025-08-07 ### Breaking Changes +- **Major Architecture Restructuring**: Complete reorganization of the codebase with extraction of core functionality into dedicated crates (`brk_structs`, `brk_error`) and comprehensive modularization of all components for better maintainability and reusability +- **Struct System Overhaul**: Moved all Bitcoin-related structures from `brk_core` to new `brk_structs` crate with enhanced grouping capabilities, comprehensive address types, and improved serialization support ([crates/brk_structs/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_structs/src/lib.rs)) -- **Major crate reorganization from brk_core**: Split the monolithic `brk_core` crate into specialized `brk_structs` and `brk_error` crates, providing better separation of concerns and modular architecture. Code that previously imported from `brk_core` will need to update imports to use the new specialized crates. This change reduces compilation times and improves dependency clarity. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/Cargo.toml#L31-L32) +### New Features +- **Centralized Error Handling**: Introduced `brk_error` crate providing unified error handling across all BRK components with comprehensive error types for different subsystems ([crates/brk_error/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_error/src/lib.rs)) +- **Advanced Address Analytics**: Enhanced address grouping system with comprehensive filtering capabilities including by address type, amount ranges, age ranges, epochs, terms, and spendable/unspendable classifications ([crates/brk_structs/src/groups/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_structs/src/groups/mod.rs)) +- **Vector Macro System**: Added `brk_vecs_macros` crate providing procedural macros for automated vector trait implementations and boilerplate reduction ([crates/brk_vecs_macros/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_vecs_macros/src/lib.rs)) +- **Enhanced Data Types**: Comprehensive Bitcoin data type system including transaction IDs, block hashes, raw locktime, version numbers, and specialized index types for all Bitcoin primitives ([crates/brk_structs/src/structs/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_structs/src/structs/mod.rs)) -- **Removed multiple workspace dependencies**: Eliminated unused dependencies including `bincode`, `clap`, `clap_derive`, `color-eyre`, `libc`, `rmcp`, `schemars`, and `tabled` from workspace configuration. This cleanup reduces build complexity, improves compilation times, and removes potential version conflicts while maintaining all necessary functionality. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/Cargo.toml) +### Architecture Improvements +- **Modular Design**: Complete separation of concerns with dedicated crates for different functionality areas, enabling better code organization and independent versioning +- **Build System Enhancement**: Added comprehensive build scripts across all crates with `cargo-dist` integration for automated release management and distribution ([.github/workflows/release.yml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/.github/workflows/release.yml)) +- **Price Analysis**: New dedicated price analysis module with enhanced market data processing and price-to-amount state tracking ([crates/brk_computer/src/price.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_computer/src/price.rs)) -### Architecture Changes +### Developer Experience +- **Comprehensive Documentation**: Added README files and examples for all major crates, providing clear usage instructions and API documentation +- **Enhanced Examples**: Expanded example collection demonstrating various BRK components and usage patterns across all crates +- **Development Tools**: Improved development workflow with better build scripts, dependency management, and testing infrastructure -- **Enhanced brk_vecs with comprehensive error and trait system**: Expanded the vector system with dedicated error handling, exit management, and reorganized trait structure. Added specialized traits for compressed, iterable, printable, raw, and stored vector operations, providing better type safety and performance characteristics. [crates/brk_vecs/src/error.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_vecs/src/error.rs) +### Performance Improvements +- **Vector System**: Enhanced vector system with improved compression, better memory management, and optimized I/O operations through the redesigned `brk_vecs` architecture +- **State Management**: Improved state tracking with dedicated modules for block states, realized/unrealized values, supply tracking, and transaction analysis -- **Implemented comprehensive README generation system**: Added `build.rs` scripts across all crates to automatically generate documentation and README files from code examples and docstrings. This ensures consistent documentation and reduces maintenance overhead while keeping examples synchronized with actual code. [crates/brk_structs/build.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/crates/brk_structs/build.rs) +### Infrastructure +- **CI/CD Enhancement**: Updated GitHub Actions workflow with improved Ubuntu runner (22.04) and enhanced release automation +- **Docker Improvements**: Enhanced Docker configuration with better environment handling and deployment options -- **Simplified distribution configuration**: Streamlined GitHub Actions release workflow by removing complex custom runner configurations and container specifications. Updated to cargo-dist 0.29.0 with simplified target configuration focusing on core platforms (aarch64-apple-darwin, aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu). [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/Cargo.toml#L69) - -### Internal Changes - -- **Updated core dependencies**: Upgraded Bitcoin to 0.32.7, serde_json to 1.0.142, and tokio to 1.47.1, incorporating latest performance improvements and security patches from upstream libraries. - -- **Enhanced vector system modularity**: Reorganized vector variants with improved page handling, compression algorithms, and lazy loading mechanisms through dedicated modules and enhanced trait system. - -- **Cleaned up social media links**: Updated README to remove deprecated social media references and focus on core documentation and functionality. +### Social Media +- **Platform Updates**: Updated social media links removing outdated platforms and focusing on active community channels ([README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.84/README.md)) [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.83...v0.0.84) -## [v0.0.83](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.83) - 2025-07-09 +## [v0.0.83](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.83) - 2025-07-26 + +### New Features +- **Cross-Platform Hole Punching**: Added Linux support for file hole punching operations using `fallocate` system call, expanding platform compatibility beyond macOS for efficient sparse file management ([crates/brk_vecs/src/file/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.83/crates/brk_vecs/src/file/mod.rs)) ### Performance Improvements +- **Platform-Specific Optimization**: Implemented platform-specific hole punching strategies with optimized system calls for both macOS (`fcntl` with `F_PUNCHHOLE`) and Linux (`fallocate`), improving storage efficiency and I/O performance on different operating systems -- **Added Linux support for file hole punching**: Implemented `fallocate`-based hole punching for Linux systems using `FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE` flags, enabling efficient sparse file management on Linux platforms. This optimization allows BRK to reclaim unused disk space during vector operations, reducing storage footprint and improving I/O performance on Linux deployments. [crates/brk_vecs/src/file/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.83/crates/brk_vecs/src/file/mod.rs#L511-L527) - -### Architecture Changes - -- **Unified cross-platform hole punching interface**: Refactored platform-specific hole punching implementations to use a common `punch_hole_impl` interface, replacing the macOS-specific naming with platform-agnostic function names. This architectural improvement provides cleaner code organization and easier maintenance across different operating systems. [crates/brk_vecs/src/file/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.83/crates/brk_vecs/src/file/mod.rs#L486) - -- **Enhanced platform compatibility handling**: Added explicit fallback implementation for unsupported platforms, providing clear error messaging when hole punching operations are attempted on systems that don't support sparse file operations. This ensures graceful degradation and better user experience across different deployment environments. [crates/brk_vecs/src/file/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.83/crates/brk_vecs/src/file/mod.rs#L530-L534) +### Internal Changes +- **Code Organization**: Refactored hole punching implementation with unified `punch_hole_impl()` method that dispatches to platform-specific implementations, improving code maintainability and reducing duplication +- **Error Handling**: Enhanced error handling for unsupported platforms with clear error messages for hole punching operations [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.82...v0.0.83) -## [v0.0.82](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.82) - 2025-07-09 - -### New Features - -- **Introduced brk_vecs: Next-generation vector storage system**: Added comprehensive new `brk_vecs` crate designed as a high-performance index/value store optimized for disk-based operations. This new system provides enhanced compressed storage, lazy loading capabilities, file-based vector management with page-size optimization, and improved memory mapping efficiency. The redesigned architecture supports better scalability and performance for large-scale Bitcoin blockchain analysis. [crates/brk_vecs/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/Cargo.toml) - -- **Enhanced file-based vector operations**: Integrated dedicated `File` abstraction with `PAGE_SIZE` constants and `Reader` interface, providing more efficient disk-based vector operations. This improvement enables better memory management and I/O performance for large datasets through optimized page-aligned access patterns and reduced memory fragmentation. [crates/brk_vecs/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/src/lib.rs#L7) +## [v0.0.82](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.82) - 2025-07-26 ### Breaking Changes +- **Vector System Refactoring**: Replaced `brk_vec` with new `brk_vecs` crate, introducing a completely redesigned vector storage system with improved file layouts, better compression, and enhanced performance characteristics ([crates/brk_vecs/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/src/lib.rs)) -- **Migrated from brk_vec to brk_vecs architecture**: Replaced the legacy `brk_vec` crate with the redesigned `brk_vecs` system, providing significant improvements in storage efficiency, compression algorithms, and lazy loading capabilities. This change requires code updates for any direct usage of vector storage APIs, but provides substantial performance benefits for blockchain data processing. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/Cargo.toml#L42) +### New Features +- **Advanced Vector Architecture**: Introduced comprehensive vector system with multiple storage variants including `RawVec`, `CompressedVec`, `ComputedVec`, `EagerVec`, `LazyVec`, and `StampedVec` for different use cases and performance requirements ([crates/brk_vecs/src/variants/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/src/variants/mod.rs)) +- **File-Based Storage**: New file-based storage system with dedicated `File` and `Reader` implementations, featuring page-based architecture and memory mapping for efficient disk I/O ([crates/brk_vecs/src/file/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/src/file/mod.rs)) +- **Stamped Vectors**: Added timestamped vector support with `StampedVec` and `Stamp` structures for versioned data management and temporal analysis ([crates/brk_vecs/src/variants/stamped/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/src/variants/stamped/mod.rs)) -- **Removed arc-swap dependency**: Eliminated the `arc-swap` crate from workspace dependencies, simplifying atomic reference management and reducing dependency complexity. This change improves compilation times and reduces potential version conflicts while maintaining thread safety through alternative mechanisms. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/Cargo.toml) +### Architecture Improvements +- **Lazy Computation**: Enhanced lazy evaluation system with support for 1, 2, and 3-source computed vectors, enabling complex data transformations with minimal memory overhead ([crates/brk_vecs/src/variants/lazy/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/src/variants/lazy/mod.rs)) +- **Compression Optimization**: Redesigned compression system with page-based metadata management and improved compression ratios for large datasets ([crates/brk_vecs/src/variants/compressed/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/src/variants/compressed/mod.rs)) +- **Type System Enhancement**: Improved trait system with dedicated interfaces for different vector operations, providing better type safety and performance ([crates/brk_vecs/src/traits/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/src/traits/mod.rs)) -### Architecture Changes +### Performance Improvements +- **Build Optimization**: Updated build scripts to focus on release builds for better performance in production deployments ([update.sh](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/update.sh)) +- **Memory Management**: Enhanced memory usage patterns with better file mapping strategies and reduced memory footprint for large-scale Bitcoin data processing -- **Redesigned exit handling with parking_lot integration**: Refactored exit management from atomic boolean-based system to RwLock-based approach using `parking_lot`, providing better thread synchronization and more efficient blocking mechanisms. This change improves graceful shutdown handling and reduces CPU overhead during exit coordination across multiple threads. [crates/brk_exit/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_exit/src/lib.rs#L12) - -- **Enhanced computer architecture with file management**: Integrated `Arc` management into the computer structure, providing better resource sharing and lifecycle management for file-based operations. This architectural improvement enables more efficient memory usage and reduces file handle contention during parallel processing operations. [crates/brk_computer/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_computer/src/lib.rs#L35) +### Infrastructure +- **Comprehensive Examples**: Added extensive examples demonstrating various vector types and usage patterns for better developer onboarding ([crates/brk_vecs/examples/](https://github.com/bitcoinresearchkit/brk/blob/v0.0.82/crates/brk_vecs/examples/)) +- **Documentation**: Enhanced documentation with detailed explanations of vector architectures and storage strategies ### Internal Changes - -- **Updated core dependencies**: Upgraded `fjall` to 2.11.2 and `serde_json` to 1.0.141, incorporating performance improvements and bug fixes from upstream libraries. - -- **Added libc and parking_lot workspace dependencies**: Integrated system-level and high-performance synchronization primitives to support the enhanced vector storage and exit handling systems. - -- **Reorganized vector variant structure**: Restructured vector variants with specialized modules for compressed, computed, eager, lazy, raw, and stamped vector types, providing better code organization and maintenance. +- **Address Handling**: Improved address byte hash management and height-based indexing for better address analytics performance +- **Group Processing**: Enhanced address and UTXO grouping capabilities with better filtering and processing mechanisms +- **Error Handling**: Refined error handling throughout the vector system for more robust data operations [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.81...v0.0.82) -## [v0.0.81](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.81) - 2025-07-09 - -### New Features - -- **Added Docker containerization support**: Introduced complete Docker setup including Dockerfile, docker-compose.yml, and comprehensive documentation for running BRK in containerized environments. The Docker configuration supports Bitcoin Core integration, volume mounting for data persistence, and easy deployment across different platforms. This enables simplified deployment and consistent runtime environments for production use. [docker/README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/docker/README.md), [docker/Dockerfile](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/docker/Dockerfile) - -- **Enhanced address indexing system**: Added comprehensive address index types including `AnyAddressIndex`, `EmptyAddressIndex`, and `LoadedAddressIndex` to provide more flexible and efficient address handling. This new system supports polymorphic address indexing and better separation between loaded and empty address states, improving memory efficiency and query performance for address-based operations. [crates/brk_core/src/structs/anyaddressindex.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/crates/brk_core/src/structs/anyaddressindex.rs) - -### Architecture Changes - -- **Major module reorganization for improved maintainability**: Restructured the computer module from nested directory structure to flattened top-level modules (blocks, cointime, constants, fetched, grouped, indexes, market, mining, stateful, states, transactions). This change improves code navigation, reduces import complexity, and provides clearer separation of concerns across the computational pipeline. [crates/brk_computer/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/crates/brk_computer/src/lib.rs#L15-L26) - -- **Upgraded MCP framework integration**: Migrated from `brk_rmcp` to the official `rmcp` 0.3.0 library, providing better AI integration capabilities with improved transport protocols and streamlined HTTP server support. This upgrade enhances the Model Context Protocol implementation for AI tool integration and provides better compatibility with external AI systems. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/Cargo.toml#L54) +## [v0.0.81](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.81) - 2025-07-17 ### Breaking Changes +- **Computer Module Restructuring**: Major reorganization of the computer module from nested `vecs` structure to flat module layout, moving vector implementations directly into separate modules (`all`, `blocks`, `cointime`, `constants`, `fetched`, `grouped`, `indexes`, `market`, `mining`, `stateful`, `transactions`) for better maintainability ([crates/brk_computer/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/crates/brk_computer/src/lib.rs)) -- **Removed brk_rmcp dependency**: Eliminated the custom `brk_rmcp` crate in favor of the official `rmcp` library, consolidating MCP functionality and reducing maintenance overhead. Code that directly imported `brk_rmcp` will need to be updated to use the new `rmcp` library with its updated API. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/Cargo.toml) +### New Features +- **Docker Support**: Added comprehensive Docker setup with Dockerfile, docker-compose configuration, environment templates, and detailed documentation for containerized BRK deployment ([docker/README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/docker/README.md)) +- **Address Index System**: Implemented new address indexing architecture with `AnyAddressIndex`, `EmptyAddressIndex`, and `LoadedAddressIndex` structures for more efficient address data management ([crates/brk_core/src/structs/anyaddressindex.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/crates/brk_core/src/structs/anyaddressindex.rs)) +- **Enhanced Address Grouping**: Added comprehensive address filtering and grouping capabilities with `by_address_type`, `by_any_address`, and flexible filter systems ([crates/brk_core/src/groups/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/crates/brk_core/src/groups/mod.rs)) -### Internal Changes +### Architecture Improvements +- **Stateful Processing**: Enhanced stateful vector processing with dedicated traits and improved address data source handling ([crates/brk_computer/src/stateful/trait.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/crates/brk_computer/src/stateful/trait.rs)) +- **Address Analytics**: Added sophisticated address counting and analysis capabilities with support for different address types and cohort analysis +- **Module Organization**: Flattened module hierarchy eliminating nested structures for clearer code organization and easier navigation -- **Consolidated vector module structure**: Moved vector-related modules from nested organization to direct top-level access, simplifying import paths and improving code organization throughout the computational pipeline. +### Infrastructure +- **Container Deployment**: Full Docker containerization support with multi-stage builds, environment configuration, and production-ready setup +- **Build Optimization**: Enhanced build scripts and profiling tools for better development workflow -- **Enhanced address data handling**: Added new address data structures and traits to support the expanded address indexing system, providing better type safety and performance for address-related computations. - -- **Added package metadata**: Enhanced workspace configuration with README specification for improved package documentation and distribution. +### Documentation +- **Website Updates**: Added `brekit.org` as primary domain in README alongside existing mirrors ([README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.81/README.md)) +- **Docker Guide**: Comprehensive Docker setup and deployment documentation with prerequisites, configuration, and usage instructions [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.80...v0.0.81) -## [v0.0.80](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.80) - 2025-07-09 +## [v0.0.80](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.80) - 2025-07-13 ### Performance Improvements +- **Vector Length Caching**: Added local length caching in raw vectors with `local_stored_len` field, reducing atomic operations and improving read performance by storing frequently accessed length values locally ([crates/brk_vec/src/variants/raw.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.80/crates/brk_vec/src/variants/raw.rs)) -- **Implemented dual-layer stored length management for vectors**: Added `local_stored_len` cache alongside `shared_stored_len` in raw vectors, providing faster access to vector length information by avoiding atomic operations when possible. This optimization reduces contention in multi-threaded scenarios and improves performance for frequent length queries during blockchain data processing. [crates/brk_vec/src/variants/raw.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.80/crates/brk_vec/src/variants/raw.rs#L31) - -- **Optimized stored length calculations in compressed vectors**: Moved stored length computation logic from the compressed vector layer into the underlying raw vector storage, eliminating duplicate calculations and improving memory access patterns. This change provides more efficient length tracking and reduces computational overhead during vector operations. [crates/brk_vec/src/variants/compressed.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.80/crates/brk_vec/src/variants/compressed.rs#L72-L76) - -### Architecture Changes - -- **Enhanced vector length caching strategy**: Implemented intelligent fallback logic where vectors first check local cached length before accessing shared atomic counters, providing better performance characteristics for single-threaded access patterns while maintaining thread safety for concurrent operations. [crates/brk_vec/src/variants/raw.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.80/crates/brk_vec/src/variants/raw.rs#L161-L163) - -- **Unified stored length management interface**: Added `set_stored_len` method that simultaneously updates both local cache and shared atomic counter, ensuring consistency while providing a clean API for length management throughout the vector system. [crates/brk_vec/src/variants/raw.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.80/crates/brk_vec/src/variants/raw.rs#L104-L107) +### API Enhancements +- **Length Management**: Introduced `set_stored_len()` method for direct length management, providing better control over vector metadata and synchronization between local and shared length values ### Documentation +- **README Cleanup**: Removed detailed AI example links from main README to streamline content and focus on core functionality, improving readability and reducing maintenance overhead ([README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.80/README.md)) +- **MCP Documentation**: Added dedicated README for Model Context Protocol integration with comprehensive usage examples and setup instructions ([crates/brk_mcp/README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.80/crates/brk_mcp/README.md)) -- **Updated AI integration examples**: Enhanced README documentation with concrete examples of BRK's AI capabilities through MCP integration, including links to example outputs demonstrating document generation and dashboard creation using LLM data analysis. [README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.80/README.md#L47-L49) +### Internal Changes +- **Vector Architecture**: Enhanced raw and compressed vector implementations with improved length tracking mechanisms for better performance and consistency [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.79...v0.0.80) -## [v0.0.79](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.79) - 2025-07-09 +## [v0.0.79](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.79) - 2025-07-13 ### Performance Improvements +- **File Handle Optimization**: Reduced minimum file handle limit from 250,000 to 10,000, significantly lowering system resource requirements while maintaining adequate file access for most Bitcoin datasets ([crates/brk_core/src/utils/rlimit.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.79/crates/brk_core/src/utils/rlimit.rs)) -- **Optimized file handle resource management**: Reduced the maximum file handle limit (NOFILE) from 250,000 to 10,000, providing better system resource utilization and preventing excessive file handle allocation during large-scale blockchain processing. This change improves stability on systems with limited file descriptor resources while maintaining sufficient capacity for normal BRK operations. [crates/brk_core/src/utils/rlimit.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.79/crates/brk_core/src/utils/rlimit.rs#L10) - -- **Enhanced memory mapping efficiency**: Replaced arc_swap-based memory mapping with direct mmap creation, eliminating unnecessary atomic reference counting overhead and improving memory access performance. This change provides more efficient memory-mapped file access patterns during vector operations and reduces memory management complexity. [crates/brk_computer/src/vecs/stateful/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.79/crates/brk_computer/src/vecs/stateful/mod.rs#L501-L503) - -### Architecture Changes - -- **Simplified bloom filter configuration API**: Refactored bloom filter settings from bit-based configuration (`Option>`) to simple boolean flag (`Option`), providing clearer and more intuitive control over bloom filter usage in storage partitions. This improvement reduces configuration complexity and makes bloom filter behavior more predictable. [crates/brk_store/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.79/crates/brk_store/src/lib.rs#L37) - -- **Streamlined storage partition creation**: Enhanced partition creation logic with better bloom filter handling, including explicit bloom filter disabling when requested and improved default memory table sizing (8MB). This provides more granular control over storage performance characteristics and better resource management. [crates/brk_store/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.79/crates/brk_store/src/lib.rs#L183-L189) +### Breaking Changes +- **Vector Memory Architecture**: Replaced `ArcSwap` with `Arc` for stored length tracking in raw vectors, eliminating memory mapping overhead and improving concurrent access patterns while reducing memory usage ([crates/brk_vec/src/variants/raw.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.79/crates/brk_vec/src/variants/raw.rs)) ### Internal Changes - -- **Removed redundant storage length calculations**: Eliminated duplicate `stored_len_` methods that accepted memory maps as parameters, consolidating length calculations into simpler interfaces and reducing code complexity in vector storage operations. - -- **Cleaned up memory mapping abstractions**: Removed unused `mmap()` method abstractions from storage vectors, simplifying the memory-mapped file access patterns and reducing indirection in hot code paths. +- **Vector Storage Simplification**: Removed arc-swap dependency from vector variants, streamlining memory management and reducing complexity in concurrent scenarios +- **Store Integration**: Enhanced indexer store integration with better error handling and resource management +- **Header Management**: Improved vector header handling for more efficient metadata operations [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.78...v0.0.79) -## [v0.0.78](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.78) - 2025-07-09 +## [v0.0.78](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.78) - 2025-07-13 ### New Features +- **Semester Index Support**: Added `SemesterIndex` struct for 6-month interval datasets, enabling bi-annual analysis of Bitcoin metrics with proper serialization and mathematical operations ([crates/brk_core/src/structs/semesterindex.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.78/crates/brk_core/src/structs/semesterindex.rs)) +- **Enhanced Vector Architecture**: Refactored vector computation infrastructure with improved `VecBuilderOptions` and `Source` handling for more flexible dataset generation ([crates/brk_computer/src/vecs/grouped/builder_computed.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.78/crates/brk_computer/src/vecs/grouped/builder_computed.rs)) -- **Added semester-based time indexing system**: Introduced new `SemesterIndex` struct that provides 6-month semester intervals for blockchain analysis, expanding the existing time granularity options (daily, weekly, monthly, quarterly, yearly). This enables more flexible temporal analysis patterns for Bitcoin research, particularly useful for mid-term trend analysis and seasonal pattern detection. The semester index integrates seamlessly with all existing vector operations and grouping functions. [crates/brk_core/src/structs/semesterindex.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.78/crates/brk_core/src/structs/semesterindex.rs) +### Architecture Improvements +- **Vector Builder Refactoring**: Renamed `StorableVecGeneatorOptions` to `VecBuilderOptions` for better naming consistency and enhanced vector generation capabilities +- **Cointime Integration**: Enhanced cointime computation with better indexing support and computation parameter handling +- **Profiling Tools**: Added dedicated flamegraph and samply profiling scripts for the computer module to aid performance analysis -- **Extended vector builder architecture**: Added comprehensive semester support to all computational vectors including `monthindex_to_semesterindex`, `semesterindex_to_first_monthindex`, `semesterindex_to_monthindex_count`, and `semesterindex_to_semesterindex` mappings. This provides complete integration of semester indexing across the entire data processing pipeline. [crates/brk_computer/src/vecs/indexes.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.78/crates/brk_computer/src/vecs/indexes.rs) - -### Architecture Changes - -- **Refactored grouped vector builders for improved organization**: Split the monolithic builder module into specialized `builder_computed.rs` and `builder_eager.rs` files, providing clearer separation between different vector construction patterns. This architectural improvement enhances code maintainability and makes the vector building system more modular and easier to extend. [crates/brk_computer/src/vecs/grouped/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.78/crates/brk_computer/src/vecs/grouped/mod.rs) - -- **Enhanced stateful processing with new source abstraction**: Added `Source` enum and improved control flow mechanisms using Rust's `ControlFlow` type for better processing pipeline management. This provides more structured handling of different data sources and improves error propagation throughout the stateful computation system. [crates/brk_computer/src/vecs/stateful/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.78/crates/brk_computer/src/vecs/stateful/mod.rs) - -### Internal Changes - -- **Expanded time interval grouping capabilities**: Added semester support to all height-based and date-based grouping operations, ensuring consistent semester indexing across different vector types and computational contexts. - -- **Enhanced address type processing**: Added new `AddressTypeToTypeIndexSet` for improved address classification and type index management in the stateful processing pipeline. +### Development Experience +- **Documentation Updates**: Expanded TODO list with additional feature requests including chopiness datasets, reused address analytics, z-score chart improvements, and HTTPS support +- **Profiling Support**: Added flamegraph.sh and samply.sh scripts to the computer module for better performance debugging capabilities [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.76...v0.0.78) +## [v0.0.76](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.76) - 2025-07-09 + +### Build System Updates +- **Rolldown Bundler**: Updated `brk_rolldown` from 0.1.0 to 0.1.1 with improvements across all bundler components including enhanced ECMAScript utilities, better plugin architecture, and improved string manipulation capabilities ([crates/brk_bundler/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.76/crates/brk_bundler/Cargo.toml)) + +[View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.75...v0.0.76) + ## [v0.0.75](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.75) - 2025-07-09 ### Performance Improvements - -- **Optimized parallel processing chunk size for better throughput**: Fine-tuned the chunking strategy by increasing chunk size from 25% to approximately 33% of total vectors (changed divisor from 4.0 to 3.0). This adjustment reduces coordination overhead from excessive parallelization while maintaining protection against I/O saturation on external drives. The larger chunks provide better balance between parallel processing benefits and system resource efficiency during large-scale blockchain data computation. [crates/brk_computer/src/vecs/stateful/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.75/crates/brk_computer/src/vecs/stateful/mod.rs#L1304) - -### Internal Changes - -- **Cleaned up logging and removed redundant messages**: Streamlined logging output by removing duplicate and unnecessary log statements that did not provide meaningful information during computation processes, improving log clarity and reducing noise in system output. +- **Chunk Size Optimization**: Adjusted parallel processing chunk size from length/4 to length/3, increasing parallelization granularity for better performance on high-end storage systems while maintaining external drive protection ([crates/brk_computer/src/vecs/stateful/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.75/crates/brk_computer/src/vecs/stateful/mod.rs)) [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.74...v0.0.75) ## [v0.0.74](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.74) - 2025-07-09 ### Performance Improvements +- **Parallel Processing Optimization**: Refactored stateful vector computation to use chunked parallel processing with controlled chunk sizes (length/4) instead of unbounded parallelization, preventing external drive bottlenecks and improving performance on Thunderbolt 4 SSDs ([crates/brk_computer/src/vecs/stateful/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.74/crates/brk_computer/src/vecs/stateful/mod.rs)) +- **Thread Scope Elimination**: Replaced complex thread scope management with streamlined Either-based collection processing, reducing threading overhead and improving memory usage patterns during computation -- **Implemented chunked parallel processing to prevent I/O bottlenecks**: Introduced intelligent chunking system that limits concurrent operations to prevent overwhelming external storage devices, including high-performance Thunderbolt 4 SSDs. The system now processes vectors in chunks of approximately 25% of total vectors at a time, ensuring consistent performance regardless of storage device capabilities and preventing I/O saturation during large-scale Bitcoin data processing. [crates/brk_computer/src/vecs/stateful/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.74/crates/brk_computer/src/vecs/stateful/mod.rs#L1304-L1305) - -### Architecture Changes - -- **Unified processing pipeline for UTXO and address computations**: Replaced separate thread-based processing with a unified pipeline that handles both UTXO and address cohort vectors through a single processing flow. This architectural improvement uses the `Either` type to seamlessly process different vector types in the same pipeline, reducing complexity, improving error handling, and eliminating thread management overhead. The change provides more predictable performance characteristics and simplified resource management. [crates/brk_computer/src/vecs/stateful/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.74/crates/brk_computer/src/vecs/stateful/mod.rs#L1242-L1263) +### Bug Fixes +- **Memory Table Rotation Logging**: Fixed missing log message for memory table rotation operations, improving debugging and monitoring capabilities during store operations ([crates/brk_computer/src/stores.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.74/crates/brk_computer/src/stores.rs)) ### Internal Changes - -- **Enhanced error handling and resource management**: Improved variable lifecycle management by declaring references upfront and reusing them throughout the computation process, reducing repeated access patterns and improving memory efficiency during large-scale blockchain analysis operations. +- **Computation Architecture**: Unified UTXO and address vector processing using Either enum for type-safe handling of different vector types while maintaining performance through parallel iteration +- **Chunk-based Processing**: Implemented intelligent chunking strategy to prevent overwhelming external storage devices while maintaining parallelization benefits [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.73...v0.0.74) ## [v0.0.73](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.73) - 2025-07-09 ### Breaking Changes +- **Architecture Restructuring**: Removed `brk_state` crate entirely, consolidating its functionality into `brk_computer` with direct store and serialization dependencies, simplifying the overall architecture and reducing module complexity +- **Build System Upgrade**: Updated `brk_rolldown` bundler from 0.0.1 to 0.1.0 with significant API changes including removal of deprecated loader utilities and addition of hot module replacement support -- **Removed brk_state crate and consolidated state management**: Eliminated the separate `brk_state` crate and integrated its functionality into the broader architecture using `brk_store`. This architectural simplification reduces complexity and improves maintainability by consolidating state management responsibilities into fewer, more focused components. Code that directly imported `brk_state` will need to be updated to use the new consolidated system. [Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.73/Cargo.toml), [crates/brk_computer/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.73/crates/brk_computer/Cargo.toml) - -### Performance Improvements - -- **Implemented zerocopy serialization optimizations**: Added advanced zero-copy operations through `zerocopy` and `zerocopy-derive` dependencies in the computation layer. This eliminates unnecessary memory allocations and data copying when processing large Bitcoin datasets, resulting in significant performance improvements for blockchain analysis and metric calculations, especially for memory-intensive operations. [crates/brk_computer/Cargo.toml](https://github.com/bitcoinresearchkit/brk/blob/v0.0.73/crates/brk_computer/Cargo.toml#L29-L30) - -- **Enhanced serialization framework**: Integrated `bincode` for efficient binary serialization and `serde` for flexible data handling, providing faster and more memory-efficient data processing. These optimizations particularly benefit large-scale computations, data export operations, and inter-process communication by reducing serialization overhead and improving throughput. +### New Features +- **Hot Module Replacement**: Added HMR plugin support for improved development experience with live code updates and faster iteration cycles during bundling operations +- **Advanced Hashing**: Integrated Blake3 hashing algorithm for improved performance in debug operations and file integrity verification ### Internal Changes - -- **Upgraded MCP framework**: Updated `brk_rmcp` from version 0.1.8 to 0.2.1, bringing significant improvements to the Model Context Protocol implementation with enhanced AI integration capabilities, better error handling, and improved API functionality for connecting external AI tools to BRK's blockchain data. - -- **Added profiling build configuration**: Introduced dedicated profiling build profile that inherits from release but includes debug symbols, facilitating performance analysis and optimization work during development without compromising release build performance. - -- **Enhanced code ergonomics**: Added `derive_deref` dependency to simplify dereferencing patterns and improve code readability throughout the computation layer, making the codebase more maintainable and reducing boilerplate code. +- **Computer Module Enhancement**: Added bincode serialization, zerocopy optimizations, and derive_deref functionality directly to the computer module for better performance +- **Store Integration**: Enhanced store module with logging capabilities for better debugging and monitoring +- **Plugin Architecture**: Expanded bundler plugin system with data URI support and improved ECMAScript utilities [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.71...v0.0.73) ## [v0.0.71](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.71) - 2025-06-25 -### API Improvements +### New Features +- **Enhanced Schema Documentation**: Added comprehensive descriptions to all Index enum variants and API parameters, providing clear explanations for date/day index, height/block index, transaction indexes, address types, and time periods for better API usability ([crates/brk_interface/src/index.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.71/crates/brk_interface/src/index.rs), [crates/brk_interface/src/params.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.71/crates/brk_interface/src/params.rs)) -- **Enhanced API documentation with comprehensive schema descriptions**: Added detailed descriptions to all index types and API parameters using JSON Schema annotations. Each index type now includes clear explanations (e.g., "Date/day index", "Difficulty epoch index (equivalent to ~2 weeks)", "Halving epoch index (equivalent to ~4 years)"). API parameters now have enhanced descriptions explaining their behavior, such as inclusive/exclusive ranges and negative index handling. This significantly improves developer experience when using BRK's API by providing clear, self-documenting interfaces. [crates/brk_interface/src/index.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.71/crates/brk_interface/src/index.rs), [crates/brk_interface/src/params.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.71/crates/brk_interface/src/params.rs) - -- **Standardized method naming for consistency**: Renamed `get_variant_count` to `get_vec_count` in the MCP interface to align with the actual API endpoint structure and improve naming consistency across the system. This change makes the API more intuitive and reduces confusion between different counting methods. [crates/brk_mcp/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.71/crates/brk_mcp/src/lib.rs#L59) - -### Architecture Modernization - -- **Upgraded MCP framework to latest tool routing system**: Implemented major architectural improvements by migrating from the legacy `tool_box` pattern to the modern `tool_router` system. This upgrade introduces better type safety, improved parameter handling through the `Parameters(...)` wrapper pattern, and more structured API definitions. The new system provides enhanced error handling, better documentation generation, and improved maintainability for AI integration features. [crates/brk_mcp/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.71/crates/brk_mcp/src/lib.rs#L27-L32) - -### Breaking Changes - -- **Updated MCP parameter handling system**: Modified parameter passing from attribute-based `#[tool(aggr)]` annotations to the new `Parameters` wrapper system. This change affects how parameters are passed to MCP tools but provides better type safety and validation. Developers using the MCP interface will need to update their parameter handling code to work with the new system. +### API Changes +- **MCP Tool Modernization**: Upgraded Model Context Protocol implementation to use new `tool_router` and `Parameters` wrapper for better type safety and parameter handling, replacing legacy `tool_box` approach ([crates/brk_mcp/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.71/crates/brk_mcp/src/lib.rs)) +- **Endpoint Renaming**: Renamed `get_variant_count` to `get_vec_count` for better consistency with API terminology ### Internal Changes - -- **Updated core dependencies for improved functionality**: Upgraded `brk_rmcp` to version 0.1.8 and `schemars` to version 1.0.1, bringing bug fixes, performance improvements, and enhanced features. Also updated several other dependencies including `oxc_resolver` and `papaya` to their latest versions for better stability and performance. - -- **Added development tooling configuration**: Included commented development path for `brk_rmcp` to facilitate local development and testing of MCP functionality. +- **Development Flexibility**: Added commented local development path for `brk_rmcp` to facilitate easier testing and development workflows [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.70...v0.0.71) ## [v0.0.70](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.70) - 2025-06-24 -### User Experience +### New Features +- **Model Context Protocol Default**: Enabled MCP (Model Context Protocol) by default for LLM integration, changing from opt-in to opt-out behavior to make AI-powered Bitcoin data analysis more accessible ([crates/brk_cli/src/config.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.70/crates/brk_cli/src/config.rs)) -- **Enabled MCP (Model Context Protocol) by default**: AI integration is now enabled by default, making it easier for users to connect AI assistants and tools to BRK's blockchain data without manual configuration. Users can still disable MCP if needed, but the default behavior now promotes seamless AI-powered blockchain analysis workflows. This change significantly lowers the barrier to entry for AI-enhanced Bitcoin research. [crates/brk_cli/src/config.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.70/crates/brk_cli/src/config.rs#L91-L371) - -### API Improvements - -- **Simplified API endpoint structure for better usability**: Streamlined API endpoints by removing complex query parameters in favor of direct, intuitive paths. The height-to-OHLC endpoint now uses `/height-to-ohlc?from={}&to={}` instead of the previous `/query?index=height&values=ohlc&from={}&to={}` format, and similarly for dateindex endpoints. This makes the API more RESTful and easier to use for developers integrating with BRK's data services. [crates/brk_fetcher/src/brk.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.70/crates/brk_fetcher/src/brk.rs#L50-L100) - -- **Updated API documentation and endpoint references**: Corrected the dataset variant count API endpoint reference in the README from `/vecs/variant-count` to `/vecs/vec-count` to reflect the actual API structure and ensure accurate documentation for developers using the public API. [README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.70/README.md#L45) - -### Code Organization - -- **Flattened fetcher module structure for improved maintainability**: Reorganized the fetcher modules by moving all fetcher implementations from the nested `fetchers/` subdirectory directly to the `src/` root. This eliminates unnecessary module hierarchy, simplifies imports, and makes the codebase easier to navigate for developers working with price data fetching functionality. The change affects binance, kraken, BRK, and retry modules without changing their public APIs. [crates/brk_fetcher/src/](https://github.com/bitcoinresearchkit/brk/tree/v0.0.70/crates/brk_fetcher/src) +### API Changes +- **Simplified Endpoints**: Streamlined API endpoints by replacing complex query parameters with dedicated paths (`/height-to-ohlc` and `/dateindex-to-ohlc`) for cleaner and more intuitive data access ([crates/brk_fetcher/src/brk.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.70/crates/brk_fetcher/src/brk.rs)) ### Internal Changes - -- **Code cleanup and documentation improvements**: Removed commented-out debug statements and dead code from the vector management system, improving code readability and maintenance. Also enhanced MCP tool descriptions with better punctuation and formatting for improved developer experience. +- **Module Restructuring**: Flattened fetcher module structure by moving fetcher implementations directly into the main crate, eliminating nested module hierarchy for better maintainability +- **Documentation**: Updated API badge URL to reflect new vec-count endpoint and improved MCP tool description clarity ([README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.70/README.md)) +- **Code Cleanup**: Removed commented debug code and unused file handle references from raw vector implementation [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.69...v0.0.70) ## [v0.0.69](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.69) - 2025-06-24 ### Performance Improvements +- **Vector Initialization Optimization**: Removed thread-based parallel initialization of indexes and fetched vectors, replacing with sequential initialization to reduce overhead and improve memory usage patterns during startup ([crates/brk_computer/src/vecs/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.69/crates/brk_computer/src/vecs/mod.rs)) +- **File Handle Management**: Refactored vector file handling architecture to use on-demand file opening instead of persistent file handles, reducing memory footprint and file descriptor usage ([crates/brk_vec/src/variants/raw.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.69/crates/brk_vec/src/variants/raw.rs)) -- **Optimized file handle management for better resource utilization**: Completely refactored the vector storage system to use on-demand file operations instead of persistent file handles. This architectural improvement eliminates file descriptor leaks, reduces memory pressure, and enables more robust handling of large datasets. Files are now opened when needed and immediately closed, preventing resource exhaustion when processing many concurrent operations. The new design also includes optimized header writing that conditionally returns file handles for better performance. [crates/brk_vec/](https://github.com/bitcoinresearchkit/brk/tree/v0.0.69/crates/brk_vec) - -### Architecture Changes - -- **Simplified vector initialization by removing parallel processing**: Streamlined the vector computation initialization from parallel threaded execution to sequential processing. While this may impact initialization speed, it eliminates threading complexity and potential race conditions, resulting in more predictable and maintainable code. This change improves system stability and reduces the potential for concurrency-related bugs. [crates/brk_computer/src/vecs/mod.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.69/crates/brk_computer/src/vecs/mod.rs#L47-L63) - -### Bug Fixes - -- **Reverted file descriptor limit to stable configuration**: Reduced the file descriptor limit back to 210,000 from the previous 420,000 setting. The higher limit may have caused system stability issues or compatibility problems with certain configurations. This reversion ensures reliable operation across different environments while the new file handle management provides better resource efficiency. [crates/brk_core/src/utils/rlimit.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.69/crates/brk_core/src/utils/rlimit.rs#L10) +### Internal Changes +- **Resource Limit Adjustment**: Reverted file handle limit back to 210,000 from 420,000, optimizing for more conservative resource usage +- **Header Write Logic**: Simplified vector header writing by removing conditional logic and always performing write operations when needed, improving code clarity and reducing potential race conditions ([crates/brk_vec/src/structs/header.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.69/crates/brk_vec/src/structs/header.rs)) +- **Memory Map Updates**: Refactored memory map update logic to accept file references directly, eliminating need for persistent file handle storage and improving resource management +- **Code Cleanup**: Removed unused imports and simplified vector trait implementations for better maintainability [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.68...v0.0.69) ## [v0.0.68](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.68) - 2025-06-24 +### New Features +- **CLI Version Information**: Added version command support to CLI configuration, enabling users to check the current version of BRK directly from the command line ([crates/brk_cli/src/config.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.68/crates/brk_cli/src/config.rs)) + ### Performance Improvements - -- **Doubled file descriptor limit for enhanced scalability**: Increased the maximum number of simultaneously open files from 210,000 to 420,000. This significant improvement addresses performance bottlenecks when processing large Bitcoin datasets that require opening many files concurrently (block files, index files, computed datasets). The higher limit enables BRK to handle larger datasets and more concurrent operations without hitting system resource constraints that could cause errors or performance degradation. [crates/brk_core/src/utils/rlimit.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.68/crates/brk_core/src/utils/rlimit.rs#L10) - -### User Experience - -- **Enhanced CLI with standard command behaviors**: Added automatic `--version` and `--help` command support to the CLI configuration through clap derive attributes. This provides users with standard command-line interface behaviors and better discoverability of available options without requiring additional implementation code. [crates/brk_cli/src/config.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.68/crates/brk_cli/src/config.rs#L19) +- **File Handle Limits**: Doubled the minimum file handle limit from 210,000 to 420,000 to accommodate larger Bitcoin datasets and prevent resource exhaustion during intensive blockchain processing operations ([crates/brk_core/src/utils/rlimit.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.68/crates/brk_core/src/utils/rlimit.rs)) [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.67...v0.0.68) ## [v0.0.67](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.67) - 2025-06-24 ### New Features - -- **Added Model Context Protocol (MCP) server support**: Introduced comprehensive MCP server implementation enabling AI assistants and external tools to connect to BRK's blockchain data through standardized protocols. This powerful integration allows AI systems to query Bitcoin data, perform analysis, and access BRK's computational capabilities through a well-defined interface, opening up new possibilities for AI-powered blockchain analysis tools. The MCP server provides secure, structured access to all of BRK's datasets and metrics. - -- **Introduced standardized interface layer**: Added new `brk_interface` crate that provides a clean, well-documented API abstraction layer for external access to BRK's computational capabilities. This interface includes comprehensive schema generation, structured data serialization, and formatted output capabilities, making it easier for developers to integrate BRK into their applications and tools. +- **Data Interface Layer**: Added `brk_interface` crate providing a comprehensive data interface layer with serialization, schema generation, and tabular formatting capabilities for exporting datasets in multiple formats (JSON, CSV, TSV, Markdown) +- **Model Context Protocol Support**: Introduced `brk_mcp` crate implementing Model Context Protocol (MCP) for seamless integration with Large Language Models, enabling AI-powered Bitcoin data analysis and querying +- **External MCP Integration**: Added `brk_rmcp` external dependency for robust MCP client/server communication capabilities ### Breaking Changes - -- **Restructured workspace architecture**: Removed the legacy `brk_query` crate as part of a major architectural modernization. Query functionality has been consolidated into the new interface layer, providing a more cohesive and maintainable API structure. This change simplifies the codebase while improving functionality through better abstraction layers. - -### Documentation - -- **Comprehensive repository rebranding and migration**: Updated all historical changelog references to reflect the migration from `kibo-money/kibo` to `bitcoinresearchkit/brk`. This includes updating GitHub URLs, asset paths, and project names throughout the historical documentation. Also corrected branding for historical versions (satonomics → kibo → brk) to accurately reflect the project's evolution and maintain documentation consistency. +- **Dependency Restructuring**: Removed direct `brk_query` dependency from CLI, replaced with modular `brk_interface` and `brk_mcp` architecture for better separation of concerns +- **Storage Simplification**: Removed `arc-swap` and `fjall` dependencies from `brk_state`, streamlining state management architecture ### Internal Changes - -- **Optimized dependency management**: Streamlined the dependency tree by removing unused dependencies including `arc-swap` from `brk_store`, `jiff` from `brk_fetcher`, and `tabled` from `brk_cli`. These optimizations reduce build times and binary size while maintaining all functionality through more efficient architectural patterns. - -- **Added auto-generated file management**: Enhanced build process by properly excluding auto-generated files (`vecid-to-indexes.js`) from version control, ensuring cleaner repository state and preventing conflicts from build artifacts. +- **Build System**: Added auto-generated `vecid-to-indexes.js` file to gitignore to prevent version control conflicts +- **Documentation Updates**: Updated historical changelog entries to reflect correct repository URLs and asset paths, migrating from kibo-money references to bitcoinresearchkit organization +- **Dependency Updates**: Updated multiple core dependencies including `async-compression`, `autocfg`, `errno`, and `syn` to their latest versions for improved performance and compatibility [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.66...v0.0.67) ## [v0.0.66](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.66) - 2025-06-19 ### New Features - -- **Added comprehensive Cointime analysis module**: Introduced advanced blockchain economic analysis capabilities through a complete Cointime implementation. This powerful new module provides sophisticated metrics for understanding Bitcoin holder behavior and market dynamics, including coinblocks tracking (created/stored/destroyed), liveliness and vaultedness calculations, supply segmentation into active and vaulted components, derived price metrics (vaulted price, active price, true market mean), capitalization analysis (thermo cap, investor cap, vaulted cap, active cap), and cointime value flow tracking. These metrics enable deep insights into market cycles, holder behavior patterns, and the economic state of the Bitcoin network. [crates/brk_computer/src/vecs/cointime.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.66/crates/brk_computer/src/vecs/cointime.rs) +- **Cointime Analysis**: Added comprehensive cointime economic metrics including coinblocks creation/storage tracking, liveliness and vaultedness calculations, activity ratios, and specialized price metrics (vaulted price, active price, true market mean, cointime price) with corresponding market cap calculations ([crates/brk_computer/src/vecs/cointime.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.66/crates/brk_computer/src/vecs/cointime.rs)) +- **Advanced Supply Analysis**: Implemented vaulted and active supply tracking with dollar value computations, enabling analysis of Bitcoin storage behavior and economic activity patterns ### Documentation +- **CLI Documentation**: Improved CLI README with better formatting, clearer installation instructions, enhanced usage examples, and restructured content with proper markdown syntax and information blocks ([crates/brk_cli/README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.66/crates/brk_cli/README.md)) +- **Installation Guidance**: Added prominent installation notes for Ubuntu users and improved download section formatting with better link formatting and structure -- **Enhanced CLI documentation and user experience**: Significantly improved the BRK CLI README with better formatting, corrected typos, and enhanced clarity. Added proper GitHub-style callouts for important information (Ubuntu installation requirements) and helpful tips (configuration persistence). Improved explanations of command usage patterns, updated documentation links to point to specific commit hashes for stability, and enhanced Cloudflare integration guidance with proper formatting. These improvements make BRK more accessible to new users and provide clearer guidance for setup and usage. [crates/brk_cli/README.md](https://github.com/bitcoinresearchkit/brk/blob/v0.0.66/crates/brk_cli/README.md) +### Internal Changes +- **Ratio Analysis Integration**: Connected cointime price metrics with ratio analysis system for comprehensive trend analysis across vaulted price, active price, true market mean, and cointime price ratios [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.65...v0.0.66) ## [v0.0.65](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.65) - 2025-06-17 ### Bug Fixes - -- **Improved cohort analysis metric calculations**: Updated version numbers for cumulative net realized profit and loss calculations to ensure accurate computation of 30-day change metrics. This includes improvements to standard calculations, realized cap relative calculations, and market cap relative calculations for better cohort analysis accuracy. [crates/brk_computer/src/vecs/stateful/cohort.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.65/crates/brk_computer/src/vecs/stateful/cohort.rs#L951-L976) - -### Performance Improvements - -- **Streamlined chart data update mechanism**: Significantly simplified the chart update logic by replacing complex historical data comparison with a streamlined approach that only updates data points at or after the last existing timestamp. This eliminates unnecessary computation overhead from detailed value comparisons and debugging logic, resulting in faster chart rendering and improved user interface responsiveness. [websites/default/packages/lightweight-charts/wrapper.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.65/websites/default/packages/lightweight-charts/wrapper.js#L483-L491) +- **Chart Data Update Logic**: Simplified chart data update algorithm by removing complex comparison logic and replacing it with a streamlined approach that updates all data points at or after the last known time, significantly reducing complexity and potential update conflicts ([websites/default/packages/lightweight-charts/wrapper.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.65/websites/default/packages/lightweight-charts/wrapper.js)) ### Internal Changes - -- **Updated web interface version tracking**: Synchronized version numbers in auto-generated files to maintain consistency between backend calculations and frontend display systems. +- **Cohort Analysis Versioning**: Incremented version numbers for cumulative net realized profit/loss metrics from VERSION::TWO to VERSION::new(3), ensuring proper cache invalidation and data consistency for cohort analysis computations ([crates/brk_computer/src/vecs/stateful/cohort.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.65/crates/brk_computer/src/vecs/stateful/cohort.rs)) [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.64...v0.0.65) ## [v0.0.64](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.64) - 2025-06-17 ### New Features - -- **Added 4-year financial analysis metrics**: Introduced comprehensive 4-year statistical measures including 4-year simple moving average (`ratio_4y_sma`), 4-year standard deviation (`ratio_4y_sd`), and 4-year z-score (`ratio_4y_zscore`) for long-term market cycle analysis. These metrics enable identification of extreme market conditions over full Bitcoin market cycles, providing crucial insights for long-term trend analysis and valuation assessment. [crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.64/crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs) +- **4-Year Statistical Analysis**: Added comprehensive 4-year moving averages and standard deviation calculations for ratio analysis, enabling long-term trend analysis with `ratio_4y_sma`, `ratio_4y_sd`, and `ratio_4y_zscore` metrics ([crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.64/crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs)) +- **Z-Score Computation Optimization**: Refactored z-score calculations to use a dedicated `compute_zscore()` method, improving code maintainability and performance by centralizing statistical computations ### Internal Changes - -- **Enhanced grouped vector builder with conditional naming**: Added intelligent naming logic that applies different suffixes based on computation position in series, enabling more descriptive names for final computations versus intermediate steps. This improves code organization and makes grouped computations more self-documenting. [crates/brk_computer/src/vecs/grouped/builder.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.64/crates/brk_computer/src/vecs/grouped/builder.rs#L133-L137) - -- **Refactored z-score computation for code reusability**: Consolidated duplicate z-score calculation logic into a reusable `compute_zscore` method that accepts separate moving average and standard deviation inputs. This eliminates code duplication between 1-year and 4-year z-score calculations while improving maintainability and consistency. - -- **Standardized statistical metric naming**: Renamed `ratio_standard_deviation` to `ratio_sd` for consistency with other abbreviated metric names throughout the codebase, improving code readability and maintaining naming conventions. +- **Vector Naming Convention**: Renamed `ratio_standard_deviation` to `ratio_sd` for consistency with other abbreviated metric names +- **Statistical Method Extraction**: Extracted z-score computation logic into reusable methods, reducing code duplication and improving mathematical accuracy +- **Vector Builder Enhancement**: Added conditional naming logic in grouped vector builder for better handling of sum operations with optional suffixes [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.63...v0.0.64) ## [v0.0.63](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.63) - 2025-06-16 ### New Features - -- **Enhanced Progressive Web App support**: Added comprehensive PWA configuration with device-specific splash screens and icons for seamless mobile and desktop app installation. Includes optimized assets for all major iOS device sizes and orientations, improving the native app experience when users install the web application on their devices. [websites/default/assets/pwa/](https://github.com/bitcoinresearchkit/brk/tree/v0.0.63/websites/default/assets/pwa) - -### Performance Improvements - -- **Optimized static file serving and caching**: Streamlined cache control logic by replacing complex string-based path matching with proper file extension detection. Simplified immutable cache rules to focus on essential static assets (images, JavaScript, maps) while removing unnecessary directory-based checks, resulting in more efficient file serving and better cache hit rates. [crates/brk_server/src/files/file.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.63/crates/brk_server/src/files/file.rs#L97-L109) +- **Static File Caching**: Implemented intelligent HTTP caching strategy for static assets, setting immutable cache headers for long-term assets (images, fonts, JavaScript, map files) and must-revalidate headers for HTML and service worker files to ensure optimal performance and cache invalidation ([crates/brk_server/src/files/file.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.63/crates/brk_server/src/files/file.rs)) +- **Progressive Web App Assets**: Added comprehensive PWA assets including Apple Touch icons, splash screens for all iOS device sizes and orientations, and maskable icons for Android, enabling native app-like experience across all mobile platforms ### Internal Changes - -- **Improved file extension handling**: Replaced string-based file type detection with robust `path.extension()` method calls for better reliability and maintainability in static file processing. This architectural improvement reduces the likelihood of file type detection errors and makes the codebase more resilient to edge cases in file path handling. +- **File Extension Detection**: Refactored file extension checking from string-based `ends_with()` pattern matching to more robust `Path::extension()` method for better accuracy and maintainability +- **Cache Logic Simplification**: Consolidated cache control logic by removing redundant file path checks and grouping related file types for cleaner code organization [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.62...v0.0.63) ## [v0.0.62](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.62) - 2025-06-16 ### Bug Fixes +- **TypeScript Bridge Generation**: Fixed JavaScript/TypeScript bridge generation by properly handling optional return values when reading hashed main.js entry files, preventing crashes when entry files don't exist ([crates/brk_bundler/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.62/crates/brk_bundler/src/lib.rs)) +- **TypeScript Type Generation**: Restructured TypeScript type definitions for VecIdToIndexes, moving typedef comments outside function declaration for proper type recognition ([crates/brk_server/src/api/query/bridge.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.62/crates/brk_server/src/api/query/bridge.rs)) -- **Improved error handling in bundler file operations**: Fixed potential panics in the bundler when processing entry files that don't contain expected "main" or ".js" strings. Replaced unsafe `.unwrap()` calls with proper `if let Some()` pattern matching to gracefully handle missing file content patterns. [crates/brk_bundler/src/lib.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.62/crates/brk_bundler/src/lib.rs#L52-L57) - -- **Enhanced web application error resilience**: Added try-catch error handling around localStorage operations to prevent application crashes when localStorage is unavailable (such as in private browsing mode or restrictive environments). This ensures the web application remains functional even when local storage access is blocked. [websites/default/index.html](https://github.com/bitcoinresearchkit/brk/blob/v0.0.62/websites/default/index.html#L1857-L1865) - -### Performance Improvements - -- **Optimized chart rendering performance**: Streamlined the lightweight-charts data processing pipeline by removing unnecessary intermediate variables and simplifying data transformation logic. Improved time scale bar spacing algorithms for different time periods (months, quarters, years, decades) to provide better visual spacing and reduced computational overhead. [websites/default/packages/lightweight-charts/wrapper.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.62/websites/default/packages/lightweight-charts/wrapper.js) +### New Features +- **Chart Time Scale Optimization**: Improved time scale spacing for different chart time periods with more balanced bar spacing (quarters: 3→2, years: 12→6, decades: 120→60) for better visual density ([websites/default/packages/lightweight-charts/wrapper.js](https://github.com/bitcoinresearchkit/brk/blob/v0.0.62/websites/default/packages/lightweight-charts/wrapper.js)) +- **Progressive Web App Support**: Added service worker scope configuration and improved PWA manifest handling for better standalone app experience ### Internal Changes - -- **Enhanced TypeScript support for web interface**: Reorganized TypeScript type definition generation to improve IntelliSense and code completion. Moved `@typedef` comments to proper positions and simplified object return structures for better developer experience when working with the web API. [crates/brk_server/src/api/query/bridge.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.62/crates/brk_server/src/api/query/bridge.rs#L64-L85) - -- **Improved HTML5 compliance and service worker configuration**: Updated HTML doctype declaration for better standards compliance and enhanced service worker registration with explicit scope configuration for improved Progressive Web App functionality. [websites/default/index.html](https://github.com/bitcoinresearchkit/brk/blob/v0.0.62/websites/default/index.html) +- **Chart Data Processing**: Refactored chart data handling to use object destructuring instead of arrays, improving code clarity and type safety in effect callbacks +- **HTML Standards**: Updated HTML5 DOCTYPE declaration and improved syntax consistency +- **Error Handling**: Added try-catch protection for localStorage operations to prevent crashes in restricted environments [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.61...v0.0.62) ## [v0.0.61](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.0.61) - 2025-06-15 -### Bug Fixes - -- **Fixed OHLC price continuity in financial data computation**: Implemented proper candlestick continuity logic where each trading day's opening price now equals the previous day's closing price. This ensures accurate financial charting and enables proper gap analysis by adjusting high and low prices when opening price gaps occur. [crates/brk_computer/src/vecs/fetched.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.61/crates/brk_computer/src/vecs/fetched.rs#L432-L443) - -- **Improved error handling in block recap export functionality**: Enhanced error diagnostics by capturing and displaying the actual file system error instead of generic "No such file or directory" message. Now provides more accurate "Cannot write file" error with detailed error information for better debugging when export operations fail. [crates/brk_parser/src/blk_index_to_blk_recap.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.61/crates/brk_parser/src/blk_index_to_blk_recap.rs#L99-L103) +### New Features +- **OHLC Price Continuity**: Added logic to maintain price continuity between days in OHLC data computation by setting today's opening price to the previous day's closing price, ensuring no gaps in price series when computing daily OHLC from fetched data ([crates/brk_computer/src/vecs/fetched.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.61/crates/brk_computer/src/vecs/fetched.rs)) ### Internal Changes - -- **Added mutable dereferencing capability to OHLC data structures**: Extended all OHLC-related structs with `DerefMut` derive to enable direct mutable access to underlying price data. This architectural change supports the price continuity fix by allowing the system to modify opening, high, and low prices when implementing gap adjustments between trading periods. [crates/brk_core/src/structs/ohlc.rs](https://github.com/bitcoinresearchkit/brk/blob/v0.0.61/crates/brk_core/src/structs/ohlc.rs) +- **Struct Mutability**: Added `DerefMut` trait to all OHLC struct variants (OhlcF64, OhlcBtc, OhlcSats, OhlcUsd) enabling mutable access to underlying values +- **Error Handling**: Improved file creation error handling in block recap export with more descriptive panic messages [View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.0.59...v0.0.61)