Documentation ¶
Overview ¶
Package types defines types to handle IBC handshakes in Network modules
Package types defines types for monitored validator activities ¶
Package types defines types to handle IBC handshakes in Network modules
Index ¶
- Constants
- Variables
- func CheckValidatorSetHash(valSet tmtypes.ValidatorSet, consensusState ibctmtypes.ConsensusState) bool
- func UintBytes(v uint64) []byte
- type ConsensusState
- func (*ConsensusState) Descriptor() ([]byte, []int)
- func (cs *ConsensusState) Equal(cmp *ConsensusState) bool
- func (m *ConsensusState) GetNextValidatorsHash() string
- func (m *ConsensusState) GetRoot() MerkleRoot
- func (m *ConsensusState) GetTimestamp() string
- func (m *ConsensusState) Marshal() (dAtA []byte, err error)
- func (m *ConsensusState) MarshalTo(dAtA []byte) (int, error)
- func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConsensusState) ProtoMessage()
- func (m *ConsensusState) Reset()
- func (cs ConsensusState) RootHash() string
- func (m *ConsensusState) Size() (n int)
- func (m *ConsensusState) String() string
- func (cs ConsensusState) ToTendermintConsensusState() (ibctm.ConsensusState, error)
- func (m *ConsensusState) Unmarshal(dAtA []byte) error
- func (m *ConsensusState) XXX_DiscardUnknown()
- func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConsensusState) XXX_Merge(src proto.Message)
- func (m *ConsensusState) XXX_Size() int
- func (m *ConsensusState) XXX_Unmarshal(b []byte) error
- type MerkleRoot
- func (*MerkleRoot) Descriptor() ([]byte, []int)
- func (m *MerkleRoot) GetHash() string
- func (m *MerkleRoot) Marshal() (dAtA []byte, err error)
- func (m *MerkleRoot) MarshalTo(dAtA []byte) (int, error)
- func (m *MerkleRoot) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MerkleRoot) ProtoMessage()
- func (m *MerkleRoot) Reset()
- func (m *MerkleRoot) Size() (n int)
- func (m *MerkleRoot) String() string
- func (m *MerkleRoot) Unmarshal(dAtA []byte) error
- func (m *MerkleRoot) XXX_DiscardUnknown()
- func (m *MerkleRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MerkleRoot) XXX_Merge(src proto.Message)
- func (m *MerkleRoot) XXX_Size() int
- func (m *MerkleRoot) XXX_Unmarshal(b []byte) error
- type MonitoringPacket
- func (*MonitoringPacket) Descriptor() ([]byte, []int)
- func (m *MonitoringPacket) GetBlockHeight() int64
- func (m *MonitoringPacket) GetSignatureCounts() SignatureCounts
- func (m *MonitoringPacket) Marshal() (dAtA []byte, err error)
- func (m *MonitoringPacket) MarshalTo(dAtA []byte) (int, error)
- func (m *MonitoringPacket) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MonitoringPacket) ProtoMessage()
- func (m *MonitoringPacket) Reset()
- func (m *MonitoringPacket) Size() (n int)
- func (m *MonitoringPacket) String() string
- func (m *MonitoringPacket) Unmarshal(dAtA []byte) error
- func (m MonitoringPacket) ValidateBasic() error
- func (m *MonitoringPacket) XXX_DiscardUnknown()
- func (m *MonitoringPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MonitoringPacket) XXX_Merge(src proto.Message)
- func (m *MonitoringPacket) XXX_Size() int
- func (m *MonitoringPacket) XXX_Unmarshal(b []byte) error
- type MonitoringPacketAck
- func (*MonitoringPacketAck) Descriptor() ([]byte, []int)
- func (m *MonitoringPacketAck) Marshal() (dAtA []byte, err error)
- func (m *MonitoringPacketAck) MarshalTo(dAtA []byte) (int, error)
- func (m *MonitoringPacketAck) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MonitoringPacketAck) ProtoMessage()
- func (m *MonitoringPacketAck) Reset()
- func (m *MonitoringPacketAck) Size() (n int)
- func (m *MonitoringPacketAck) String() string
- func (m *MonitoringPacketAck) Unmarshal(dAtA []byte) error
- func (m *MonitoringPacketAck) XXX_DiscardUnknown()
- func (m *MonitoringPacketAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MonitoringPacketAck) XXX_Merge(src proto.Message)
- func (m *MonitoringPacketAck) XXX_Size() int
- func (m *MonitoringPacketAck) XXX_Unmarshal(b []byte) error
- type MonitoringPacketData
- func (*MonitoringPacketData) Descriptor() ([]byte, []int)
- func (m *MonitoringPacketData) GetMonitoringPacket() *MonitoringPacket
- func (m *MonitoringPacketData) GetPacket() isMonitoringPacketData_Packet
- func (m *MonitoringPacketData) Marshal() (dAtA []byte, err error)
- func (m *MonitoringPacketData) MarshalTo(dAtA []byte) (int, error)
- func (m *MonitoringPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MonitoringPacketData) ProtoMessage()
- func (m *MonitoringPacketData) Reset()
- func (m *MonitoringPacketData) Size() (n int)
- func (m *MonitoringPacketData) String() string
- func (m *MonitoringPacketData) Unmarshal(dAtA []byte) error
- func (m *MonitoringPacketData) XXX_DiscardUnknown()
- func (m *MonitoringPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MonitoringPacketData) XXX_Merge(src proto.Message)
- func (*MonitoringPacketData) XXX_OneofWrappers() []interface{}
- func (m *MonitoringPacketData) XXX_Size() int
- func (m *MonitoringPacketData) XXX_Unmarshal(b []byte) error
- type MonitoringPacketData_MonitoringPacket
- type PubKey
- func (*PubKey) Descriptor() ([]byte, []int)
- func (m *PubKey) GetType() string
- func (m *PubKey) GetValue() string
- func (m *PubKey) Marshal() (dAtA []byte, err error)
- func (m *PubKey) MarshalTo(dAtA []byte) (int, error)
- func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PubKey) ProtoMessage()
- func (m *PubKey) Reset()
- func (m *PubKey) Size() (n int)
- func (m *PubKey) String() string
- func (m *PubKey) Unmarshal(dAtA []byte) error
- func (m *PubKey) XXX_DiscardUnknown()
- func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PubKey) XXX_Merge(src proto.Message)
- func (m *PubKey) XXX_Size() int
- func (m *PubKey) XXX_Unmarshal(b []byte) error
- type SignatureCount
- func (*SignatureCount) Descriptor() ([]byte, []int)
- func (m *SignatureCount) GetOpAddress() string
- func (m SignatureCount) GetOperatorAddress(accountPrefix string) (string, error)
- func (m *SignatureCount) Marshal() (dAtA []byte, err error)
- func (m *SignatureCount) MarshalTo(dAtA []byte) (int, error)
- func (m *SignatureCount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SignatureCount) ProtoMessage()
- func (m *SignatureCount) Reset()
- func (m *SignatureCount) Size() (n int)
- func (m *SignatureCount) String() string
- func (m *SignatureCount) Unmarshal(dAtA []byte) error
- func (m *SignatureCount) XXX_DiscardUnknown()
- func (m *SignatureCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignatureCount) XXX_Merge(src proto.Message)
- func (m *SignatureCount) XXX_Size() int
- func (m *SignatureCount) XXX_Unmarshal(b []byte) error
- type SignatureCounts
- func (m *SignatureCounts) AddSignature(opAddress string, validatorSetSize int64)
- func (*SignatureCounts) Descriptor() ([]byte, []int)
- func (m *SignatureCounts) GetBlockCount() uint64
- func (m *SignatureCounts) GetCounts() []SignatureCount
- func (m *SignatureCounts) Marshal() (dAtA []byte, err error)
- func (m *SignatureCounts) MarshalTo(dAtA []byte) (int, error)
- func (m *SignatureCounts) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SignatureCounts) ProtoMessage()
- func (m *SignatureCounts) Reset()
- func (m *SignatureCounts) Size() (n int)
- func (m *SignatureCounts) String() string
- func (m *SignatureCounts) Unmarshal(dAtA []byte) error
- func (m SignatureCounts) Validate() error
- func (m *SignatureCounts) XXX_DiscardUnknown()
- func (m *SignatureCounts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SignatureCounts) XXX_Merge(src proto.Message)
- func (m *SignatureCounts) XXX_Size() int
- func (m *SignatureCounts) XXX_Unmarshal(b []byte) error
- type Validator
- func (*Validator) Descriptor() ([]byte, []int)
- func (m *Validator) GetProposerPriority() string
- func (m *Validator) GetPubKey() PubKey
- func (m *Validator) GetVotingPower() string
- func (m *Validator) Marshal() (dAtA []byte, err error)
- func (m *Validator) MarshalTo(dAtA []byte) (int, error)
- func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Validator) ProtoMessage()
- func (m *Validator) Reset()
- func (m *Validator) Size() (n int)
- func (m *Validator) String() string
- func (m *Validator) Unmarshal(dAtA []byte) error
- func (m *Validator) XXX_DiscardUnknown()
- func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Validator) XXX_Merge(src proto.Message)
- func (m *Validator) XXX_Size() int
- func (m *Validator) XXX_Unmarshal(b []byte) error
- type ValidatorSet
- func (*ValidatorSet) Descriptor() ([]byte, []int)
- func (m *ValidatorSet) GetValidators() []Validator
- func (m *ValidatorSet) Marshal() (dAtA []byte, err error)
- func (m *ValidatorSet) MarshalTo(dAtA []byte) (int, error)
- func (m *ValidatorSet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ValidatorSet) ProtoMessage()
- func (m *ValidatorSet) Reset()
- func (m *ValidatorSet) Size() (n int)
- func (m *ValidatorSet) String() string
- func (vs ValidatorSet) ToTendermintValidatorSet() (valSet tmtypes.ValidatorSet, err error)
- func (m *ValidatorSet) Unmarshal(dAtA []byte) error
- func (m *ValidatorSet) XXX_DiscardUnknown()
- func (m *ValidatorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorSet) XXX_Merge(src proto.Message)
- func (m *ValidatorSet) XXX_Size() int
- func (m *ValidatorSet) XXX_Unmarshal(b []byte) error
Constants ¶
const ( // AccountAddressPrefix is the prefix used for account bech32 addresses AccountAddressPrefix = "spn" // Name is the name of the application Name = "spn" // DefaultChainID is the default chain ID used DefaultChainID = "spn-1" // DefaultUnbondingPeriod is the default unbonding time in seconds // 1814400 represents 21 days DefaultUnbondingPeriod = 1814400 // MinimalUnbondingPeriod is the minimal unbonding time that can be set for a chain // it must greater than 1 because trusting period for the IBC client is unbonding period - 1 // and trusting period can't be 0 MinimalUnbondingPeriod = 2 // DefaultRevisionHeight is the revision height used by default for creating the monitoring IBC client DefaultRevisionHeight = 1 TotalShareNumber = 100000 )
const TypeEd25519 = "tendermint/PubKeyEd25519"
Variables ¶
Functions ¶
func CheckValidatorSetHash ¶
func CheckValidatorSetHash(valSet tmtypes.ValidatorSet, consensusState ibctmtypes.ConsensusState) bool
CheckValidatorSetHash checks the Tendermint validator set hash matches the Tendermint consensus state next validator set hash
Types ¶
type ConsensusState ¶
type ConsensusState struct { NextValidatorsHash string `protobuf:"bytes,1,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Root MerkleRoot `protobuf:"bytes,3,opt,name=root,proto3" json:"root"` }
ConsensusState represents a Consensus State it is compatible with the dumped state from `appd q ibc client self-consensus-state` command
func NewConsensusState ¶
func NewConsensusState(timestamp, nextValHash, rootHash string) ConsensusState
NewConsensusState initializes a new consensus state
func ParseConsensusStateFromFile ¶
func ParseConsensusStateFromFile(filePath string) (ConsensusState, error)
ParseConsensusStateFromFile parses a YAML dumped Consensus State file and returns a new Consensus State TODO: Improve method and support other format than YAML if there are other format of dumped file
func (*ConsensusState) Descriptor ¶
func (*ConsensusState) Descriptor() ([]byte, []int)
func (*ConsensusState) Equal ¶
func (cs *ConsensusState) Equal(cmp *ConsensusState) bool
Equal compares IBC Tendermint Consensus State.
func (*ConsensusState) GetNextValidatorsHash ¶
func (m *ConsensusState) GetNextValidatorsHash() string
func (*ConsensusState) GetRoot ¶
func (m *ConsensusState) GetRoot() MerkleRoot
func (*ConsensusState) GetTimestamp ¶
func (m *ConsensusState) GetTimestamp() string
func (*ConsensusState) Marshal ¶
func (m *ConsensusState) Marshal() (dAtA []byte, err error)
func (*ConsensusState) MarshalToSizedBuffer ¶
func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConsensusState) ProtoMessage ¶
func (*ConsensusState) ProtoMessage()
func (*ConsensusState) Reset ¶
func (m *ConsensusState) Reset()
func (ConsensusState) RootHash ¶
func (cs ConsensusState) RootHash() string
RootHash returns the Merkle Root hash of the Consensus State
func (*ConsensusState) Size ¶
func (m *ConsensusState) Size() (n int)
func (*ConsensusState) String ¶
func (m *ConsensusState) String() string
func (ConsensusState) ToTendermintConsensusState ¶
func (cs ConsensusState) ToTendermintConsensusState() (ibctm.ConsensusState, error)
ToTendermintConsensusState returns a new IBC Tendermint Consensus State
func (*ConsensusState) Unmarshal ¶
func (m *ConsensusState) Unmarshal(dAtA []byte) error
func (*ConsensusState) XXX_DiscardUnknown ¶
func (m *ConsensusState) XXX_DiscardUnknown()
func (*ConsensusState) XXX_Marshal ¶
func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConsensusState) XXX_Merge ¶
func (m *ConsensusState) XXX_Merge(src proto.Message)
func (*ConsensusState) XXX_Size ¶
func (m *ConsensusState) XXX_Size() int
func (*ConsensusState) XXX_Unmarshal ¶
func (m *ConsensusState) XXX_Unmarshal(b []byte) error
type MerkleRoot ¶
type MerkleRoot struct {
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
}
MerkleRoot represents a Merkle Root in ConsensusState
func (*MerkleRoot) Descriptor ¶
func (*MerkleRoot) Descriptor() ([]byte, []int)
func (*MerkleRoot) GetHash ¶
func (m *MerkleRoot) GetHash() string
func (*MerkleRoot) Marshal ¶
func (m *MerkleRoot) Marshal() (dAtA []byte, err error)
func (*MerkleRoot) MarshalToSizedBuffer ¶
func (m *MerkleRoot) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MerkleRoot) ProtoMessage ¶
func (*MerkleRoot) ProtoMessage()
func (*MerkleRoot) Reset ¶
func (m *MerkleRoot) Reset()
func (*MerkleRoot) Size ¶
func (m *MerkleRoot) Size() (n int)
func (*MerkleRoot) String ¶
func (m *MerkleRoot) String() string
func (*MerkleRoot) Unmarshal ¶
func (m *MerkleRoot) Unmarshal(dAtA []byte) error
func (*MerkleRoot) XXX_DiscardUnknown ¶
func (m *MerkleRoot) XXX_DiscardUnknown()
func (*MerkleRoot) XXX_Marshal ¶
func (m *MerkleRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MerkleRoot) XXX_Merge ¶
func (m *MerkleRoot) XXX_Merge(src proto.Message)
func (*MerkleRoot) XXX_Size ¶
func (m *MerkleRoot) XXX_Size() int
func (*MerkleRoot) XXX_Unmarshal ¶
func (m *MerkleRoot) XXX_Unmarshal(b []byte) error
type MonitoringPacket ¶
type MonitoringPacket struct { BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` SignatureCounts SignatureCounts `protobuf:"bytes,2,opt,name=signature_counts,json=signatureCounts,proto3" json:"signature_counts"` }
MonitoringPacket is the packet sent over IBC that contains all the signature counts
func (*MonitoringPacket) Descriptor ¶
func (*MonitoringPacket) Descriptor() ([]byte, []int)
func (*MonitoringPacket) GetBlockHeight ¶
func (m *MonitoringPacket) GetBlockHeight() int64
func (*MonitoringPacket) GetSignatureCounts ¶
func (m *MonitoringPacket) GetSignatureCounts() SignatureCounts
func (*MonitoringPacket) Marshal ¶
func (m *MonitoringPacket) Marshal() (dAtA []byte, err error)
func (*MonitoringPacket) MarshalToSizedBuffer ¶
func (m *MonitoringPacket) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MonitoringPacket) ProtoMessage ¶
func (*MonitoringPacket) ProtoMessage()
func (*MonitoringPacket) Reset ¶
func (m *MonitoringPacket) Reset()
func (*MonitoringPacket) Size ¶
func (m *MonitoringPacket) Size() (n int)
func (*MonitoringPacket) String ¶
func (m *MonitoringPacket) String() string
func (*MonitoringPacket) Unmarshal ¶
func (m *MonitoringPacket) Unmarshal(dAtA []byte) error
func (MonitoringPacket) ValidateBasic ¶
func (m MonitoringPacket) ValidateBasic() error
func (*MonitoringPacket) XXX_DiscardUnknown ¶
func (m *MonitoringPacket) XXX_DiscardUnknown()
func (*MonitoringPacket) XXX_Marshal ¶
func (m *MonitoringPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MonitoringPacket) XXX_Merge ¶
func (m *MonitoringPacket) XXX_Merge(src proto.Message)
func (*MonitoringPacket) XXX_Size ¶
func (m *MonitoringPacket) XXX_Size() int
func (*MonitoringPacket) XXX_Unmarshal ¶
func (m *MonitoringPacket) XXX_Unmarshal(b []byte) error
type MonitoringPacketAck ¶
type MonitoringPacketAck struct { }
MonitoringPacketAck defines a struct for the packet acknowledgment
func (*MonitoringPacketAck) Descriptor ¶
func (*MonitoringPacketAck) Descriptor() ([]byte, []int)
func (*MonitoringPacketAck) Marshal ¶
func (m *MonitoringPacketAck) Marshal() (dAtA []byte, err error)
func (*MonitoringPacketAck) MarshalTo ¶
func (m *MonitoringPacketAck) MarshalTo(dAtA []byte) (int, error)
func (*MonitoringPacketAck) MarshalToSizedBuffer ¶
func (m *MonitoringPacketAck) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MonitoringPacketAck) ProtoMessage ¶
func (*MonitoringPacketAck) ProtoMessage()
func (*MonitoringPacketAck) Reset ¶
func (m *MonitoringPacketAck) Reset()
func (*MonitoringPacketAck) Size ¶
func (m *MonitoringPacketAck) Size() (n int)
func (*MonitoringPacketAck) String ¶
func (m *MonitoringPacketAck) String() string
func (*MonitoringPacketAck) Unmarshal ¶
func (m *MonitoringPacketAck) Unmarshal(dAtA []byte) error
func (*MonitoringPacketAck) XXX_DiscardUnknown ¶
func (m *MonitoringPacketAck) XXX_DiscardUnknown()
func (*MonitoringPacketAck) XXX_Marshal ¶
func (m *MonitoringPacketAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MonitoringPacketAck) XXX_Merge ¶
func (m *MonitoringPacketAck) XXX_Merge(src proto.Message)
func (*MonitoringPacketAck) XXX_Size ¶
func (m *MonitoringPacketAck) XXX_Size() int
func (*MonitoringPacketAck) XXX_Unmarshal ¶
func (m *MonitoringPacketAck) XXX_Unmarshal(b []byte) error
type MonitoringPacketData ¶
type MonitoringPacketData struct { // Types that are valid to be assigned to Packet: // *MonitoringPacketData_MonitoringPacket Packet isMonitoringPacketData_Packet `protobuf_oneof:"packet"` }
MonitoringPacketData is the IBC packet for monitoring modules
func (*MonitoringPacketData) Descriptor ¶
func (*MonitoringPacketData) Descriptor() ([]byte, []int)
func (*MonitoringPacketData) GetMonitoringPacket ¶
func (m *MonitoringPacketData) GetMonitoringPacket() *MonitoringPacket
func (*MonitoringPacketData) GetPacket ¶
func (m *MonitoringPacketData) GetPacket() isMonitoringPacketData_Packet
func (*MonitoringPacketData) Marshal ¶
func (m *MonitoringPacketData) Marshal() (dAtA []byte, err error)
func (*MonitoringPacketData) MarshalTo ¶
func (m *MonitoringPacketData) MarshalTo(dAtA []byte) (int, error)
func (*MonitoringPacketData) MarshalToSizedBuffer ¶
func (m *MonitoringPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MonitoringPacketData) ProtoMessage ¶
func (*MonitoringPacketData) ProtoMessage()
func (*MonitoringPacketData) Reset ¶
func (m *MonitoringPacketData) Reset()
func (*MonitoringPacketData) Size ¶
func (m *MonitoringPacketData) Size() (n int)
func (*MonitoringPacketData) String ¶
func (m *MonitoringPacketData) String() string
func (*MonitoringPacketData) Unmarshal ¶
func (m *MonitoringPacketData) Unmarshal(dAtA []byte) error
func (*MonitoringPacketData) XXX_DiscardUnknown ¶
func (m *MonitoringPacketData) XXX_DiscardUnknown()
func (*MonitoringPacketData) XXX_Marshal ¶
func (m *MonitoringPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MonitoringPacketData) XXX_Merge ¶
func (m *MonitoringPacketData) XXX_Merge(src proto.Message)
func (*MonitoringPacketData) XXX_OneofWrappers ¶
func (*MonitoringPacketData) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*MonitoringPacketData) XXX_Size ¶
func (m *MonitoringPacketData) XXX_Size() int
func (*MonitoringPacketData) XXX_Unmarshal ¶
func (m *MonitoringPacketData) XXX_Unmarshal(b []byte) error
type MonitoringPacketData_MonitoringPacket ¶
type MonitoringPacketData_MonitoringPacket struct {
MonitoringPacket *MonitoringPacket `protobuf:"bytes,1,opt,name=monitoring_packet,json=monitoringPacket,proto3,oneof" json:"monitoring_packet,omitempty"`
}
func (*MonitoringPacketData_MonitoringPacket) MarshalTo ¶
func (m *MonitoringPacketData_MonitoringPacket) MarshalTo(dAtA []byte) (int, error)
func (*MonitoringPacketData_MonitoringPacket) MarshalToSizedBuffer ¶
func (m *MonitoringPacketData_MonitoringPacket) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MonitoringPacketData_MonitoringPacket) Size ¶
func (m *MonitoringPacketData_MonitoringPacket) Size() (n int)
type PubKey ¶
type PubKey struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
PubKey represents a public key in Validator
func (*PubKey) Descriptor ¶
func (*PubKey) MarshalToSizedBuffer ¶
func (*PubKey) ProtoMessage ¶
func (*PubKey) ProtoMessage()
func (*PubKey) XXX_DiscardUnknown ¶
func (m *PubKey) XXX_DiscardUnknown()
func (*PubKey) XXX_Marshal ¶
func (*PubKey) XXX_Unmarshal ¶
type SignatureCount ¶
type SignatureCount struct { OpAddress string `protobuf:"bytes,1,opt,name=op_address,json=opAddress,proto3" json:"op_address,omitempty"` RelativeSignatures cosmossdk_io_math.LegacyDec `` /* 144-byte string literal not displayed */ }
SignatureCount contains information of signature reporting for one specific validator with consensus address RelativeSignatures is the sum of all signatures relative to the validator set size
func (*SignatureCount) Descriptor ¶
func (*SignatureCount) Descriptor() ([]byte, []int)
func (*SignatureCount) GetOpAddress ¶
func (m *SignatureCount) GetOpAddress() string
func (SignatureCount) GetOperatorAddress ¶
func (m SignatureCount) GetOperatorAddress(accountPrefix string) (string, error)
GetOperatorAddress returns the operator address for the signer with the Network prefix format
func (*SignatureCount) Marshal ¶
func (m *SignatureCount) Marshal() (dAtA []byte, err error)
func (*SignatureCount) MarshalToSizedBuffer ¶
func (m *SignatureCount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignatureCount) ProtoMessage ¶
func (*SignatureCount) ProtoMessage()
func (*SignatureCount) Reset ¶
func (m *SignatureCount) Reset()
func (*SignatureCount) Size ¶
func (m *SignatureCount) Size() (n int)
func (*SignatureCount) String ¶
func (m *SignatureCount) String() string
func (*SignatureCount) Unmarshal ¶
func (m *SignatureCount) Unmarshal(dAtA []byte) error
func (*SignatureCount) XXX_DiscardUnknown ¶
func (m *SignatureCount) XXX_DiscardUnknown()
func (*SignatureCount) XXX_Marshal ¶
func (m *SignatureCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SignatureCount) XXX_Merge ¶
func (m *SignatureCount) XXX_Merge(src proto.Message)
func (*SignatureCount) XXX_Size ¶
func (m *SignatureCount) XXX_Size() int
func (*SignatureCount) XXX_Unmarshal ¶
func (m *SignatureCount) XXX_Unmarshal(b []byte) error
type SignatureCounts ¶
type SignatureCounts struct { BlockCount uint64 `protobuf:"varint,1,opt,name=block_count,json=blockCount,proto3" json:"block_count,omitempty"` Counts []SignatureCount `protobuf:"bytes,2,rep,name=counts,proto3" json:"counts"` }
SignatureCounts contains information about signature reporting for a number of blocks
func NewSignatureCounts ¶
func NewSignatureCounts() SignatureCounts
NewSignatureCounts returns a new SignatureCounts
func (*SignatureCounts) AddSignature ¶
func (m *SignatureCounts) AddSignature(opAddress string, validatorSetSize int64)
AddSignature adds a signature for the consensus address at a specific validator set size
func (*SignatureCounts) Descriptor ¶
func (*SignatureCounts) Descriptor() ([]byte, []int)
func (*SignatureCounts) GetBlockCount ¶
func (m *SignatureCounts) GetBlockCount() uint64
func (*SignatureCounts) GetCounts ¶
func (m *SignatureCounts) GetCounts() []SignatureCount
func (*SignatureCounts) Marshal ¶
func (m *SignatureCounts) Marshal() (dAtA []byte, err error)
func (*SignatureCounts) MarshalToSizedBuffer ¶
func (m *SignatureCounts) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SignatureCounts) ProtoMessage ¶
func (*SignatureCounts) ProtoMessage()
func (*SignatureCounts) Reset ¶
func (m *SignatureCounts) Reset()
func (*SignatureCounts) Size ¶
func (m *SignatureCounts) Size() (n int)
func (*SignatureCounts) String ¶
func (m *SignatureCounts) String() string
func (*SignatureCounts) Unmarshal ¶
func (m *SignatureCounts) Unmarshal(dAtA []byte) error
func (SignatureCounts) Validate ¶
func (m SignatureCounts) Validate() error
Validate checks if the signature counts object is valid the sum of all relative signatures should not exceed the number of block
func (*SignatureCounts) XXX_DiscardUnknown ¶
func (m *SignatureCounts) XXX_DiscardUnknown()
func (*SignatureCounts) XXX_Marshal ¶
func (m *SignatureCounts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SignatureCounts) XXX_Merge ¶
func (m *SignatureCounts) XXX_Merge(src proto.Message)
func (*SignatureCounts) XXX_Size ¶
func (m *SignatureCounts) XXX_Size() int
func (*SignatureCounts) XXX_Unmarshal ¶
func (m *SignatureCounts) XXX_Unmarshal(b []byte) error
type Validator ¶
type Validator struct { ProposerPriority string `protobuf:"bytes,1,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"` VotingPower string `protobuf:"bytes,2,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` PubKey PubKey `protobuf:"bytes,3,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"` }
Validator represents a validator in ValSet
func NewValidator ¶
NewValidator returns a validator with a ed25519 public key
func (*Validator) Descriptor ¶
func (*Validator) GetProposerPriority ¶
func (*Validator) GetVotingPower ¶
func (*Validator) MarshalToSizedBuffer ¶
func (*Validator) ProtoMessage ¶
func (*Validator) ProtoMessage()
func (*Validator) XXX_DiscardUnknown ¶
func (m *Validator) XXX_DiscardUnknown()
func (*Validator) XXX_Marshal ¶
func (*Validator) XXX_Unmarshal ¶
type ValidatorSet ¶
type ValidatorSet struct {
Validators []Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators"`
}
ValidatorSet represents a Validator Set it is compatible with the dumped set from `appd q tendermint-validator-set n` command
func NewValidatorSet ¶
func NewValidatorSet(validators ...Validator) ValidatorSet
NewValidatorSet returns a new Validator Set from a list of validators
func ParseValidatorSetFromFile ¶
func ParseValidatorSetFromFile(filePath string) (vs ValidatorSet, err error)
ParseValidatorSetFromFile parses a YAML dumped Validator Set file and returns a new Validator Set TODO: Support other format than YAML if there are other format of dumped file
func (*ValidatorSet) Descriptor ¶
func (*ValidatorSet) Descriptor() ([]byte, []int)
func (*ValidatorSet) GetValidators ¶
func (m *ValidatorSet) GetValidators() []Validator
func (*ValidatorSet) Marshal ¶
func (m *ValidatorSet) Marshal() (dAtA []byte, err error)
func (*ValidatorSet) MarshalToSizedBuffer ¶
func (m *ValidatorSet) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ValidatorSet) ProtoMessage ¶
func (*ValidatorSet) ProtoMessage()
func (*ValidatorSet) Reset ¶
func (m *ValidatorSet) Reset()
func (*ValidatorSet) Size ¶
func (m *ValidatorSet) Size() (n int)
func (*ValidatorSet) String ¶
func (m *ValidatorSet) String() string
func (ValidatorSet) ToTendermintValidatorSet ¶
func (vs ValidatorSet) ToTendermintValidatorSet() (valSet tmtypes.ValidatorSet, err error)
ToTendermintValidatorSet returns a new Tendermint Validator Set
func (*ValidatorSet) Unmarshal ¶
func (m *ValidatorSet) Unmarshal(dAtA []byte) error
func (*ValidatorSet) XXX_DiscardUnknown ¶
func (m *ValidatorSet) XXX_DiscardUnknown()
func (*ValidatorSet) XXX_Marshal ¶
func (m *ValidatorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorSet) XXX_Merge ¶
func (m *ValidatorSet) XXX_Merge(src proto.Message)
func (*ValidatorSet) XXX_Size ¶
func (m *ValidatorSet) XXX_Size() int
func (*ValidatorSet) XXX_Unmarshal ¶
func (m *ValidatorSet) XXX_Unmarshal(b []byte) error