Versions in this module Expand all Collapse all v0 v0.5.0 Mar 23, 2021 Changes in this version + func BClaimsEqual(a, b interface{}) (bool, error) + func ExtractHCID(any interface{}) (uint32, uint32) + func ExtractHR(any interface{}) (uint32, uint32) + func GetProposerIdx(numv int, height uint32, round uint32) uint8 + func IsDeadBlockRound(any interface{}) bool + func MakeTxRoot(txHashes [][]byte) ([]byte, error) + func NextHeightSigDesignator() []byte + func NextRoundSigDesignator() []byte + func PreCommitNilSigDesignator() []byte + func PreCommitSigDesignator() []byte + func PreVoteNilSigDesignator() []byte + func PreVoteSigDesignator() []byte + func PrevBlockEqual(a, b interface{}) bool + func ProposalSigDesignator() []byte + func RelateH(a, b interface{}) int + func RelateHR(a, b interface{}) int + func SplitBlob(s []byte, blen int) ([][]byte, error) + func SplitHashes(s []byte) ([][]byte, error) + func SplitSignatures(s []byte) ([][]byte, error) + type BClaims struct + ChainID uint32 + HeaderRoot []byte + Height uint32 + PrevBlock []byte + StateRoot []byte + TxCount uint32 + TxRoot []byte + func ExtractBClaims(any interface{}) *BClaims + func (b *BClaims) BlockHash() ([]byte, error) + func (b *BClaims) MarshalBinary() ([]byte, error) + func (b *BClaims) MarshalCapn(seg *capnp.Segment) (mdefs.BClaims, error) + func (b *BClaims) UnmarshalBinary(data []byte) error + func (b *BClaims) UnmarshalCapn(bc mdefs.BClaims) error + type BlockHeader struct + BClaims *BClaims + GroupKey []byte + SigGroup []byte + TxHshLst [][]byte + func (b *BlockHeader) BlockHash() ([]byte, error) + func (b *BlockHeader) GetRCert() (*RCert, error) + func (b *BlockHeader) MakeDeadRoundProposal(rcert *RCert, headerRoot []byte) (*Proposal, error) + func (b *BlockHeader) MarshalBinary() ([]byte, error) + func (b *BlockHeader) MarshalCapn(seg *capnp.Segment) (mdefs.BlockHeader, error) + func (b *BlockHeader) UnmarshalBinary(data []byte) error + func (b *BlockHeader) UnmarshalBinaryUnsafe(data []byte) error + func (b *BlockHeader) UnmarshalCapn(bh mdefs.BlockHeader) error + func (b *BlockHeader) ValidateSignatures(bnVal *crypto.BNGroupValidator) error + type BlockHeaderHashIndexKey struct + BlockHash []byte + Prefix []byte + func (b *BlockHeaderHashIndexKey) MarshalBinary() ([]byte, error) + func (b *BlockHeaderHashIndexKey) UnmarshalBinary(data []byte) error + type BlockHeaderHeightKey struct + Height uint32 + Prefix []byte + func (b *BlockHeaderHeightKey) MarshalBinary() ([]byte, error) + func (b *BlockHeaderHeightKey) UnmarshalBinary(data []byte) error + type EncryptedStore struct + ClearText []byte + Kid []byte + Name []byte + func (b *EncryptedStore) Decrypt(resolver interfaces.KeyResolver) error + func (b *EncryptedStore) Encrypt(resolver interfaces.KeyResolver) error + func (b *EncryptedStore) MarshalBinary() ([]byte, error) + func (b *EncryptedStore) MarshalCapn(seg *capnp.Segment) (mdefs.EncryptedStore, error) + func (b *EncryptedStore) UnmarshalBinary(data []byte) error + func (b *EncryptedStore) UnmarshalCapn(bh mdefs.EncryptedStore) error + type NHClaims struct + GroupShare []byte + Proposal *Proposal + SigShare []byte + func (b *NHClaims) MarshalBinary() ([]byte, error) + func (b *NHClaims) MarshalCapn(seg *capnp.Segment) (mdefs.NHClaims, error) + func (b *NHClaims) UnmarshalBinary(data []byte) error + func (b *NHClaims) UnmarshalCapn(bh mdefs.NHClaims) error + func (b *NHClaims) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error + type NRClaims struct + GroupShare []byte + RCert *RCert + RClaims *RClaims + SigShare []byte + func (b *NRClaims) MarshalBinary() ([]byte, error) + func (b *NRClaims) MarshalCapn(seg *capnp.Segment) (mdefs.NRClaims, error) + func (b *NRClaims) Sign(bnSigner *crypto.BNGroupSigner) error + func (b *NRClaims) UnmarshalBinary(data []byte) error + func (b *NRClaims) UnmarshalCapn(bh mdefs.NRClaims) error + func (b *NRClaims) ValidateSignatures(bnVal *crypto.BNGroupValidator) error + type NextHeight struct + GroupKey []byte + GroupShare []byte + NHClaims *NHClaims + PreCommits [][]byte + Signature []byte + Signers [][]byte + Voter []byte + func (b *NextHeight) MarshalBinary() ([]byte, error) + func (b *NextHeight) MarshalCapn(seg *capnp.Segment) (mdefs.NextHeight, error) + func (b *NextHeight) Plagiarize(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) (*NextHeight, error) + func (b *NextHeight) Sign(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) error + func (b *NextHeight) UnmarshalBinary(data []byte) error + func (b *NextHeight) UnmarshalCapn(bh mdefs.NextHeight) error + func (b *NextHeight) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error + type NextHeightList []*NextHeight + func (nhl NextHeightList) MakeBlockHeader(bns *crypto.BNGroupSigner, groupShares [][]byte) (*BlockHeader, *RCert, error) + type NextRound struct + GroupKey []byte + GroupShare []byte + NRClaims *NRClaims + Signature []byte + Voter []byte + func (b *NextRound) MarshalBinary() ([]byte, error) + func (b *NextRound) MarshalCapn(seg *capnp.Segment) (mdefs.NextRound, error) + func (b *NextRound) Sign(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) error + func (b *NextRound) UnmarshalBinary(data []byte) error + func (b *NextRound) UnmarshalCapn(bh mdefs.NextRound) error + func (b *NextRound) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error + type NextRoundList []*NextRound + func (nrl NextRoundList) MakeRoundCert(bns *crypto.BNGroupSigner, groupShares [][]byte) (*RCert, error) + type OwnState struct + CanonicalSnapShot *BlockHeader + GroupKey []byte + MaxBHSeen *BlockHeader + PendingSnapShot *BlockHeader + SyncToBH *BlockHeader + VAddr []byte + func (b *OwnState) Copy() (*OwnState, error) + func (b *OwnState) IsSync() bool + func (b *OwnState) MarshalBinary() ([]byte, error) + func (b *OwnState) MarshalCapn(seg *capnp.Segment) (mdefs.OwnState, error) + func (b *OwnState) UnmarshalBinary(data []byte) error + func (b *OwnState) UnmarshalCapn(bh mdefs.OwnState) error + type OwnValidatingState struct + GroupKey []byte + LockedValue *Proposal + PreCommitStepStarted int64 + PreVoteStepStarted int64 + RoundStarted int64 + VAddr []byte + ValidValue *Proposal + func (b *OwnValidatingState) DBRNRExpired() bool + func (b *OwnValidatingState) MarshalBinary() ([]byte, error) + func (b *OwnValidatingState) MarshalCapn(seg *capnp.Segment) (mdefs.OwnValidatingState, error) + func (b *OwnValidatingState) PCTOExpired() bool + func (b *OwnValidatingState) PTOExpired() bool + func (b *OwnValidatingState) PVTOExpired() bool + func (b *OwnValidatingState) SetPreCommitStepStarted() + func (b *OwnValidatingState) SetPreVoteStepStarted() + func (b *OwnValidatingState) SetRoundStarted() + func (b *OwnValidatingState) UnmarshalBinary(data []byte) error + func (b *OwnValidatingState) UnmarshalCapn(bh mdefs.OwnValidatingState) error + type PClaims struct + BClaims *BClaims + RCert *RCert + func (b *PClaims) MarshalBinary() ([]byte, error) + func (b *PClaims) MarshalCapn(seg *capnp.Segment) (mdefs.PClaims, error) + func (b *PClaims) UnmarshalBinary(data []byte) error + func (b *PClaims) UnmarshalCapn(bh mdefs.PClaims) error + type PendingHdrLeafKey struct + Key []byte + Prefix []byte + func (b *PendingHdrLeafKey) MarshalBinary() ([]byte, error) + func (b *PendingHdrLeafKey) UnmarshalBinary(data []byte) error + type PendingLeafKey struct + Key []byte + Prefix []byte + func (b *PendingLeafKey) MarshalBinary() ([]byte, error) + func (b *PendingLeafKey) UnmarshalBinary(data []byte) error + type PendingNodeKey struct + Key []byte + Prefix []byte + func (b *PendingNodeKey) MarshalBinary() ([]byte, error) + func (b *PendingNodeKey) UnmarshalBinary(data []byte) error + type PreCommit struct + GroupKey []byte + PreVotes [][]byte + Proposal *Proposal + Proposer []byte + Signature []byte + Signers [][]byte + Voter []byte + func (b *PreCommit) MakeImplPreVotes() (PreVoteList, error) + func (b *PreCommit) MarshalBinary() ([]byte, error) + func (b *PreCommit) MarshalCapn(seg *capnp.Segment) (mdefs.PreCommit, error) + func (b *PreCommit) Sign(secpSigner *crypto.Secp256k1Signer) error + func (b *PreCommit) UnmarshalBinary(data []byte) error + func (b *PreCommit) UnmarshalCapn(bh mdefs.PreCommit) error + func (b *PreCommit) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error + type PreCommitList []*PreCommit + func (pcl PreCommitList) GetProposal() (*Proposal, error) + func (pcl PreCommitList) MakeNextHeight(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) (*NextHeight, error) + type PreCommitNil struct + GroupKey []byte + RCert *RCert + Signature []byte + Voter []byte + func (b *PreCommitNil) MarshalBinary() ([]byte, error) + func (b *PreCommitNil) MarshalCapn(seg *capnp.Segment) (mdefs.PreCommitNil, error) + func (b *PreCommitNil) UnmarshalBinary(data []byte) error + func (b *PreCommitNil) UnmarshalCapn(bh mdefs.PreCommitNil) error + func (b *PreCommitNil) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error + type PreCommitNilList []bool + type PreVote struct + GroupKey []byte + Proposal *Proposal + Signature []byte + Voter []byte + func (b *PreVote) MarshalBinary() ([]byte, error) + func (b *PreVote) MarshalCapn(seg *capnp.Segment) (mdefs.PreVote, error) + func (b *PreVote) Sign(secpSigner *crypto.Secp256k1Signer) error + func (b *PreVote) UnmarshalBinary(data []byte) error + func (b *PreVote) UnmarshalCapn(bh mdefs.PreVote) error + func (b *PreVote) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error + type PreVoteList []*PreVote + func (pvl PreVoteList) GetProposal() (*Proposal, error) + func (pvl PreVoteList) MakePreCommit(secpSigner *crypto.Secp256k1Signer) (*PreCommit, error) + type PreVoteNil struct + GroupKey []byte + RCert *RCert + Signature []byte + Voter []byte + func (b *PreVoteNil) MarshalBinary() ([]byte, error) + func (b *PreVoteNil) MarshalCapn(seg *capnp.Segment) (mdefs.PreVoteNil, error) + func (b *PreVoteNil) UnmarshalBinary(data []byte) error + func (b *PreVoteNil) UnmarshalCapn(bh mdefs.PreVoteNil) error + func (b *PreVoteNil) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error + type PreVoteNilList []bool + type Proposal struct + GroupKey []byte + PClaims *PClaims + Proposer []byte + Signature []byte + TxHshLst [][]byte + func (b *Proposal) MarshalBinary() ([]byte, error) + func (b *Proposal) MarshalCapn(seg *capnp.Segment) (mdefs.Proposal, error) + func (b *Proposal) PreVote(secpSigner *crypto.Secp256k1Signer) (*PreVote, error) + func (b *Proposal) RePropose(secpSigner *crypto.Secp256k1Signer, rc *RCert) (*Proposal, error) + func (b *Proposal) Sign(secpSigner *crypto.Secp256k1Signer) error + func (b *Proposal) UnmarshalBinary(data []byte) error + func (b *Proposal) UnmarshalCapn(bh mdefs.Proposal) error + func (b *Proposal) ValidateSignatures(val *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error + type RCert struct + GroupKey []byte + RClaims *RClaims + SigGroup []byte + func ExtractRCert(any interface{}) *RCert + func ExtractRCertAny(any interface{}) (*RCert, error) + func (b *RCert) MarshalBinary() ([]byte, error) + func (b *RCert) MarshalCapn(seg *capnp.Segment) (mdefs.RCert, error) + func (b *RCert) NextRound(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) (*NextRound, error) + func (b *RCert) PreCommitNil(secpSigner *crypto.Secp256k1Signer) (*PreCommitNil, error) + func (b *RCert) PreVoteNil(secpSigner *crypto.Secp256k1Signer) (*PreVoteNil, error) + func (b *RCert) UnmarshalBinary(data []byte) error + func (b *RCert) UnmarshalCapn(bh mdefs.RCert) error + func (b *RCert) ValidateSignature(bnVal *crypto.BNGroupValidator) error + type RClaims struct + ChainID uint32 + Height uint32 + PrevBlock []byte + Round uint32 + func (b *RClaims) MarshalBinary() ([]byte, error) + func (b *RClaims) MarshalCapn(seg *capnp.Segment) (mdefs.RClaims, error) + func (b *RClaims) UnmarshalBinary(data []byte) error + func (b *RClaims) UnmarshalCapn(bh mdefs.RClaims) error + type RoundState struct + ConflictingNextHeight *NextHeight + ConflictingPreCommit *PreCommit + ConflictingPreVote *PreVote + ConflictingProposal *Proposal + ConflictingRCert *RCert + GroupIdx uint8 + GroupKey []byte + GroupShare []byte + ImplicitPCN bool + ImplicitPVN bool + NextHeight *NextHeight + NextRound *NextRound + PreCommit *PreCommit + PreCommitNil *PreCommitNil + PreVote *PreVote + PreVoteNil *PreVoteNil + Proposal *Proposal + RCert *RCert + VAddr []byte + func (b *RoundState) CurrentH(a *RCert) bool + func (b *RoundState) CurrentHR(a *RCert) bool + func (b *RoundState) FutureH(a *RCert) bool + func (b *RoundState) FutureHR(a *RCert) bool + func (b *RoundState) MarshalBinary() ([]byte, error) + func (b *RoundState) MarshalCapn(seg *capnp.Segment) (mdefs.RoundState, error) + func (b *RoundState) NHCurrent(a *RCert) bool + func (b *RoundState) NRCurrent(a *RCert) bool + func (b *RoundState) PCCurrent(a *RCert) bool + func (b *RoundState) PCNCurrent(a *RCert) bool + func (b *RoundState) PCurrent(a *RCert) bool + func (b *RoundState) PVCurrent(a *RCert) bool + func (b *RoundState) PVNCurrent(a *RCert) bool + func (b *RoundState) Reset() + func (b *RoundState) SetNextHeight(v *NextHeight) (bool, error) + func (b *RoundState) SetNextRound(v *NextRound) (bool, error) + func (b *RoundState) SetPreCommit(v *PreCommit) (bool, error) + func (b *RoundState) SetPreCommitNil(v *PreCommitNil) (bool, error) + func (b *RoundState) SetPreVote(v *PreVote) (bool, error) + func (b *RoundState) SetPreVoteNil(v *PreVoteNil) (bool, error) + func (b *RoundState) SetProposal(v *Proposal) (bool, error) + func (b *RoundState) SetRCert(rc *RCert) error + func (b *RoundState) TrackExternalConflicts(v *Proposal) + func (b *RoundState) UnmarshalBinary(data []byte) error + func (b *RoundState) UnmarshalCapn(bh mdefs.RoundState) error + type RoundStateCurrentKey struct + GroupKey []byte + Prefix []byte + VAddr []byte + func (b *RoundStateCurrentKey) MarshalBinary() ([]byte, error) + func (b *RoundStateCurrentKey) UnmarshalBinary(data []byte) error + type RoundStateHistoricKey struct + Height uint32 + Prefix []byte + Round uint32 + VAddr []byte + func (b *RoundStateHistoricKey) MakeIterKey() ([]byte, error) + func (b *RoundStateHistoricKey) MarshalBinary() ([]byte, error) + func (b *RoundStateHistoricKey) UnmarshalBinary(data []byte) error + type SafeToProceedKey struct + Height uint32 + Prefix []byte + func (b *SafeToProceedKey) MarshalBinary() ([]byte, error) + func (b *SafeToProceedKey) UnmarshalBinary(data []byte) error + type StagedBlockHeaderKey struct + Key []byte + Prefix []byte + func (b *StagedBlockHeaderKey) MarshalBinary() ([]byte, error) + func (b *StagedBlockHeaderKey) UnmarshalBinary(data []byte) error + type TxCacheKey struct + Height uint32 + Prefix []byte + TxHash []byte + func (b *TxCacheKey) MakeIterKey() ([]byte, error) + func (b *TxCacheKey) MarshalBinary() ([]byte, error) + func (b *TxCacheKey) UnmarshalBinary(data []byte) error + type Validator struct + GroupShare []byte + VAddr []byte + func (b *Validator) MarshalBinary() ([]byte, error) + func (b *Validator) MarshalCapn(seg *capnp.Segment) (mdefs.Validator, error) + func (b *Validator) UnmarshalBinary(data []byte) error + func (b *Validator) UnmarshalCapn(bh mdefs.Validator) error + type ValidatorSet struct + GroupKey []byte + NotBefore uint32 + ValidatorGroupShareMap map[string]int + ValidatorGroupShareSet map[string]bool + ValidatorVAddrMap map[string]int + ValidatorVAddrSet map[string]bool + Validators []*Validator + func (b *ValidatorSet) GroupShareIdx(groupShare []byte) (bool, int) + func (b *ValidatorSet) IsGroupShareValidator(groupShare []byte) bool + func (b *ValidatorSet) IsVAddrValidator(addr []byte) bool + func (b *ValidatorSet) IsValidTriplet(vAddr []byte, groupShare []byte, groupKey []byte) bool + func (b *ValidatorSet) IsValidTuple(vAddr []byte, groupKey []byte) bool + func (b *ValidatorSet) MarshalBinary() ([]byte, error) + func (b *ValidatorSet) MarshalCapn(seg *capnp.Segment) (mdefs.ValidatorSet, error) + func (b *ValidatorSet) UnmarshalBinary(data []byte) error + func (b *ValidatorSet) UnmarshalCapn(bh mdefs.ValidatorSet) error + func (b *ValidatorSet) VAddrIdx(vAddr []byte) (bool, int) + type ValidatorSetKey struct + NotBefore uint32 + Prefix []byte + func (b *ValidatorSetKey) MarshalBinary() ([]byte, error) + func (b *ValidatorSetKey) UnmarshalBinary(data []byte) error