Documentation ¶
Index ¶
- Constants
- Variables
- func CalcMisbehaviourProofsHash(mps []MisbehaviourProof) hash.Hash
- func CalcPayloadHash(e EventPayloadI) hash.Hash
- func CalcReceiptsHash(receipts []*types.ReceiptForStorage) hash.Hash
- func CalcTxHash(txs types.Transactions) hash.Hash
- func EmptyPayloadHash(version uint8) hash.Hash
- func EventIDsToHex(ids hash.Events) []hexutil.Bytes
- func FilterSkippedTxs(txs types.Transactions, skippedTxs []uint32) types.Transactions
- func HexToEventIDs(bb []interface{}) hash.Events
- func MarshalTxsCSER(txs types.Transactions, w *cser.Writer) error
- func RPCMarshalEvent(e EventI) map[string]interface{}
- func RPCMarshalEventPayload(event EventPayloadI, inclTx bool, fullTx bool) (map[string]interface{}, error)
- func TransactionMarshalCSER(w *cser.Writer, tx *types.Transaction) error
- func TransactionUnmarshalCSER(r *cser.Reader) (*types.Transaction, error)
- type Block
- type BlockVoteDoublesign
- type EpochVoteDoublesign
- type Event
- func (e *Event) AnyBlockVotes() bool
- func (e *Event) AnyEpochVote() bool
- func (e *Event) AnyMisbehaviourProofs() bool
- func (e *Event) AnyTxs() bool
- func (e *Event) CreationTime() Timestamp
- func (e *Event) Extra() []byte
- func (e *Event) GasPowerLeft() GasPowerLeft
- func (e *Event) GasPowerUsed() uint64
- func (e *Event) HashToSign() hash.Hash
- func (e *Event) Locator() EventLocator
- func (e *Event) MarshalBinary() ([]byte, error)
- func (e *Event) MarshalCSER(w *cser.Writer) error
- func (e *Event) MedianTime() Timestamp
- func (e *Event) NetForkID() uint16
- func (e *Event) PayloadHash() hash.Hash
- func (e *Event) PrevEpochHash() *hash.Hash
- func (e *Event) Version() uint8
- type EventI
- type EventIs
- type EventLocator
- type EventPayload
- func (e *EventPayload) AnyBlockVotes() bool
- func (e *EventPayload) AnyEpochVote() bool
- func (e *EventPayload) AnyMisbehaviourProofs() bool
- func (e *EventPayload) AnyTxs() bool
- func (e *EventPayload) BlockVotes() LlrBlockVotes
- func (e *EventPayload) CreationTime() Timestamp
- func (e *EventPayload) DecodeRLP(src *rlp.Stream) error
- func (e *EventPayload) EncodeRLP(w io.Writer) error
- func (e *EventPayload) EpochVote() LlrEpochVote
- func (e *EventPayload) Extra() []byte
- func (e *EventPayload) GasPowerLeft() GasPowerLeft
- func (e *EventPayload) GasPowerUsed() uint64
- func (e *EventPayload) MarshalBinary() ([]byte, error)
- func (e *EventPayload) MarshalCSER(w *cser.Writer) error
- func (e *EventPayload) MedianTime() Timestamp
- func (e *EventPayload) MisbehaviourProofs() []MisbehaviourProof
- func (e *EventPayload) NetForkID() uint16
- func (e *EventPayload) PayloadHash() hash.Hash
- func (e *EventPayload) PrevEpochHash() *hash.Hash
- func (e *EventPayload) Sig() Signature
- func (e *EventPayload) Size() int
- func (e *EventPayload) Txs() types.Transactions
- func (e *EventPayload) UnmarshalBinary(raw []byte) (err error)
- func (e *EventPayload) Version() uint8
- type EventPayloadI
- type EventPayloads
- type Events
- type EventsDoublesign
- type GasPowerLeft
- type LlrBlockVotes
- type LlrEpochVote
- type LlrSignedBlockVotes
- type LlrSignedEpochVote
- type MisbehaviourProof
- type MutableEventPayload
- func (e *MutableEventPayload) AnyBlockVotes() bool
- func (e *MutableEventPayload) AnyEpochVote() bool
- func (e *MutableEventPayload) AnyMisbehaviourProofs() bool
- func (e *MutableEventPayload) AnyTxs() bool
- func (e *MutableEventPayload) BlockVotes() LlrBlockVotes
- func (e *MutableEventPayload) Build() *EventPayload
- func (e *MutableEventPayload) CreationTime() Timestamp
- func (e *MutableEventPayload) DecodeRLP(src *rlp.Stream) error
- func (e *MutableEventPayload) EpochVote() LlrEpochVote
- func (e *MutableEventPayload) Extra() []byte
- func (e *MutableEventPayload) GasPowerLeft() GasPowerLeft
- func (e *MutableEventPayload) GasPowerUsed() uint64
- func (e *MutableEventPayload) HashToSign() hash.Hash
- func (e *MutableEventPayload) Locator() EventLocator
- func (e *MutableEventPayload) MedianTime() Timestamp
- func (e *MutableEventPayload) MisbehaviourProofs() []MisbehaviourProof
- func (e *MutableEventPayload) NetForkID() uint16
- func (e *MutableEventPayload) PayloadHash() hash.Hash
- func (e *MutableEventPayload) PrevEpochHash() *hash.Hash
- func (e *MutableEventPayload) SetBlockVotes(v LlrBlockVotes)
- func (e *MutableEventPayload) SetCreationTime(v Timestamp)
- func (e *MutableEventPayload) SetEpochVote(v LlrEpochVote)
- func (e *MutableEventPayload) SetExtra(v []byte)
- func (e *MutableEventPayload) SetGasPowerLeft(v GasPowerLeft)
- func (e *MutableEventPayload) SetGasPowerUsed(v uint64)
- func (e *MutableEventPayload) SetMedianTime(v Timestamp)
- func (e *MutableEventPayload) SetMisbehaviourProofs(v []MisbehaviourProof)
- func (e *MutableEventPayload) SetNetForkID(v uint16)
- func (e *MutableEventPayload) SetPayloadHash(v hash.Hash)
- func (e *MutableEventPayload) SetPrevEpochHash(v *hash.Hash)
- func (e *MutableEventPayload) SetSig(v Signature)
- func (e *MutableEventPayload) SetTxs(v types.Transactions)
- func (e *MutableEventPayload) SetVersion(v uint8)
- func (e *MutableEventPayload) Sig() Signature
- func (e *MutableEventPayload) Size() int
- func (e *MutableEventPayload) Txs() types.Transactions
- func (e *MutableEventPayload) UnmarshalBinary(raw []byte) (err error)
- func (e *MutableEventPayload) UnmarshalCSER(r *cser.Reader) error
- func (e *MutableEventPayload) Version() uint8
- type Signature
- type SignedEvent
- func (e *SignedEvent) AnyBlockVotes() bool
- func (e *SignedEvent) AnyEpochVote() bool
- func (e *SignedEvent) AnyMisbehaviourProofs() bool
- func (e *SignedEvent) AnyTxs() bool
- func (e *SignedEvent) CreationTime() Timestamp
- func (e *SignedEvent) Extra() []byte
- func (e *SignedEvent) GasPowerLeft() GasPowerLeft
- func (e *SignedEvent) GasPowerUsed() uint64
- func (e *SignedEvent) MedianTime() Timestamp
- func (e *SignedEvent) NetForkID() uint16
- func (e *SignedEvent) PayloadHash() hash.Hash
- func (e *SignedEvent) PrevEpochHash() *hash.Hash
- func (e *SignedEvent) Sig() Signature
- func (e *SignedEvent) Version() uint8
- type SignedEventLocator
- type Timestamp
- type WrongBlockVote
- type WrongEpochVote
Constants ¶
const ( ShortTermGas = 0 LongTermGas = 1 GasPowerConfigs = 2 )
const MaxSerializationVersion = 1
const ( // MinAccomplicesForProof defines how many validators must have signed the same wrong vote. // Otherwise, wrong-signer is not liable as a protection against singular software/hardware failures MinAccomplicesForProof = 2 )
const SigSize = 64
Variables ¶
var ( ErrSerMalformedEvent = errors.New("serialization of malformed event") ErrTooLowEpoch = errors.New("serialization of events with epoch<256 and version=0 is unsupported") ErrUnknownVersion = errors.New("unknown serialization version") )
var ErrUnknownTxType = errors.New("unknown tx type")
Functions ¶
func CalcMisbehaviourProofsHash ¶ added in v1.0.2
func CalcMisbehaviourProofsHash(mps []MisbehaviourProof) hash.Hash
func CalcPayloadHash ¶ added in v1.0.2
func CalcPayloadHash(e EventPayloadI) hash.Hash
func CalcReceiptsHash ¶ added in v1.0.2
func CalcReceiptsHash(receipts []*types.ReceiptForStorage) hash.Hash
func CalcTxHash ¶ added in v1.0.2
func CalcTxHash(txs types.Transactions) hash.Hash
func EmptyPayloadHash ¶ added in v1.0.2
func FilterSkippedTxs ¶
func FilterSkippedTxs(txs types.Transactions, skippedTxs []uint32) types.Transactions
func HexToEventIDs ¶ added in v1.0.2
func MarshalTxsCSER ¶ added in v1.0.2
func MarshalTxsCSER(txs types.Transactions, w *cser.Writer) error
func RPCMarshalEvent ¶ added in v1.0.2
RPCMarshalEvent converts the given event to the RPC output .
func RPCMarshalEventPayload ¶ added in v1.0.2
func RPCMarshalEventPayload(event EventPayloadI, inclTx bool, fullTx bool) (map[string]interface{}, error)
RPCMarshalEventPayload converts the given event to the RPC output which depends on fullTx. If inclTx is true transactions are returned. When fullTx is true the returned block contains full transaction details, otherwise it will only contain transaction hashes.
func TransactionMarshalCSER ¶
func TransactionMarshalCSER(w *cser.Writer, tx *types.Transaction) error
func TransactionUnmarshalCSER ¶
func TransactionUnmarshalCSER(r *cser.Reader) (*types.Transaction, error)
Types ¶
type Block ¶
type Block struct { Time Timestamp Atropos hash.Event Events hash.Events Txs []common.Hash // non events txs (genesis) InternalTxs []common.Hash SkippedTxs []uint32 // indexes of skipped txs, starting from first tx of first event, ending with last tx of last event GasUsed uint64 Root hash.Hash }
func (*Block) EstimateSize ¶
type BlockVoteDoublesign ¶ added in v1.0.2
type BlockVoteDoublesign struct { Block idx.Block Pair [2]LlrSignedBlockVotes }
type EpochVoteDoublesign ¶ added in v1.0.2
type EpochVoteDoublesign struct {
Pair [2]LlrSignedEpochVote
}
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) AnyBlockVotes ¶ added in v1.0.2
func (e *Event) AnyBlockVotes() bool
func (*Event) AnyEpochVote ¶ added in v1.0.2
func (e *Event) AnyEpochVote() bool
func (*Event) AnyMisbehaviourProofs ¶ added in v1.0.2
func (e *Event) AnyMisbehaviourProofs() bool
func (*Event) CreationTime ¶
func (e *Event) CreationTime() Timestamp
func (*Event) GasPowerLeft ¶
func (e *Event) GasPowerLeft() GasPowerLeft
func (*Event) GasPowerUsed ¶
func (e *Event) GasPowerUsed() uint64
func (*Event) HashToSign ¶
func (*Event) Locator ¶ added in v1.0.2
func (e *Event) Locator() EventLocator
func (*Event) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaller interface.
func (*Event) MedianTime ¶
func (e *Event) MedianTime() Timestamp
func (*Event) PayloadHash ¶ added in v1.0.2
func (*Event) PrevEpochHash ¶
type EventI ¶
type EventI interface { dag.Event Version() uint8 NetForkID() uint16 CreationTime() Timestamp MedianTime() Timestamp PrevEpochHash() *hash.Hash Extra() []byte GasPowerLeft() GasPowerLeft GasPowerUsed() uint64 HashToSign() hash.Hash Locator() EventLocator AnyTxs() bool AnyBlockVotes() bool AnyEpochVote() bool AnyMisbehaviourProofs() bool PayloadHash() hash.Hash }
func RPCUnmarshalEvent ¶ added in v1.0.2
RPCUnmarshalEvent converts the RPC output to the header.
type EventIs ¶
type EventIs []EventI
EventIs is a ordered slice of events.
type EventLocator ¶ added in v1.0.2
type EventLocator struct { BaseHash hash.Hash NetForkID uint16 Epoch idx.Epoch Seq idx.Event Lamport idx.Lamport Creator idx.ValidatorID PayloadHash hash.Hash }
func (EventLocator) HashToSign ¶ added in v1.0.2
func (l EventLocator) HashToSign() hash.Hash
func (EventLocator) ID ¶ added in v1.0.2
func (l EventLocator) ID() hash.Event
type EventPayload ¶
type EventPayload struct { SignedEvent // contains filtered or unexported fields }
func (*EventPayload) AnyBlockVotes ¶ added in v1.0.2
func (e *EventPayload) AnyBlockVotes() bool
func (*EventPayload) AnyEpochVote ¶ added in v1.0.2
func (e *EventPayload) AnyEpochVote() bool
func (*EventPayload) AnyMisbehaviourProofs ¶ added in v1.0.2
func (e *EventPayload) AnyMisbehaviourProofs() bool
func (*EventPayload) BlockVotes ¶ added in v1.0.2
func (e *EventPayload) BlockVotes() LlrBlockVotes
func (*EventPayload) CreationTime ¶
func (e *EventPayload) CreationTime() Timestamp
func (*EventPayload) DecodeRLP ¶
func (e *EventPayload) DecodeRLP(src *rlp.Stream) error
DecodeRLP implements rlp.Decoder interface.
func (*EventPayload) EncodeRLP ¶
func (e *EventPayload) EncodeRLP(w io.Writer) error
EncodeRLP implements rlp.Encoder interface.
func (*EventPayload) EpochVote ¶ added in v1.0.2
func (e *EventPayload) EpochVote() LlrEpochVote
func (*EventPayload) GasPowerLeft ¶
func (e *EventPayload) GasPowerLeft() GasPowerLeft
func (*EventPayload) GasPowerUsed ¶
func (e *EventPayload) GasPowerUsed() uint64
func (*EventPayload) MarshalBinary ¶
func (e *EventPayload) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaller interface.
func (*EventPayload) MarshalCSER ¶
func (e *EventPayload) MarshalCSER(w *cser.Writer) error
func (*EventPayload) MedianTime ¶
func (e *EventPayload) MedianTime() Timestamp
func (*EventPayload) MisbehaviourProofs ¶ added in v1.0.2
func (e *EventPayload) MisbehaviourProofs() []MisbehaviourProof
func (*EventPayload) PayloadHash ¶ added in v1.0.2
func (*EventPayload) PrevEpochHash ¶
func (*EventPayload) Size ¶
func (e *EventPayload) Size() int
func (*EventPayload) Txs ¶
func (e *EventPayload) Txs() types.Transactions
func (*EventPayload) UnmarshalBinary ¶
func (e *EventPayload) UnmarshalBinary(raw []byte) (err error)
UnmarshalBinary implements encoding.BinaryUnmarshaller interface.
type EventPayloadI ¶
type EventPayloadI interface { EventI Sig() Signature Txs() types.Transactions EpochVote() LlrEpochVote BlockVotes() LlrBlockVotes MisbehaviourProofs() []MisbehaviourProof }
type EventPayloads ¶
type EventPayloads []*EventPayload
EventPayloads is a ordered slice of EventPayload.
func (*EventPayloads) Add ¶
func (ee *EventPayloads) Add(e ...*EventPayload)
Add appends hash to the slice.
func (EventPayloads) Bases ¶
func (ee EventPayloads) Bases() dag.Events
func (EventPayloads) IDs ¶
func (ee EventPayloads) IDs() hash.Events
func (EventPayloads) Len ¶
func (ee EventPayloads) Len() int
func (EventPayloads) Less ¶
func (ee EventPayloads) Less(i, j int) bool
func (EventPayloads) String ¶
func (ee EventPayloads) String() string
String returns human readable representation.
func (EventPayloads) Swap ¶
func (ee EventPayloads) Swap(i, j int)
type Events ¶
type Events []*Event
Events is a ordered slice of events.
func (Events) Interfaces ¶
type EventsDoublesign ¶ added in v1.0.2
type EventsDoublesign struct {
Pair [2]SignedEventLocator
}
type GasPowerLeft ¶
type GasPowerLeft struct {
Gas [GasPowerConfigs]uint64
}
GasPowerLeft is long-term gas power left and short-term gas power left
func (GasPowerLeft) Max ¶
func (g GasPowerLeft) Max() uint64
Max returns maximum within long-term gas power left and short-term gas power left
func (GasPowerLeft) Min ¶
func (g GasPowerLeft) Min() uint64
Min returns minimum within long-term gas power left and short-term gas power left
func (GasPowerLeft) String ¶
func (g GasPowerLeft) String() string
String returns string representation.
func (GasPowerLeft) Sub ¶
func (g GasPowerLeft) Sub(diff uint64) GasPowerLeft
Sub subtracts from all gas power lefts
type LlrBlockVotes ¶ added in v1.0.2
func (LlrBlockVotes) Hash ¶ added in v1.0.2
func (bvs LlrBlockVotes) Hash() hash.Hash
func (LlrBlockVotes) LastBlock ¶ added in v1.0.2
func (bvs LlrBlockVotes) LastBlock() idx.Block
func (LlrBlockVotes) MarshalCSER ¶ added in v1.0.2
func (bvs LlrBlockVotes) MarshalCSER(w *cser.Writer) error
func (*LlrBlockVotes) UnmarshalCSER ¶ added in v1.0.2
func (bvs *LlrBlockVotes) UnmarshalCSER(r *cser.Reader) error
type LlrEpochVote ¶ added in v1.0.2
func (LlrEpochVote) Hash ¶ added in v1.0.2
func (ers LlrEpochVote) Hash() hash.Hash
func (LlrEpochVote) MarshalCSER ¶ added in v1.0.2
func (ers LlrEpochVote) MarshalCSER(w *cser.Writer) error
func (*LlrEpochVote) UnmarshalCSER ¶ added in v1.0.2
func (ers *LlrEpochVote) UnmarshalCSER(r *cser.Reader) error
type LlrSignedBlockVotes ¶ added in v1.0.2
type LlrSignedBlockVotes struct { Signed SignedEventLocator TxsAndMisbehaviourProofsHash hash.Hash EpochVoteHash hash.Hash Val LlrBlockVotes }
func AsSignedBlockVotes ¶ added in v1.0.2
func AsSignedBlockVotes(e EventPayloadI) LlrSignedBlockVotes
func (LlrSignedBlockVotes) CalcPayloadHash ¶ added in v1.0.2
func (bvs LlrSignedBlockVotes) CalcPayloadHash() hash.Hash
func (LlrSignedBlockVotes) Size ¶ added in v1.0.2
func (bvs LlrSignedBlockVotes) Size() uint64
type LlrSignedEpochVote ¶ added in v1.0.2
type LlrSignedEpochVote struct { Signed SignedEventLocator TxsAndMisbehaviourProofsHash hash.Hash BlockVotesHash hash.Hash Val LlrEpochVote }
func AsSignedEpochVote ¶ added in v1.0.2
func AsSignedEpochVote(e EventPayloadI) LlrSignedEpochVote
func (LlrSignedEpochVote) CalcPayloadHash ¶ added in v1.0.2
func (ev LlrSignedEpochVote) CalcPayloadHash() hash.Hash
func (LlrSignedEpochVote) Size ¶ added in v1.0.2
func (ev LlrSignedEpochVote) Size() uint64
type MisbehaviourProof ¶ added in v1.0.2
type MisbehaviourProof struct { EventsDoublesign *EventsDoublesign `rlp:"nil"` BlockVoteDoublesign *BlockVoteDoublesign `rlp:"nil"` WrongBlockVote *WrongBlockVote `rlp:"nil"` EpochVoteDoublesign *EpochVoteDoublesign `rlp:"nil"` WrongEpochVote *WrongEpochVote `rlp:"nil"` }
type MutableEventPayload ¶
type MutableEventPayload struct {
// contains filtered or unexported fields
}
func (*MutableEventPayload) AnyBlockVotes ¶ added in v1.0.2
func (e *MutableEventPayload) AnyBlockVotes() bool
func (*MutableEventPayload) AnyEpochVote ¶ added in v1.0.2
func (e *MutableEventPayload) AnyEpochVote() bool
func (*MutableEventPayload) AnyMisbehaviourProofs ¶ added in v1.0.2
func (e *MutableEventPayload) AnyMisbehaviourProofs() bool
func (*MutableEventPayload) BlockVotes ¶ added in v1.0.2
func (e *MutableEventPayload) BlockVotes() LlrBlockVotes
func (*MutableEventPayload) Build ¶
func (e *MutableEventPayload) Build() *EventPayload
func (*MutableEventPayload) CreationTime ¶
func (e *MutableEventPayload) CreationTime() Timestamp
func (*MutableEventPayload) DecodeRLP ¶
func (e *MutableEventPayload) DecodeRLP(src *rlp.Stream) error
DecodeRLP implements rlp.Decoder interface.
func (*MutableEventPayload) EpochVote ¶ added in v1.0.2
func (e *MutableEventPayload) EpochVote() LlrEpochVote
func (*MutableEventPayload) GasPowerLeft ¶
func (e *MutableEventPayload) GasPowerLeft() GasPowerLeft
func (*MutableEventPayload) GasPowerUsed ¶
func (e *MutableEventPayload) GasPowerUsed() uint64
func (*MutableEventPayload) HashToSign ¶
func (e *MutableEventPayload) HashToSign() hash.Hash
func (*MutableEventPayload) Locator ¶ added in v1.0.2
func (e *MutableEventPayload) Locator() EventLocator
func (*MutableEventPayload) MedianTime ¶
func (e *MutableEventPayload) MedianTime() Timestamp
func (*MutableEventPayload) MisbehaviourProofs ¶ added in v1.0.2
func (e *MutableEventPayload) MisbehaviourProofs() []MisbehaviourProof
func (*MutableEventPayload) NetForkID ¶ added in v1.0.2
func (e *MutableEventPayload) NetForkID() uint16
func (*MutableEventPayload) PayloadHash ¶ added in v1.0.2
func (*MutableEventPayload) PrevEpochHash ¶
func (*MutableEventPayload) SetBlockVotes ¶ added in v1.0.2
func (e *MutableEventPayload) SetBlockVotes(v LlrBlockVotes)
func (*MutableEventPayload) SetCreationTime ¶
func (e *MutableEventPayload) SetCreationTime(v Timestamp)
func (*MutableEventPayload) SetEpochVote ¶ added in v1.0.2
func (e *MutableEventPayload) SetEpochVote(v LlrEpochVote)
func (*MutableEventPayload) SetExtra ¶
func (e *MutableEventPayload) SetExtra(v []byte)
func (*MutableEventPayload) SetGasPowerLeft ¶
func (e *MutableEventPayload) SetGasPowerLeft(v GasPowerLeft)
func (*MutableEventPayload) SetGasPowerUsed ¶
func (e *MutableEventPayload) SetGasPowerUsed(v uint64)
func (*MutableEventPayload) SetMedianTime ¶
func (e *MutableEventPayload) SetMedianTime(v Timestamp)
func (*MutableEventPayload) SetMisbehaviourProofs ¶ added in v1.0.2
func (e *MutableEventPayload) SetMisbehaviourProofs(v []MisbehaviourProof)
func (*MutableEventPayload) SetNetForkID ¶ added in v1.0.2
func (e *MutableEventPayload) SetNetForkID(v uint16)
func (*MutableEventPayload) SetPayloadHash ¶ added in v1.0.2
func (e *MutableEventPayload) SetPayloadHash(v hash.Hash)
func (*MutableEventPayload) SetPrevEpochHash ¶
func (e *MutableEventPayload) SetPrevEpochHash(v *hash.Hash)
func (*MutableEventPayload) SetSig ¶
func (e *MutableEventPayload) SetSig(v Signature)
func (*MutableEventPayload) SetTxs ¶
func (e *MutableEventPayload) SetTxs(v types.Transactions)
func (*MutableEventPayload) SetVersion ¶ added in v1.0.2
func (e *MutableEventPayload) SetVersion(v uint8)
func (*MutableEventPayload) Size ¶
func (e *MutableEventPayload) Size() int
func (*MutableEventPayload) Txs ¶
func (e *MutableEventPayload) Txs() types.Transactions
func (*MutableEventPayload) UnmarshalBinary ¶
func (e *MutableEventPayload) UnmarshalBinary(raw []byte) (err error)
UnmarshalBinary implements encoding.BinaryUnmarshaller interface.
func (*MutableEventPayload) UnmarshalCSER ¶
func (e *MutableEventPayload) UnmarshalCSER(r *cser.Reader) error
type SignedEvent ¶
type SignedEvent struct { Event // contains filtered or unexported fields }
func (*SignedEvent) AnyBlockVotes ¶ added in v1.0.2
func (e *SignedEvent) AnyBlockVotes() bool
func (*SignedEvent) AnyEpochVote ¶ added in v1.0.2
func (e *SignedEvent) AnyEpochVote() bool
func (*SignedEvent) AnyMisbehaviourProofs ¶ added in v1.0.2
func (e *SignedEvent) AnyMisbehaviourProofs() bool
func (*SignedEvent) CreationTime ¶
func (e *SignedEvent) CreationTime() Timestamp
func (*SignedEvent) GasPowerLeft ¶
func (e *SignedEvent) GasPowerLeft() GasPowerLeft
func (*SignedEvent) GasPowerUsed ¶
func (e *SignedEvent) GasPowerUsed() uint64
func (*SignedEvent) MedianTime ¶
func (e *SignedEvent) MedianTime() Timestamp
func (*SignedEvent) PayloadHash ¶ added in v1.0.2
func (*SignedEvent) PrevEpochHash ¶
type SignedEventLocator ¶ added in v1.0.2
type SignedEventLocator struct { Locator EventLocator Sig Signature }
func AsSignedEventLocator ¶ added in v1.0.2
func AsSignedEventLocator(e EventPayloadI) SignedEventLocator
func (SignedEventLocator) Size ¶ added in v1.0.2
func (r SignedEventLocator) Size() uint64
type Timestamp ¶
type Timestamp uint64
Timestamp is a UNIX nanoseconds timestamp
func BytesToTimestamp ¶
BytesToTimestamp converts bytes to timestamp.
type WrongBlockVote ¶ added in v1.0.2
type WrongBlockVote struct { Block idx.Block Pals [MinAccomplicesForProof]LlrSignedBlockVotes WrongEpoch bool }
type WrongEpochVote ¶ added in v1.0.2
type WrongEpochVote struct {
Pals [MinAccomplicesForProof]LlrSignedEpochVote
}