nethermind
nethermind copied to clipboard
Feature/debug get bad blocks
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
Lets wait with potential changes for the_merge as there might be differences with handling bad blocks
A bit risky that there would be a lot of bad blocks:
- A lot of data stored on disk? Probably minor risk unless some attack.
- 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