-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Foundry): Honor block.number
and cache requests
#129
Merged
Conversation
This file contains 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
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
acuarica
added
the
feature
Enhancing an existing feature driven by business requirements. Typically backwards compatible.
label
Nov 14, 2024
Signed-off-by: Luis Mastrangelo <[email protected]>
acuarica
requested review from
andrewb1269hg,
stoyanov-st and
arianejasuwienas
November 14, 2024 21:34
Signed-off-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Luis Mastrangelo <[email protected]>
mishomihov00
approved these changes
Nov 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and approved only this file:
.github/workflows/test.yml
arianejasuwienas
approved these changes
Nov 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
victor-yanev
approved these changes
Nov 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature
Enhancing an existing feature driven by business requirements. Typically backwards compatible.
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:
This PR honors
block.number
when requesting balances to the Mirror Node.The test data and
block.number
used for mocking match testnet state up to that block. This means that tests against testnet will work again when using the block number8535327
$ forge test --fork-url https://testnet.hashio.io/api --fork-block-number 8535327
Warning
Fetching allowances up to a given block is not supported yet #96.
It also caches the requests made to the Mirror Node within the same test. This is specially useful when making repeated requests to fetch block information. Given that we cache both
200
s and404
s, the specific cache foraccounts/
is not needed anymore 8cbdeb5.Finally, it changes the
accounts/
request so it doesn't fetch transactions given they are not needed e8d552c.Related issue(s):
Fixes #95.
Notes for reviewer:
Note
The
Forge tests w/FFI curl process mock
job was updated to include the--fork-block-number
CLI option b463fce. Moreover, two options were removed--chain 296
. This is not necessary given Foundry uses the sameblock.chainid
as the remote network.--no-storage-caching
. This flag was introduced (in other jobs) to ensure the JSON-RPC was called. However, given that we do not insert a JSON-RPC in this test, this flag is not needed.Checklist