nethermind icon indicating copy to clipboard operation
nethermind copied to clipboard

Feature/debug get bad blocks

Open kjazgar opened this issue 3 years ago • 1 comments

Fixes | Closes | Resolves #

Resolves https://github.com/NethermindEth/nethermind/issues/3419.

Changes:

Implemented debug_getBadBlocks method.

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Documentation Update
  • [ ] Code style update (formatting, renaming)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] Other (please describe):

Testing

Requires testing

  • [x] Yes
  • [ ] No

In case you checked yes, did you write tests??

  • [x] Yes
  • [ ] No

kjazgar avatar Feb 21 '22 18:02 kjazgar

Lets wait with potential changes for the_merge as there might be differences with handling bad blocks

LukaszRozmej avatar Mar 30 '22 07:03 LukaszRozmej

A bit risky that there would be a lot of bad blocks:

  1. A lot of data stored on disk? Probably minor risk unless some attack.
  2. debug_getBadBlocks would try to read all of them causing potentially huge memory spike.

I've made a change to limit the number of bad blocks stored to 10, replicating the behaviour of geth

Marchhill avatar Dec 11 '23 11:12 Marchhill