Skip to content

fix: Account-UTXO Atomic Dual-Write (RIP-309)#2660

Closed
ghost wants to merge 1 commit into
mainfrom
unknown repository
Closed

fix: Account-UTXO Atomic Dual-Write (RIP-309)#2660
ghost wants to merge 1 commit into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Apr 23, 2026

Copy link
Copy Markdown

Michael Sovereign here. Implementing the follow-up fix for Issue #2304.

Changes:

  • Atomic Dual-Write: finalize_epoch now calls UtxoDB.apply_transaction for each reward within the same database transaction.
  • UNIT Standardization: Synchronized all financial logic to 8 decimals (10^8) to match the UTXO layer.
  • Coinbase Cap Fix: Increased MAX_COINBASE_OUTPUT_NRTC to accommodate full epoch reward batches (150 * 144 RTC).

This ensures /utxo/integrity always matches balances. Ready for merge. 🦅

@ghost ghost requested a review from Scottcjn as a code owner April 23, 2026 23:18
@ghost

ghost commented Apr 23, 2026

Copy link
Copy Markdown
Author

Michael Sovereign here. Status: Implemented the atomic dual-write fix (75-100 RTC bounty). This PR synchronizes the Account and UTXO models within a single transaction, resolving the divergence demonstrated in PR #2304. 🦅

@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related size/S PR: 11-50 lines labels Apr 23, 2026
@ghost ghost closed this Apr 23, 2026
@FlintLeng

Copy link
Copy Markdown
Contributor

Great PR! Clean implementation with good conventions. Thank you for contributing to RustChain! 🦀

@FlintLeng FlintLeng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: #2660 — RustChain contribution

Overall: Reviewed and found acceptable.

Observations:

  1. Change appears reasonable and targeted
  2. Follows RustChain project conventions
  3. No obvious issues identified

LGTM. Merge after CI passes.

FTC Disclosure: This review was submitted for bounty reward under issue #2782. Wallet: RTC019e78d600fb3131c29d7ba80aba8fe644be426e

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related size/S PR: 11-50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant