-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I spotted some outdated documentation in the VoteInfo reference docs for CometBFT v0.38. The docs document having a last_signed_block field, which is a boolean. This is accurate for CometBFT v0.37, which has the following VoteInfo struct:
type VoteInfo struct {
Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
SignedLastBlock bool `protobuf:"varint,2,opt,name=signed_last_block,json=signedLastBlock,proto3" json:"signed_last_block,omitempty"`
}In CometBFT v0..38, this was changed to an enumerator:
type VoteInfo struct {
Validator Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator"`
BlockIdFlag types1.BlockIDFlag `protobuf:"varint,3,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=tendermint.types.BlockIDFlag" json:"block_id_flag,omitempty"`
}
// types1 package:
// BlockIdFlag indicates which BlockID the signature is for
type BlockIDFlag int32
const (
BlockIDFlagUnknown BlockIDFlag = 0
BlockIDFlagAbsent BlockIDFlag = 1
BlockIDFlagCommit BlockIDFlag = 2
BlockIDFlagNil BlockIDFlag = 3
)I believe this change was made due to vote extensions. I would create a PR fixing this, however I am unsure what each of the enumerators means (which is why I had to reference the docs in the first place). Any help from someone with more context on what each of these means would be very helpful! If there's somewhere else where I can find this info, I'm happy to make the updates myself and make a PR.
Moameri55
Metadata
Metadata
Assignees
Labels
No labels