Versions in this module Expand all Collapse all v0 v0.0.4 May 28, 2021 Changes in this version + const BlockHeightKey type VoteSet + func (voteSet *VoteSet) LogString() string v0.0.3 May 28, 2021 v0.0.2 May 27, 2021 Changes in this version + const ABCIPubKeyTypeSecp256k1 + const MaxCommitOverheadBytes + const MaxCommitSigBytes + func ComputeProtoSizeForTxs(txs []Tx) int64 + func MaxCommitBytes(valCount int) int64 + func MaxDataBytesNoEvidence(maxBytes int64, valsCount int) int64 type DuplicateVoteEvidence + TotalVotingPower int64 + ValidatorPower int64 + func (dve *DuplicateVoteEvidence) ABCI() []abci.Evidence type ErrEvidenceOverflow + Got int64 + Max int64 + type ErrInvalidEvidence struct + Evidence Evidence + Reason error + func NewErrInvalidEvidence(ev Evidence, err error) *ErrInvalidEvidence + func (err *ErrInvalidEvidence) Error() string type Evidence + ABCI func() []abci.Evidence type EvidenceData + func (data *EvidenceData) ByteSize() int64 + type LightBlock struct + ValidatorSet *ValidatorSet + func LightBlockFromProto(pb *tmproto.LightBlock) (*LightBlock, error) + func (lb *LightBlock) ToProto() (*tmproto.LightBlock, error) + func (lb LightBlock) String() string + func (lb LightBlock) StringIndented(indent string) string + func (lb LightBlock) ValidateBasic(chainID string) error + type LightClientAttackEvidence struct + ByzantineValidators []*Validator + CommonHeight int64 + ConflictingBlock *LightBlock + Timestamp time.Time + TotalVotingPower int64 + func LightClientAttackEvidenceFromProto(lpb *tmproto.LightClientAttackEvidence) (*LightClientAttackEvidence, error) + func (l *LightClientAttackEvidence) ABCI() []abci.Evidence + func (l *LightClientAttackEvidence) Bytes() []byte + func (l *LightClientAttackEvidence) ConflictingHeaderIsInvalid(trustedHeader *Header) bool + func (l *LightClientAttackEvidence) GetByzantineValidators(commonVals *ValidatorSet, trusted *SignedHeader) []*Validator + func (l *LightClientAttackEvidence) Hash() []byte + func (l *LightClientAttackEvidence) Height() int64 + func (l *LightClientAttackEvidence) String() string + func (l *LightClientAttackEvidence) Time() time.Time + func (l *LightClientAttackEvidence) ToProto() (*tmproto.LightClientAttackEvidence, error) + func (l *LightClientAttackEvidence) ValidateBasic() error type PartSet + func (ps *PartSet) ByteSize() int64 type ValidatorSet + func ValidatorSetFromExistingValidators(valz []*Validator) (*ValidatorSet, error) v0.0.1 May 27, 2021 Changes in this version + const ABCIEvidenceTypeAmnesia + const ABCIEvidenceTypeDuplicateVote + const ABCIEvidenceTypeLunatic + const ABCIPubKeyTypeEd25519 + const AppHashField + const BlockPartSizeBytes + const ConsensusHashField + const EventCompleteProposal + const EventLock + const EventNewBlock + const EventNewBlockHeader + const EventNewEvidence + const EventNewRound + const EventNewRoundStep + const EventPolka + const EventRelock + const EventTimeoutPropose + const EventTimeoutWait + const EventTx + const EventTypeKey + const EventUnlock + const EventValidBlock + const EventValidatorSetUpdates + const EventVote + const LastResultsHashField + const MaxBlockPartsCount + const MaxBlockSizeBytes + const MaxChainIDLen + const MaxEvidenceBytes + const MaxEvidencePerBlock + const MaxHeaderBytes + const MaxOverheadForBlock + const MaxTotalVotingPower + const MaxVoteBytes + const MaxVotesCount + const NextValidatorsHashField + const PriorityWindowSizeFactor + const TimeFormat + const TxHashKey + const TxHeightKey + const ValidatorsHashField + var ABCIPubKeyTypesToNames = map[string]string + var ErrInvalidBlockPartHash = errors.New("error invalid block part hash") + var ErrInvalidBlockPartSignature = errors.New("error invalid block part signature") + var ErrPartSetInvalidProof = errors.New("error part set invalid proof") + var ErrPartSetUnexpectedIndex = errors.New("error part set unexpected index") + var ErrTotalVotingPowerOverflow = fmt.Errorf("total voting power of resulting valset exceeds max %d", MaxTotalVotingPower) + var ErrVoteInvalidBlockHash = errors.New("invalid block hash") + var ErrVoteInvalidSignature = errors.New("invalid signature") + var ErrVoteInvalidValidatorAddress = errors.New("invalid validator address") + var ErrVoteInvalidValidatorIndex = errors.New("invalid validator index") + var ErrVoteNil = errors.New("nil vote") + var ErrVoteNonDeterministicSignature = errors.New("non-deterministic signature") + var ErrVoteUnexpectedStep = errors.New("unexpected step") + var ErroringMockPVErr = errors.New("erroringMockPV always returns an error") + var EventQueryCompleteProposal = QueryForEvent(EventCompleteProposal) + var EventQueryLock = QueryForEvent(EventLock) + var EventQueryNewBlock = QueryForEvent(EventNewBlock) + var EventQueryNewBlockHeader = QueryForEvent(EventNewBlockHeader) + var EventQueryNewEvidence = QueryForEvent(EventNewEvidence) + var EventQueryNewRound = QueryForEvent(EventNewRound) + var EventQueryNewRoundStep = QueryForEvent(EventNewRoundStep) + var EventQueryPolka = QueryForEvent(EventPolka) + var EventQueryRelock = QueryForEvent(EventRelock) + var EventQueryTimeoutPropose = QueryForEvent(EventTimeoutPropose) + var EventQueryTimeoutWait = QueryForEvent(EventTimeoutWait) + var EventQueryTx = QueryForEvent(EventTx) + var EventQueryUnlock = QueryForEvent(EventUnlock) + var EventQueryValidBlock = QueryForEvent(EventValidBlock) + var EventQueryValidatorSetUpdates = QueryForEvent(EventValidatorSetUpdates) + var EventQueryVote = QueryForEvent(EventVote) + var MaxSignatureSize = tmmath.MaxInt(ed25519.SignatureSize, 64) + var PB2TM = pb2tm + var PeerStateKey = "ConsensusReactor.peerState" + var TM2PB = tm2pb + func CanonicalTime(t time.Time) string + func CanonicalizeBlockID(bid tmproto.BlockID) *tmproto.CanonicalBlockID + func CanonicalizePartSetHeader(psh tmproto.PartSetHeader) tmproto.CanonicalPartSetHeader + func CanonicalizeProposal(chainID string, proposal *tmproto.Proposal) tmproto.CanonicalProposal + func CanonicalizeVote(chainID string, vote *tmproto.Vote) tmproto.CanonicalVote + func DefaultBlockParams() tmproto.BlockParams + func DefaultConsensusParams() *tmproto.ConsensusParams + func DefaultEvidenceParams() tmproto.EvidenceParams + func DefaultValidatorParams() tmproto.ValidatorParams + func DefaultVersionParams() tmproto.VersionParams + func EventQueryTxFor(tx Tx) tmpubsub.Query + func EvidenceToProto(evidence Evidence) (*tmproto.Evidence, error) + func HashConsensusParams(params tmproto.ConsensusParams) []byte + func IsErrNotEnoughVotingPowerSigned(err error) bool + func IsValidPubkeyType(params tmproto.ValidatorParams, pubkeyType string) bool + func IsVoteTypeValid(t tmproto.SignedMsgType) bool + func MaxDataBytes(maxBytes int64, valsCount, evidenceCount int) int64 + func MaxDataBytesUnknownEvidence(maxBytes int64, valsCount int, maxNumEvidence uint32) int64 + func ProposalSignBytes(chainID string, p *tmproto.Proposal) []byte + func QueryForEvent(eventType string) tmpubsub.Query + func RandValidator(randPower bool, minPower int64) (*Validator, PrivValidator) + func RandValidatorSet(numValidators int, votingPower int64) (*ValidatorSet, []PrivValidator) + func UpdateConsensusParams(params tmproto.ConsensusParams, params2 *abci.ConsensusParams) tmproto.ConsensusParams + func ValidateConsensusParams(params tmproto.ConsensusParams) error + func ValidateHash(h []byte) error + func ValidateTime(t time.Time) error + func ValidatorListString(vals []*Validator) string + func VoteSignBytes(chainID string, vote *tmproto.Vote) []byte + type ABCIResults []*abci.ResponseDeliverTx + func NewResults(responses []*abci.ResponseDeliverTx) ABCIResults + func (a ABCIResults) Hash() []byte + func (a ABCIResults) ProveResult(i int) merkle.Proof + type Address = crypto.Address + type AmnesiaEvidence struct + Polc *ProofOfLockChange + func AmnesiaEvidenceFromProto(pb *tmproto.AmnesiaEvidence) (*AmnesiaEvidence, error) + func NewAmnesiaEvidence(pe *PotentialAmnesiaEvidence, proof *ProofOfLockChange) *AmnesiaEvidence + func (e *AmnesiaEvidence) Bytes() []byte + func (e *AmnesiaEvidence) Equal(ev Evidence) bool + func (e *AmnesiaEvidence) String() string + func (e *AmnesiaEvidence) ToProto() *tmproto.AmnesiaEvidence + func (e *AmnesiaEvidence) ValidateBasic() error + func (e *AmnesiaEvidence) ViolatedConsensus() (bool, string) + type Block struct + Evidence EvidenceData + LastCommit *Commit + func BlockFromProto(bp *tmproto.Block) (*Block, error) + func MakeBlock(height int64, txs []Tx, lastCommit *Commit, evidence []Evidence) *Block + func (b *Block) Hash() tmbytes.HexBytes + func (b *Block) HashesTo(hash []byte) bool + func (b *Block) MakePartSet(partSize uint32) *PartSet + func (b *Block) Size() int + func (b *Block) String() string + func (b *Block) StringIndented(indent string) string + func (b *Block) StringShort() string + func (b *Block) ToProto() (*tmproto.Block, error) + func (b *Block) ValidateBasic() error + type BlockEventPublisher interface + PublishEventNewBlock func(block EventDataNewBlock) error + PublishEventNewBlockHeader func(header EventDataNewBlockHeader) error + PublishEventNewEvidence func(evidence EventDataNewEvidence) error + PublishEventTx func(EventDataTx) error + PublishEventValidatorSetUpdates func(EventDataValidatorSetUpdates) error + type BlockID struct + Hash tmbytes.HexBytes + PartSetHeader PartSetHeader + func BlockIDFromProto(bID *tmproto.BlockID) (*BlockID, error) + func (blockID *BlockID) ToProto() tmproto.BlockID + func (blockID BlockID) Equals(other BlockID) bool + func (blockID BlockID) IsComplete() bool + func (blockID BlockID) IsZero() bool + func (blockID BlockID) Key() string + func (blockID BlockID) String() string + func (blockID BlockID) ValidateBasic() error + type BlockIDFlag byte + const BlockIDFlagAbsent + const BlockIDFlagCommit + const BlockIDFlagNil + type BlockMeta struct + BlockID BlockID + BlockSize int + Header Header + NumTxs int + func BlockMetaFromProto(pb *tmproto.BlockMeta) (*BlockMeta, error) + func NewBlockMeta(block *Block, blockParts *PartSet) *BlockMeta + func (bm *BlockMeta) ToProto() *tmproto.BlockMeta + func (bm *BlockMeta) ValidateBasic() error + type Commit struct + BlockID BlockID + Height int64 + Round int32 + Signatures []CommitSig + func CommitFromProto(cp *tmproto.Commit) (*Commit, error) + func MakeCommit(blockID BlockID, height int64, round int32, voteSet *VoteSet, ...) (*Commit, error) + func NewCommit(height int64, round int32, blockID BlockID, commitSigs []CommitSig) *Commit + func (commit *Commit) BitArray() *bits.BitArray + func (commit *Commit) GetByIndex(valIdx int32) *Vote + func (commit *Commit) GetHeight() int64 + func (commit *Commit) GetRound() int32 + func (commit *Commit) GetVote(valIdx int32) *Vote + func (commit *Commit) Hash() tmbytes.HexBytes + func (commit *Commit) IsCommit() bool + func (commit *Commit) Size() int + func (commit *Commit) StringIndented(indent string) string + func (commit *Commit) ToProto() *tmproto.Commit + func (commit *Commit) Type() byte + func (commit *Commit) ValidateBasic() error + func (commit *Commit) VoteSignBytes(chainID string, valIdx int32) []byte + type CommitSig struct + BlockIDFlag BlockIDFlag + Signature []byte + Timestamp time.Time + ValidatorAddress Address + func NewCommitSigAbsent() CommitSig + func NewCommitSigForBlock(signature []byte, valAddr Address, ts time.Time) CommitSig + func (cs *CommitSig) FromProto(csp tmproto.CommitSig) error + func (cs *CommitSig) ToProto() *tmproto.CommitSig + func (cs CommitSig) Absent() bool + func (cs CommitSig) BlockID(commitBlockID BlockID) BlockID + func (cs CommitSig) ForBlock() bool + func (cs CommitSig) String() string + func (cs CommitSig) ValidateBasic() error + type CompositeEvidence interface + Split func(committedHeader *Header, valSet *ValidatorSet) []Evidence + VerifyComposite func(committedHeader *Header, valSet *ValidatorSet) error + type ConflictingHeadersEvidence struct + H1 *SignedHeader + H2 *SignedHeader + func ConflictingHeadersEvidenceFromProto(pb *tmproto.ConflictingHeadersEvidence) (*ConflictingHeadersEvidence, error) + func NewConflictingHeadersEvidence(h1, h2 *SignedHeader) *ConflictingHeadersEvidence + func (ev *ConflictingHeadersEvidence) Address() []byte + func (ev *ConflictingHeadersEvidence) Bytes() []byte + func (ev *ConflictingHeadersEvidence) Equal(ev2 Evidence) bool + func (ev *ConflictingHeadersEvidence) Hash() []byte + func (ev *ConflictingHeadersEvidence) Height() int64 + func (ev *ConflictingHeadersEvidence) Split(committedHeader *Header, valSet *ValidatorSet) []Evidence + func (ev *ConflictingHeadersEvidence) String() string + func (ev *ConflictingHeadersEvidence) Time() time.Time + func (ev *ConflictingHeadersEvidence) ToProto() *tmproto.ConflictingHeadersEvidence + func (ev *ConflictingHeadersEvidence) ValidateBasic() error + func (ev *ConflictingHeadersEvidence) Verify(chainID string, _ crypto.PubKey) error + func (ev *ConflictingHeadersEvidence) VerifyComposite(committedHeader *Header, valSet *ValidatorSet) error + type Data struct + Txs Txs + func DataFromProto(dp *tmproto.Data) (Data, error) + func (data *Data) Hash() tmbytes.HexBytes + func (data *Data) StringIndented(indent string) string + func (data *Data) ToProto() tmproto.Data + type DuplicateVoteEvidence struct + Timestamp time.Time + VoteA *Vote + VoteB *Vote + func DuplicateVoteEvidenceFromProto(pb *tmproto.DuplicateVoteEvidence) (*DuplicateVoteEvidence, error) + func NewDuplicateVoteEvidence(vote1, vote2 *Vote, time time.Time) *DuplicateVoteEvidence + func NewMockDuplicateVoteEvidence(height int64, time time.Time, chainID string) *DuplicateVoteEvidence + func NewMockDuplicateVoteEvidenceWithValidator(height int64, time time.Time, pv PrivValidator, chainID string) *DuplicateVoteEvidence + func (dve *DuplicateVoteEvidence) Address() []byte + func (dve *DuplicateVoteEvidence) Bytes() []byte + func (dve *DuplicateVoteEvidence) Equal(ev Evidence) bool + func (dve *DuplicateVoteEvidence) Hash() []byte + func (dve *DuplicateVoteEvidence) Height() int64 + func (dve *DuplicateVoteEvidence) String() string + func (dve *DuplicateVoteEvidence) Time() time.Time + func (dve *DuplicateVoteEvidence) ToProto() *tmproto.DuplicateVoteEvidence + func (dve *DuplicateVoteEvidence) ValidateBasic() error + func (dve *DuplicateVoteEvidence) Verify(chainID string, pubKey crypto.PubKey) error + type ErrEvidenceInvalid struct + ErrorValue error + Evidence Evidence + func NewErrEvidenceInvalid(ev Evidence, err error) *ErrEvidenceInvalid + func (err *ErrEvidenceInvalid) Error() string + type ErrEvidenceOverflow struct + GotNum int + MaxNum int + func NewErrEvidenceOverflow(max, got int) *ErrEvidenceOverflow + func (err *ErrEvidenceOverflow) Error() string + type ErrInvalidCommitHeight struct + Actual int64 + Expected int64 + func NewErrInvalidCommitHeight(expected, actual int64) ErrInvalidCommitHeight + func (e ErrInvalidCommitHeight) Error() string + type ErrInvalidCommitSignatures struct + Actual int + Expected int + func NewErrInvalidCommitSignatures(expected, actual int) ErrInvalidCommitSignatures + func (e ErrInvalidCommitSignatures) Error() string + type ErrNotEnoughVotingPowerSigned struct + Got int64 + Needed int64 + func (e ErrNotEnoughVotingPowerSigned) Error() string + type ErrVoteConflictingVotes struct + VoteA *Vote + VoteB *Vote + func NewConflictingVoteError(vote1, vote2 *Vote) *ErrVoteConflictingVotes + func (err *ErrVoteConflictingVotes) Error() string + type ErroringMockPV struct + func NewErroringMockPV() *ErroringMockPV + func (pv *ErroringMockPV) SignProposal(chainID string, proposal *tmproto.Proposal) error + func (pv *ErroringMockPV) SignVote(chainID string, vote *tmproto.Vote) error + type EventBus struct + func NewEventBus() *EventBus + func NewEventBusWithBufferCapacity(cap int) *EventBus + func (b *EventBus) NumClientSubscriptions(clientID string) int + func (b *EventBus) NumClients() int + func (b *EventBus) OnStart() error + func (b *EventBus) OnStop() + func (b *EventBus) Publish(eventType string, eventData TMEventData) error + func (b *EventBus) PublishEventCompleteProposal(data EventDataCompleteProposal) error + func (b *EventBus) PublishEventLock(data EventDataRoundState) error + func (b *EventBus) PublishEventNewBlock(data EventDataNewBlock) error + func (b *EventBus) PublishEventNewBlockHeader(data EventDataNewBlockHeader) error + func (b *EventBus) PublishEventNewEvidence(evidence EventDataNewEvidence) error + func (b *EventBus) PublishEventNewRound(data EventDataNewRound) error + func (b *EventBus) PublishEventNewRoundStep(data EventDataRoundState) error + func (b *EventBus) PublishEventPolka(data EventDataRoundState) error + func (b *EventBus) PublishEventRelock(data EventDataRoundState) error + func (b *EventBus) PublishEventTimeoutPropose(data EventDataRoundState) error + func (b *EventBus) PublishEventTimeoutWait(data EventDataRoundState) error + func (b *EventBus) PublishEventTx(data EventDataTx) error + func (b *EventBus) PublishEventUnlock(data EventDataRoundState) error + func (b *EventBus) PublishEventValidBlock(data EventDataRoundState) error + func (b *EventBus) PublishEventValidatorSetUpdates(data EventDataValidatorSetUpdates) error + func (b *EventBus) PublishEventVote(data EventDataVote) error + func (b *EventBus) SetLogger(l log.Logger) + func (b *EventBus) Subscribe(ctx context.Context, subscriber string, query tmpubsub.Query, ...) (Subscription, error) + func (b *EventBus) SubscribeUnbuffered(ctx context.Context, subscriber string, query tmpubsub.Query) (Subscription, error) + func (b *EventBus) Unsubscribe(ctx context.Context, subscriber string, query tmpubsub.Query) error + func (b *EventBus) UnsubscribeAll(ctx context.Context, subscriber string) error + type EventBusSubscriber interface + NumClientSubscriptions func(clientID string) int + NumClients func() int + Subscribe func(ctx context.Context, subscriber string, query tmpubsub.Query, ...) (Subscription, error) + Unsubscribe func(ctx context.Context, subscriber string, query tmpubsub.Query) error + UnsubscribeAll func(ctx context.Context, subscriber string) error + type EventDataCompleteProposal struct + BlockID BlockID + Height int64 + Round int32 + Step string + type EventDataNewBlock struct + Block *Block + ResultBeginBlock abci.ResponseBeginBlock + ResultEndBlock abci.ResponseEndBlock + type EventDataNewBlockHeader struct + Header Header + NumTxs int64 + ResultBeginBlock abci.ResponseBeginBlock + ResultEndBlock abci.ResponseEndBlock + type EventDataNewEvidence struct + Evidence Evidence + Height int64 + type EventDataNewRound struct + Height int64 + Proposer ValidatorInfo + Round int32 + Step string + type EventDataRoundState struct + Height int64 + Round int32 + Step string + type EventDataString string + type EventDataTx struct + type EventDataValidatorSetUpdates struct + ValidatorUpdates []*Validator + type EventDataVote struct + Vote *Vote + type Evidence interface + Address func() []byte + Bytes func() []byte + Equal func(Evidence) bool + Hash func() []byte + Height func() int64 + String func() string + Time func() time.Time + ValidateBasic func() error + Verify func(chainID string, pubKey crypto.PubKey) error + func EvidenceFromProto(evidence *tmproto.Evidence) (Evidence, error) + type EvidenceData struct + Evidence EvidenceList + func (data *EvidenceData) FromProto(eviData *tmproto.EvidenceData) error + func (data *EvidenceData) Hash() tmbytes.HexBytes + func (data *EvidenceData) StringIndented(indent string) string + func (data *EvidenceData) ToProto() (*tmproto.EvidenceData, error) + type EvidenceList []Evidence + func (evl EvidenceList) Has(evidence Evidence) bool + func (evl EvidenceList) Hash() []byte + func (evl EvidenceList) String() string + type GenesisDoc struct + AppHash tmbytes.HexBytes + AppState json.RawMessage + ChainID string + ConsensusParams *tmproto.ConsensusParams + GenesisTime time.Time + InitialHeight int64 + Validators []GenesisValidator + func GenesisDocFromFile(genDocFile string) (*GenesisDoc, error) + func GenesisDocFromJSON(jsonBlob []byte) (*GenesisDoc, error) + func (genDoc *GenesisDoc) SaveAs(file string) error + func (genDoc *GenesisDoc) ValidateAndComplete() error + func (genDoc *GenesisDoc) ValidatorHash() []byte + type GenesisValidator struct + Address Address + Name string + Power int64 + PubKey crypto.PubKey + type Header struct + AppHash tmbytes.HexBytes + ChainID string + ConsensusHash tmbytes.HexBytes + DataHash tmbytes.HexBytes + EvidenceHash tmbytes.HexBytes + Height int64 + LastBlockID BlockID + LastCommitHash tmbytes.HexBytes + LastResultsHash tmbytes.HexBytes + NextValidatorsHash tmbytes.HexBytes + ProposerAddress Address + Time time.Time + ValidatorsHash tmbytes.HexBytes + Version tmversion.Consensus + func HeaderFromProto(ph *tmproto.Header) (Header, error) + func (h *Header) Hash() tmbytes.HexBytes + func (h *Header) Populate(version tmversion.Consensus, chainID string, timestamp time.Time, ...) + func (h *Header) StringIndented(indent string) string + func (h *Header) ToProto() *tmproto.Header + func (h Header) ValidateBasic() error + type LunaticValidatorEvidence struct + Header *Header + InvalidHeaderField string + Timestamp time.Time + Vote *Vote + func LunaticValidatorEvidenceFromProto(pb *tmproto.LunaticValidatorEvidence) (*LunaticValidatorEvidence, error) + func NewLunaticValidatorEvidence(header *Header, vote *Vote, invalidHeaderField string, time time.Time) *LunaticValidatorEvidence + func (e *LunaticValidatorEvidence) Address() []byte + func (e *LunaticValidatorEvidence) Bytes() []byte + func (e *LunaticValidatorEvidence) Equal(ev Evidence) bool + func (e *LunaticValidatorEvidence) Hash() []byte + func (e *LunaticValidatorEvidence) Height() int64 + func (e *LunaticValidatorEvidence) String() string + func (e *LunaticValidatorEvidence) Time() time.Time + func (e *LunaticValidatorEvidence) ToProto() *tmproto.LunaticValidatorEvidence + func (e *LunaticValidatorEvidence) ValidateBasic() error + func (e *LunaticValidatorEvidence) Verify(chainID string, pubKey crypto.PubKey) error + func (e *LunaticValidatorEvidence) VerifyHeader(committedHeader *Header) error + type MockPV struct + PrivKey crypto.PrivKey + func NewMockPV() MockPV + func NewMockPVWithParams(privKey crypto.PrivKey, breakProposalSigning, breakVoteSigning bool) MockPV + func (pv MockPV) DisableChecks() + func (pv MockPV) ExtractIntoValidator(votingPower int64) *Validator + func (pv MockPV) GetPubKey() (crypto.PubKey, error) + func (pv MockPV) SignProposal(chainID string, proposal *tmproto.Proposal) error + func (pv MockPV) SignVote(chainID string, vote *tmproto.Vote) error + func (pv MockPV) String() string + type NopEventBus struct + func (NopEventBus) PublishEventCompleteProposal(data EventDataRoundState) error + func (NopEventBus) PublishEventLock(data EventDataRoundState) error + func (NopEventBus) PublishEventNewBlock(data EventDataNewBlock) error + func (NopEventBus) PublishEventNewBlockHeader(data EventDataNewBlockHeader) error + func (NopEventBus) PublishEventNewEvidence(evidence EventDataNewEvidence) error + func (NopEventBus) PublishEventNewRound(data EventDataRoundState) error + func (NopEventBus) PublishEventNewRoundStep(data EventDataRoundState) error + func (NopEventBus) PublishEventPolka(data EventDataRoundState) error + func (NopEventBus) PublishEventRelock(data EventDataRoundState) error + func (NopEventBus) PublishEventTimeoutPropose(data EventDataRoundState) error + func (NopEventBus) PublishEventTimeoutWait(data EventDataRoundState) error + func (NopEventBus) PublishEventTx(data EventDataTx) error + func (NopEventBus) PublishEventUnlock(data EventDataRoundState) error + func (NopEventBus) PublishEventValidatorSetUpdates(data EventDataValidatorSetUpdates) error + func (NopEventBus) PublishEventVote(data EventDataVote) error + func (NopEventBus) Subscribe(ctx context.Context, subscriber string, query tmpubsub.Query, ...) error + func (NopEventBus) Unsubscribe(ctx context.Context, subscriber string, query tmpubsub.Query) error + func (NopEventBus) UnsubscribeAll(ctx context.Context, subscriber string) error + type P2PID string + type Part struct + Bytes tmbytes.HexBytes + Index uint32 + Proof merkle.Proof + func PartFromProto(pb *tmproto.Part) (*Part, error) + func (part *Part) String() string + func (part *Part) StringIndented(indent string) string + func (part *Part) ToProto() (*tmproto.Part, error) + func (part *Part) ValidateBasic() error + type PartSet struct + func NewPartSetFromData(data []byte, partSize uint32) *PartSet + func NewPartSetFromHeader(header PartSetHeader) *PartSet + func (ps *PartSet) AddPart(part *Part) (bool, error) + func (ps *PartSet) BitArray() *bits.BitArray + func (ps *PartSet) Count() uint32 + func (ps *PartSet) GetPart(index int) *Part + func (ps *PartSet) GetReader() io.Reader + func (ps *PartSet) HasHeader(header PartSetHeader) bool + func (ps *PartSet) Hash() []byte + func (ps *PartSet) HashesTo(hash []byte) bool + func (ps *PartSet) Header() PartSetHeader + func (ps *PartSet) IsComplete() bool + func (ps *PartSet) MarshalJSON() ([]byte, error) + func (ps *PartSet) StringShort() string + func (ps *PartSet) Total() uint32 + type PartSetHeader struct + Hash tmbytes.HexBytes + Total uint32 + func PartSetHeaderFromProto(ppsh *tmproto.PartSetHeader) (*PartSetHeader, error) + func (psh *PartSetHeader) ToProto() tmproto.PartSetHeader + func (psh PartSetHeader) Equals(other PartSetHeader) bool + func (psh PartSetHeader) IsZero() bool + func (psh PartSetHeader) String() string + func (psh PartSetHeader) ValidateBasic() error + type PartSetReader struct + func NewPartSetReader(parts []*Part) *PartSetReader + func (psr *PartSetReader) Read(p []byte) (n int, err error) + type PotentialAmnesiaEvidence struct + HeightStamp int64 + Timestamp time.Time + VoteA *Vote + VoteB *Vote + func NewPotentialAmnesiaEvidence(voteA, voteB *Vote, time time.Time) *PotentialAmnesiaEvidence + func PotentialAmnesiaEvidenceFromProto(pb *tmproto.PotentialAmnesiaEvidence) (*PotentialAmnesiaEvidence, error) + func (e *PotentialAmnesiaEvidence) Address() []byte + func (e *PotentialAmnesiaEvidence) Bytes() []byte + func (e *PotentialAmnesiaEvidence) Equal(ev Evidence) bool + func (e *PotentialAmnesiaEvidence) Hash() []byte + func (e *PotentialAmnesiaEvidence) Height() int64 + func (e *PotentialAmnesiaEvidence) Primed(trialPeriod, currentHeight int64) bool + func (e *PotentialAmnesiaEvidence) String() string + func (e *PotentialAmnesiaEvidence) Time() time.Time + func (e *PotentialAmnesiaEvidence) ToProto() *tmproto.PotentialAmnesiaEvidence + func (e *PotentialAmnesiaEvidence) ValidateBasic() error + func (e *PotentialAmnesiaEvidence) Verify(chainID string, pubKey crypto.PubKey) error + type PrivValidator interface + GetPubKey func() (crypto.PubKey, error) + SignProposal func(chainID string, proposal *tmproto.Proposal) error + SignVote func(chainID string, vote *tmproto.Vote) error + type PrivValidatorsByAddress []PrivValidator + func (pvs PrivValidatorsByAddress) Len() int + func (pvs PrivValidatorsByAddress) Less(i, j int) bool + func (pvs PrivValidatorsByAddress) Swap(i, j int) + type ProofOfLockChange struct + PubKey crypto.PubKey + Votes []*Vote + func NewEmptyPOLC() *ProofOfLockChange + func NewMockPOLC(height int64, time time.Time, pubKey crypto.PubKey) ProofOfLockChange + func NewPOLC(votes []*Vote, pubKey crypto.PubKey) *ProofOfLockChange + func NewPOLCFromVoteSet(voteSet *VoteSet, pubKey crypto.PubKey, blockID BlockID) (*ProofOfLockChange, error) + func ProofOfLockChangeFromProto(pb *tmproto.ProofOfLockChange) (*ProofOfLockChange, error) + func (e *ProofOfLockChange) Address() []byte + func (e *ProofOfLockChange) BlockID() BlockID + func (e *ProofOfLockChange) Equal(e2 *ProofOfLockChange) bool + func (e *ProofOfLockChange) Height() int64 + func (e *ProofOfLockChange) IsAbsent() bool + func (e *ProofOfLockChange) Round() int32 + func (e *ProofOfLockChange) String() string + func (e *ProofOfLockChange) Time() time.Time + func (e *ProofOfLockChange) ToProto() (*tmproto.ProofOfLockChange, error) + func (e *ProofOfLockChange) ValidateBasic() error + func (e *ProofOfLockChange) ValidateVotes(valSet *ValidatorSet, chainID string) error + type Proposal struct + BlockID BlockID + Height int64 + POLRound int32 + Round int32 + Signature []byte + Timestamp time.Time + Type tmproto.SignedMsgType + func NewProposal(height int64, round int32, polRound int32, blockID BlockID) *Proposal + func ProposalFromProto(pp *tmproto.Proposal) (*Proposal, error) + func (p *Proposal) String() string + func (p *Proposal) ToProto() *tmproto.Proposal + func (p *Proposal) ValidateBasic() error + type Signable interface + SignBytes func(chainID string) []byte + type SignedHeader struct + Commit *Commit + func SignedHeaderFromProto(shp *tmproto.SignedHeader) (*SignedHeader, error) + func (sh *SignedHeader) ToProto() *tmproto.SignedHeader + func (sh SignedHeader) String() string + func (sh SignedHeader) StringIndented(indent string) string + func (sh SignedHeader) ValidateBasic(chainID string) error + type Subscription interface + Cancelled func() <-chan struct{} + Err func() error + Out func() <-chan tmpubsub.Message + type TMEventData interface + type Tx []byte + func (tx Tx) Hash() []byte + func (tx Tx) String() string + type TxEventPublisher interface + PublishEventTx func(EventDataTx) error + type TxProof struct + Data Tx + Proof merkle.Proof + RootHash tmbytes.HexBytes + func TxProofFromProto(pb tmproto.TxProof) (TxProof, error) + func (tp TxProof) Leaf() []byte + func (tp TxProof) ToProto() tmproto.TxProof + func (tp TxProof) Validate(dataHash []byte) error + type Txs []Tx + func (txs Txs) Hash() []byte + func (txs Txs) Index(tx Tx) int + func (txs Txs) IndexByHash(hash []byte) int + func (txs Txs) Proof(i int) TxProof + type Validator struct + Address Address + ProposerPriority int64 + PubKey crypto.PubKey + VotingPower int64 + func NewValidator(pubKey crypto.PubKey, votingPower int64) *Validator + func ValidatorFromProto(vp *tmproto.Validator) (*Validator, error) + func (v *Validator) Bytes() []byte + func (v *Validator) CompareProposerPriority(other *Validator) *Validator + func (v *Validator) Copy() *Validator + func (v *Validator) String() string + func (v *Validator) ToProto() (*tmproto.Validator, error) + func (v *Validator) ValidateBasic() error + type ValidatorInfo struct + Address Address + Index int32 + type ValidatorSet struct + Proposer *Validator + Validators []*Validator + func NewValidatorSet(valz []*Validator) *ValidatorSet + func ValidatorSetFromProto(vp *tmproto.ValidatorSet) (*ValidatorSet, error) + func (vals *ValidatorSet) Copy() *ValidatorSet + func (vals *ValidatorSet) CopyIncrementProposerPriority(times int32) *ValidatorSet + func (vals *ValidatorSet) GetByAddress(address []byte) (index int32, val *Validator) + func (vals *ValidatorSet) GetByIndex(index int32) (address []byte, val *Validator) + func (vals *ValidatorSet) GetProposer() (proposer *Validator) + func (vals *ValidatorSet) HasAddress(address []byte) bool + func (vals *ValidatorSet) Hash() []byte + func (vals *ValidatorSet) IncrementProposerPriority(times int32) + func (vals *ValidatorSet) IsNilOrEmpty() bool + func (vals *ValidatorSet) Iterate(fn func(index int, val *Validator) bool) + func (vals *ValidatorSet) RescalePriorities(diffMax int64) + func (vals *ValidatorSet) Size() int + func (vals *ValidatorSet) String() string + func (vals *ValidatorSet) StringIndented(indent string) string + func (vals *ValidatorSet) ToProto() (*tmproto.ValidatorSet, error) + func (vals *ValidatorSet) TotalVotingPower() int64 + func (vals *ValidatorSet) UpdateWithChangeSet(changes []*Validator) error + func (vals *ValidatorSet) ValidateBasic() error + func (vals *ValidatorSet) VerifyCommit(chainID string, blockID BlockID, height int64, commit *Commit) error + func (vals *ValidatorSet) VerifyCommitLight(chainID string, blockID BlockID, height int64, commit *Commit) error + func (vals *ValidatorSet) VerifyCommitLightTrusting(chainID string, commit *Commit, trustLevel tmmath.Fraction) error + type ValidatorsByAddress []*Validator + func (valz ValidatorsByAddress) Len() int + func (valz ValidatorsByAddress) Less(i, j int) bool + func (valz ValidatorsByAddress) Swap(i, j int) + type ValidatorsByVotingPower []*Validator + func (valz ValidatorsByVotingPower) Len() int + func (valz ValidatorsByVotingPower) Less(i, j int) bool + func (valz ValidatorsByVotingPower) Swap(i, j int) + type Vote struct + BlockID BlockID + Height int64 + Round int32 + Signature []byte + Timestamp time.Time + Type tmproto.SignedMsgType + ValidatorAddress Address + ValidatorIndex int32 + func MakeVote(height int64, blockID BlockID, valSet *ValidatorSet, privVal PrivValidator, ...) (*Vote, error) + func VoteFromProto(pv *tmproto.Vote) (*Vote, error) + func (vote *Vote) CommitSig() CommitSig + func (vote *Vote) Copy() *Vote + func (vote *Vote) String() string + func (vote *Vote) ToProto() *tmproto.Vote + func (vote *Vote) ValidateBasic() error + func (vote *Vote) Verify(chainID string, pubKey crypto.PubKey) error + type VoteSet struct + func CommitToVoteSet(chainID string, commit *Commit, vals *ValidatorSet) *VoteSet + func NewVoteSet(chainID string, height int64, round int32, signedMsgType tmproto.SignedMsgType, ...) *VoteSet + func (voteSet *VoteSet) AddVote(vote *Vote) (added bool, err error) + func (voteSet *VoteSet) BitArray() *bits.BitArray + func (voteSet *VoteSet) BitArrayByBlockID(blockID BlockID) *bits.BitArray + func (voteSet *VoteSet) BitArrayString() string + func (voteSet *VoteSet) ChainID() string + func (voteSet *VoteSet) GetByAddress(address []byte) *Vote + func (voteSet *VoteSet) GetByIndex(valIndex int32) *Vote + func (voteSet *VoteSet) GetHeight() int64 + func (voteSet *VoteSet) GetRound() int32 + func (voteSet *VoteSet) HasAll() bool + func (voteSet *VoteSet) HasTwoThirdsAny() bool + func (voteSet *VoteSet) HasTwoThirdsMajority() bool + func (voteSet *VoteSet) IsCommit() bool + func (voteSet *VoteSet) MakeCommit() *Commit + func (voteSet *VoteSet) MarshalJSON() ([]byte, error) + func (voteSet *VoteSet) SetPeerMaj23(peerID P2PID, blockID BlockID) error + func (voteSet *VoteSet) Size() int + func (voteSet *VoteSet) String() string + func (voteSet *VoteSet) StringIndented(indent string) string + func (voteSet *VoteSet) StringShort() string + func (voteSet *VoteSet) TwoThirdsMajority() (blockID BlockID, ok bool) + func (voteSet *VoteSet) Type() byte + func (voteSet *VoteSet) VoteStrings() []string + type VoteSetJSON struct + PeerMaj23s map[P2PID]BlockID + Votes []string + VotesBitArray string + type VoteSetReader interface + BitArray func() *bits.BitArray + GetByIndex func(int32) *Vote + GetHeight func() int64 + GetRound func() int32 + IsCommit func() bool + Size func() int + Type func() byte