Documentation
¶
Index ¶
- 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
- type BlockHeader
- 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
- type BlockHeaderHeightKey
- type EncryptedStore
- 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
- 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
- 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
- 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
- type NextRound
- 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
- type OwnState
- 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
- 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
- type PendingHdrLeafKey
- type PendingLeafKey
- type PendingNodeKey
- type PreCommit
- 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
- type PreCommitNil
- 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
- type PreVote
- 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
- type PreVoteNil
- 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
- type Proposal
- 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
- 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
- type RoundState
- 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
- type RoundStateHistoricKey
- type SafeToProceedKey
- type StagedBlockHeaderKey
- type TxCacheKey
- type Validator
- type ValidatorSet
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BClaimsEqual ¶
func ExtractHCID ¶
func GetProposerIdx ¶
GetProposerIdx will return the index of the proposer of this round from the list of validators
func IsDeadBlockRound ¶
func IsDeadBlockRound(any interface{}) bool
func MakeTxRoot ¶
MakeTxRoot creates a txRootHsh from a list of transaction hashes
func NextHeightSigDesignator ¶
func NextHeightSigDesignator() []byte
func NextRoundSigDesignator ¶
func NextRoundSigDesignator() []byte
func PreCommitNilSigDesignator ¶
func PreCommitNilSigDesignator() []byte
func PreCommitSigDesignator ¶
func PreCommitSigDesignator() []byte
func PreVoteNilSigDesignator ¶
func PreVoteNilSigDesignator() []byte
func PreVoteSigDesignator ¶
func PreVoteSigDesignator() []byte
func PrevBlockEqual ¶
func PrevBlockEqual(a, b interface{}) bool
func ProposalSigDesignator ¶
func ProposalSigDesignator() []byte
func SplitHashes ¶
SplitHashes splits hashes by chopping up a blob of data into byte slices by length. return an error if the length is not correct. IE the total length is not a multiple of expected length for a single element of type.
func SplitSignatures ¶
SplitSignatures splits signatures by chopping up a blob of data into byte slices by length. return an error if the length is not correct. IE the total length is not a multiple of expected length for a single element of type.
Types ¶
type BClaims ¶
type BClaims struct {
ChainID uint32
Height uint32
TxCount uint32
PrevBlock []byte
TxRoot []byte
StateRoot []byte
HeaderRoot []byte
}
BClaims ...
func ExtractBClaims ¶
func ExtractBClaims(any interface{}) *BClaims
func (*BClaims) MarshalBinary ¶
MarshalBinary takes the BClaims object and returns the canonical byte slice
func (*BClaims) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*BClaims) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding BClaims object
type BlockHeader ¶
type BlockHeader struct {
BClaims *BClaims
SigGroup []byte
TxHshLst [][]byte
// Not Part of actual object below this line
GroupKey []byte
}
BlockHeader ...
func (*BlockHeader) BlockHash ¶
func (b *BlockHeader) BlockHash() ([]byte, error)
BlockHash returns the BlockHash of BlockHeader
func (*BlockHeader) GetRCert ¶
func (b *BlockHeader) GetRCert() (*RCert, error)
GetRCert returns the RCert for BlockHeader
func (*BlockHeader) MakeDeadRoundProposal ¶
func (b *BlockHeader) MakeDeadRoundProposal(rcert *RCert, headerRoot []byte) (*Proposal, error)
MakeDeadRoundProposal makes the proposal for the DeadBlockRound
func (*BlockHeader) MarshalBinary ¶
func (b *BlockHeader) MarshalBinary() ([]byte, error)
MarshalBinary takes the BlockHeader object and returns the canonical byte slice
func (*BlockHeader) MarshalCapn ¶
func (b *BlockHeader) MarshalCapn(seg *capnp.Segment) (mdefs.BlockHeader, error)
MarshalCapn marshals the object into its capnproto definition
func (*BlockHeader) UnmarshalBinary ¶
func (b *BlockHeader) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding BlockHeader object
func (*BlockHeader) UnmarshalBinaryUnsafe ¶
func (b *BlockHeader) UnmarshalBinaryUnsafe(data []byte) error
UnmarshalBinaryUnsafe unmarshals a BlockHeader in an unsafe manner; that is, we do not look at the TxHshLst. This is necessary during fast synchronization, as transactions are not synced.
func (*BlockHeader) UnmarshalCapn ¶
func (b *BlockHeader) UnmarshalCapn(bh mdefs.BlockHeader) error
UnmarshalCapn unmarshals the capnproto definition of the object
func (*BlockHeader) ValidateSignatures ¶
func (b *BlockHeader) ValidateSignatures(bnVal *crypto.BNGroupValidator) error
ValidateSignatures validates the TxRoot and group signature on the Blockheader
type BlockHeaderHashIndexKey ¶
BlockHeaderHashIndexKey ...
func (*BlockHeaderHashIndexKey) MarshalBinary ¶
func (b *BlockHeaderHashIndexKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the BlockHeaderHashIndexKey object and returns the canonical byte slice
func (*BlockHeaderHashIndexKey) UnmarshalBinary ¶
func (b *BlockHeaderHashIndexKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding BlockHeaderHashIndexKey object
type BlockHeaderHeightKey ¶
BlockHeaderHeightKey ...
func (*BlockHeaderHeightKey) MarshalBinary ¶
func (b *BlockHeaderHeightKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the BlockHeaderHeightKey object and returns the canonical byte slice
func (*BlockHeaderHeightKey) UnmarshalBinary ¶
func (b *BlockHeaderHeightKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding BlockHeaderHeightKey object
type EncryptedStore ¶
type EncryptedStore struct {
Kid []byte
Name []byte
// Not Part of actual object below this line
ClearText []byte
// contains filtered or unexported fields
}
EncryptedStore ...
func (*EncryptedStore) Decrypt ¶
func (b *EncryptedStore) Decrypt(resolver interfaces.KeyResolver) error
Decrypt decrypts b.cypherText and saves the result to b.ClearText
func (*EncryptedStore) Encrypt ¶
func (b *EncryptedStore) Encrypt(resolver interfaces.KeyResolver) error
Encrypt encrypts b.ClearText and writes the result to b.cypherText; afterwards, it zeros b.ClearText and sets its pointer to nil
func (*EncryptedStore) MarshalBinary ¶
func (b *EncryptedStore) MarshalBinary() ([]byte, error)
MarshalBinary takes the EncryptedStore object and returns the canonical byte slice
func (*EncryptedStore) MarshalCapn ¶
func (b *EncryptedStore) MarshalCapn(seg *capnp.Segment) (mdefs.EncryptedStore, error)
MarshalCapn marshals the object into its capnproto definition
func (*EncryptedStore) UnmarshalBinary ¶
func (b *EncryptedStore) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding EncryptedStore object
func (*EncryptedStore) UnmarshalCapn ¶
func (b *EncryptedStore) UnmarshalCapn(bh mdefs.EncryptedStore) error
UnmarshalCapn unmarshals the capnproto definition of the object
type NHClaims ¶
NHClaims ...
func (*NHClaims) MarshalBinary ¶
MarshalBinary takes the NHClaims object and returns the canonical byte slice
func (*NHClaims) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*NHClaims) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding NHClaims object
func (*NHClaims) UnmarshalCapn ¶
UnmarshalCapn unmarshals the capnproto definition of the object
func (*NHClaims) ValidateSignatures ¶
func (b *NHClaims) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error
type NRClaims ¶
NRClaims ...
func (*NRClaims) MarshalBinary ¶
MarshalBinary takes the NRClaims object and returns the canonical byte slice
func (*NRClaims) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*NRClaims) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding NRClaims object
func (*NRClaims) UnmarshalCapn ¶
UnmarshalCapn unmarshals the capnproto definition of the object
func (*NRClaims) ValidateSignatures ¶
func (b *NRClaims) ValidateSignatures(bnVal *crypto.BNGroupValidator) error
type NextHeight ¶
type NextHeight struct {
NHClaims *NHClaims
Signature []byte
PreCommits [][]byte
// Not Part of actual object below this line
Voter []byte
GroupKey []byte
Signers [][]byte
}
NextHeight ...
func (*NextHeight) MarshalBinary ¶
func (b *NextHeight) MarshalBinary() ([]byte, error)
MarshalBinary takes the NextHeight object and returns the canonical byte slice
func (*NextHeight) MarshalCapn ¶
func (b *NextHeight) MarshalCapn(seg *capnp.Segment) (mdefs.NextHeight, error)
MarshalCapn marshals the object into its capnproto definition
func (*NextHeight) Plagiarize ¶
func (b *NextHeight) Plagiarize(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) (*NextHeight, error)
func (*NextHeight) Sign ¶
func (b *NextHeight) Sign(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) error
func (*NextHeight) UnmarshalBinary ¶
func (b *NextHeight) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding NextHeight object
func (*NextHeight) UnmarshalCapn ¶
func (b *NextHeight) UnmarshalCapn(bh mdefs.NextHeight) error
UnmarshalCapn unmarshals the capnproto definition of the object
func (*NextHeight) ValidateSignatures ¶
func (b *NextHeight) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error
type NextHeightList ¶
type NextHeightList []*NextHeight
NextHeightList ...
func (NextHeightList) MakeBlockHeader ¶
func (nhl NextHeightList) MakeBlockHeader(bns *crypto.BNGroupSigner, groupShares [][]byte) (*BlockHeader, *RCert, error)
type NextRound ¶
type NextRound struct {
NRClaims *NRClaims
Signature []byte
// Not Part of actual object below this line
Voter []byte
GroupKey []byte
}
NextRound ...
func (*NextRound) MarshalBinary ¶
MarshalBinary takes the NextRound object and returns the canonical byte slice
func (*NextRound) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*NextRound) Sign ¶
func (b *NextRound) Sign(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) error
func (*NextRound) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding NextRound object
func (*NextRound) UnmarshalCapn ¶
UnmarshalCapn unmarshals the capnproto definition of the object
func (*NextRound) ValidateSignatures ¶
func (b *NextRound) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error
type NextRoundList ¶
type NextRoundList []*NextRound
NextRoundList ...
func (NextRoundList) MakeRoundCert ¶
func (nrl NextRoundList) MakeRoundCert(bns *crypto.BNGroupSigner, groupShares [][]byte) (*RCert, error)
type OwnState ¶
type OwnState struct {
VAddr []byte
GroupKey []byte
SyncToBH *BlockHeader
MaxBHSeen *BlockHeader
CanonicalSnapShot *BlockHeader
PendingSnapShot *BlockHeader
}
OwnState ...
func (*OwnState) MarshalBinary ¶
MarshalBinary takes the OwnState object and returns the canonical byte slice
func (*OwnState) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*OwnState) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding OwnState object
type OwnValidatingState ¶
type OwnValidatingState struct {
VAddr []byte
GroupKey []byte
RoundStarted int64
PreVoteStepStarted int64
PreCommitStepStarted int64
ValidValue *Proposal
LockedValue *Proposal
}
OwnValidatingState ...
func (*OwnValidatingState) DBRNRExpired ¶
func (b *OwnValidatingState) DBRNRExpired() bool
func (*OwnValidatingState) MarshalBinary ¶
func (b *OwnValidatingState) MarshalBinary() ([]byte, error)
MarshalBinary takes the OwnValidatingState object and returns the canonical byte slice
func (*OwnValidatingState) MarshalCapn ¶
func (b *OwnValidatingState) MarshalCapn(seg *capnp.Segment) (mdefs.OwnValidatingState, error)
MarshalCapn marshals the object into its capnproto definition
func (*OwnValidatingState) PCTOExpired ¶
func (b *OwnValidatingState) PCTOExpired() bool
func (*OwnValidatingState) PTOExpired ¶
func (b *OwnValidatingState) PTOExpired() bool
func (*OwnValidatingState) PVTOExpired ¶
func (b *OwnValidatingState) PVTOExpired() bool
func (*OwnValidatingState) SetPreCommitStepStarted ¶
func (b *OwnValidatingState) SetPreCommitStepStarted()
func (*OwnValidatingState) SetPreVoteStepStarted ¶
func (b *OwnValidatingState) SetPreVoteStepStarted()
func (*OwnValidatingState) SetRoundStarted ¶
func (b *OwnValidatingState) SetRoundStarted()
func (*OwnValidatingState) UnmarshalBinary ¶
func (b *OwnValidatingState) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding OwnValidatingState object
func (*OwnValidatingState) UnmarshalCapn ¶
func (b *OwnValidatingState) UnmarshalCapn(bh mdefs.OwnValidatingState) error
UnmarshalCapn unmarshals the capnproto definition of the object
type PClaims ¶
PClaims ...
func (*PClaims) MarshalBinary ¶
MarshalBinary takes the PClaims object and returns the canonical byte slice
func (*PClaims) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*PClaims) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding PClaims object
type PendingHdrLeafKey ¶
PendingHdrLeafKey ...
func (*PendingHdrLeafKey) MarshalBinary ¶
func (b *PendingHdrLeafKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the PendingHdrLeafKey object and returns the canonical byte slice
func (*PendingHdrLeafKey) UnmarshalBinary ¶
func (b *PendingHdrLeafKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding PendingHdrLeafKey object
type PendingLeafKey ¶
PendingLeafKey ...
func (*PendingLeafKey) MarshalBinary ¶
func (b *PendingLeafKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the PendingLeafKey object and returns the canonical byte slice
func (*PendingLeafKey) UnmarshalBinary ¶
func (b *PendingLeafKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding PendingLeafKey object
type PendingNodeKey ¶
PendingNodeKey ...
func (*PendingNodeKey) MarshalBinary ¶
func (b *PendingNodeKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the PendingNodeKey object and returns the canonical byte slice
func (*PendingNodeKey) UnmarshalBinary ¶
func (b *PendingNodeKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding PendingNodeKey object
type PreCommit ¶
type PreCommit struct {
Proposal *Proposal
Signature []byte
PreVotes [][]byte
// Not Part of actual object below this line
Voter []byte
Signers [][]byte
GroupKey []byte
Proposer []byte
}
PreCommit ...
func (*PreCommit) MakeImplPreVotes ¶
func (b *PreCommit) MakeImplPreVotes() (PreVoteList, error)
func (*PreCommit) MarshalBinary ¶
MarshalBinary takes the PreCommit object and returns the canonical byte slice
func (*PreCommit) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*PreCommit) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding PreCommit object
func (*PreCommit) UnmarshalCapn ¶
UnmarshalCapn unmarshals the capnproto definition of the object
func (*PreCommit) ValidateSignatures ¶
func (b *PreCommit) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error
type PreCommitList ¶
type PreCommitList []*PreCommit
func (PreCommitList) GetProposal ¶
func (pcl PreCommitList) GetProposal() (*Proposal, error)
func (PreCommitList) MakeNextHeight ¶
func (pcl PreCommitList) MakeNextHeight(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) (*NextHeight, error)
type PreCommitNil ¶
type PreCommitNil struct {
RCert *RCert
Signature []byte
// Not Part of actual object below this line
Voter []byte
GroupKey []byte
}
PreCommitNil ...
func (*PreCommitNil) MarshalBinary ¶
func (b *PreCommitNil) MarshalBinary() ([]byte, error)
MarshalBinary takes the PreCommitNil object and returns the canonical byte slice
func (*PreCommitNil) MarshalCapn ¶
func (b *PreCommitNil) MarshalCapn(seg *capnp.Segment) (mdefs.PreCommitNil, error)
MarshalCapn marshals the object into its capnproto definition
func (*PreCommitNil) UnmarshalBinary ¶
func (b *PreCommitNil) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding PreCommitNil object
func (*PreCommitNil) UnmarshalCapn ¶
func (b *PreCommitNil) UnmarshalCapn(bh mdefs.PreCommitNil) error
UnmarshalCapn unmarshals the capnproto definition of the object
func (*PreCommitNil) ValidateSignatures ¶
func (b *PreCommitNil) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error
type PreCommitNilList ¶
type PreCommitNilList []bool
type PreVote ¶
type PreVote struct {
Proposal *Proposal
Signature []byte
// Not Part of actual object below this line
Voter []byte
GroupKey []byte
}
PreVote ...
func (*PreVote) MarshalBinary ¶
MarshalBinary takes the PreVote object and returns the canonical byte slice
func (*PreVote) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*PreVote) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding PreVote object
func (*PreVote) UnmarshalCapn ¶
UnmarshalCapn unmarshals the capnproto definition of the object
func (*PreVote) ValidateSignatures ¶
func (b *PreVote) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error
type PreVoteList ¶
type PreVoteList []*PreVote
func (PreVoteList) GetProposal ¶
func (pvl PreVoteList) GetProposal() (*Proposal, error)
func (PreVoteList) MakePreCommit ¶
func (pvl PreVoteList) MakePreCommit(secpSigner *crypto.Secp256k1Signer) (*PreCommit, error)
type PreVoteNil ¶
type PreVoteNil struct {
RCert *RCert
Signature []byte
// Not Part of actual object below this line
Voter []byte
GroupKey []byte
}
PreVoteNil ...
func (*PreVoteNil) MarshalBinary ¶
func (b *PreVoteNil) MarshalBinary() ([]byte, error)
MarshalBinary takes the PreVoteNil object and returns the canonical byte slice
func (*PreVoteNil) MarshalCapn ¶
func (b *PreVoteNil) MarshalCapn(seg *capnp.Segment) (mdefs.PreVoteNil, error)
MarshalCapn marshals the object into its capnproto definition
func (*PreVoteNil) UnmarshalBinary ¶
func (b *PreVoteNil) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding PreVoteNil object
func (*PreVoteNil) UnmarshalCapn ¶
func (b *PreVoteNil) UnmarshalCapn(bh mdefs.PreVoteNil) error
UnmarshalCapn unmarshals the capnproto definition of the object
func (*PreVoteNil) ValidateSignatures ¶
func (b *PreVoteNil) ValidateSignatures(secpVal *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error
type PreVoteNilList ¶
type PreVoteNilList []bool
type Proposal ¶
type Proposal struct {
PClaims *PClaims
Signature []byte
TxHshLst [][]byte
// Not Part of actual object below this line
Proposer []byte
GroupKey []byte
}
Proposal ...
func (*Proposal) MarshalBinary ¶
MarshalBinary takes the Proposal object and returns the canonical byte slice
func (*Proposal) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*Proposal) PreVote ¶
func (b *Proposal) PreVote(secpSigner *crypto.Secp256k1Signer) (*PreVote, error)
func (*Proposal) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding Proposal object
func (*Proposal) UnmarshalCapn ¶
UnmarshalCapn unmarshals the capnproto definition of the object
func (*Proposal) ValidateSignatures ¶
func (b *Proposal) ValidateSignatures(val *crypto.Secp256k1Validator, bnVal *crypto.BNGroupValidator) error
type RCert ¶
type RCert struct {
RClaims *RClaims
SigGroup []byte
// Not Part of actual object below this line
GroupKey []byte
}
RCert ...
func ExtractRCert ¶
func ExtractRCert(any interface{}) *RCert
func ExtractRCertAny ¶
func (*RCert) MarshalBinary ¶
MarshalBinary takes the RCert object and returns the canonical byte slice
func (*RCert) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*RCert) NextRound ¶
func (b *RCert) NextRound(secpSigner *crypto.Secp256k1Signer, bnSigner *crypto.BNGroupSigner) (*NextRound, error)
NextRound constructs a NextRound object from RCert
func (*RCert) PreCommitNil ¶
func (b *RCert) PreCommitNil(secpSigner *crypto.Secp256k1Signer) (*PreCommitNil, error)
PreCommitNil constructs a PreCommitNil object from RCert
func (*RCert) PreVoteNil ¶
func (b *RCert) PreVoteNil(secpSigner *crypto.Secp256k1Signer) (*PreVoteNil, error)
PreVoteNil constructs a PreVoteNil object from RCert
func (*RCert) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding RCert object
func (*RCert) UnmarshalCapn ¶
UnmarshalCapn unmarshals the capnproto definition of the object
func (*RCert) ValidateSignature ¶
func (b *RCert) ValidateSignature(bnVal *crypto.BNGroupValidator) error
ValidateSignature validates the group signature on the RCert
type RClaims ¶
RClaims ...
func (*RClaims) MarshalBinary ¶
MarshalBinary takes the RClaims object and returns the canonical byte slice
func (*RClaims) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*RClaims) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding RClaims object
type RoundState ¶
type RoundState struct {
VAddr []byte
GroupKey []byte
GroupIdx uint8
RCert *RCert
ConflictingRCert *RCert
Proposal *Proposal
ConflictingProposal *Proposal
PreVote *PreVote
ConflictingPreVote *PreVote
PreVoteNil *PreVoteNil
ImplicitPVN bool
PreCommit *PreCommit
ConflictingPreCommit *PreCommit
PreCommitNil *PreCommitNil
ImplicitPCN bool
NextRound *NextRound
NextHeight *NextHeight
ConflictingNextHeight *NextHeight
}
RoundState ...
func (*RoundState) CurrentH ¶
func (b *RoundState) CurrentH(a *RCert) bool
func (*RoundState) CurrentHR ¶
func (b *RoundState) CurrentHR(a *RCert) bool
func (*RoundState) FutureH ¶
func (b *RoundState) FutureH(a *RCert) bool
func (*RoundState) FutureHR ¶
func (b *RoundState) FutureHR(a *RCert) bool
func (*RoundState) MarshalBinary ¶
func (b *RoundState) MarshalBinary() ([]byte, error)
MarshalBinary takes the RoundState object and returns the canonical byte slice
func (*RoundState) MarshalCapn ¶
func (b *RoundState) MarshalCapn(seg *capnp.Segment) (mdefs.RoundState, error)
MarshalCapn marshals the object into its capnproto definition
func (*RoundState) NHCurrent ¶
func (b *RoundState) NHCurrent(a *RCert) bool
func (*RoundState) NRCurrent ¶
func (b *RoundState) NRCurrent(a *RCert) bool
func (*RoundState) PCCurrent ¶
func (b *RoundState) PCCurrent(a *RCert) bool
func (*RoundState) PCNCurrent ¶
func (b *RoundState) PCNCurrent(a *RCert) bool
func (*RoundState) PCurrent ¶
func (b *RoundState) PCurrent(a *RCert) bool
func (*RoundState) PVCurrent ¶
func (b *RoundState) PVCurrent(a *RCert) bool
func (*RoundState) PVNCurrent ¶
func (b *RoundState) PVNCurrent(a *RCert) bool
func (*RoundState) Reset ¶
func (b *RoundState) Reset()
func (*RoundState) SetNextHeight ¶
func (b *RoundState) SetNextHeight(v *NextHeight) (bool, error)
func (*RoundState) SetNextRound ¶
func (b *RoundState) SetNextRound(v *NextRound) (bool, error)
func (*RoundState) SetPreCommit ¶
func (b *RoundState) SetPreCommit(v *PreCommit) (bool, error)
func (*RoundState) SetPreCommitNil ¶
func (b *RoundState) SetPreCommitNil(v *PreCommitNil) (bool, error)
func (*RoundState) SetPreVote ¶
func (b *RoundState) SetPreVote(v *PreVote) (bool, error)
func (*RoundState) SetPreVoteNil ¶
func (b *RoundState) SetPreVoteNil(v *PreVoteNil) (bool, error)
func (*RoundState) SetProposal ¶
func (b *RoundState) SetProposal(v *Proposal) (bool, error)
func (*RoundState) SetRCert ¶
func (b *RoundState) SetRCert(rc *RCert) error
func (*RoundState) TrackExternalConflicts ¶
func (b *RoundState) TrackExternalConflicts(v *Proposal)
func (*RoundState) UnmarshalBinary ¶
func (b *RoundState) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding RoundState object
func (*RoundState) UnmarshalCapn ¶
func (b *RoundState) UnmarshalCapn(bh mdefs.RoundState) error
UnmarshalCapn unmarshals the capnproto definition of the object
type RoundStateCurrentKey ¶
RoundStateCurrentKey ...
func (*RoundStateCurrentKey) MarshalBinary ¶
func (b *RoundStateCurrentKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the RoundStateCurrentKey object and returns the canonical byte slice
func (*RoundStateCurrentKey) UnmarshalBinary ¶
func (b *RoundStateCurrentKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding RoundStateCurrentKey object
type RoundStateHistoricKey ¶
RoundStateHistoricKey ...
func (*RoundStateHistoricKey) MakeIterKey ¶
func (b *RoundStateHistoricKey) MakeIterKey() ([]byte, error)
MakeIterKey ...
func (*RoundStateHistoricKey) MarshalBinary ¶
func (b *RoundStateHistoricKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the RoundStateHistoricKey object and returns the canonical byte slice
func (*RoundStateHistoricKey) UnmarshalBinary ¶
func (b *RoundStateHistoricKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding RoundStateHistoricKey object
type SafeToProceedKey ¶
SafeToProceedKey ...
func (*SafeToProceedKey) MarshalBinary ¶
func (b *SafeToProceedKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the SafeToProceedKey object and returns the canonical byte slice
func (*SafeToProceedKey) UnmarshalBinary ¶
func (b *SafeToProceedKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding SafeToProceedKey object
type StagedBlockHeaderKey ¶
StagedBlockHeaderKey ...
func (*StagedBlockHeaderKey) MarshalBinary ¶
func (b *StagedBlockHeaderKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the StagedBlockHeaderKey object and returns the canonical byte slice
func (*StagedBlockHeaderKey) UnmarshalBinary ¶
func (b *StagedBlockHeaderKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding StagedBlockHeaderKey object
type TxCacheKey ¶
TxCacheKey ...
func (*TxCacheKey) MarshalBinary ¶
func (b *TxCacheKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the TxCacheKey object and returns the canonical byte slice
func (*TxCacheKey) UnmarshalBinary ¶
func (b *TxCacheKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding TxCacheKey object
type Validator ¶
type Validator struct {
VAddr []byte
}
Validator ...
func (*Validator) MarshalBinary ¶
MarshalBinary takes the Validator object and returns the canonical byte slice
func (*Validator) MarshalCapn ¶
MarshalCapn marshals the object into its capnproto definition
func (*Validator) UnmarshalBinary ¶
UnmarshalBinary takes a byte slice and returns the corresponding Validator object
type ValidatorSet ¶
type ValidatorSet struct {
Validators []*Validator
GroupKey []byte
NotBefore uint32
// Not Part of actual object below this line
ValidatorVAddrMap map[string]int
ValidatorVAddrSet map[string]bool
}
ValidatorSet ...
func (*ValidatorSet) GroupShareIdx ¶
func (b *ValidatorSet) GroupShareIdx(groupShare []byte) (bool, int)
func (*ValidatorSet) IsGroupShareValidator ¶
func (b *ValidatorSet) IsGroupShareValidator(groupShare []byte) bool
func (*ValidatorSet) IsVAddrValidator ¶
func (b *ValidatorSet) IsVAddrValidator(addr []byte) bool
func (*ValidatorSet) IsValidTriplet ¶
func (b *ValidatorSet) IsValidTriplet(vAddr []byte, groupShare []byte, groupKey []byte) bool
func (*ValidatorSet) IsValidTuple ¶
func (b *ValidatorSet) IsValidTuple(vAddr []byte, groupKey []byte) bool
func (*ValidatorSet) MarshalBinary ¶
func (b *ValidatorSet) MarshalBinary() ([]byte, error)
MarshalBinary takes the ValidatorSet object and returns the canonical byte slice
func (*ValidatorSet) MarshalCapn ¶
func (b *ValidatorSet) MarshalCapn(seg *capnp.Segment) (mdefs.ValidatorSet, error)
MarshalCapn marshals the object into its capnproto definition
func (*ValidatorSet) UnmarshalBinary ¶
func (b *ValidatorSet) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding ValidatorSet object
func (*ValidatorSet) UnmarshalCapn ¶
func (b *ValidatorSet) UnmarshalCapn(bh mdefs.ValidatorSet) error
UnmarshalCapn unmarshals the capnproto definition of the object
type ValidatorSetKey ¶
ValidatorSetKey ...
func (*ValidatorSetKey) MarshalBinary ¶
func (b *ValidatorSetKey) MarshalBinary() ([]byte, error)
MarshalBinary takes the ValidatorSetKey object and returns the canonical byte slice
func (*ValidatorSetKey) UnmarshalBinary ¶
func (b *ValidatorSetKey) UnmarshalBinary(data []byte) error
UnmarshalBinary takes a byte slice and returns the corresponding ValidatorSetKey object