relay

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXECUTION_STATE_ROOT_INDEX   = 17
	EXECUTION_BLOCK_NUMBER_INDEX = 21
)

general

View Source
const (
	MINIMAL_SECONDS_PER_SLOT                 uint64 = 6
	MINIMAL_SLOTS_PER_EPOCH                  uint64 = 8
	MINIMAL_EPOCHS_PER_SYNC_COMMITTEE_PERIOD uint64 = 8
)

minimal preset

View Source
const (
	MAINNET_SECONDS_PER_SLOT                 uint64 = 12
	MAINNET_SLOTS_PER_EPOCH                  uint64 = 32
	MAINNET_EPOCHS_PER_SYNC_COMMITTEE_PERIOD uint64 = 256
)

mainnet preset

View Source
const (
	Mainnet = "mainnet"
	Minimal = "minimal"
	Goerli  = "goerli"
	Sepolia = "sepolia"
)

Variables

View Source
var (
	ErrInvalidLengthConfig        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConfig          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the module interfaces to protobuf Any.

Types

type Module

type Module struct{}

func (Module) GetCmd

func (Module) GetCmd(ctx *config.Context) *cobra.Command

GetCmd returns the command

func (Module) Name

func (Module) Name() string

Name returns the name of the module

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 NewProver

func NewProver(chain *ethereum.Chain, config ProverConfig) *Prover

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

func (pr *Prover) GetLatestFinalizedHeader() (headers core.Header, err error)

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

func (pr *Prover) SetupForRelay(ctx context.Context) error

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"`
}

func (ProverConfig) Build

func (prc ProverConfig) Build(chain core.Chain) (core.Prover, error)

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) MarshalTo

func (m *ProverConfig) MarshalTo(dAtA []byte) (int, 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) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL