Documentation ¶
Index ¶
- func MessageMaxSize() (s int)
- type Message
- func (_ *Message) CanMarshalMsg(z interface{}) bool
- func (_ *Message) CanUnmarshalMsg(z interface{}) bool
- func (m *Message) Hash() sp.MessageHash
- func (z *Message) MarshalMsg(b []byte) (o []byte)
- func (z *Message) MsgIsZero() bool
- func (z *Message) Msgsize() (s int)
- func (m Message) ToBeHashed() (protocol.HashID, []byte)
- func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (z *Message) UnmarshalMsgWithState(bts []byte, st msgp.UnmarshalState) (o []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MessageMaxSize ¶
func MessageMaxSize() (s int)
MaxSize returns a maximum valid message size for this message type
Types ¶
type Message ¶
type Message struct { // BlockHeadersCommitment contains a commitment on all light block headers within a state proof interval. BlockHeadersCommitment []byte `codec:"b,allocbound=crypto.Sha256Size"` VotersCommitment []byte `codec:"v,allocbound=crypto.SumhashDigestSize"` LnProvenWeight uint64 `codec:"P"` FirstAttestedRound uint64 `codec:"f"` LastAttestedRound uint64 `codec:"l"` // contains filtered or unexported fields }
Message represents the message that the state proofs are attesting to. This message can be used by lightweight client and gives it the ability to verify proofs on the Algorand's state. In addition to that proof, this message also contains fields that are needed in order to verify the next state proofs (VotersCommitment and LnProvenWeight).
func (*Message) CanMarshalMsg ¶
func (*Message) CanUnmarshalMsg ¶
func (*Message) Hash ¶
func (m *Message) Hash() sp.MessageHash
Hash returns a hashed representation fitting the state proof messages.
func (*Message) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*Message) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (Message) ToBeHashed ¶
ToBeHashed returns the bytes of the message.
func (*Message) UnmarshalMsgWithState ¶
UnmarshalMsg implements msgp.Unmarshaler