This repository was archived by the owner on May 29, 2026. It is now read-only.
debug: log allowEmptyBlocks wireup to triage MaruMultiValidatorTest CI failure#513
Closed
gauravahuja wants to merge 1 commit into
Closed
debug: log allowEmptyBlocks wireup to triage MaruMultiValidatorTest CI failure#513gauravahuja wants to merge 1 commit into
gauravahuja wants to merge 1 commit into
Conversation
…I failure
CI run 25536072042 failed on `validators converge to stable block production
without round skips` with a periodic "Block is empty" rejection pattern (every
3rd block has round=1 because a validator's proposal is rejected with
"Block is empty number=N executionPayloadBlockNumber=N hash=…"). That error
string is unique to maru's `EmptyBlockValidator`, but the test sets
`allowEmptyBlocks = true` and a source audit shows every chain-construction
site correctly omits `EmptyBlockValidator` when the flag is true.
This change adds three diagnostic logs (gated by [debug/allowEmptyBlocks])
so the next CI run pinpoints whether:
(a) the runtime `allowEmptyBlocks` value at the validator-factory ctor
differs from what the test passed (config drift), or
(b) `EmptyBlockValidator.validateBlock` is being invoked from a code path
I haven't traced (the stack trace on first invocation locates it).
After we have the answer, this PR should be reverted and the underlying
issue fixed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Contributor
Author
|
Debug logs confirmed allowEmptyBlocks wireup is correct end-to-end. The 'Block is empty' rejections seen earlier were log bleed-through from sibling tests, not the failing test's own validators. Closing — replacing with separate fixes for runner sizing, log isolation, and Thread.sleep flakes. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
CI run 25536072042 failed on
MaruMultiValidatorTest > validators converge to stable block production without round skipswith the test timing out after 240s. The CI report shows the chain in a periodic state where every 3rd block is atround=1— the maximum consecutiveround=0streak is 2, but the test demands 5.The reason for the round-skip is a Besu QBFT log line:
That error string is unique to maru's
EmptyBlockValidator(consensus/src/main/kotlin/maru/consensus/validation/BlockValidator.kt:257-259), but the test setsallowEmptyBlocks = trueand a source audit shows every chain-construction site correctly omitsEmptyBlockValidatorwhen the flag is true:BeaconBlockValidatorFactory.kt:32— QBFT validator pathSyncSealedBlockImporterFactory.kt:90— CL sync importer pathQbftFollowerFactory.kt:90— follower path (not exercised in this test)So either the runtime
allowEmptyBlocksvalue diverges fromconfig.allowEmptyBlocks=true, orEmptyBlockValidatoris being invoked from a code path not in the audit.What this PR adds
Three INFO-level diagnostic logs gated by
[debug/allowEmptyBlocks]so they're easy to grep:BeaconBlockValidatorFactoryImpl.<init>— logs the runtimeallowEmptyBlocksvalue when the QBFT validator factory is constructed.SyncSealedBlockImporterFactory.create— same, for the CL sync importer factory.EmptyBlockValidator.validateBlock— once-per-VM (viaAtomicBoolean.compareAndSet) log on first invocation, with a stack trace, so we can see what's calling it whenallowEmptyBlocks=trueshould have removed it from the chain.Expected outcomes
allowEmptyBlocks=truelogged at both factories ANDEmptyBlockValidatornever logsallowEmptyBlocks=falseat one factoryallowEmptyBlocks=trueeverywhere ANDEmptyBlockValidatorfirst-invocation logs with stackTest plan
test reportsfrom thetesting / maru testsjob.[debug/allowEmptyBlocks]in the integration-test logs.EmptyBlockValidatorfirst-invocation stack trace if present.🤖 Generated with Claude Code
Note
Low Risk
Low risk: adds INFO-level diagnostic logging (including a one-time stack trace) around
allowEmptyBlocksandEmptyBlockValidatorusage without changing validation behavior or control flow beyond logging.Overview
Adds targeted INFO diagnostics tagged
[debug/allowEmptyBlocks]to help triage unexpected empty-block rejections.Logs the runtime
allowEmptyBlocksvalue (and whetherEmptyBlockValidatoris included) whenBeaconBlockValidatorFactoryImplis constructed and whenSyncSealedBlockImporterFactory.createis called. Also updatesEmptyBlockValidator.validateBlockto emit a once-per-process first-invocation log with block metadata and a stack trace to identify the caller path.Reviewed by Cursor Bugbot for commit e97e251. Bugbot is set up for automated code reviews on this repo. Configure here.