Documentation ¶
Overview ¶
nolint
Index ¶
- Constants
- func MalfeasanceInfo(smesher types.NodeID, mp *MalfeasanceProof) string
- type AtxProof
- type AtxProofMsg
- type BallotProof
- type BallotProofMsg
- type HareMetadata
- func (t *HareMetadata) DecodeScale(dec *scale.Decoder) (total int, err error)
- func (t *HareMetadata) EncodeScale(enc *scale.Encoder) (total int, err error)
- func (hm *HareMetadata) Equivocation(other *HareMetadata) bool
- func (hm *HareMetadata) MarshalLogObject(encoder zapcore.ObjectEncoder) error
- func (hm HareMetadata) ToBytes() []byte
- type HareProof
- type HareProofMsg
- type InvalidPostIndexProof
- type InvalidPrevATXProof
- type MalfeasanceGossip
- type MalfeasanceProof
- func (t *MalfeasanceProof) DecodeScale(dec *scale.Decoder) (total int, err error)
- func (t *MalfeasanceProof) EncodeScale(enc *scale.Encoder) (total int, err error)
- func (mp *MalfeasanceProof) MarshalLogObject(encoder zapcore.ObjectEncoder) error
- func (mp *MalfeasanceProof) Received() time.Time
- func (mp *MalfeasanceProof) SetReceived(received time.Time)
- type Proof
- type ProofData
Constants ¶
View Source
const ( MultipleATXs byte = iota + 1 MultipleBallots HareEquivocation InvalidPostIndex InvalidPrevATX )
Variables ¶
This section is empty.
Functions ¶
func MalfeasanceInfo ¶
func MalfeasanceInfo(smesher types.NodeID, mp *MalfeasanceProof) string
Types ¶
type AtxProof ¶
type AtxProof struct {
Messages [2]AtxProofMsg
}
func (*AtxProof) DecodeScale ¶
func (*AtxProof) EncodeScale ¶
func (*AtxProof) MarshalLogObject ¶
func (ap *AtxProof) MarshalLogObject(encoder zapcore.ObjectEncoder) error
type AtxProofMsg ¶
type AtxProofMsg struct { InnerMsg types.ATXMetadata SmesherID types.NodeID Signature types.EdSignature }
func (*AtxProofMsg) DecodeScale ¶
func (t *AtxProofMsg) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*AtxProofMsg) EncodeScale ¶
func (t *AtxProofMsg) EncodeScale(enc *scale.Encoder) (total int, err error)
func (*AtxProofMsg) SignedBytes ¶
func (m *AtxProofMsg) SignedBytes() []byte
SignedBytes returns the actual data being signed in a AtxProofMsg.
type BallotProof ¶
type BallotProof struct {
Messages [2]BallotProofMsg
}
func (*BallotProof) DecodeScale ¶
func (t *BallotProof) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*BallotProof) EncodeScale ¶
func (t *BallotProof) EncodeScale(enc *scale.Encoder) (total int, err error)
func (*BallotProof) MarshalLogObject ¶
func (bp *BallotProof) MarshalLogObject(encoder zapcore.ObjectEncoder) error
type BallotProofMsg ¶
type BallotProofMsg struct { InnerMsg types.BallotMetadata SmesherID types.NodeID Signature types.EdSignature }
func (*BallotProofMsg) DecodeScale ¶
func (t *BallotProofMsg) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*BallotProofMsg) EncodeScale ¶
func (t *BallotProofMsg) EncodeScale(enc *scale.Encoder) (total int, err error)
func (*BallotProofMsg) SignedBytes ¶
func (m *BallotProofMsg) SignedBytes() []byte
SignedBytes returns the actual data being signed in a BallotProofMsg.
type HareMetadata ¶
type HareMetadata struct { Layer types.LayerID // the round counter (K) Round uint32 // hash of hare.Message.InnerMessage MsgHash types.Hash32 }
func (*HareMetadata) DecodeScale ¶
func (t *HareMetadata) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*HareMetadata) EncodeScale ¶
func (t *HareMetadata) EncodeScale(enc *scale.Encoder) (total int, err error)
func (*HareMetadata) Equivocation ¶
func (hm *HareMetadata) Equivocation(other *HareMetadata) bool
Equivocation detects if two messages form an equivocation, based on their HareMetadata. It returns true if the two messages are from the same layer and round, but have different hashes.
func (*HareMetadata) MarshalLogObject ¶
func (hm *HareMetadata) MarshalLogObject(encoder zapcore.ObjectEncoder) error
func (HareMetadata) ToBytes ¶
func (hm HareMetadata) ToBytes() []byte
type HareProof ¶
type HareProof struct {
Messages [2]HareProofMsg
}
func (*HareProof) DecodeScale ¶
func (*HareProof) EncodeScale ¶
func (*HareProof) MarshalLogObject ¶
func (hp *HareProof) MarshalLogObject(encoder zapcore.ObjectEncoder) error
func (*HareProof) ToMalfeasanceProof ¶
func (hp *HareProof) ToMalfeasanceProof() *MalfeasanceProof
type HareProofMsg ¶
type HareProofMsg struct { InnerMsg HareMetadata SmesherID types.NodeID Signature types.EdSignature }
func (*HareProofMsg) DecodeScale ¶
func (t *HareProofMsg) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*HareProofMsg) EncodeScale ¶
func (t *HareProofMsg) EncodeScale(enc *scale.Encoder) (total int, err error)
func (*HareProofMsg) SignedBytes ¶
func (m *HareProofMsg) SignedBytes() []byte
SignedBytes returns the actual data being signed in a HareProofMsg.
type InvalidPostIndexProof ¶
type InvalidPostIndexProof struct { Atx wire.ActivationTxV1 // Which index in POST is invalid InvalidIdx uint32 }
func (*InvalidPostIndexProof) DecodeScale ¶
func (t *InvalidPostIndexProof) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*InvalidPostIndexProof) EncodeScale ¶
func (t *InvalidPostIndexProof) EncodeScale(enc *scale.Encoder) (total int, err error)
type InvalidPrevATXProof ¶ added in v1.5.3
type InvalidPrevATXProof struct { Atx1 wire.ActivationTxV1 Atx2 wire.ActivationTxV1 }
InvalidPrevAtxProof is a proof that a smesher published an ATX with an old previous ATX ID. The proof contains two ATXs that reference the same previous ATX.
func (*InvalidPrevATXProof) DecodeScale ¶ added in v1.5.3
func (t *InvalidPrevATXProof) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*InvalidPrevATXProof) EncodeScale ¶ added in v1.5.3
func (t *InvalidPrevATXProof) EncodeScale(enc *scale.Encoder) (total int, err error)
type MalfeasanceGossip ¶
type MalfeasanceGossip struct { MalfeasanceProof Eligibility *types.HareEligibilityGossip // deprecated - to be removed in the next version }
func (*MalfeasanceGossip) DecodeScale ¶
func (t *MalfeasanceGossip) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*MalfeasanceGossip) EncodeScale ¶
func (t *MalfeasanceGossip) EncodeScale(enc *scale.Encoder) (total int, err error)
func (*MalfeasanceGossip) MarshalLogObject ¶
func (mg *MalfeasanceGossip) MarshalLogObject(encoder zapcore.ObjectEncoder) error
type MalfeasanceProof ¶
type MalfeasanceProof struct { // for network upgrade Layer types.LayerID Proof Proof // contains filtered or unexported fields }
func (*MalfeasanceProof) DecodeScale ¶
func (t *MalfeasanceProof) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*MalfeasanceProof) EncodeScale ¶
func (t *MalfeasanceProof) EncodeScale(enc *scale.Encoder) (total int, err error)
func (*MalfeasanceProof) MarshalLogObject ¶
func (mp *MalfeasanceProof) MarshalLogObject(encoder zapcore.ObjectEncoder) error
func (*MalfeasanceProof) Received ¶
func (mp *MalfeasanceProof) Received() time.Time
func (*MalfeasanceProof) SetReceived ¶
func (mp *MalfeasanceProof) SetReceived(received time.Time)
type Proof ¶
type Proof struct { // MultipleATXs | MultipleBallots | HareEquivocation | InvalidPostIndex Type byte // AtxProof | BallotProof | HareProof | InvalidPostIndexProof Data ProofData }
func (*Proof) DecodeScale ¶
func (*Proof) EncodeScale ¶
Click to show internal directories.
Click to hide internal directories.