Documentation
¶
Index ¶
- func Compose(blsPubKey bytes.Buffer, phase bytes.Buffer, hash []byte) (bytes.Buffer, error)
- func Marshal(r *bytes.Buffer, ev wire.Event) error
- func MarshalFields(r *bytes.Buffer, h Header) error
- func MarshalSignableVote(r *bytes.Buffer, h Header) error
- func Unmarshal(r *bytes.Buffer, ev wire.Event) error
- func UnmarshalFields(r *bytes.Buffer, h *Header) error
- func VerifySignatures(round uint64, step uint8, blockHash []byte, apk *bls.Apk, sig *bls.Signature) error
- type Header
- type Phase
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compose ¶ added in v0.2.0
Compose is useful when header information is cached and there is an opportunity to avoid unnecessary allocations
func MarshalFields ¶ added in v0.2.0
MarshalFields marshals the core field of the Header (i.e. Round, Step and BlockHash)
func MarshalSignableVote ¶
MarshalSignableVote marshals the fields necessary for a Committee member to cast a Vote (namely the Round, the Step and the BlockHash). Note: UnmarshalSignableVote does not make sense as the only reason to use it would be if we could somehow revert a signature to the preimage and thus unmarshal it into a struct :P
func UnmarshalFields ¶ added in v0.2.0
UnmarshalFields unmarshals the core field of the Header (i.e. Round, Step and BlockHash)
func VerifySignatures ¶ added in v0.2.0
func VerifySignatures(round uint64, step uint8, blockHash []byte, apk *bls.Apk, sig *bls.Signature) error
VerifySignatures verifies the BLS aggregated signature carried by consensus related messages. The signed message needs to carry information about the round, the step and the blockhash
Types ¶
type Header ¶
Header is an embeddable struct representing the consensus event header fields
func (Header) CompareRound ¶ added in v0.2.0
func (Header) CompareRoundAndStep ¶ added in v0.2.0
Compare headers to establish time order