Skip to content

fix(thorchain): recover indexed transactions missing from direct lookup - #1290

Closed
0xApotheosis wants to merge 1 commit into
developfrom
fix/historical-transaction-lookup
Closed

0xApotheosis wants to merge 1 commit into
developfrom
fix/historical-transaction-lookup

Conversation

@0xApotheosis

Copy link
Copy Markdown
Member

THORChain can return a transaction in account history while /api/v1/tx/{txid} fails with HTTP 500: the upstream /tx lookup says it is missing, but /tx_search on the same provider still returns the complete signed transaction. For example, this affects D4C2B478C69D020386D027CB2205CFCAE60D1BD791E93E31ACDAE8ACCB32AA9F.

Fall back to a one-result exact-hash search only for the specific transaction-not-found RPC error and a valid 32-byte hash. Accept the result only when both its reported hash and the hash of its signed bytes match the requested transaction. Other upstream failures retain their existing behavior. Also preserve the decoding error instead of dereferencing a nil RPC error on malformed success responses.

Validation: live read-only checks recovered both audited missing transactions through exact-hash search, verified their signed-byte hashes, fetched their blocks, and confirmed account history formats the same transactions. An unknown hash returned no search results. git diff --check passes. Local tests, Go builds/vet, and lint were not run per CLAUDE.md; CI provides build/lint validation.

This addresses the THORChain lookup failure. The separately observed Arbitrum/Moralis miss is not changed here.

@0xApotheosis
0xApotheosis requested a review from a team as a code owner September 8, 2026 02:46
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 4770ed07-62d8-4f86-9bab-df9017468e82

📥 Commits

Reviewing files that changed from the base of the PR and between 8ca5984 and 9d1fe4a.

📒 Files selected for processing (1)
  • go/pkg/thorchain/tx.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kaladinlight

Copy link
Copy Markdown
Member

Upstream bug which has been fixed.

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.

2 participants