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.
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 calledvalidate_block_for_sync
.