Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block Validation Errors should be at least INFO level not DEBUG or TRACE #1568

Closed
shemnon opened this issue Nov 16, 2020 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@shemnon
Copy link
Contributor

shemnon commented Nov 16, 2020

When importing a chain the errors causing a block to be rejected should be at INFO. Currently they are at DEBUG or TRACE. Bad blocks are rare enough and critical enough they should not be veiled behind developer flags.

Expected behavior: [What you expect to happen]

stack traces that look like

2020-11-16 11:56:01.310+10:00 | EthScheduler-Services-5 (importBlock) | INFO  | CalculatedDifficultyValidationRule | Invalid block header: difficulty 1 does not equal expected difficulty 2
2020-11-16 11:56:03.320+10:00 | EthScheduler-Timer-0 | INFO  | FullSyncTargetManager | No sync target, waiting for peers: 0

Actual behavior:
Stack traces that look like this

2020-11-16 11:56:01.310+10:00 | EthScheduler-Services-5 (importBlock) | WARN  | PipelineChainDownloader | Chain download failed. Restarting after short delay.
java.util.concurrent.CompletionException: org.hyperledger.besu.ethereum.eth.sync.tasks.exceptions.InvalidBlockException: Failed to import block: Invalid block at #7 (0xd169d7c49653f7070fc8a8e45af477c8efd6840279f5fc5277a2359a37afe88d)
	at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:367) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:376) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:1019) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) ~[?:?]
	at org.hyperledger.besu.services.pipeline.Pipeline.abort(Pipeline.java:152) ~[besu-pipeline-1.5.0.jar:1.5.0]
	at org.hyperledger.besu.services.pipeline.Pipeline.lambda$runWithErrorHandling$3(Pipeline.java:134) ~[besu-pipeline-1.5.0.jar:1.5.0]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.hyperledger.besu.ethereum.eth.sync.tasks.exceptions.InvalidBlockException: Failed to import block: Invalid block at #7 (0xd169d7c49653f7070fc8a8e45af477c8efd6840279f5fc5277a2359a37afe88d)
	at org.hyperledger.besu.ethereum.eth.sync.fullsync.FullImportBlockStep.accept(FullImportBlockStep.java:57) ~[besu-eth-1.5.0.jar:1.5.0]
	at org.hyperledger.besu.ethereum.eth.sync.fullsync.FullImportBlockStep.accept(FullImportBlockStep.java:30) ~[besu-eth-1.5.0.jar:1.5.0]
	at org.hyperledger.besu.services.pipeline.CompleterStage.run(CompleterStage.java:37) ~[besu-pipeline-1.5.0.jar:1.5.0]
	at org.hyperledger.besu.services.pipeline.Pipeline.lambda$runWithErrorHandling$3(Pipeline.java:130) ~[besu-pipeline-1.5.0.jar:1.5.0]
	... 5 more
2020-11-16 11:56:03.320+10:00 | EthScheduler-Timer-0 | INFO  | FullSyncTargetManager | No sync target, waiting for peers: 0
@timbeiko timbeiko added the enhancement New feature or request label Nov 16, 2020
shemnon added a commit to shemnon/besu that referenced this issue Dec 14, 2020
Move the block header validation errors logging levels from trace and
debug to info. Also, include a standard prefix "Invalid block header: "
in each of the log lines.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
@shemnon shemnon changed the title Block Validation Errors should be at INFO level not DEBUG or TRACE Block Validation Errors should be at least INFO level not DEBUG or TRACE Dec 14, 2020
shemnon added a commit that referenced this issue Dec 15, 2020
Move the block header validation errors logging levels from trace and
debug to info. Also, include a standard prefix "Invalid block header: "
in each of the log lines.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants