Skip to content

RocksDB UtxoState implementation#129

Draft
satran004 wants to merge 9 commits intodevelop/yaci-nodefrom
feat/utxo_state
Draft

RocksDB UtxoState implementation#129
satran004 wants to merge 9 commits intodevelop/yaci-nodefrom
feat/utxo_state

Conversation

@satran004
Copy link
Member

No description provided.

Introduced configuration, data models, and tests for a new UTXO state implementation. Supports unspent/spent output tracking, rollback safety, pruning, and indexing via RocksDB. Provides both "classic" and experimental MMR-based storage options.
Introduced SyncTipContext to share and propagate the latest network tip between HeaderSyncManager and BodyFetchManager. Updated managers and logging to use this shared context for improved decision-making and distance-aware behaviors. Adjusted tests and build settings accordingly.
Reformatted code blocks to enhance readability, ensuring proper indentation and spacing. Adjusted control flow structures to improve maintainability while retaining existing functionality. Simplified exception handling and maintained adherence to coding standards.
Introduce new UTXO-related REST endpoints to fetch UTXOs by address, transaction hash, and payment credentials. Implement `PruneService` for scheduled UTXO pruning and add meta column families to maintain pruning state. Refactor `ClassicUtxoStore` to support efficient, bounded pruning operations.
UtxoResource has been removed, simplifying the API layer, while a new `PruneService` has been introduced to handle periodic pruning of UTXOs in `YaciNode`. The prune service operates on a configurable interval and integrates with the UTXO store to improve resource management.
Introduced new interfaces and classes for UTXO processing, event handling, and pruning to improve modularity and encapsulation. Enhanced RocksDB configuration with tunable options for better performance based on system resources. Added a basic web UI for node status monitoring and updated Java version in workflows to JDK 21.
Introduce `UtxoEventHandlerAsync` for sequential async UTXO processing, preserving order using a single-thread executor. Added a new configuration property `yaci.node.utxo.applyAsync` to toggle between sync and async UTXO processing. Refactored `UtxoKeyUtil` for cleaner payment credential extraction using `Address` and `AddressProvider`.
Introduce tests to validate async UTXO processing and rollback recovery. These tests ensure proper handling of concurrent block applications and chain rollback to maintain consistency in UTXO state.
Introduce `MmrUtxoStore` as an experimental UTXO backend offering Merkle Mountain Range (MMR) support for UTXO creation proofs. Added a factory for store selection (`classic` or `mmr`) and implemented tests to validate MMR functionality. This includes persistent data structure, rollback handling, and proof generation, laying the groundwork for advanced accumulator-backed verification.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 8, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots
4.9% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@satran004 satran004 marked this pull request as draft February 8, 2026 15:20
Base automatically changed from feat/chainsync_pipeline_2 to develop/yaci-node February 9, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant