Enforce checksum address during EVM sync#4123
Merged
kajoseph merged 4 commits intobitpay:masterfrom Mar 12, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses an EVM indexing regression where to/from addresses are being persisted in lowercase, causing wallet history queries (that expect checksummed addresses) to miss transactions.
Changes:
- Normalize EVM transaction
toandfromto EIP-55 checksum format during transaction conversion/sync. - Add a maintenance script to rewrite previously-synced transactions in MongoDB to use checksum-cased
to/from.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/bitcore-node/src/providers/chain-state/evm/models/transaction.ts | Enforces checksum casing for to/from when converting raw EVM transactions. |
| packages/bitcore-node/scripts/fixEvmTxToFromAddressesCase.js | New DB migration script to checksum-case existing transactions over a block-height range (and mempool txs). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/bitcore-node/src/providers/chain-state/evm/models/transaction.ts
Show resolved
Hide resolved
leolambo
reviewed
Mar 12, 2026
leolambo
approved these changes
Mar 12, 2026
nitsujlangston
approved these changes
Mar 12, 2026
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.
Description
I believe a recent Geth upgrade made the
toandfromfields lowercase when syncing blocks & transactions. Regardless of the cause, txs are now being stored with lowercasetoandfromfields which is making those txs not be included in wallet tx histories per this db query.Changelog
toandfromfields on EVM txs during syncTesting Notes
Prior to checking out my branch, sync a few blocks and you should see the
toandfromfields be lowercase on the recently synced transactions.Checklist