Fetch balance only for blocks which are greater or equal block with FIRST_BLOCK number #3126
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.
Motivation
Eliminate requests to the node for blocks which state doesn't exist on the node. Example of response from such failed request from Nethermind archive node:
0x58bad7cf29428c3d17cb859f5c580d3c25f134cd@�: (-32002) No state available for block 0x56c39d10e519eda9e8c0175c2f9d0c25ec41c18ddd870febcf6e05d5410327a7
Changelog
Take into consideration
FIRST_BLOCK
environment variable in getting coin balances for the address at the block. Specifically, make a request only if the block number is greater or equal to the FIRST_BLOCK param.Checklist for your Pull Request (PR)
CHANGELOG.md
with this PRmaster
in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.