Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- type Module
- type Prover
- func (pr *Prover) CreateMsgCreateClient(clientID string, dstHeader core.Header, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error)
- func (pr *Prover) GetLatestFinalizedHeader() (headers core.Header, err error)
- func (pr *Prover) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, ...) 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(dstChain core.ChainInfoICS02Querier, latestFinalizedHeader core.Header) ([]core.Header, error)
- type ProverConfig
- func (prc ProverConfig) Build(chain core.Chain) (core.Prover, error)
- func (*ProverConfig) Descriptor() ([]byte, []int)
- func (prc *ProverConfig) IsMainnetPreset() bool
- 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 (prc 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
Constants ¶
const ( EXECUTION_STATE_ROOT_INDEX = 17 EXECUTION_BLOCK_NUMBER_INDEX = 21 )
general
const ( MINIMAL_SECONDS_PER_SLOT uint64 = 6 MINIMAL_SLOTS_PER_EPOCH uint64 = 8 MINIMAL_EPOCHS_PER_SYNC_COMMITTEE_PERIOD uint64 = 8 )
minimal preset
const ( MAINNET_SECONDS_PER_SLOT uint64 = 12 MAINNET_SLOTS_PER_EPOCH uint64 = 32 MAINNET_EPOCHS_PER_SYNC_COMMITTEE_PERIOD uint64 = 256 )
mainnet preset
const ( Mainnet = "mainnet" Minimal = "minimal" Goerli = "goerli" Sepolia = "sepolia" )
Variables ¶
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the module interfaces to protobuf Any.
Types ¶
type Module ¶
type Module struct{}
func (Module) RegisterInterfaces ¶
func (Module) RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the module interfaces to protobuf Any.
type Prover ¶
type Prover struct {
// contains filtered or unexported fields
}
func (*Prover) CreateMsgCreateClient ¶
func (pr *Prover) CreateMsgCreateClient(clientID string, dstHeader core.Header, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error)
CreateMsgCreateClient creates a CreateClientMsg to this chain
func (*Prover) GetLatestFinalizedHeader ¶
GetLatestFinalizedHeader returns the latest finalized header on this chain The returned header is expected to be the latest one of headers that can be verified by the light client
func (*Prover) Init ¶
func (pr *Prover) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, debug bool) error
Init initializes the chain
func (*Prover) ProveState ¶ added in v0.2.0
func (pr *Prover) ProveState(ctx core.QueryContext, path string, value []byte) ([]byte, clienttypes.Height, error)
ProveState returns the proof of an IBC state specified by `path` and `value`
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(dstChain core.ChainInfoICS02Querier, latestFinalizedHeader core.Header) ([]core.Header, error)
SetupHeadersForUpdate returns the finalized header and any intermediate headers needed to apply it to the client on the counterpaty chain The order of the returned header slice should be as: [<intermediate headers>..., <update header>] if the header slice's length == 0 and err == nil, the relayer should skips the update-client
type ProverConfig ¶
type ProverConfig struct { BeaconEndpoint string `protobuf:"bytes,1,opt,name=beacon_endpoint,json=beaconEndpoint,proto3" json:"beacon_endpoint,omitempty"` Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` TrustingPeriod string `protobuf:"bytes,3,opt,name=trusting_period,json=trustingPeriod,proto3" json:"trusting_period,omitempty"` MaxClockDrift string `protobuf:"bytes,4,opt,name=max_clock_drift,json=maxClockDrift,proto3" json:"max_clock_drift,omitempty"` }
func (*ProverConfig) Descriptor ¶
func (*ProverConfig) Descriptor() ([]byte, []int)
func (*ProverConfig) IsMainnetPreset ¶
func (prc *ProverConfig) IsMainnetPreset() bool
NOTE the prover supports only the mainnet and minimal preset for now
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 ¶ added in v0.2.1
func (prc 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