Documentation ¶
Overview ¶
Package v2 is used for tendermint v0.34.22 and its compatible version.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeLightBlockValidationResult ¶
output: | validatorSetChanged | empty | consensusStateBytesLength | new consensusState | | 1 byte | 23 bytes | 8 bytes | |
Types ¶
type ConsensusState ¶
type ConsensusState struct { ChainID string Height uint64 NextValidatorSetHash []byte ValidatorSet *types.ValidatorSet }
func DecodeConsensusState ¶
func DecodeConsensusState(input []byte) (ConsensusState, error)
input: | chainID | height | nextValidatorSetHash | [{validator pubkey, voting power, relayer address, relayer bls pubkey}] | | 32 bytes | 8 bytes | 32 bytes | [{32 bytes, 8 bytes, 20 bytes, 48 bytes}] |
func DecodeLightBlockValidationInput ¶
func DecodeLightBlockValidationInput(input []byte) (*ConsensusState, *types.LightBlock, error)
input: consensus state length | consensus state | light block | 32 bytes | | |
func (*ConsensusState) ApplyLightBlock ¶
func (cs *ConsensusState) ApplyLightBlock(block *types.LightBlock, isHertz bool) (bool, error)
func (ConsensusState) EncodeConsensusState ¶
func (cs ConsensusState) EncodeConsensusState() ([]byte, error)
output: | chainID | height | nextValidatorSetHash | [{validator pubkey, voting power, relayer address, relayer bls pubkey}] | | 32 bytes | 8 bytes | 32 bytes | [{32 bytes, 8 bytes, 20 bytes, 48 bytes}] |