shutterevents

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package shutterevents contains types to represent deserialized shuttermint/tendermint events

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accusation

type Accusation struct {
	Height  int64
	Eon     uint64
	Sender  common.Address
	Accused []common.Address
}

Accusation represents a broadcasted accusation message against one or more keypers.

func (Accusation) MakeABCIEvent

func (acc Accusation) MakeABCIEvent() abcitypes.Event

type Apology

type Apology struct {
	Height   int64
	Eon      uint64
	Sender   common.Address
	Accusers []common.Address
	PolyEval []*big.Int
}

Apology represents an apology broadcasted in response to a prior accusation.

func (Apology) MakeABCIEvent

func (msg Apology) MakeABCIEvent() abcitypes.Event

type BatchConfig

type BatchConfig struct {
	Height                int64
	Keypers               []common.Address
	StartBatchIndex       uint64
	Threshold             uint64
	ConfigIndex           uint64
	ConfigContractAddress common.Address
	Started               bool
	ValidatorsUpdated     bool
}

BatchConfig is the configuration we use for a consecutive sequence of batches. This should be synchronized with the list of BatchConfig structures stored in the ConfigContract deployed on the main chain. The keypers use the corresponding shmsg.BatchConfig message to vote on new configs. This struct is sent as an event, when a new batch config has enough votes.

func BatchConfigFromMessage

func BatchConfigFromMessage(m *shmsg.BatchConfig) (BatchConfig, error)

BatchConfigFromMessage extracts the batch config received in a message.

func (*BatchConfig) EnsureValid

func (bc *BatchConfig) EnsureValid() error

EnsureValid checks if the BatchConfig is valid and returns an error if it's not valid.

func (*BatchConfig) IsKeyper

func (bc *BatchConfig) IsKeyper(candidate common.Address) bool

IsKeyper checks if the given address is a keyper.

func (*BatchConfig) KeyperIndex

func (bc *BatchConfig) KeyperIndex(address common.Address) (uint64, bool)

KeyperIndex returns the index of the keyper identified by the given address.

func (BatchConfig) MakeABCIEvent

func (bc BatchConfig) MakeABCIEvent() abcitypes.Event

type CheckIn

type CheckIn struct {
	Height              int64
	Sender              common.Address
	EncryptionPublicKey *ecies.PublicKey
}

CheckIn is emitted by shuttermint when a keyper sends their check in message.

func (CheckIn) MakeABCIEvent

func (msg CheckIn) MakeABCIEvent() abcitypes.Event

type DecryptionSignature

type DecryptionSignature struct {
	Height     int64
	BatchIndex uint64
	Sender     common.Address
	Signature  []byte
}

DecryptionSignature is generated by shuttermint when a keyper sends a decryption signature.

func (DecryptionSignature) MakeABCIEvent

func (msg DecryptionSignature) MakeABCIEvent() abcitypes.Event

type EonStarted

type EonStarted struct {
	Height     int64
	Eon        uint64
	BatchIndex uint64
}

EonStarted is generated by shuttermint when a new eon is started. The batch index identifies the first batch that belongs to that eon.

func (EonStarted) MakeABCIEvent

func (msg EonStarted) MakeABCIEvent() abcitypes.Event

type EpochSecretKeyShare

type EpochSecretKeyShare struct {
	Height int64
	Sender common.Address
	Eon    uint64
	Epoch  uint64
	Share  *shcrypto.EpochSecretKeyShare
}

EpochSecretKeyShare represents a message containing an epoch secret key.

func (EpochSecretKeyShare) MakeABCIEvent

func (msg EpochSecretKeyShare) MakeABCIEvent() abcitypes.Event

type IEvent

type IEvent interface {
	MakeABCIEvent() abcitypes.Event
}

IEvent is an interface for the event types declared above.

func MakeEvent

func MakeEvent(ev abcitypes.Event, height int64) (IEvent, error)

MakeEvent creates an Event from the given tendermint event.

type PolyCommitment

type PolyCommitment struct {
	Height int64
	Eon    uint64
	Sender common.Address
	Gammas *shcrypto.Gammas
}

PolyCommitment represents a broadcasted polynomial commitment message.

func (PolyCommitment) MakeABCIEvent

func (msg PolyCommitment) MakeABCIEvent() abcitypes.Event

type PolyEval

type PolyEval struct {
	Height         int64
	Sender         common.Address
	Eon            uint64
	Receivers      []common.Address
	EncryptedEvals [][]byte
}

PolyEval represents an encrypted polynomial evaluation message from one keyper to another.

func (PolyEval) MakeABCIEvent

func (msg PolyEval) MakeABCIEvent() abcitypes.Event

Directories

Path Synopsis
evtype declares the the different event types sent by shuttermint
evtype declares the the different event types sent by shuttermint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL