types

package
v1.0.0-rc62 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: Apache-2.0 Imports: 38 Imported by: 14

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "blob"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_blob"
)
View Source
const (
	URLMsgPayForBlobs = "/celestia.blob.v1.MsgPayForBlobs"

	// PFBGasFixedCost is a rough estimate for the "fixed cost" in the gas cost
	// formula: gas cost = gas per byte * bytes per share * shares occupied by
	// blob + "fixed cost". In this context, "fixed cost" accounts for the gas
	// consumed by operations outside the blob's GasToConsume function (i.e.
	// signature verification, tx size, read access to accounts).
	//
	// Since the gas cost of these operations is not easy to calculate, linear
	// regression was performed on a set of observed data points to derive an
	// approximate formula for gas cost. Assuming gas per byte = 8 and bytes per
	// share = 512, we can solve for "fixed cost" and arrive at 65,000. gas cost
	// = 8 * 512 * number of shares occupied by the blob + 65,000 has a
	// correlation coefficient of 0.996. To be conservative, we round up "fixed
	// cost" to 75,000 because the first tx always takes up 10,000 more gas than
	// subsequent txs.
	PFBGasFixedCost = 75000

	// BytesPerBlobInfo is a rough estimation for the amount of extra bytes in
	// information a blob adds to the size of the underlying transaction.
	BytesPerBlobInfo = 70
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

Variables

View Source
var (
	ErrReservedNamespace              = errors.Register(ModuleName, 11110, "cannot use reserved namespace IDs")
	ErrInvalidNamespaceLen            = errors.Register(ModuleName, 11111, "invalid namespace length")
	ErrInvalidDataSize                = errors.Register(ModuleName, 11112, "data must be multiple of shareSize")
	ErrBlobSizeMismatch               = errors.Register(ModuleName, 11113, "actual blob size differs from that specified in the MsgPayForBlob")
	ErrCommittedSquareSizeNotPowOf2   = errors.Register(ModuleName, 11114, "committed to invalid square size: must be power of two")
	ErrCalculateCommitment            = errors.Register(ModuleName, 11115, "unexpected error calculating commitment for share")
	ErrInvalidShareCommitment         = errors.Register(ModuleName, 11116, "invalid commitment for share")
	ErrParitySharesNamespace          = errors.Register(ModuleName, 11117, "cannot use parity shares namespace ID")
	ErrTailPaddingNamespace           = errors.Register(ModuleName, 11118, "cannot use tail padding namespace ID")
	ErrTxNamespace                    = errors.Register(ModuleName, 11119, "cannot use transaction namespace ID")
	ErrInvalidShareCommitments        = errors.Register(ModuleName, 11122, "invalid share commitments: all relevant square sizes must be committed to")
	ErrUnsupportedShareVersion        = errors.Register(ModuleName, 11123, "unsupported share version")
	ErrZeroBlobSize                   = errors.Register(ModuleName, 11124, "cannot use zero blob size")
	ErrMismatchedNumberOfPFBorBlob    = errors.Register(ModuleName, 11125, "mismatched number of blobs per MsgPayForBlob")
	ErrNoPFB                          = errors.Register(ModuleName, 11126, "no MsgPayForBlobs found in blob transaction")
	ErrNamespaceMismatch              = errors.Register(ModuleName, 11127, "namespace of blob and its respective MsgPayForBlobs differ")
	ErrProtoParsing                   = errors.Register(ModuleName, 11128, "failure to parse a transaction from its protobuf representation")
	ErrMultipleMsgsInBlobTx           = errors.Register(ModuleName, 11129, "not yet supported: multiple sdk.Msgs found in BlobTx")
	ErrMismatchedNumberOfPFBComponent = errors.Register(ModuleName, 11130, "number of each component in a MsgPayForBlobs must be identical")
	ErrNoBlobs                        = errors.Register(ModuleName, 11131, "no blobs provided")
	ErrNoNamespaces                   = errors.Register(ModuleName, 11132, "no namespaces provided")
	ErrNoShareVersions                = errors.Register(ModuleName, 11133, "no share versions provided")
	ErrNoBlobSizes                    = errors.Register(ModuleName, 11134, "no blob sizes provided")
	ErrNoShareCommitments             = errors.Register(ModuleName, 11135, "no share commitments provided")
	ErrInvalidNamespace               = errors.Register(ModuleName, 11136, "invalid namespace")
	ErrInvalidNamespaceVersion        = errors.Register(ModuleName, 11137, "invalid namespace version")
	ErrTotalBlobSizeTooLarge          = errors.Register(ModuleName, 11138, "total blob size too large")
)
View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyGasPerBlobByte              = []byte("GasPerBlobByte")
	DefaultGasPerBlobByte   uint32 = appconsts.DefaultGasPerBlobByte
	KeyGovMaxSquareSize            = []byte("GovMaxSquareSize")
	DefaultGovMaxSquareSize uint64 = appconsts.DefaultGovMaxSquareSize
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var EventTypePayForBlob = proto.MessageName(&EventPayForBlobs{})

Functions

func BlobTxSharesUsed

func BlobTxSharesUsed(btx tmproto.BlobTx) int

func DefaultEstimateGas added in v1.0.0

func DefaultEstimateGas(blobSizes []uint32) uint64

DefaultEstimateGas runs EstimateGas with the system defaults. The network may change these values through governance, thus this function should predominantly be used in testing.

func EstimateGas added in v1.0.0

func EstimateGas(blobSizes []uint32, gasPerByte uint32, txSizeCost uint64) uint64

EstimateGas estimates the total gas required to pay for a set of blobs in a PFB. It is based on a linear model that is dependent on the governance parameters: gasPerByte and txSizeCost. It assumes other variables are constant. This includes assuming the PFB is the only message in the transaction.

func ExtractBlobComponents

func ExtractBlobComponents(pblobs []*blob.Blob) (namespaceVersions []uint32, namespaceIds [][]byte, sizes []uint32, shareVersions []uint32)

ExtractBlobComponents separates and returns the components of a slice of blobs.

func GasToConsume added in v1.0.0

func GasToConsume(blobSizes []uint32, gasPerByte uint32) uint64

GasToConsume works out the extra gas charged to pay for a set of blobs in a PFB. Note that transactions will incur other gas costs, such as the signature verification and reads to the user's account.

func KeyPrefix

func KeyPrefix(p string) []byte

func NewBlob

func NewBlob(ns appns.Namespace, data []byte, shareVersion uint8) (*blob.Blob, error)

NewBlob creates a new coretypes.Blob from the provided data after performing basic stateless checks over it.

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable returns the param key table for the blob module

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgHandler

func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.

func RegisterMsgHandlerFromEndpoint

func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMsgHandlerServer

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateBlobNamespace added in v1.0.0

func ValidateBlobNamespace(ns appns.Namespace) error

ValidateBlobNamespace returns an error if the provided namespace is an invalid user-specifiable blob namespace (e.g. reserved, parity shares, or tail padding).

func ValidateBlobTx

func ValidateBlobTx(txcfg client.TxEncodingConfig, bTx blob.BlobTx) error

ValidateBlobTx performs stateless checks on the BlobTx to ensure that the blobs attached to the transaction are valid.

func ValidateBlobs

func ValidateBlobs(blobs ...*blob.Blob) error

ValidateBlobs performs basic checks over the components of one or more PFBs.

Types

type EventPayForBlobs

type EventPayForBlobs struct {
	Signer    string   `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	BlobSizes []uint32 `protobuf:"varint,2,rep,packed,name=blob_sizes,json=blobSizes,proto3" json:"blob_sizes,omitempty"`
	// namespaces is a list of namespaces that the blobs in blob_sizes belong to.
	// A namespace has length of 29 bytes where the first byte is the
	// namespaceVersion and the subsequent 28 bytes are the namespaceID.
	Namespaces [][]byte `protobuf:"bytes,3,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
}

EventPayForBlobs defines an event that is emitted after a pay for blob has been processed.

func NewPayForBlobsEvent

func NewPayForBlobsEvent(signer string, blobSizes []uint32, namespaces [][]byte) *EventPayForBlobs

NewPayForBlobsEvent returns a new EventPayForBlobs

func (*EventPayForBlobs) Descriptor

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

func (*EventPayForBlobs) GetBlobSizes

func (m *EventPayForBlobs) GetBlobSizes() []uint32

func (*EventPayForBlobs) GetNamespaces added in v1.0.0

func (m *EventPayForBlobs) GetNamespaces() [][]byte

func (*EventPayForBlobs) GetSigner

func (m *EventPayForBlobs) GetSigner() string

func (*EventPayForBlobs) Marshal

func (m *EventPayForBlobs) Marshal() (dAtA []byte, err error)

func (*EventPayForBlobs) MarshalTo

func (m *EventPayForBlobs) MarshalTo(dAtA []byte) (int, error)

func (*EventPayForBlobs) MarshalToSizedBuffer

func (m *EventPayForBlobs) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventPayForBlobs) ProtoMessage

func (*EventPayForBlobs) ProtoMessage()

func (*EventPayForBlobs) Reset

func (m *EventPayForBlobs) Reset()

func (*EventPayForBlobs) Size

func (m *EventPayForBlobs) Size() (n int)

func (*EventPayForBlobs) String

func (m *EventPayForBlobs) String() string

func (*EventPayForBlobs) Unmarshal

func (m *EventPayForBlobs) Unmarshal(dAtA []byte) error

func (*EventPayForBlobs) XXX_DiscardUnknown

func (m *EventPayForBlobs) XXX_DiscardUnknown()

func (*EventPayForBlobs) XXX_Marshal

func (m *EventPayForBlobs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventPayForBlobs) XXX_Merge

func (m *EventPayForBlobs) XXX_Merge(src proto.Message)

func (*EventPayForBlobs) XXX_Size

func (m *EventPayForBlobs) XXX_Size() int

func (*EventPayForBlobs) XXX_Unmarshal

func (m *EventPayForBlobs) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the capability module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// PayForBlobs allows the user to pay for the inclusion of one or more blobs
	PayForBlobs(ctx context.Context, in *MsgPayForBlobs, opts ...grpc.CallOption) (*MsgPayForBlobsResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgPayForBlobs

type MsgPayForBlobs struct {
	// signer is the bech32 encoded signer address. See
	// https://en.bitcoin.it/wiki/Bech32.
	Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	// namespaces is a list of namespaces that the blobs are associated with. A
	// namespace is a byte slice of length 29 where the first byte is the
	// namespaceVersion and the subsequent 28 bytes are the namespaceId.
	Namespaces [][]byte `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
	// blob_sizes is a list of blob sizes (one per blob). Each size is in bytes.
	BlobSizes []uint32 `protobuf:"varint,3,rep,packed,name=blob_sizes,json=blobSizes,proto3" json:"blob_sizes,omitempty"`
	// share_commitments is a list of share commitments (one per blob).
	ShareCommitments [][]byte `protobuf:"bytes,4,rep,name=share_commitments,json=shareCommitments,proto3" json:"share_commitments,omitempty"`
	// share_versions are the versions of the share format that the blobs
	// associated with this message should use when included in a block. The
	// share_versions specified must match the share_versions used to generate the
	// share_commitment in this message.
	ShareVersions []uint32 `protobuf:"varint,8,rep,packed,name=share_versions,json=shareVersions,proto3" json:"share_versions,omitempty"`
}

MsgPayForBlobs pays for the inclusion of a blob in the block.

func NewMsgPayForBlobs

func NewMsgPayForBlobs(signer string, blobs ...*blob.Blob) (*MsgPayForBlobs, error)

func (*MsgPayForBlobs) Descriptor

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

func (*MsgPayForBlobs) Gas added in v1.0.0

func (msg *MsgPayForBlobs) Gas(gasPerByte uint32) uint64

func (*MsgPayForBlobs) GetBlobSizes

func (m *MsgPayForBlobs) GetBlobSizes() []uint32

func (*MsgPayForBlobs) GetNamespaces added in v1.0.0

func (m *MsgPayForBlobs) GetNamespaces() [][]byte

func (*MsgPayForBlobs) GetShareCommitments

func (m *MsgPayForBlobs) GetShareCommitments() [][]byte

func (*MsgPayForBlobs) GetShareVersions

func (m *MsgPayForBlobs) GetShareVersions() []uint32

func (*MsgPayForBlobs) GetSignBytes

func (msg *MsgPayForBlobs) GetSignBytes() []byte

GetSignBytes fulfills the legacytx.LegacyMsg interface by returning a deterministic set of bytes to sign over

func (*MsgPayForBlobs) GetSigner

func (m *MsgPayForBlobs) GetSigner() string

func (*MsgPayForBlobs) GetSigners

func (msg *MsgPayForBlobs) GetSigners() []sdk.AccAddress

GetSigners fulfills the sdk.Msg interface by returning the signer's address

func (*MsgPayForBlobs) Marshal

func (m *MsgPayForBlobs) Marshal() (dAtA []byte, err error)

func (*MsgPayForBlobs) MarshalTo

func (m *MsgPayForBlobs) MarshalTo(dAtA []byte) (int, error)

func (*MsgPayForBlobs) MarshalToSizedBuffer

func (m *MsgPayForBlobs) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgPayForBlobs) ProtoMessage

func (*MsgPayForBlobs) ProtoMessage()

func (*MsgPayForBlobs) Reset

func (m *MsgPayForBlobs) Reset()

func (*MsgPayForBlobs) Route

func (msg *MsgPayForBlobs) Route() string

Route fulfills the legacytx.LegacyMsg interface

func (*MsgPayForBlobs) Size

func (m *MsgPayForBlobs) Size() (n int)

func (*MsgPayForBlobs) String

func (m *MsgPayForBlobs) String() string

func (*MsgPayForBlobs) Type

func (msg *MsgPayForBlobs) Type() string

Type fulfills the legacytx.LegacyMsg interface

func (*MsgPayForBlobs) Unmarshal

func (m *MsgPayForBlobs) Unmarshal(dAtA []byte) error

func (*MsgPayForBlobs) ValidateBasic

func (msg *MsgPayForBlobs) ValidateBasic() error

ValidateBasic fulfills the sdk.Msg interface by performing stateless validity checks on the msg that also don't require having the actual blob(s)

func (*MsgPayForBlobs) XXX_DiscardUnknown

func (m *MsgPayForBlobs) XXX_DiscardUnknown()

func (*MsgPayForBlobs) XXX_Marshal

func (m *MsgPayForBlobs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgPayForBlobs) XXX_Merge

func (m *MsgPayForBlobs) XXX_Merge(src proto.Message)

func (*MsgPayForBlobs) XXX_Size

func (m *MsgPayForBlobs) XXX_Size() int

func (*MsgPayForBlobs) XXX_Unmarshal

func (m *MsgPayForBlobs) XXX_Unmarshal(b []byte) error

type MsgPayForBlobsResponse

type MsgPayForBlobsResponse struct {
}

MsgPayForBlobsResponse describes the response returned after the submission of a PayForBlobs

func (*MsgPayForBlobsResponse) Descriptor

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

func (*MsgPayForBlobsResponse) Marshal

func (m *MsgPayForBlobsResponse) Marshal() (dAtA []byte, err error)

func (*MsgPayForBlobsResponse) MarshalTo

func (m *MsgPayForBlobsResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgPayForBlobsResponse) MarshalToSizedBuffer

func (m *MsgPayForBlobsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgPayForBlobsResponse) ProtoMessage

func (*MsgPayForBlobsResponse) ProtoMessage()

func (*MsgPayForBlobsResponse) Reset

func (m *MsgPayForBlobsResponse) Reset()

func (*MsgPayForBlobsResponse) Size

func (m *MsgPayForBlobsResponse) Size() (n int)

func (*MsgPayForBlobsResponse) String

func (m *MsgPayForBlobsResponse) String() string

func (*MsgPayForBlobsResponse) Unmarshal

func (m *MsgPayForBlobsResponse) Unmarshal(dAtA []byte) error

func (*MsgPayForBlobsResponse) XXX_DiscardUnknown

func (m *MsgPayForBlobsResponse) XXX_DiscardUnknown()

func (*MsgPayForBlobsResponse) XXX_Marshal

func (m *MsgPayForBlobsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgPayForBlobsResponse) XXX_Merge

func (m *MsgPayForBlobsResponse) XXX_Merge(src proto.Message)

func (*MsgPayForBlobsResponse) XXX_Size

func (m *MsgPayForBlobsResponse) XXX_Size() int

func (*MsgPayForBlobsResponse) XXX_Unmarshal

func (m *MsgPayForBlobsResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// PayForBlobs allows the user to pay for the inclusion of one or more blobs
	PayForBlobs(context.Context, *MsgPayForBlobs) (*MsgPayForBlobsResponse, error)
}

MsgServer is the server API for Msg service.

type Params

type Params struct {
	GasPerBlobByte   uint32 `` /* 133-byte string literal not displayed */
	GovMaxSquareSize uint64 `` /* 141-byte string literal not displayed */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams(gasPerBlobByte uint32, govMaxSquareSize uint64) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetGasPerBlobByte

func (m *Params) GetGasPerBlobByte() uint32

func (*Params) GetGovMaxSquareSize added in v1.0.0

func (m *Params) GetGovMaxSquareSize() uint64

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs gets the list of param key-value pairs

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Params queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryParamsRequest) MarshalTo

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsRequest) MarshalToSizedBuffer

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

func (m *QueryParamsRequest) Size() (n int)

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsRequest) XXX_Merge

func (m *QueryParamsRequest) XXX_Merge(src proto.Message)

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Params queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) PayForBlobs

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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