Documentation ¶
Index ¶
Constants ¶
View Source
const ( PreprepareCode = 0x12 PrepareCode = 0x13 CommitCode = 0x14 RoundChangeCode = 0x15 )
QBFT message codes
Variables ¶
This section is empty.
Functions ¶
func MessageCodes ¶
func MessageCodes() map[uint64]struct{}
A set containing the messages codes for all QBFT messages.
Types ¶
type Commit ¶
type Commit struct { CommonPayload Digest common.Hash CommitSeal []byte }
A QBFT COMMIT message.
func (*Commit) EncodePayloadForSigning ¶
type CommonPayload ¶
type CommonPayload struct { Sequence *big.Int Round *big.Int // contains filtered or unexported fields }
Data that is common to all QBFT messages. Used for composition.
func (*CommonPayload) Code ¶
func (m *CommonPayload) Code() uint64
func (*CommonPayload) SetSignature ¶
func (m *CommonPayload) SetSignature(signature []byte)
func (*CommonPayload) SetSource ¶
func (m *CommonPayload) SetSource(address common.Address)
func (*CommonPayload) Signature ¶
func (m *CommonPayload) Signature() []byte
func (*CommonPayload) Source ¶
func (m *CommonPayload) Source() common.Address
func (*CommonPayload) View ¶
func (m *CommonPayload) View() istanbul.View
type Prepare ¶
type Prepare struct { CommonPayload Digest common.Hash }
A QBFT PREPARE message.
func (*Prepare) EncodePayloadForSigning ¶
type Preprepare ¶
type Preprepare struct { CommonPayload Proposal istanbul.Proposal JustificationRoundChanges []*SignedRoundChangePayload JustificationPrepares []*Prepare }
func NewPreprepare ¶
func (*Preprepare) EncodePayloadForSigning ¶
func (m *Preprepare) EncodePayloadForSigning() ([]byte, error)
func (*Preprepare) String ¶
func (m *Preprepare) String() string
type QBFTMessage ¶
type QBFTMessage interface { Code() uint64 View() istanbul.View Source() common.Address SetSource(address common.Address) EncodePayloadForSigning() ([]byte, error) Signature() []byte SetSignature(signature []byte) }
Common interface for all QBFT messages
type RoundChange ¶
type RoundChange struct { SignedRoundChangePayload PreparedBlock *types.Block Justification []*Prepare }
ROUND-CHANGE
func NewRoundChange ¶
type SignedRoundChangePayload ¶
type SignedRoundChangePayload struct { CommonPayload PreparedRound *big.Int PreparedDigest common.Hash }
func (*SignedRoundChangePayload) DecodeRLP ¶
func (p *SignedRoundChangePayload) DecodeRLP(stream *rlp.Stream) error
func (*SignedRoundChangePayload) EncodePayloadForSigning ¶
func (p *SignedRoundChangePayload) EncodePayloadForSigning() ([]byte, error)
func (*SignedRoundChangePayload) EncodeRLP ¶
func (p *SignedRoundChangePayload) EncodeRLP(w io.Writer) error
func (*SignedRoundChangePayload) String ¶
func (p *SignedRoundChangePayload) String() string
Click to show internal directories.
Click to hide internal directories.