Skip to content

Fixed - logging cleanup for invalid blocks #10160#10180

Open
sagarkhandagre998 wants to merge 1 commit intobesu-eth:mainfrom
sagarkhandagre998:issue-10160
Open

Fixed - logging cleanup for invalid blocks #10160#10180
sagarkhandagre998 wants to merge 1 commit intobesu-eth:mainfrom
sagarkhandagre998:issue-10160

Conversation

@sagarkhandagre998
Copy link
Copy Markdown

@sagarkhandagre998 sagarkhandagre998 commented Apr 4, 2026

PR description

Logging cleanup: demote invalid-block ERROR noise to DEBUG in block processors

AbstractBlockProcessor was logging at ERROR for block validation failures (state-root mismatch, blob gas mismatch, requests/BAL hash mismatch, etc.). These are expected outcomes when the network sends a genuinely invalid block — not Besu errors. MainnetBlockValidator.handleFailedBlockProcessing already owns the canonical INFO-level "Invalid block …" message for all failure paths, making the ERROR logs both wrong-level and redundant.

The state-root mismatch ERROR was additionally duplicated: the parallel attempt fired it, the sequential fallback fired it again, and then the validator emitted its INFO line — three log entries for one invalid block.

Changes:

  • All LOG.error calls in AbstractBlockProcessor.processBlock demoted to LOG.debug.
  • MainnetParallelBlockProcessor fallback log is now conditional:
    • causedBy().isPresent() → keeps LOG.info (a real local exception occurred in the parallel path)
    • causedBy().isEmpty()LOG.debug (deterministic block invalidity; the validator's INFO line is sufficient)

Result for a genuine invalid network block:

DEBUG AbstractBlockProcessor  – failed persisting block due to stateroot mismatch …
DEBUG MainnetParallelBlockProcessor – Parallel transaction processing reported block invalid. Falling back …
DEBUG AbstractBlockProcessor  – failed persisting block due to stateroot mismatch …
INFO  MainnetBlockValidator   – Invalid block 24788495 (0x1048…): World State Root does not match …
WARN  AbstractEngineNewPayload – Invalid new payload: …

Fixed Issue(s)

Fixed #10160

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests
  • hive tests: Engine or other RPCs modified?

Signed-off-by: Sagar Khandagre <sagar.khandagre998@gmail.com>
@sagarkhandagre998
Copy link
Copy Markdown
Author

sagarkhandagre998 commented Apr 11, 2026

@jframe kindly review

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.

logging cleanup for invalid blocks

1 participant