Skip to content

fix(settlement): verify on-chain broadcast confirmation before marking claims settled - #8234

Open
trexfr-ops wants to merge 1 commit into
Scottcjn:mainfrom
trexfr-ops:fix/claims-settlement-broadcast-verification
Open

fix(settlement): verify on-chain broadcast confirmation before marking claims settled#8234
trexfr-ops wants to merge 1 commit into
Scottcjn:mainfrom
trexfr-ops:fix/claims-settlement-broadcast-verification

Conversation

@trexfr-ops

@trexfr-ops trexfr-ops commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Closes #8230

This PR addresses the false-success pathways in sign_and_broadcast_transaction() where claims could transition to settled with a synthetic hash when no broadcast to the network occurred.

Changes

  1. Require TREASURY_KEY_PATH and NODE_API_URL configuration; returns (False, None, error_message) if unset.
  2. Require confirmed HTTP 2xx response from /api/tx/submit before returning success=True and on_chain_hash.
  3. Handle non-2xx broadcast responses and network errors by returning success=False with error details, allowing process_claims_batch() to release pool funds and retain claims for retry.
  4. Updated TestSignAndBroadcastTransaction suite covering missing configuration, signing errors, broadcast failures, and verified 2xx success (100% pass).

Bounty Payout Addresses

  • EVM (Base/ETH): 0x32BB3df5B74a594956a0f33Bc353511Fa759FCa4
  • Solana (SOL): 8Xo39uq9LoaM2rQEkgaaSfuThqHZTd18yGdJSXffkLwM
  • LTC: LPnftYop8yhRNQZstysT3vuJf3XkpQWKTC
  • BTC: bc1qpyu6866qcgt26sqw4dn2mlmp8d0yc657fuedkv
  • DOGE: DDMU6D9TCE3BhqqYyy7MUZQD7JhfL39FpE

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Non-doc PRs have a BCOS-L1 or BCOS-L2 label
  • Doc-only PRs are exempt from BCOS tier labels when they only touch docs/**, *.md, or common image/PDF files
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) node Node server related tests Test suite changes size/L PR: 201-500 lines labels Aug 19, 2026
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) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) node Node server related size/L PR: 201-500 lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settlement returns success=True with a fabricated tx_hash when the broadcast never happens (claims marked settled, pool reservation consumed)

1 participant