Skip to content

feat: implement eth_getLogs RPC method for flashblocks#99

Merged
cody-wang-cb merged 15 commits intomainfrom
cody/eth_getlogs
Oct 1, 2025
Merged

feat: implement eth_getLogs RPC method for flashblocks#99
cody-wang-cb merged 15 commits intomainfrom
cody/eth_getlogs

Conversation

@cody-wang-cb
Copy link
Copy Markdown
Contributor

@cody-wang-cb cody-wang-cb commented Sep 25, 2025

Summary

  • Implements eth_getLogs RPC method for flashblocks with pure pending query support
  • Adds comprehensive test coverage with realistic Transfer event logs
  • Delegates historical queries to underlying eth API for backwards compatibility

Changes Made

  • RPC Method: Added get_logs to EthApiOverride trait with pure pending logic
  • Pending Logic: when toBlock:"pending", queries use flashblocks state
  • Log Filtering: Uses alloy's built-in filter.matches() for efficient address/topic filtering
  • API Extension: Added get_pending_logs method to FlashblocksAPI trait
  • Test Coverage: Enhanced tests with realistic Transfer event logs and comprehensive filtering scenarios

Test Plan

  • Pure pending queries return logs from flashblocks state
  • Historical queries delegate to underlying eth API
  • Address filtering works correctly
  • Topic filtering supports event signatures and indexed parameters
  • Mixed block range queries (e.g., block 0 to pending) delegate to eth API
  • All existing tests continue to pass

🤖 Generated with Claude Code

cody-wang-cb and others added 8 commits September 23, 2025 20:14
- Add get_logs counter metric
- Implement pending logs filtering with address/topic support
- Add get_logs RPC method with pending/historical logic
- Include comprehensive tests for log retrieval functionality
- Add get_logs method to EthApiOverride trait and implementation
- Support pure pending queries (fromBlock:"pending" and toBlock:"pending")
- Delegate all other queries to underlying eth API for historical data
- Add comprehensive test coverage with realistic log data including Transfer events
- Implement log filtering by address, topics, and block ranges
- Add get_pending_logs method to FlashblocksAPI trait
- Use alloy's built-in filter.matches() for efficient log filtering

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@danyalprout danyalprout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, curious if we should/can support more than just (pending, pending) and combine with other cases

@cody-wang-cb cody-wang-cb merged commit a6d4439 into main Oct 1, 2025
7 checks passed
@danyalprout danyalprout deleted the cody/eth_getlogs branch January 9, 2026 18:47
danyalprout pushed a commit that referenced this pull request Feb 12, 2026
* feat(audit): add S3 storage schema for UserOp events

* docs: add UserOp S3 storage format documentation

* test(audit): add S3 integration tests for UserOp events

* docs: update AUDIT_S3_FORMAT.md with UserOp storage schema

* docs: keep transaction lookups in description

* fix: remove duplicate UserOpEventWrapper, import from reader
refcell added a commit that referenced this pull request Feb 18, 2026
### Description

Simplifies the log update methods of the `SystemConfig` to accept bool
flags if ecotone is active instead of requiring the full `RollupConfig`
object. Intentionally simplifies arguments.

### Metadata

Closes #99
refcell added a commit that referenced this pull request Feb 18, 2026
### Description

Simplifies the log update methods of the `SystemConfig` to accept bool
flags if ecotone is active instead of requiring the full `RollupConfig`
object. Intentionally simplifies arguments.

### Metadata

Closes #99
mw2000 pushed a commit that referenced this pull request Mar 9, 2026
* chore: remove random md files

* fix diff
mw2000 pushed a commit that referenced this pull request Mar 16, 2026
* chore: remove random md files

* fix diff
haardikk21 pushed a commit that referenced this pull request Mar 17, 2026
* feat: implement get_logs RPC method for pending state

- Add get_logs counter metric
- Implement pending logs filtering with address/topic support
- Add get_logs RPC method with pending/historical logic
- Include comprehensive tests for log retrieval functionality

* fix test to properly test logs

* wip

* fix test

* only pending

* optimize

* optimize

* feat: implement eth_getLogs RPC method for flashblocks

- Add get_logs method to EthApiOverride trait and implementation
- Support pure pending queries (fromBlock:"pending" and toBlock:"pending")
- Delegate all other queries to underlying eth API for historical data
- Add comprehensive test coverage with realistic log data including Transfer events
- Implement log filtering by address, topics, and block ranges
- Add get_pending_logs method to FlashblocksAPI trait
- Use alloy's built-in filter.matches() for efficient log filtering

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* lint

* wip

* use canonical block

* refactor

* remove unnecessary tests

---------

Co-authored-by: Claude <noreply@anthropic.com>
haardikk21 pushed a commit that referenced this pull request Mar 17, 2026
* chore: remove random md files

* fix diff
mw2000 pushed a commit that referenced this pull request Mar 19, 2026
* chore: remove random md files

* fix diff
mw2000 pushed a commit that referenced this pull request Mar 23, 2026
* chore: remove random md files

* fix diff
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.

3 participants