prover

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProverServiceLatestProvableHeightProcedure is the fully-qualified name of the ProverService's
	// LatestProvableHeight RPC.
	ProverServiceLatestProvableHeightProcedure = "/ibc.v2.prover.ProverService/LatestProvableHeight"
	// ProverServiceClientUpdatePayloadsProcedure is the fully-qualified name of the ProverService's
	// ClientUpdatePayloads RPC.
	ProverServiceClientUpdatePayloadsProcedure = "/ibc.v2.prover.ProverService/ClientUpdatePayloads"
	// ProverServicePacketProofsProcedure is the fully-qualified name of the ProverService's
	// PacketProofs RPC.
	ProverServicePacketProofsProcedure = "/ibc.v2.prover.ProverService/PacketProofs"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// ProverServiceName is the fully-qualified name of the ProverService service.
	ProverServiceName = "ibc.v2.prover.ProverService"
)

Variables

View Source
var (
	ProofKind_name = map[int32]string{
		0: "PROOF_KIND_UNSPECIFIED",
		1: "PROOF_KIND_PACKET_COMMITMENT",
		2: "PROOF_KIND_ACKNOWLEDGEMENT",
		3: "PROOF_KIND_RECEIPT_ABSENCE",
	}
	ProofKind_value = map[string]int32{
		"PROOF_KIND_UNSPECIFIED":       0,
		"PROOF_KIND_PACKET_COMMITMENT": 1,
		"PROOF_KIND_ACKNOWLEDGEMENT":   2,
		"PROOF_KIND_RECEIPT_ABSENCE":   3,
	}
)

Enum value maps for ProofKind.

View Source
var File_prover_proto protoreflect.FileDescriptor

Functions

func NewProverServiceHandler

func NewProverServiceHandler(svc ProverServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewProverServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type Acknowledgement

type Acknowledgement struct {

	// The packet's encoded application acknowledgements.
	AppAcknowledgements [][]byte `protobuf:"bytes,1,rep,name=app_acknowledgements,json=appAcknowledgements,proto3" json:"app_acknowledgements,omitempty"`
	// contains filtered or unexported fields
}

func (*Acknowledgement) Descriptor deprecated

func (*Acknowledgement) Descriptor() ([]byte, []int)

Deprecated: Use Acknowledgement.ProtoReflect.Descriptor instead.

func (*Acknowledgement) GetAppAcknowledgements

func (x *Acknowledgement) GetAppAcknowledgements() [][]byte

func (*Acknowledgement) ProtoMessage

func (*Acknowledgement) ProtoMessage()

func (*Acknowledgement) ProtoReflect

func (x *Acknowledgement) ProtoReflect() protoreflect.Message

func (*Acknowledgement) Reset

func (x *Acknowledgement) Reset()

func (*Acknowledgement) String

func (x *Acknowledgement) String() string

type Client

type Client struct {

	// The chain the light client lives on.
	ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// The light client's id on that chain.
	ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// contains filtered or unexported fields
}

Client identifies one configured light client: the chain it lives on and its client id.

func (*Client) Descriptor deprecated

func (*Client) Descriptor() ([]byte, []int)

Deprecated: Use Client.ProtoReflect.Descriptor instead.

func (*Client) GetChainId

func (x *Client) GetChainId() string

func (*Client) GetClientId

func (x *Client) GetClientId() string

func (*Client) ProtoMessage

func (*Client) ProtoMessage()

func (*Client) ProtoReflect

func (x *Client) ProtoReflect() protoreflect.Message

func (*Client) Reset

func (x *Client) Reset()

func (*Client) String

func (x *Client) String() string

type ClientUpdatePayloadsRequest

type ClientUpdatePayloadsRequest struct {

	// The light client this call is scoped to.
	Client *Client `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"`
	// The counterparty height to prove at.
	Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientUpdatePayloadsRequest) Descriptor deprecated

func (*ClientUpdatePayloadsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ClientUpdatePayloadsRequest.ProtoReflect.Descriptor instead.

func (*ClientUpdatePayloadsRequest) GetClient

func (x *ClientUpdatePayloadsRequest) GetClient() *Client

func (*ClientUpdatePayloadsRequest) GetHeight

func (x *ClientUpdatePayloadsRequest) GetHeight() uint64

func (*ClientUpdatePayloadsRequest) ProtoMessage

func (*ClientUpdatePayloadsRequest) ProtoMessage()

func (*ClientUpdatePayloadsRequest) ProtoReflect

func (*ClientUpdatePayloadsRequest) Reset

func (x *ClientUpdatePayloadsRequest) Reset()

func (*ClientUpdatePayloadsRequest) String

func (x *ClientUpdatePayloadsRequest) String() string

type ClientUpdatePayloadsResponse

type ClientUpdatePayloadsResponse struct {

	// The encoded updates, each passed unchanged as one updateMsg and submitted
	// in order before the packets. Empty when no update is needed; each entry is
	// a non-empty updateMsg.
	Payloads [][]byte `protobuf:"bytes,1,rep,name=payloads,proto3" json:"payloads,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientUpdatePayloadsResponse) Descriptor deprecated

func (*ClientUpdatePayloadsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ClientUpdatePayloadsResponse.ProtoReflect.Descriptor instead.

func (*ClientUpdatePayloadsResponse) GetPayloads

func (x *ClientUpdatePayloadsResponse) GetPayloads() [][]byte

func (*ClientUpdatePayloadsResponse) ProtoMessage

func (*ClientUpdatePayloadsResponse) ProtoMessage()

func (*ClientUpdatePayloadsResponse) ProtoReflect

func (*ClientUpdatePayloadsResponse) Reset

func (x *ClientUpdatePayloadsResponse) Reset()

func (*ClientUpdatePayloadsResponse) String

type LatestProvableHeightRequest

type LatestProvableHeightRequest struct {

	// The light client this call is scoped to.
	Client *Client `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"`
	// contains filtered or unexported fields
}

func (*LatestProvableHeightRequest) Descriptor deprecated

func (*LatestProvableHeightRequest) Descriptor() ([]byte, []int)

Deprecated: Use LatestProvableHeightRequest.ProtoReflect.Descriptor instead.

func (*LatestProvableHeightRequest) GetClient

func (x *LatestProvableHeightRequest) GetClient() *Client

func (*LatestProvableHeightRequest) ProtoMessage

func (*LatestProvableHeightRequest) ProtoMessage()

func (*LatestProvableHeightRequest) ProtoReflect

func (*LatestProvableHeightRequest) Reset

func (x *LatestProvableHeightRequest) Reset()

func (*LatestProvableHeightRequest) String

func (x *LatestProvableHeightRequest) String() string

type LatestProvableHeightResponse

type LatestProvableHeightResponse struct {

	// The highest counterparty height currently provable.
	Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// counterparty-chain timestamp of height, in seconds.
	Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*LatestProvableHeightResponse) Descriptor deprecated

func (*LatestProvableHeightResponse) Descriptor() ([]byte, []int)

Deprecated: Use LatestProvableHeightResponse.ProtoReflect.Descriptor instead.

func (*LatestProvableHeightResponse) GetHeight

func (x *LatestProvableHeightResponse) GetHeight() uint64

func (*LatestProvableHeightResponse) GetTimestamp

func (x *LatestProvableHeightResponse) GetTimestamp() uint64

func (*LatestProvableHeightResponse) ProtoMessage

func (*LatestProvableHeightResponse) ProtoMessage()

func (*LatestProvableHeightResponse) ProtoReflect

func (*LatestProvableHeightResponse) Reset

func (x *LatestProvableHeightResponse) Reset()

func (*LatestProvableHeightResponse) String

type Packet

type Packet struct {

	// The packet's sequence on the source client.
	Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// The client the packet was sent from.
	SourceClient string `protobuf:"bytes,2,opt,name=source_client,json=sourceClient,proto3" json:"source_client,omitempty"`
	// The client the packet was sent to.
	DestinationClient string `protobuf:"bytes,3,opt,name=destination_client,json=destinationClient,proto3" json:"destination_client,omitempty"`
	// When the packet stops being receivable, in seconds.
	TimeoutTimestamp uint64 `protobuf:"varint,4,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"`
	// The packet's application payloads.
	Payloads []*Payload `protobuf:"bytes,5,rep,name=payloads,proto3" json:"payloads,omitempty"`
	// contains filtered or unexported fields
}

func (*Packet) Descriptor deprecated

func (*Packet) Descriptor() ([]byte, []int)

Deprecated: Use Packet.ProtoReflect.Descriptor instead.

func (*Packet) GetDestinationClient

func (x *Packet) GetDestinationClient() string

func (*Packet) GetPayloads

func (x *Packet) GetPayloads() []*Payload

func (*Packet) GetSequence

func (x *Packet) GetSequence() uint64

func (*Packet) GetSourceClient

func (x *Packet) GetSourceClient() string

func (*Packet) GetTimeoutTimestamp

func (x *Packet) GetTimeoutTimestamp() uint64

func (*Packet) ProtoMessage

func (*Packet) ProtoMessage()

func (*Packet) ProtoReflect

func (x *Packet) ProtoReflect() protoreflect.Message

func (*Packet) Reset

func (x *Packet) Reset()

func (*Packet) String

func (x *Packet) String() string

type PacketProofsRequest

type PacketProofsRequest struct {

	// The light client this call is scoped to.
	Client *Client `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"`
	// The counterparty height to prove at.
	Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// Which commitment to prove for every packet in this request.
	Kind ProofKind `protobuf:"varint,3,opt,name=kind,proto3,enum=ibc.v2.prover.ProofKind" json:"kind,omitempty"`
	// The packets to prove, all under the same kind and height.
	Packets []*Packet `protobuf:"bytes,4,rep,name=packets,proto3" json:"packets,omitempty"`
	// One acknowledgement per packet, in packet order; only for acknowledgement proofs.
	Acknowledgements []*Acknowledgement `protobuf:"bytes,5,rep,name=acknowledgements,proto3" json:"acknowledgements,omitempty"`
	// contains filtered or unexported fields
}

func (*PacketProofsRequest) Descriptor deprecated

func (*PacketProofsRequest) Descriptor() ([]byte, []int)

Deprecated: Use PacketProofsRequest.ProtoReflect.Descriptor instead.

func (*PacketProofsRequest) GetAcknowledgements

func (x *PacketProofsRequest) GetAcknowledgements() []*Acknowledgement

func (*PacketProofsRequest) GetClient

func (x *PacketProofsRequest) GetClient() *Client

func (*PacketProofsRequest) GetHeight

func (x *PacketProofsRequest) GetHeight() uint64

func (*PacketProofsRequest) GetKind

func (x *PacketProofsRequest) GetKind() ProofKind

func (*PacketProofsRequest) GetPackets

func (x *PacketProofsRequest) GetPackets() []*Packet

func (*PacketProofsRequest) ProtoMessage

func (*PacketProofsRequest) ProtoMessage()

func (*PacketProofsRequest) ProtoReflect

func (x *PacketProofsRequest) ProtoReflect() protoreflect.Message

func (*PacketProofsRequest) Reset

func (x *PacketProofsRequest) Reset()

func (*PacketProofsRequest) String

func (x *PacketProofsRequest) String() string

type PacketProofsResponse

type PacketProofsResponse struct {

	// One proof per requested packet, in request order. The proofs of one
	// response are submitted together in one transaction, in this order, so a
	// prover may carry material the batch shares only in the first proof.
	Proofs [][]byte `protobuf:"bytes,1,rep,name=proofs,proto3" json:"proofs,omitempty"`
	// contains filtered or unexported fields
}

func (*PacketProofsResponse) Descriptor deprecated

func (*PacketProofsResponse) Descriptor() ([]byte, []int)

Deprecated: Use PacketProofsResponse.ProtoReflect.Descriptor instead.

func (*PacketProofsResponse) GetProofs

func (x *PacketProofsResponse) GetProofs() [][]byte

func (*PacketProofsResponse) ProtoMessage

func (*PacketProofsResponse) ProtoMessage()

func (*PacketProofsResponse) ProtoReflect

func (x *PacketProofsResponse) ProtoReflect() protoreflect.Message

func (*PacketProofsResponse) Reset

func (x *PacketProofsResponse) Reset()

func (*PacketProofsResponse) String

func (x *PacketProofsResponse) String() string

type Payload

type Payload struct {

	// The application that sent the payload.
	SourcePort string `protobuf:"bytes,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"`
	// The application that receives the payload.
	DestinationPort string `protobuf:"bytes,2,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"`
	// The application version the payload is encoded for.
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// How value is encoded.
	Encoding string `protobuf:"bytes,4,opt,name=encoding,proto3" json:"encoding,omitempty"`
	// The application data.
	Value []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Payload) Descriptor deprecated

func (*Payload) Descriptor() ([]byte, []int)

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetDestinationPort

func (x *Payload) GetDestinationPort() string

func (*Payload) GetEncoding

func (x *Payload) GetEncoding() string

func (*Payload) GetSourcePort

func (x *Payload) GetSourcePort() string

func (*Payload) GetValue

func (x *Payload) GetValue() []byte

func (*Payload) GetVersion

func (x *Payload) GetVersion() string

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

func (x *Payload) ProtoReflect() protoreflect.Message

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

type ProofKind

type ProofKind int32
const (
	ProofKind_PROOF_KIND_UNSPECIFIED ProofKind = 0
	// The packet was sent. Proven to receive it.
	ProofKind_PROOF_KIND_PACKET_COMMITMENT ProofKind = 1
	// The packet was received and acknowledged. Proven to acknowledge it.
	ProofKind_PROOF_KIND_ACKNOWLEDGEMENT ProofKind = 2
	// The packet was never received. Proven to time it out.
	ProofKind_PROOF_KIND_RECEIPT_ABSENCE ProofKind = 3
)

func (ProofKind) Descriptor

func (ProofKind) Descriptor() protoreflect.EnumDescriptor

func (ProofKind) Enum

func (x ProofKind) Enum() *ProofKind

func (ProofKind) EnumDescriptor deprecated

func (ProofKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProofKind.Descriptor instead.

func (ProofKind) Number

func (x ProofKind) Number() protoreflect.EnumNumber

func (ProofKind) String

func (x ProofKind) String() string

func (ProofKind) Type

type ProverServiceClient

type ProverServiceClient interface {
	// LatestProvableHeight returns the highest height a subsequent ClientUpdatePayloads
	// and PacketProofs call sharing that height can currently succeed at, with
	// that height's counterparty-chain timestamp.
	LatestProvableHeight(context.Context, *connect.Request[LatestProvableHeightRequest]) (*connect.Response[LatestProvableHeightResponse], error)
	// ClientUpdatePayloads returns the encoded light-client updates that bring the
	// client to a height.
	ClientUpdatePayloads(context.Context, *connect.Request[ClientUpdatePayloadsRequest]) (*connect.Response[ClientUpdatePayloadsResponse], error)
	// PacketProofs proves each packet's membership or non-membership at a
	// height, one proof per packet with indices aligned to the request.
	PacketProofs(context.Context, *connect.Request[PacketProofsRequest]) (*connect.Response[PacketProofsResponse], error)
}

ProverServiceClient is a client for the ibc.v2.prover.ProverService service.

func NewProverServiceClient

func NewProverServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ProverServiceClient

NewProverServiceClient constructs a client for the ibc.v2.prover.ProverService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type ProverServiceHandler

type ProverServiceHandler interface {
	// LatestProvableHeight returns the highest height a subsequent ClientUpdatePayloads
	// and PacketProofs call sharing that height can currently succeed at, with
	// that height's counterparty-chain timestamp.
	LatestProvableHeight(context.Context, *connect.Request[LatestProvableHeightRequest]) (*connect.Response[LatestProvableHeightResponse], error)
	// ClientUpdatePayloads returns the encoded light-client updates that bring the
	// client to a height.
	ClientUpdatePayloads(context.Context, *connect.Request[ClientUpdatePayloadsRequest]) (*connect.Response[ClientUpdatePayloadsResponse], error)
	// PacketProofs proves each packet's membership or non-membership at a
	// height, one proof per packet with indices aligned to the request.
	PacketProofs(context.Context, *connect.Request[PacketProofsRequest]) (*connect.Response[PacketProofsResponse], error)
}

ProverServiceHandler is an implementation of the ibc.v2.prover.ProverService service.

type UnimplementedProverServiceHandler

type UnimplementedProverServiceHandler struct{}

UnimplementedProverServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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