Skip to content

fix: getEvents queries with not existing block number should be bounded to [0,latest] #2963

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

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

EgeCaner
Copy link
Contributor

@EgeCaner EgeCaner commented Jul 8, 2025

Current approach was upon receiving query on getEvents with to_block greater than the height, we were bounding the range to [0, Pending] but Pending block does not have blocknumber and this behavior might be confusing for some user. What they experience is for such queries they are receiving some events for non-existing block and response does not specifies block number for such events since Pending block does not have block number. With this PR, queries with block numbers will be bounded in range [0, latest] and pending block events will be only returned when it is explicity queried with pending or pre_confirmed tag.

Closes #2955

Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (0.14.0-beta@42ce4cc). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff               @@
##             0.14.0-beta    #2963   +/-   ##
==============================================
  Coverage               ?   73.00%           
==============================================
  Files                  ?      284           
  Lines                  ?    32604           
  Branches               ?        0           
==============================================
  Hits                   ?    23803           
  Misses                 ?     7246           
  Partials               ?     1555           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rodrigo-pino rodrigo-pino merged commit ace5a80 into 0.14.0-beta Jul 8, 2025
7 checks passed
@rodrigo-pino rodrigo-pino deleted the fix/bound-get-events-cap-range-latest branch July 8, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants