parallelchain-io / hotstuff_rs

Rust implementation of the HotStuff consensus algorithm.
34 stars 4 forks source link

Special variant of `validate_block` for sync #13

Closed lyulka closed 6 months ago

lyulka commented 10 months ago

Background

In ParallelChain Protocol specifically: validate_block calls are “artificially” forced to take a specific (longer) duration instead of returning as soon as possible to try and maintain a specific block time.

Problem

validate_block calls made during sync should try to complete as soon as possible so that the replica syncs faster.

However, it is currently not possible to find out inside a validate_block call whether the call was made in progress mode or in sync mode.

Suggested solution

Add a new method to the App trait, tentatively called validate_block_for_sync.

lyulka commented 6 months ago

Implemented in HotStuff-rs v0.3.