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

Bad Block Comparator - Plugin #6301

Open
jflo opened this issue Dec 14, 2023 · 5 comments
Open

Bad Block Comparator - Plugin #6301

jflo opened this issue Dec 14, 2023 · 5 comments
Labels
dev experience The build system, things that enable easier development etc. enhancement New feature or request help wanted Extra attention is needed icebox items that need more consideration, time, or can wait logging mainnet testing

Comments

@jflo
Copy link
Contributor

jflo commented Dec 14, 2023

In order to quickly diagnose bad blocks, it is necessary to compare block traces between two clients at the same state. Usually, this requires either quick action (most clients have limits on how much historical state they can maintain, since it is only needed for reorgs) or access to an archive node.

To solve the recency issue, it would be helpful to have a plugin in Besu that could be configured with a peer execution client, which could be asked for a trace of the same block as soon as a bad one is detected and added to the bad block manager. It could work something like this:

  • when a bad block is detected, trace it and store the trace
  • contact the configured peer, and immediately trace the same block
  • normalize the output, trace formats are not quite the same
  • provide both versions of the raw trace, and a delta between their normal forms via debug apis.

This would automate a very large portion of the legwork needed to diagnose issues.

@non-fungible-nelson non-fungible-nelson added enhancement New feature or request help wanted Extra attention is needed testing dev experience The build system, things that enable easier development etc. mainnet logging icebox items that need more consideration, time, or can wait labels Dec 18, 2023
@mbaxter mbaxter self-assigned this Jan 16, 2024
@mbaxter
Copy link
Contributor

mbaxter commented Feb 13, 2024

Plugin development has been started in a new repo here: https://github.com/Consensys/besu-bad-block-plugin

@macfarla macfarla removed the help wanted Extra attention is needed label Mar 1, 2024
@macfarla
Copy link
Contributor

macfarla commented Mar 1, 2024

Removing the help wanted label since @mbaxter is working on this - thanks!

mbaxter added a commit that referenced this issue Mar 4, 2024
Signed-off-by: mbaxter <mbaxter.dev@gmail.com>
@mbaxter mbaxter removed their assignment Mar 29, 2024
@mbaxter
Copy link
Contributor

mbaxter commented Apr 9, 2024

I've stopped work on this and unassigned it. If anyone wants to pick this up again, bad block events have been exposed through the plugins api here and a plugin project has been started here. The new plugin basically just contains scaffolding currently. Next steps would be to consume the bad block events from besu and implement the core logic.

@mbaxter mbaxter added the help wanted Extra attention is needed label Apr 9, 2024
amsmota pushed a commit to Citi/besu that referenced this issue Apr 16, 2024
Signed-off-by: mbaxter <mbaxter.dev@gmail.com>
Signed-off-by: amsmota <antonio.mota@citi.com>
amsmota pushed a commit to Citi/besu that referenced this issue Apr 16, 2024
Signed-off-by: mbaxter <mbaxter.dev@gmail.com>
Signed-off-by: amsmota <antonio.mota@citi.com>
matthew1001 pushed a commit to kaleido-io/besu that referenced this issue Jun 7, 2024
Signed-off-by: mbaxter <mbaxter.dev@gmail.com>
@non-fungible-nelson
Copy link
Contributor

@jflo what shall we do with this one?

@jflo
Copy link
Contributor Author

jflo commented Aug 26, 2024

Icebox seems like the right place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev experience The build system, things that enable easier development etc. enhancement New feature or request help wanted Extra attention is needed icebox items that need more consideration, time, or can wait logging mainnet testing
Projects
None yet
Development

No branches or pull requests

4 participants