Tracking: Support invalidating and reconsidering blocks in the NonFinalizedState
via RPC methods
#8634
Labels
Milestone
NonFinalizedState
via RPC methods
#8634
Motivation
This would be useful for testing forks and chain reorganizations, it was mentioned in the forums as a requirement for dex support and in the Regtest tracking issue.
See this comment for more information about the motivation.
Design
Add
invalidate()
/reconsider_block()
methods to theNonFinalizedState
, accept a new channel inwrite_blocks_from_channels()
running in the the block write task (or refactor the existing channels into a single channel receiving an enum), addStateService
Request
variants for invalidating/reconsidering blocks, and add theinvalidate()
/reconsiderblock()
RPC methods that call theStateService
with the newRequest
variants.Implementation Plan:
NonFinalizedState
for invalidated blocks #8840invalidate_block()
method to theNonFinalizedState
for removing a block and its descendents #8841reconsider_block()
method to theNonFinalizedState
for validating/committing a previously invalidated block and its invalidated descendents #8842NonFinalizedState
methods when the block write task receives a message to invalidate or reconsider a block #8844InvalidateBlock
StateService
Request
variant which sends a message to the block write task #8845ReconsiderBlock
StateService
Request
variant which sends a message to the block write task #8846invalidate()
RPC method #8847reconsiderblock()
RPC method #8848The text was updated successfully, but these errors were encountered: