-
Notifications
You must be signed in to change notification settings - Fork 853
Check against sstore block availability when processing eth_getLogs #2433
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
base: main
Are you sure you want to change the base?
Conversation
f12b81f
to
d4fc8cd
Compare
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (57.14%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2433 +/- ##
=========================================
+ Coverage 0 27.11% +27.11%
=========================================
Files 0 1464 +1464
Lines 0 144423 +144423
=========================================
+ Hits 0 39154 +39154
- Misses 0 101905 +101905
- Partials 0 3364 +3364
🚀 New features to boost your workflow:
|
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.
(once tests are green)
// get block number from hash and compare to latest | ||
latestReceiptVersion, err := a.logFetcher.k.GetLatestReceiptVersion(a.logFetcher.ctxProvider(LatestCtxHeight)) | ||
if err != nil { | ||
return nil, err |
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.
Currently if it returns an error, we should probably fall back to the previous approach to assume latestVersion=latestblock
Describe your changes and provide context
This checks against the latest available version for receiptStore so that we can properly error on eth_getLogs if/when we haven't yet flushed one or more of the blocks within the queried range.
Testing performed to validate your change
Unit tests