Description
Summary
Currently, regardless of whether a validator's vote extension passes VerifyVoteExtensionHandler
, the BlockIdFlag
is always set to BlockIDFlagCommit
. This approach is not accurate in all scenarios.
Proposal
Introduce a global configuration option that allows the application to decide whether to set the BlockIdFlag
as BlockIDFlagAbsent
or BlockIDFlagNil
if a validator's vote extension fails verification.
Motivation
In our system, a validator's task is not simply signing blocks. It is the validator's responsibility to provide valid data as part of the vote extension. If a validator fails to do so (i.e., the vote extension does not pass verification), it should be treated as not having completed its task, or at least as partially incomplete.
Benefits
- Enables more accurate consensus and state accounting.
- Allows the application to penalize validators who fail to provide valid vote extensions (e.g., by withholding block rewards in certain scenarios).
- Makes the consensus protocol more extensible for advanced use cases.
Example Use Case
If a validator's vote extension fails verification, the application can set the BlockIdFlag
to Absent
or Nil
. This can be used to adjust reward distribution or take other actions as appropriate for the application's requirements.
Suggestion
Add a new parameter in the consensus parameters to allow this behavior to be configured as needed.