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

Invalid Block Not Properly Tracked in Consensus Bugs #8204

Open
matkt opened this issue Jan 30, 2025 · 0 comments
Open

Invalid Block Not Properly Tracked in Consensus Bugs #8204

matkt opened this issue Jan 30, 2025 · 0 comments
Assignees
Labels
bug Something isn't working P2 High (ex: Degrading performance issues, unexpected behavior of core features (DevP2P, syncing, etc))

Comments

@matkt
Copy link
Contributor

matkt commented Jan 30, 2025

When a consensus bug occurs, the invalid block is not properly tracked. Although the block is added to the BadBlockManager, the instance used for at the block processing part is not the same instance used for the RPC tracing functionality.

As a result, when calling tracing APIs such as debug_standardTraceBadBlockToFile, the block is not found, preventing investigation.

To fix this issue, both components (the block processing and the RPC tracing) should share the same BadBlockManager instance

Also, it appears that adding a block to the BadBlockManager does not always happen. For instance, in the case of a state root mismatch, the execution goes through this part of the code without adding the block:
MainnetBlockValidator.java#L221

We should investigate why the decision was made not to add the block in this case and determine how to properly handle state root mismatches so that they are also tracked as bad blocks.

Expected behavior: [What you expect to happen]

  • Ensure that the BadBlockManager instance used for processing blocks is the same as the one used for RPC tracing.
  • Investigate why state root mismatches are not added to the BadBlockManager and determine how to fix this behavior.
@matkt matkt added bug Something isn't working P2 High (ex: Degrading performance issues, unexpected behavior of core features (DevP2P, syncing, etc)) labels Jan 30, 2025
jflo added a commit to jflo/besu that referenced this issue Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 High (ex: Degrading performance issues, unexpected behavior of core features (DevP2P, syncing, etc))
Projects
None yet
Development

No branches or pull requests

2 participants