Repository navigation
fix: use transfer metadata and chain-correct block timestamps - #81
Closed
trungkien1992 wants to merge 1 commit into
Closed
trungkien1992 wants to merge 1 commit into
trungkien1992 wants to merge 1 commit into
Conversation
Member
|
@trungkien1992 thank you for the issue but the underlying issue of |
Author
|
Thanks for clarifying, @nickninov. Would focused regression testing help with your native |
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.
Account.get_transactions currently fetches every block timestamp from Ethereum mainnet and keys the mapping only by block height. A transfer on Base can receive Ethereum's timestamp, and a Base height above Ethereum's head can fail on a null block response. It also performs a separate block request for each globally distinct height even though Alchemy can include timestamps in transfer metadata.
This change requests withMetadata on every transfer page, uses the supplied UTC timestamps, and falls back on the originating chain only for missing, unusable or conflicting metadata. Fallbacks are deduplicated by (chain_id, block_number). Existing output fields, signed amounts, cache behavior and block-height sorting are preserved; the account documentation now describes the actual output.
Related to status-im/status-go#7883. This is an interim SDK improvement; it does not implement that issue's native wallet_ endpoint or add token addresses.
Validation:
action_required, so no remote test pass is claimed.Rerun:
python -m pip install . python -m unittest discover -s tests -v python -m benchmarks.transaction_history --repeats 3 --output transaction-history.jsonThe benchmark uses actual requests HTTP transport to synthetic responses on 127.0.0.1. It needs no credentials or Status backend. These measurements establish controlled request counts and output correctness, not live Alchemy latency or availability. Network/category coverage across all configured chains and existing provider error/retry policies remain unchanged. Baseline import instructions and bounds are in docs/transaction-history-testing.md.