Skip to content

[fix][relayer][core] isolate receipt confirmation failures - #82

Draft
fengjy73 wants to merge 4 commits into
AntChainOpenLabs:mainfrom
ICT-BCLab:fix/relayer-confirm-batch-isolation
Draft

[fix][relayer][core] isolate receipt confirmation failures#82
fengjy73 wants to merge 4 commits into
AntChainOpenLabs:mainfrom
ICT-BCLab:fix/relayer-confirm-batch-isolation

Conversation

@fengjy73

Copy link
Copy Markdown
Contributor

What changed

  • persist a confirmed SDP result by the already-known sdp_msg_pool row ID
  • retain the plugin-native transaction hash as receipt evidence without using it as the database lookup key
  • isolate an ExecutionException to the affected receipt so the remaining futures in the confirmation batch still commit
  • keep the failed receipt row in TX_PENDING for the next reconciliation pass
  • preserve and propagate InterruptedException, because worker interruption is not a transaction-local failure
  • add regression coverage for native hashes, isolated receipt failures, and thread interruption

Root cause

The confirmation worker already loaded each pending SDP row and therefore knows its primary key. It nevertheless
built terminal results without that ID, forcing the repository to fall back to a product/blockchain/transaction-hash
lookup. A plugin may return a native transaction-hash representation that does not match the pending-row lookup
shape, leaving a genuinely confirmed transaction pending.

The same loop called Future.get() inside one outer batch and rethrew every ExecutionException. One temporarily
missing or unavailable native receipt therefore discarded the confirmed results collected from other futures in
that pass. The next pass retried all of them and could also delay downstream execution reports.

Validation

  • Java 8 compiled the changed AMConfirmService against the upstream production-compatible class set
  • AMConfirmServiceTest: 3 tests passed
    • native transaction hash retains the pending row ID
    • one exceptional receipt remains pending without aborting sibling results
    • worker interruption aborts the pass and preserves the interrupt flag
  • git diff --check passed

The full local reactor also reached r-core compilation, but this workstation currently has a newer regulatory
antchain-bridge-spi snapshot cached locally. That snapshot adds ISDPWriter.setMonitorContract, which upstream
GRpcBBCServiceClient does not implement; the unrelated interface mismatch prevents a clean full-reactor result
without modifying files outside this PR. No compatibility stub is included here.

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