PLEX-2785 L-07 Signal that LogsPerBlock Filter setting is not supported#433
Open
dhaidashenko wants to merge 1 commit intodevelopfrom
Open
PLEX-2785 L-07 Signal that LogsPerBlock Filter setting is not supported#433dhaidashenko wants to merge 1 commit intodevelopfrom
dhaidashenko wants to merge 1 commit intodevelopfrom
Conversation
cf7ba66 to
33185ae
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the EVM LogPoller to (a) explicitly signal that the Filter.LogsPerBlock setting is unsupported, and (b) introduce/configure SkipEmptyBlocks to reduce DB writes by avoiding persistence of empty blocks (while preserving checkpoints needed for reorg/finality handling). It also refactors ORM inserts to support batched block inserts and adds/adjusts tests accordingly.
Changes:
- Add
SkipEmptyBlocksoption (config + wiring) and update log polling logic/tests to support skipping empty blocks while maintaining canonical-chain correctness. - Replace single-block insert API with
InsertLogsWithBlocks+ addSelectNewestBlockto support reorg/LCA logic with sparse (skipped) block persistence. - Improve DB insertion batching (generic
batchInsert,InsertBlocks) and expand tests/mocks for new behavior.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/logpoller/log_poller.go | Adds SkipEmptyBlocks, replay-aware polling, reorg/LCA handling changes, and logs unsupported LogsPerBlock. |
| pkg/logpoller/orm.go | Reworks ORM API to InsertLogsWithBlocks, adds InsertBlocks, SelectNewestBlock, and generic batch insert helper. |
| pkg/logpoller/observability.go | Updates observed ORM wrapper for new ORM methods and adds observed SelectNewestBlock. |
| pkg/logpoller/observability_test.go | Updates metrics tests to use InsertLogsWithBlocks. |
| pkg/logpoller/orm_test.go | Adds batching test for inserting logs + blocks; updates tests to new ORM API. |
| pkg/logpoller/log_poller_test.go | Updates many tests for new PollAndSaveLogs signature, adds replay/reorg coverage, introduces DB-vs-geth consistency helper. |
| pkg/logpoller/log_poller_internal_test.go | Adds extensive internal tests for replay/reorg/finality edge cases and SkipEmptyBlocks behavior. |
| pkg/logpoller/helper_test.go | Updates harness to call new PollAndSaveLogs signature and removes old canonical assertion helper. |
| pkg/logpoller/mock_orm_test.go | Adds generated ORM mock for internal tests. |
| pkg/.mockery.yaml | Configures mockery generation for the ORM interface. |
| pkg/config/config.go | Extends EVM config interface with LogPollerSkipEmptyBlocks(). |
| pkg/config/chain_scoped.go | Implements LogPollerSkipEmptyBlocks() on chain-scoped EVM config. |
| pkg/config/mocks/evm.go | Adds mock method for LogPollerSkipEmptyBlocks(). |
| pkg/config/toml/config.go | Adds TOML field LogPollerSkipEmptyBlocks. |
| pkg/config/toml/defaults.go | Wires LogPollerSkipEmptyBlocks into defaults propagation. |
| pkg/config/toml/defaults/fallback.toml | Adds default value for LogPollerSkipEmptyBlocks. |
| pkg/config/toml/testdata/config-full.toml | Adds LogPollerSkipEmptyBlocks to full config fixture. |
| pkg/config/toml/docs.toml | Documents LogPollerSkipEmptyBlocks setting. |
| pkg/config/toml/config_test.go | Updates TOML config test fixture to include LogPollerSkipEmptyBlocks. |
| pkg/chains/legacyevm/chain.go | Passes LogPollerSkipEmptyBlocks into logpoller Opts. |
| CONFIG.md | Documents LogPollerSkipEmptyBlocks in user-facing configuration docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
📊 API Diff Results
|
33185ae to
28d9018
Compare
silaslenihan
approved these changes
Apr 20, 2026
ilija42
approved these changes
Apr 20, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.