nimbus-eth2/research
Jacek Sieka 1a8b7469e3
move quarantine outside of chaindag (#3124)
* move quarantine outside of chaindag

The quarantine has been part of the ChainDAG for the longest time, but
this design has a few issues:

* the function in which blocks are verified and added to the dag becomes
reentrant and therefore difficult to reason about - we're currently
using a stateful flag to work around it
* quarantined blocks bypass the processing queue leading to a processing
stampede
* the quarantine flow is unsuitable for orphaned attestations - these
should also should be quarantined eventually

Instead of processing the quarantine inside ChainDAG, this PR moves
re-queueing to `block_processor` which already is responsible for
dealing with follow-up work when a block is added to the dag

This sets the stage for keeping attestations in the quarantine as well.

Also:

* make `BlockError` `{.pure.}`
* avoid use of `ValidationResult` in block clearance (that's for gossip)
2021-12-06 10:49:01 +01:00
..
.gitignore update research VCS ignores (#2849) 2021-09-07 23:09:49 +00:00
block_sim.nim move quarantine outside of chaindag (#3124) 2021-12-06 10:49:01 +01:00
block_sim.nim.cfg block pool simulator (#956) 2020-05-01 17:51:24 +02:00
simutils.nim ncli_db: add putState, putBlock (#3096) 2021-11-18 13:02:43 +01:00
stack_sizes.nim altair fork handling cleanups (#3050) 2021-11-05 08:34:34 +01:00
stack_sizes.nim.cfg cleanups (#962) 2020-05-04 07:38:14 +02:00
state_sim.nim ncli_db: add putState, putBlock (#3096) 2021-11-18 13:02:43 +01:00
state_sim.nim.cfg add simple wasm page with state simulator (#334) 2020-01-22 15:36:16 +00:00