Skip to content

PLEX-2785 L-07 Signal that LogsPerBlock Filter setting is not supported#433

Open
dhaidashenko wants to merge 1 commit intodevelopfrom
PLEX-2785-L-07-LogsPerBlock-Filter-Setting-Not-Supported
Open

PLEX-2785 L-07 Signal that LogsPerBlock Filter setting is not supported#433
dhaidashenko wants to merge 1 commit intodevelopfrom
PLEX-2785-L-07-LogsPerBlock-Filter-Setting-Not-Supported

Conversation

@dhaidashenko
Copy link
Copy Markdown
Contributor

No description provided.

@dhaidashenko dhaidashenko requested a review from a team as a code owner April 17, 2026 15:08
Copilot AI review requested due to automatic review settings April 17, 2026 15:08
@dhaidashenko dhaidashenko requested review from a team as code owners April 17, 2026 15:08
@dhaidashenko dhaidashenko force-pushed the PLEX-2785-L-07-LogsPerBlock-Filter-Setting-Not-Supported branch 2 times, most recently from cf7ba66 to 33185ae Compare April 17, 2026 15:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 SkipEmptyBlocks option (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 + add SelectNewestBlock to 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.

Comment thread pkg/logpoller/log_poller.go
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-evm

View full report

@dhaidashenko dhaidashenko force-pushed the PLEX-2785-L-07-LogsPerBlock-Filter-Setting-Not-Supported branch from 33185ae to 28d9018 Compare April 17, 2026 15:48
@dhaidashenko dhaidashenko enabled auto-merge (squash) April 20, 2026 11:07
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.

4 participants