fix(cketh): don't panic when transaction receipt is not yet indexed - #11093
Open
Rachit2323 wants to merge 3 commits into
Open
fix(cketh): don't panic when transaction receipt is not yet indexed#11093Rachit2323 wants to merge 3 commits into
Rachit2323 wants to merge 3 commits into
Conversation
Contributor
Rachit2323
marked this pull request as ready for review
August 12, 2026 14:35
|
✅ No security or compliance issues detected. Reviewed everything up to 5c75fa2. Security Overview
Detected Code Changes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
When finalizing ETH withdrawals, the minter checks how many transactions were finalized on-chain, then fetches receipts for each one. These are two separate RPC calls — not atomic.
If an RPC provider returns
nullfor a receipt (not yet indexed, transient lag), the code hitsOk(None)and silently skips that withdrawal. But then theassert_eq!below expects every withdrawal to have a receipt. The counts don't match and the whole finalization timer panics — blocking all pending ETH withdrawals until the next tick.Fix
Replace
assert_eq!with a log + early return. If the counts don't match, log a warning and retry on the next timer tick instead of panicking.Tests
The existing test
should_not_finalize_transaction_when_receipts_do_not_matchcontinues to pass. The fix is safe — a mismatch is now treated as a transient RPC inconsistency, not a hard failure.