Documentation
¶
Index ¶
- Constants
- Variables
- func FindTargetForkSpec(forkSpecs []*ForkSpec, height uint64, timestamp uint64) (*ForkSpec, []*ForkSpec, error)
- func MakeEpochHash(validators Validators, turnLength uint8) []byte
- func MilliTimestamp(h *types.Header) uint64
- func NewProver(chain Chain, config *ProverConfig) core.Prover
- type BLSPublicKey
- type BLSSignature
- type BoundaryEpochs
- type BoundaryHeight
- type Chain
- type ClientState
- func (cs *ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, ...) bool
- func (cs *ClientState) CheckSubstituteAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, ...) error
- func (cs *ClientState) ClientType() string
- func (*ClientState) Descriptor() ([]byte, []int)
- func (cs *ClientState) ExportMetadata(clientStore storetypes.KVStore) []exported.GenesisMetadata
- func (cs *ClientState) GetLatestHeight() exported.Height
- func (cs *ClientState) GetTimestampAtHeight(ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, ...) (uint64, error)
- func (cs *ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, ...) error
- func (m *ClientState) Marshal() (dAtA []byte, err error)
- func (m *ClientState) MarshalTo(dAtA []byte) (int, error)
- func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClientState) ProtoMessage()
- func (m *ClientState) Reset()
- func (m *ClientState) Size() (n int)
- func (cs *ClientState) Status(ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec) exported.Status
- func (m *ClientState) String() string
- func (m *ClientState) Unmarshal(dAtA []byte) error
- func (cs *ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, ...) []exported.Height
- func (cs *ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, ...)
- func (cs *ClientState) Validate() error
- func (cs *ClientState) VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, ...) error
- func (cs *ClientState) VerifyMembership(ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, ...) error
- func (cs *ClientState) VerifyNonMembership(ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, ...) error
- func (cs *ClientState) VerifyUpgradeAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, store storetypes.KVStore, ...) error
- func (m *ClientState) XXX_DiscardUnknown()
- func (m *ClientState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientState) XXX_Merge(src proto.Message)
- func (m *ClientState) XXX_Size() int
- func (m *ClientState) XXX_Unmarshal(b []byte) error
- func (cs *ClientState) ZeroCustomFields() exported.ClientState
- type ConsensusState
- func (cs *ConsensusState) ClientType() string
- func (*ConsensusState) Descriptor() ([]byte, []int)
- func (cs *ConsensusState) GetTimestamp() uint64
- 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 (m *ConsensusState) Size() (n int)
- func (m *ConsensusState) String() string
- func (m *ConsensusState) Unmarshal(dAtA []byte) error
- func (cs *ConsensusState) ValidateBasic() 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 ETHHeader
- func (*ETHHeader) Descriptor() ([]byte, []int)
- func (m *ETHHeader) Marshal() (dAtA []byte, err error)
- func (m *ETHHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *ETHHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ETHHeader) ProtoMessage()
- func (m *ETHHeader) Reset()
- func (m *ETHHeader) Size() (n int)
- func (m *ETHHeader) String() string
- func (m *ETHHeader) Unmarshal(dAtA []byte) error
- func (m *ETHHeader) XXX_DiscardUnknown()
- func (m *ETHHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ETHHeader) XXX_Merge(src proto.Message)
- func (m *ETHHeader) XXX_Size() int
- func (m *ETHHeader) XXX_Unmarshal(b []byte) error
- type ForkSpec
- func (*ForkSpec) Descriptor() ([]byte, []int)
- func (m *ForkSpec) GetHeight() uint64
- func (m *ForkSpec) GetHeightOrTimestamp() isForkSpec_HeightOrTimestamp
- func (m *ForkSpec) GetTimestamp() uint64
- func (m *ForkSpec) Marshal() (dAtA []byte, err error)
- func (m *ForkSpec) MarshalTo(dAtA []byte) (int, error)
- func (m *ForkSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ForkSpec) ProtoMessage()
- func (m *ForkSpec) Reset()
- func (m *ForkSpec) Size() (n int)
- func (m *ForkSpec) String() string
- func (m *ForkSpec) Unmarshal(dAtA []byte) error
- func (m *ForkSpec) XXX_DiscardUnknown()
- func (m *ForkSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ForkSpec) XXX_Merge(src proto.Message)
- func (*ForkSpec) XXX_OneofWrappers() []interface{}
- func (m *ForkSpec) XXX_Size() int
- func (m *ForkSpec) XXX_Unmarshal(b []byte) error
- type ForkSpec_Height
- type ForkSpec_Timestamp
- type Fraction
- func (*Fraction) Descriptor() ([]byte, []int)
- func (m *Fraction) GetDenominator() uint64
- func (m *Fraction) GetNumerator() uint64
- func (m *Fraction) Marshal() (dAtA []byte, err error)
- func (m *Fraction) MarshalTo(dAtA []byte) (int, error)
- func (m *Fraction) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Fraction) ProtoMessage()
- func (m *Fraction) Reset()
- func (m *Fraction) Size() (n int)
- func (m *Fraction) String() string
- func (m *Fraction) Unmarshal(dAtA []byte) error
- func (m *Fraction) XXX_DiscardUnknown()
- func (m *Fraction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Fraction) XXX_Merge(src proto.Message)
- func (m *Fraction) XXX_Size() int
- func (m *Fraction) XXX_Unmarshal(b []byte) error
- type Header
- func (*Header) ClientType() string
- func (*Header) Descriptor() ([]byte, []int)
- func (h *Header) GetHeight() exported.Height
- func (h *Header) Last() (*types.Header, error)
- func (m *Header) Marshal() (dAtA []byte, err error)
- func (m *Header) MarshalTo(dAtA []byte) (int, error)
- func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Header) ProtoMessage()
- func (m *Header) Reset()
- func (m *Header) Size() (n int)
- func (m *Header) String() string
- func (h *Header) Target() (*types.Header, error)
- func (m *Header) Unmarshal(dAtA []byte) error
- func (h *Header) ValidateBasic() error
- func (m *Header) XXX_DiscardUnknown()
- func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Header) XXX_Merge(src proto.Message)
- func (m *Header) XXX_Size() int
- func (m *Header) XXX_Unmarshal(b []byte) error
- type Misbehaviour
- func (*Misbehaviour) ClientType() string
- func (*Misbehaviour) Descriptor() ([]byte, []int)
- func (h *Misbehaviour) GetClientID() string
- func (m *Misbehaviour) Marshal() (dAtA []byte, err error)
- func (m *Misbehaviour) MarshalTo(dAtA []byte) (int, error)
- func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Misbehaviour) ProtoMessage()
- func (m *Misbehaviour) Reset()
- func (m *Misbehaviour) Size() (n int)
- func (m *Misbehaviour) String() string
- func (m *Misbehaviour) Unmarshal(dAtA []byte) error
- func (h *Misbehaviour) ValidateBasic() error
- func (m *Misbehaviour) XXX_DiscardUnknown()
- func (m *Misbehaviour) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Misbehaviour) XXX_Merge(src proto.Message)
- func (m *Misbehaviour) XXX_Size() int
- func (m *Misbehaviour) XXX_Unmarshal(b []byte) error
- type Module
- type Network
- type ProveState
- func (*ProveState) Descriptor() ([]byte, []int)
- func (m *ProveState) Marshal() (dAtA []byte, err error)
- func (m *ProveState) MarshalTo(dAtA []byte) (int, error)
- func (m *ProveState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProveState) ProtoMessage()
- func (m *ProveState) Reset()
- func (m *ProveState) Size() (n int)
- func (m *ProveState) String() string
- func (m *ProveState) Unmarshal(dAtA []byte) error
- func (m *ProveState) XXX_DiscardUnknown()
- func (m *ProveState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProveState) XXX_Merge(src proto.Message)
- func (m *ProveState) XXX_Size() int
- func (m *ProveState) XXX_Unmarshal(b []byte) error
- type Prover
- func (pr *Prover) CheckRefreshRequired(ctx context.Context, counterparty core.ChainInfoICS02Querier) (bool, error)
- func (pr *Prover) CreateInitialLightClientState(ctx context.Context, height exported.Height) (exported.ClientState, exported.ConsensusState, error)
- func (pr *Prover) GetLatestFinalizedHeader(ctx context.Context) (out core.Header, err error)
- func (pr *Prover) GetLatestFinalizedHeaderByLatestHeight(ctx context.Context, latestBlockNumber uint64) (core.Header, error)
- func (pr *Prover) GetStorageRoot(ctx context.Context, header *types.Header) (common.Hash, error)
- func (pr *Prover) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, ...) error
- func (pr *Prover) ProveHostConsensusState(ctx core.QueryContext, height exported.Height, ...) (proof []byte, err error)
- func (pr *Prover) ProveState(ctx core.QueryContext, path string, value []byte) ([]byte, clienttypes.Height, error)
- func (pr *Prover) SetRelayInfo(path *core.PathEnd, counterparty *core.ProvableChain, ...) error
- func (pr *Prover) SetupForRelay(ctx context.Context) error
- func (pr *Prover) SetupHeadersForUpdate(ctx context.Context, counterparty core.FinalityAwareChain, ...) (<-chan *core.HeaderOrError, error)
- func (pr *Prover) SetupHeadersForUpdateByLatestHeight(ctx context.Context, clientStateLatestHeight exported.Height, ...) ([]core.Header, error)
- type ProverConfig
- func (c *ProverConfig) Build(chain core.Chain) (core.Prover, error)
- func (*ProverConfig) Descriptor() ([]byte, []int)
- func (m *ProverConfig) GetMaxClockDrift() time.Duration
- func (m *ProverConfig) GetNetwork() string
- func (m *ProverConfig) GetRefreshBlockDifferenceThreshold() uint64
- func (m *ProverConfig) GetRefreshThresholdRate() *Fraction
- func (m *ProverConfig) GetTrustingPeriod() time.Duration
- func (m *ProverConfig) Marshal() (dAtA []byte, err error)
- func (m *ProverConfig) MarshalTo(dAtA []byte) (int, error)
- func (m *ProverConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProverConfig) ProtoMessage()
- func (m *ProverConfig) Reset()
- func (m *ProverConfig) Size() (n int)
- func (m *ProverConfig) String() string
- func (m *ProverConfig) Unmarshal(dAtA []byte) error
- func (c *ProverConfig) Validate() error
- func (m *ProverConfig) XXX_DiscardUnknown()
- func (m *ProverConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProverConfig) XXX_Merge(src proto.Message)
- func (m *ProverConfig) XXX_Size() int
- func (m *ProverConfig) XXX_Unmarshal(b []byte) error
- type Validators
- type ValidatorsBitSet
- type VoteAttestation
- type VoteData
Constants ¶
const Parlia string = "xx-parlia"
Parlia TODO client_type
Variables ¶
var ( ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthParlia = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParlia = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParlia = fmt.Errorf("proto: unexpected end of group") )
var IBCCommitmentsSlot = common.HexToHash("1ee222554989dda120e26ecacf756fe1235cd8d726706b57517715dde4f0c900")
keccak256(abi.encode(uint256(keccak256("ibc.commitment")) - 1)) & ~bytes32(uint256(0xff))
Functions ¶
func FindTargetForkSpec ¶ added in v0.3.13
func MakeEpochHash ¶
func MakeEpochHash(validators Validators, turnLength uint8) []byte
func MilliTimestamp ¶ added in v0.3.13
Types ¶
type BLSPublicKey ¶
type BLSPublicKey [blsPublicKeyLength]byte
type BLSSignature ¶
type BLSSignature [blsSignatureLength]byte
type BoundaryEpochs ¶ added in v0.3.13
type BoundaryEpochs struct { PreviousForkSpec ForkSpec CurrentForkSpec ForkSpec BoundaryHeight uint64 PrevLast uint64 CurrentFirst uint64 Intermediates []uint64 }
func (BoundaryEpochs) CurrentEpochBlockNumber ¶ added in v0.3.13
func (be BoundaryEpochs) CurrentEpochBlockNumber(number uint64) uint64
func (BoundaryEpochs) PreviousEpochBlockNumber ¶ added in v0.3.13
func (be BoundaryEpochs) PreviousEpochBlockNumber(currentEpochBlockNumber uint64) uint64
type BoundaryHeight ¶ added in v0.3.13
func GetBoundaryHeight ¶ added in v0.3.13
func (BoundaryHeight) GetBoundaryEpochs ¶ added in v0.3.13
func (b BoundaryHeight) GetBoundaryEpochs(prevForkSpecs []*ForkSpec) (*BoundaryEpochs, error)
type Chain ¶
type Chain interface { core.Chain Header(ctx context.Context, height uint64) (*types.Header, error) IBCAddress() common.Address CanonicalChainID(ctx context.Context) (uint64, error) GetProof(ctx context.Context, address common.Address, storageKeys [][]byte, blockNumber *big.Int) (*client.StateProof, error) }
type ClientState ¶
type ClientState struct { ChainId uint64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` IbcStoreAddress []byte `protobuf:"bytes,2,opt,name=ibc_store_address,json=ibcStoreAddress,proto3" json:"ibc_store_address,omitempty"` IbcCommitmentsSlot []byte `protobuf:"bytes,3,opt,name=ibc_commitments_slot,json=ibcCommitmentsSlot,proto3" json:"ibc_commitments_slot,omitempty"` LatestHeight *types.Height `protobuf:"bytes,4,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height,omitempty"` TrustingPeriod time.Duration `protobuf:"bytes,5,opt,name=trusting_period,json=trustingPeriod,proto3,stdduration" json:"trusting_period"` MaxClockDrift time.Duration `protobuf:"bytes,6,opt,name=max_clock_drift,json=maxClockDrift,proto3,stdduration" json:"max_clock_drift"` Frozen bool `protobuf:"varint,7,opt,name=frozen,proto3" json:"frozen,omitempty"` ForkSpecs []*ForkSpec `protobuf:"bytes,8,rep,name=fork_specs,json=forkSpecs,proto3" json:"fork_specs,omitempty"` }
func (*ClientState) CheckForMisbehaviour ¶
func (cs *ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) bool
func (*ClientState) CheckSubstituteAndUpdateState ¶
func (cs *ClientState) CheckSubstituteAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore, substituteClientStore storetypes.KVStore, substituteCliente exported.ClientState) error
func (*ClientState) ClientType ¶
func (cs *ClientState) ClientType() string
func (*ClientState) Descriptor ¶
func (*ClientState) Descriptor() ([]byte, []int)
func (*ClientState) ExportMetadata ¶
func (cs *ClientState) ExportMetadata(clientStore storetypes.KVStore) []exported.GenesisMetadata
func (*ClientState) GetLatestHeight ¶
func (cs *ClientState) GetLatestHeight() exported.Height
func (*ClientState) GetTimestampAtHeight ¶
func (cs *ClientState) GetTimestampAtHeight( ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, ) (uint64, error)
func (*ClientState) Initialize ¶
func (cs *ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, consensusState exported.ConsensusState) error
func (*ClientState) Marshal ¶
func (m *ClientState) Marshal() (dAtA []byte, err error)
func (*ClientState) MarshalToSizedBuffer ¶
func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClientState) ProtoMessage ¶
func (*ClientState) ProtoMessage()
func (*ClientState) Reset ¶
func (m *ClientState) Reset()
func (*ClientState) Size ¶
func (m *ClientState) Size() (n int)
func (*ClientState) Status ¶
func (cs *ClientState) Status(ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec) exported.Status
func (*ClientState) String ¶
func (m *ClientState) String() string
func (*ClientState) Unmarshal ¶
func (m *ClientState) Unmarshal(dAtA []byte) error
func (*ClientState) UpdateState ¶
func (cs *ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) []exported.Height
func (*ClientState) UpdateStateOnMisbehaviour ¶
func (cs *ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage)
func (*ClientState) Validate ¶
func (cs *ClientState) Validate() error
func (*ClientState) VerifyClientMessage ¶
func (cs *ClientState) VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) error
func (*ClientState) VerifyMembership ¶
func (*ClientState) VerifyNonMembership ¶
func (cs *ClientState) VerifyNonMembership( ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, delayTimePeriod uint64, delayBlockPeriod uint64, proof []byte, path exported.Path, ) error
func (*ClientState) VerifyUpgradeAndUpdateState ¶
func (cs *ClientState) VerifyUpgradeAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, store storetypes.KVStore, newClient exported.ClientState, newConsState exported.ConsensusState, proofUpgradeClient, proofUpgradeConsState []byte, ) error
func (*ClientState) XXX_DiscardUnknown ¶
func (m *ClientState) XXX_DiscardUnknown()
func (*ClientState) XXX_Marshal ¶
func (m *ClientState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientState) XXX_Merge ¶
func (m *ClientState) XXX_Merge(src proto.Message)
func (*ClientState) XXX_Size ¶
func (m *ClientState) XXX_Size() int
func (*ClientState) XXX_Unmarshal ¶
func (m *ClientState) XXX_Unmarshal(b []byte) error
func (*ClientState) ZeroCustomFields ¶
func (cs *ClientState) ZeroCustomFields() exported.ClientState
type ConsensusState ¶
type ConsensusState struct { StateRoot []byte `protobuf:"bytes,1,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` CurrentValidatorsHash []byte `` /* 126-byte string literal not displayed */ PreviousValidatorsHash []byte `` /* 129-byte string literal not displayed */ }
func (*ConsensusState) ClientType ¶
func (cs *ConsensusState) ClientType() string
ClientType returns mock-client type.
func (*ConsensusState) Descriptor ¶
func (*ConsensusState) Descriptor() ([]byte, []int)
func (*ConsensusState) GetTimestamp ¶
func (cs *ConsensusState) GetTimestamp() uint64
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) Size ¶
func (m *ConsensusState) Size() (n int)
func (*ConsensusState) String ¶
func (m *ConsensusState) String() string
func (*ConsensusState) Unmarshal ¶
func (m *ConsensusState) Unmarshal(dAtA []byte) error
func (*ConsensusState) ValidateBasic ¶
func (cs *ConsensusState) ValidateBasic() error
ValidateBasic defines basic validation for the mock-client consensus state.
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 ETHHeader ¶
type ETHHeader struct {
Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
}
func QueryFinalizedHeader ¶
func QueryFinalizedHeader(ctx context.Context, fn getHeaderFn, height uint64, limitHeight uint64) ([]*ETHHeader, error)
Facade for tool modules
func (*ETHHeader) Descriptor ¶
func (*ETHHeader) MarshalToSizedBuffer ¶
func (*ETHHeader) ProtoMessage ¶
func (*ETHHeader) ProtoMessage()
func (*ETHHeader) XXX_DiscardUnknown ¶
func (m *ETHHeader) XXX_DiscardUnknown()
func (*ETHHeader) XXX_Marshal ¶
func (*ETHHeader) XXX_Unmarshal ¶
type ForkSpec ¶ added in v0.3.13
type ForkSpec struct { // Types that are valid to be assigned to HeightOrTimestamp: // *ForkSpec_Height // *ForkSpec_Timestamp HeightOrTimestamp isForkSpec_HeightOrTimestamp `protobuf_oneof:"height_or_timestamp"` AdditionalHeaderItemCount uint64 `` /* 141-byte string literal not displayed */ EpochLength uint64 `protobuf:"varint,4,opt,name=epoch_length,json=epochLength,proto3" json:"epoch_length,omitempty"` MaxTurnLength uint64 `protobuf:"varint,5,opt,name=max_turn_length,json=maxTurnLength,proto3" json:"max_turn_length,omitempty"` GasLimitBoundDivider uint64 `` /* 126-byte string literal not displayed */ EnableHeaderMsec bool `protobuf:"varint,7,opt,name=enable_header_msec,json=enableHeaderMsec,proto3" json:"enable_header_msec,omitempty"` }
func GetForkParameters ¶ added in v0.3.13
func (*ForkSpec) Descriptor ¶ added in v0.3.13
func (*ForkSpec) GetHeightOrTimestamp ¶ added in v0.3.13
func (m *ForkSpec) GetHeightOrTimestamp() isForkSpec_HeightOrTimestamp
func (*ForkSpec) GetTimestamp ¶ added in v0.3.13
func (*ForkSpec) MarshalToSizedBuffer ¶ added in v0.3.13
func (*ForkSpec) ProtoMessage ¶ added in v0.3.13
func (*ForkSpec) ProtoMessage()
func (*ForkSpec) XXX_DiscardUnknown ¶ added in v0.3.13
func (m *ForkSpec) XXX_DiscardUnknown()
func (*ForkSpec) XXX_Marshal ¶ added in v0.3.13
func (*ForkSpec) XXX_OneofWrappers ¶ added in v0.3.13
func (*ForkSpec) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*ForkSpec) XXX_Unmarshal ¶ added in v0.3.13
type ForkSpec_Height ¶ added in v0.3.13
type ForkSpec_Height struct {
Height uint64 `protobuf:"varint,1,opt,name=height,proto3,oneof" json:"height,omitempty"`
}
func (*ForkSpec_Height) MarshalTo ¶ added in v0.3.13
func (m *ForkSpec_Height) MarshalTo(dAtA []byte) (int, error)
func (*ForkSpec_Height) MarshalToSizedBuffer ¶ added in v0.3.13
func (m *ForkSpec_Height) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ForkSpec_Height) Size ¶ added in v0.3.13
func (m *ForkSpec_Height) Size() (n int)
type ForkSpec_Timestamp ¶ added in v0.3.13
type ForkSpec_Timestamp struct {
Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"`
}
func (*ForkSpec_Timestamp) MarshalTo ¶ added in v0.3.13
func (m *ForkSpec_Timestamp) MarshalTo(dAtA []byte) (int, error)
func (*ForkSpec_Timestamp) MarshalToSizedBuffer ¶ added in v0.3.13
func (m *ForkSpec_Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ForkSpec_Timestamp) Size ¶ added in v0.3.13
func (m *ForkSpec_Timestamp) Size() (n int)
type Fraction ¶
type Fraction struct { Numerator uint64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` Denominator uint64 `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"` }
func (*Fraction) Descriptor ¶
func (*Fraction) GetDenominator ¶
func (*Fraction) GetNumerator ¶
func (*Fraction) MarshalToSizedBuffer ¶
func (*Fraction) ProtoMessage ¶
func (*Fraction) ProtoMessage()
func (*Fraction) XXX_DiscardUnknown ¶
func (m *Fraction) XXX_DiscardUnknown()
func (*Fraction) XXX_Marshal ¶
func (*Fraction) XXX_Unmarshal ¶
type Header ¶
type Header struct { Headers []*ETHHeader `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` TrustedHeight *types.Height `protobuf:"bytes,2,opt,name=trusted_height,json=trustedHeight,proto3" json:"trusted_height,omitempty"` CurrentValidators [][]byte `protobuf:"bytes,3,rep,name=current_validators,json=currentValidators,proto3" json:"current_validators,omitempty"` PreviousValidators [][]byte `protobuf:"bytes,4,rep,name=previous_validators,json=previousValidators,proto3" json:"previous_validators,omitempty"` CurrentTurnLength uint32 `protobuf:"varint,5,opt,name=current_turn_length,json=currentTurnLength,proto3" json:"current_turn_length,omitempty"` PreviousTurnLength uint32 `protobuf:"varint,6,opt,name=previous_turn_length,json=previousTurnLength,proto3" json:"previous_turn_length,omitempty"` }
func (*Header) ClientType ¶
func (*Header) Descriptor ¶
func (*Header) MarshalToSizedBuffer ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ValidateBasic ¶
func (*Header) XXX_DiscardUnknown ¶
func (m *Header) XXX_DiscardUnknown()
func (*Header) XXX_Marshal ¶
func (*Header) XXX_Unmarshal ¶
type Misbehaviour ¶
type Misbehaviour struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` Header_1 *Header `protobuf:"bytes,2,opt,name=header_1,json=header1,proto3" json:"header_1,omitempty"` Header_2 *Header `protobuf:"bytes,3,opt,name=header_2,json=header2,proto3" json:"header_2,omitempty"` }
func (*Misbehaviour) ClientType ¶
func (*Misbehaviour) ClientType() string
func (*Misbehaviour) Descriptor ¶
func (*Misbehaviour) Descriptor() ([]byte, []int)
func (*Misbehaviour) GetClientID ¶
func (h *Misbehaviour) GetClientID() string
func (*Misbehaviour) Marshal ¶
func (m *Misbehaviour) Marshal() (dAtA []byte, err error)
func (*Misbehaviour) MarshalToSizedBuffer ¶
func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Misbehaviour) ProtoMessage ¶
func (*Misbehaviour) ProtoMessage()
func (*Misbehaviour) Reset ¶
func (m *Misbehaviour) Reset()
func (*Misbehaviour) Size ¶
func (m *Misbehaviour) Size() (n int)
func (*Misbehaviour) String ¶
func (m *Misbehaviour) String() string
func (*Misbehaviour) Unmarshal ¶
func (m *Misbehaviour) Unmarshal(dAtA []byte) error
func (*Misbehaviour) ValidateBasic ¶
func (h *Misbehaviour) ValidateBasic() error
func (*Misbehaviour) XXX_DiscardUnknown ¶
func (m *Misbehaviour) XXX_DiscardUnknown()
func (*Misbehaviour) XXX_Marshal ¶
func (m *Misbehaviour) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Misbehaviour) XXX_Merge ¶
func (m *Misbehaviour) XXX_Merge(src proto.Message)
func (*Misbehaviour) XXX_Size ¶
func (m *Misbehaviour) XXX_Size() int
func (*Misbehaviour) XXX_Unmarshal ¶
func (m *Misbehaviour) XXX_Unmarshal(b []byte) error
type Module ¶
type Module struct{}
func (Module) RegisterInterfaces ¶
func (Module) RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the module interfaces to protobuf Any.
type ProveState ¶ added in v0.3.11
type ProveState struct { AccountProof []byte `protobuf:"bytes,1,opt,name=account_proof,json=accountProof,proto3" json:"account_proof,omitempty"` CommitmentProof []byte `protobuf:"bytes,2,opt,name=commitment_proof,json=commitmentProof,proto3" json:"commitment_proof,omitempty"` }
func (*ProveState) Descriptor ¶ added in v0.3.11
func (*ProveState) Descriptor() ([]byte, []int)
func (*ProveState) Marshal ¶ added in v0.3.11
func (m *ProveState) Marshal() (dAtA []byte, err error)
func (*ProveState) MarshalTo ¶ added in v0.3.11
func (m *ProveState) MarshalTo(dAtA []byte) (int, error)
func (*ProveState) MarshalToSizedBuffer ¶ added in v0.3.11
func (m *ProveState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProveState) ProtoMessage ¶ added in v0.3.11
func (*ProveState) ProtoMessage()
func (*ProveState) Reset ¶ added in v0.3.11
func (m *ProveState) Reset()
func (*ProveState) Size ¶ added in v0.3.11
func (m *ProveState) Size() (n int)
func (*ProveState) String ¶ added in v0.3.11
func (m *ProveState) String() string
func (*ProveState) Unmarshal ¶ added in v0.3.11
func (m *ProveState) Unmarshal(dAtA []byte) error
func (*ProveState) XXX_DiscardUnknown ¶ added in v0.3.11
func (m *ProveState) XXX_DiscardUnknown()
func (*ProveState) XXX_Marshal ¶ added in v0.3.11
func (m *ProveState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProveState) XXX_Merge ¶ added in v0.3.11
func (m *ProveState) XXX_Merge(src proto.Message)
func (*ProveState) XXX_Size ¶ added in v0.3.11
func (m *ProveState) XXX_Size() int
func (*ProveState) XXX_Unmarshal ¶ added in v0.3.11
func (m *ProveState) XXX_Unmarshal(b []byte) error
type Prover ¶
type Prover struct {
// contains filtered or unexported fields
}
func (*Prover) CheckRefreshRequired ¶
func (*Prover) CreateInitialLightClientState ¶
func (pr *Prover) CreateInitialLightClientState(ctx context.Context, height exported.Height) (exported.ClientState, exported.ConsensusState, error)
CreateInitialLightClientState returns a pair of ClientState and ConsensusState based on the state of the self chain at `height`. These states will be submitted to the counterparty chain as MsgCreateClient. If `height` is nil, the latest finalized height is selected automatically.
func (*Prover) GetLatestFinalizedHeader ¶
GetLatestFinalizedHeader returns the latest finalized header from the chain
func (*Prover) GetLatestFinalizedHeaderByLatestHeight ¶
func (pr *Prover) GetLatestFinalizedHeaderByLatestHeight(ctx context.Context, latestBlockNumber uint64) (core.Header, error)
GetLatestFinalizedHeaderByLatestHeight returns the latest finalized verifiable header from the chain
func (*Prover) GetStorageRoot ¶
func (*Prover) Init ¶
func (pr *Prover) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, debug bool) error
Init initializes the chain
func (*Prover) ProveHostConsensusState ¶
func (pr *Prover) ProveHostConsensusState(ctx core.QueryContext, height exported.Height, consensusState exported.ConsensusState) (proof []byte, err error)
ProveHostConsensusState returns an existence proof of the consensus state at `height` This proof would be ignored in ibc-go, but it is required to `getSelfConsensusState` of ibc-solidity.
func (*Prover) ProveState ¶
func (pr *Prover) ProveState(ctx core.QueryContext, path string, value []byte) ([]byte, clienttypes.Height, error)
func (*Prover) SetRelayInfo ¶
func (pr *Prover) SetRelayInfo(path *core.PathEnd, counterparty *core.ProvableChain, counterpartyPath *core.PathEnd) error
SetRelayInfo sets source's path and counterparty's info to the chain
func (*Prover) SetupForRelay ¶
SetupForRelay performs chain-specific setup before starting the relay
func (*Prover) SetupHeadersForUpdate ¶
func (pr *Prover) SetupHeadersForUpdate(ctx context.Context, counterparty core.FinalityAwareChain, latestFinalizedHeader core.Header) (<-chan *core.HeaderOrError, error)
SetupHeadersForUpdate creates a new header based on a given header
type ProverConfig ¶
type ProverConfig struct { TrustingPeriod time.Duration `protobuf:"bytes,1,opt,name=trusting_period,json=trustingPeriod,proto3,stdduration" json:"trusting_period"` MaxClockDrift time.Duration `protobuf:"bytes,2,opt,name=max_clock_drift,json=maxClockDrift,proto3,stdduration" json:"max_clock_drift"` // Fraction of the trusting period that is allowed to pass before the client is considered expired RefreshThresholdRate *Fraction `protobuf:"bytes,3,opt,name=refresh_threshold_rate,json=refreshThresholdRate,proto3" json:"refresh_threshold_rate,omitempty"` // Difference in blocks to refresh. // Refresh if the difference between blocks in the chain and ClientState exceeds this value. // If the value is 0, no refresh decision is made. RefreshBlockDifferenceThreshold uint64 `` /* 159-byte string literal not displayed */ // Network name Network string `protobuf:"bytes,5,opt,name=network,proto3" json:"network,omitempty"` }
func (*ProverConfig) Descriptor ¶
func (*ProverConfig) Descriptor() ([]byte, []int)
func (*ProverConfig) GetMaxClockDrift ¶
func (m *ProverConfig) GetMaxClockDrift() time.Duration
func (*ProverConfig) GetNetwork ¶ added in v0.3.13
func (m *ProverConfig) GetNetwork() string
func (*ProverConfig) GetRefreshBlockDifferenceThreshold ¶ added in v0.3.6
func (m *ProverConfig) GetRefreshBlockDifferenceThreshold() uint64
func (*ProverConfig) GetRefreshThresholdRate ¶
func (m *ProverConfig) GetRefreshThresholdRate() *Fraction
func (*ProverConfig) GetTrustingPeriod ¶
func (m *ProverConfig) GetTrustingPeriod() time.Duration
func (*ProverConfig) Marshal ¶
func (m *ProverConfig) Marshal() (dAtA []byte, err error)
func (*ProverConfig) MarshalToSizedBuffer ¶
func (m *ProverConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProverConfig) ProtoMessage ¶
func (*ProverConfig) ProtoMessage()
func (*ProverConfig) Reset ¶
func (m *ProverConfig) Reset()
func (*ProverConfig) Size ¶
func (m *ProverConfig) Size() (n int)
func (*ProverConfig) String ¶
func (m *ProverConfig) String() string
func (*ProverConfig) Unmarshal ¶
func (m *ProverConfig) Unmarshal(dAtA []byte) error
func (*ProverConfig) Validate ¶
func (c *ProverConfig) Validate() error
func (*ProverConfig) XXX_DiscardUnknown ¶
func (m *ProverConfig) XXX_DiscardUnknown()
func (*ProverConfig) XXX_Marshal ¶
func (m *ProverConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProverConfig) XXX_Merge ¶
func (m *ProverConfig) XXX_Merge(src proto.Message)
func (*ProverConfig) XXX_Size ¶
func (m *ProverConfig) XXX_Size() int
func (*ProverConfig) XXX_Unmarshal ¶
func (m *ProverConfig) XXX_Unmarshal(b []byte) error
type Validators ¶
type Validators [][]byte
func ExtractValidatorSetAndTurnLength ¶
func ExtractValidatorSetAndTurnLength(h *types.Header) (Validators, uint8, error)
func (Validators) Checkpoint ¶
func (v Validators) Checkpoint(turnLength uint8) uint64
type ValidatorsBitSet ¶
type ValidatorsBitSet uint64
type VoteAttestation ¶
type VoteAttestation struct { VoteAddressSet uint64 AggSignature BLSSignature Data *VoteData Extra []byte }