feat: add blacklisted block check#7498
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #7498 +/- ##
============================================
+ Coverage 50.14% 50.15% +0.01%
============================================
Files 603 603
Lines 40454 40475 +21
Branches 2226 2229 +3
============================================
+ Hits 20285 20302 +17
- Misses 20129 20133 +4
Partials 40 40 🚀 New features to boost your workflow:
|
**Motivation** - Black list the whole chain leading to black listed blocks **Description** - Init chain's black listed blocks from chain options - Populate it if a block's parent root is black listed. Gradually the whole chain will be black listed --------- Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com> Co-authored-by: matthewkeil <me@matthewkeil.com>
Performance Report✔️ no performance regression detected Full benchmark results
|
There was a problem hiding this comment.
Is this intended to be merged into unstable or is it only to showcase this feature in holesky-rescue?
If former, I don't really think we should pass the blacklisted blocks from cli arguments but probably read it from a file since it can get lengthy.
There is also an argument brought up by lighthouse guys here about this flag can potentially be abused to censor blocks, so we need to take this into account when making design decisions eg. make it harder to use, limit number of blacklisted blocks, restrict the this feature on mainnet etc.
I don't see how that is possible, the node needs to be restarted to black list a block but at this point the block should already have enough votes to be considered part of the canonical chain and the node that blacklists it would just follow a separate (minority) chain. I can't really think of a scenario here, but maybe I am missing something obvious |
|
As discussed on standup #7524 , if this feature is going ahead, it should be merged to unstable before Friday deadline for v1.28-rc.0 |
@twoeths this is a comment from you on discord, do you feel like we still want this? seems simple to implement but I don't feel strongly about adding this although on second thought it might be helpful to see all black listed parent blocks |
I think we should add it considering how easy it is to implement |
Follow up on #7498 to improve the blacklisted blocks feature - adds new endpoint `/eth/v1/lodestar/blacklisted_blocks` to return root/slot of blacklisted blocks - updates blacklisted blocks store on chain to use `Map` to also keep track of slot - proper parsing of root hex values passed through CLI flag to make sure those are handled as `string` and not `number` - add unit test to sanity check implementation + various type issue fixed not caught due to previous tsconfig issue
|
🎉 This PR is included in v1.28.0 🎉 |
Motivation
Try to save Holesky. Blacklist ancestor of invalid chain and add blacklist BlockError that can be expanded to a feature flag in the future (or API call to add to the errors array)