In both HotStuff-rs v0.3.0, PruneBlockEvents are emitted in the publish_insert_block_events function, and the blocks that are indicated to have been pruned are committed_blocks. This remains the case in the under-development HotStuff-rs v0.4.0, where publish_insert_block_events has been renamed to publish_update_block_tree_events.
Accordingly, the itemdoc for PruneBlockEvent defines "pruned blocks" as blocks whose siblings were permanently deleted from the block tree.
Intended behavior
The intended behavior was for PrunedBlockEvents to indicate the blocks that were permanently deleted from the block tree, as opposed to the blocks whose siblings were deleted. "Pruned blocks" should be defined as blocks that were removed from the block tree because one of their siblings were committed.
This definition is more useful than the current definition, since in the current definition the set of blocks which are "pruned" is exactly the same set of blocks which are "committed", and therefore PruneBlockEvents do not provide the user any more information than what is provided by CommitBlockEvents.
Proposed fix
I will modify publish_update_block_tree_events in the next PR for HotStuff-rs v0.4.0 after the open PR no. 36 is merged.
I will then find someone to backport this fix to HotStuff-rs v0.3.x, and this fix will probably be included in a HotStuff-rs v0.3.1 release.
Current behavior
In both HotStuff-rs v0.3.0,
PruneBlockEvent
s are emitted in thepublish_insert_block_events
function, and the blocks that are indicated to have been pruned arecommitted_blocks
. This remains the case in the under-development HotStuff-rs v0.4.0, wherepublish_insert_block_events
has been renamed topublish_update_block_tree_events
.Accordingly, the itemdoc for
PruneBlockEvent
defines "pruned blocks" as blocks whose siblings were permanently deleted from the block tree.Intended behavior
The intended behavior was for
PrunedBlockEvent
s to indicate the blocks that were permanently deleted from the block tree, as opposed to the blocks whose siblings were deleted. "Pruned blocks" should be defined as blocks that were removed from the block tree because one of their siblings were committed.This definition is more useful than the current definition, since in the current definition the set of blocks which are "pruned" is exactly the same set of blocks which are "committed", and therefore
PruneBlockEvent
s do not provide the user any more information than what is provided byCommitBlockEvent
s.Proposed fix
I will modify
publish_update_block_tree_events
in the next PR for HotStuff-rs v0.4.0 after the open PR no. 36 is merged.I will then find someone to backport this fix to HotStuff-rs v0.3.x, and this fix will probably be included in a HotStuff-rs v0.3.1 release.