Repository navigation
Conversation
…dateReceiptDetails
pleasew8t
requested review from
SEJeff,
bemic,
djb15,
evan-gray,
johnsaigle,
kcsongor,
mdulin2 and
panoel
as code owners
November 11, 2026 07:18
This branch has not been deployed
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.
This pull request brings some improvements to the EVM transfer verifier in preparation for enabling it.
Summary of Changes By Commit
Move nil-checks prior to dereferences
Add thread-safe map wrapper and apply to
decimalsCachelockedMaptype, which is a thread-safe wrapper around maps.decimalsCachecache, as a first phase.Apply lockedMap thread-safe wrapper to chainId, isWrapped and nativeContract caches
lockedMaptype to the remaining caches.deleteEntriesfunction (including its tests).deleteEntriespruning feature is replaced by thePruneIfFullmethod on thelockedMap.Add specialized evaluation lockedMap to support pruning block-relative receipts
evaluationscache.PruneOlderThanmethod.SetIfAbsentto atomically add a new key if it doesn't exist.Make lastBlockNumber thread-safe
lastBlockNumberan atomic uint64.updateLastBlockNumberfunction to theTransferVerifier.updateLastBlockNumber's goal is to ensure that thelastBlockNumberis monotonically increasing, and covers an edge cases where a racing goroutine could set the value to lower than what is actually latest.Ensure the originAddr is compared to a full 32-byte zero word
nativeContract()would actually always evaluate to false.ZERO_ADDRESSis 20 bytes, versus the 32-byte word returned from the RPC call.Ensure only relevant deposits and ERC20 transfers are processed by updateReceiptDetails
getDecimals()orisWrapped()call could result in a transfer getting delayed by the Notary.Update evaluation keying to include blockhash and avoid unwanted reorg behaviour
ErrCachedReceiptHasNoDataForMessagebeing returned.Review Notes
The commits have been structured to follow the changes listed above, so that reviewing each commit in order groups together changes linked to the same idea. The changes to pay special attention to include the
lockedMapimplementation, thelastBlockNumberthread-safety changes, and the last two commits that touch relevance-checking and evaluation-keying.