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
- Variables
- func BlobFromProto(p *tmproto.Blob) (core.Blob, error)
- func BlobTxSharesUsed(btx tmproto.BlobTx) int
- func BroadcastTx(ctx context.Context, conn *grpc.ClientConn, mode tx.BroadcastMode, ...) (*tx.BroadcastTxResponse, error)
- func CreateCommitment(blob *Blob) ([]byte, error)
- func CreateCommitments(blobs []*Blob) ([][]byte, error)
- func DefaultEstimateGas(blobSizes []uint32) uint64
- func EstimateGas(blobSizes []uint32, gasPerByte uint32, txSizeCost uint64) uint64
- func GasToConsume(blobSizes []uint32, gasPerByte uint32) uint64
- func GenerateKeyring(t *testing.T, accts ...string) keyring.Keyring
- func InheritTxConfig(builder sdkclient.TxBuilder, tx authsigning.Tx) sdkclient.TxBuilder
- func KeyPrefix(p string) []byte
- func ParamKeyTable() paramtypes.KeyTable
- func QueryAccount(ctx context.Context, conn *grpc.ClientConn, encCfg encoding.Config, ...) (accNum uint64, seqNum uint64, err error)
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error
- func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateBlobNamespace(ns appns.Namespace) error
- func ValidateBlobTx(txcfg client.TxEncodingConfig, bTx tmproto.BlobTx) error
- func ValidateBlobs(blobs ...*Blob) error
- type Blob
- type EventPayForBlobs
- func (*EventPayForBlobs) Descriptor() ([]byte, []int)
- func (m *EventPayForBlobs) GetBlobSizes() []uint32
- func (m *EventPayForBlobs) GetNamespaces() [][]byte
- func (m *EventPayForBlobs) GetSigner() string
- func (m *EventPayForBlobs) Marshal() (dAtA []byte, err error)
- func (m *EventPayForBlobs) MarshalTo(dAtA []byte) (int, error)
- func (m *EventPayForBlobs) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventPayForBlobs) ProtoMessage()
- func (m *EventPayForBlobs) Reset()
- func (m *EventPayForBlobs) Size() (n int)
- func (m *EventPayForBlobs) String() string
- func (m *EventPayForBlobs) Unmarshal(dAtA []byte) error
- func (m *EventPayForBlobs) XXX_DiscardUnknown()
- func (m *EventPayForBlobs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventPayForBlobs) XXX_Merge(src proto.Message)
- func (m *EventPayForBlobs) XXX_Size() int
- func (m *EventPayForBlobs) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type KeyringSigner
- func (k *KeyringSigner) BuildSignedTx(builder sdkclient.TxBuilder, msg ...sdktypes.Msg) (authsigning.Tx, error)
- func (k *KeyringSigner) EncodeTx(tx sdktypes.Tx) ([]byte, error)
- func (k *KeyringSigner) GetSignerData() (authsigning.SignerData, error)
- func (k *KeyringSigner) GetSignerInfo() *keyring.Record
- func (k *KeyringSigner) NewTxBuilder(opts ...TxBuilderOption) sdkclient.TxBuilder
- func (k *KeyringSigner) QueryAccountNumber(ctx context.Context, conn *grpc.ClientConn) error
- func (k *KeyringSigner) SetAccountNumber(n uint64)
- func (k *KeyringSigner) SetEncodingConfig(encCfg encoding.Config)
- func (k *KeyringSigner) SetKeyringAccName(name string)
- func (k *KeyringSigner) SetSequence(n uint64)
- func (k *KeyringSigner) UpdateAccountFromClient(clientCtx sdkclient.Context) error
- type MsgClient
- type MsgPayForBlobs
- func (*MsgPayForBlobs) Descriptor() ([]byte, []int)
- func (msg *MsgPayForBlobs) Gas(gasPerByte uint32) uint64
- func (m *MsgPayForBlobs) GetBlobSizes() []uint32
- func (m *MsgPayForBlobs) GetNamespaces() [][]byte
- func (m *MsgPayForBlobs) GetShareCommitments() [][]byte
- func (m *MsgPayForBlobs) GetShareVersions() []uint32
- func (msg *MsgPayForBlobs) GetSignBytes() []byte
- func (m *MsgPayForBlobs) GetSigner() string
- func (msg *MsgPayForBlobs) GetSigners() []sdk.AccAddress
- func (m *MsgPayForBlobs) Marshal() (dAtA []byte, err error)
- func (m *MsgPayForBlobs) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPayForBlobs) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPayForBlobs) ProtoMessage()
- func (m *MsgPayForBlobs) Reset()
- func (msg *MsgPayForBlobs) Route() string
- func (m *MsgPayForBlobs) Size() (n int)
- func (m *MsgPayForBlobs) String() string
- func (msg *MsgPayForBlobs) Type() string
- func (m *MsgPayForBlobs) Unmarshal(dAtA []byte) error
- func (msg *MsgPayForBlobs) ValidateBasic() error
- func (m *MsgPayForBlobs) XXX_DiscardUnknown()
- func (m *MsgPayForBlobs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPayForBlobs) XXX_Merge(src proto.Message)
- func (m *MsgPayForBlobs) XXX_Size() int
- func (m *MsgPayForBlobs) XXX_Unmarshal(b []byte) error
- type MsgPayForBlobsResponse
- func (*MsgPayForBlobsResponse) Descriptor() ([]byte, []int)
- func (m *MsgPayForBlobsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgPayForBlobsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPayForBlobsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPayForBlobsResponse) ProtoMessage()
- func (m *MsgPayForBlobsResponse) Reset()
- func (m *MsgPayForBlobsResponse) Size() (n int)
- func (m *MsgPayForBlobsResponse) String() string
- func (m *MsgPayForBlobsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgPayForBlobsResponse) XXX_DiscardUnknown()
- func (m *MsgPayForBlobsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPayForBlobsResponse) XXX_Merge(src proto.Message)
- func (m *MsgPayForBlobsResponse) XXX_Size() int
- func (m *MsgPayForBlobsResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetGasPerBlobByte() uint32
- func (m *Params) GetGovMaxSquareSize() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type TxBuilderOption
- func SetFeeAmount(fees sdk.Coins) TxBuilderOption
- func SetFeeGranter(feeGranter sdk.AccAddress) TxBuilderOption
- func SetFeePayer(feePayer sdk.AccAddress) TxBuilderOption
- func SetGasLimit(limit uint64) TxBuilderOption
- func SetMemo(memo string) TxBuilderOption
- func SetTimeoutHeight(height uint64) TxBuilderOption
- func SetTip(tip *tx.Tip) TxBuilderOption
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
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" )
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 )
const DefaultIndex uint64 = 1
DefaultIndex is the default capability global index
const (
// nolint:lll
TestAccName = "test-account"
)
Variables ¶
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") ErrTailPaddingNamespace = errors.Register(ModuleName, 11118, "cannot use tail padding namespace ID") ErrTxNamespace = errors.Register(ModuleName, 11119, "cannot use transaction namespace ID") 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") ErrNoBlobSizes = errors.Register(ModuleName, 11134, "no blob sizes 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") )
var ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( KeyGasPerBlobByte = []byte("GasPerBlobByte") DefaultGasPerBlobByte uint32 = appconsts.DefaultGasPerBlobByte KeyGovMaxSquareSize = []byte("GovMaxSquareSize") DefaultGovMaxSquareSize uint64 = appconsts.DefaultGovMaxSquareSize )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var EventTypePayForBlob = proto.MessageName(&EventPayForBlobs{})
var ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
Functions ¶
func BlobTxSharesUsed ¶
func BroadcastTx ¶
func BroadcastTx(ctx context.Context, conn *grpc.ClientConn, mode tx.BroadcastMode, txBytes []byte) (*tx.BroadcastTxResponse, error)
BroadcastTx uses the provided grpc connection to broadcast a signed and encoded transaction
func CreateCommitment ¶
CreateCommitment generates the share commitment for a given blob. See [data square layout rationale] and [blob share commitment rules].
[data square layout rationale]: ../../specs/src/specs/data_square_layout.md [blob share commitment rules]: ../../specs/src/specs/data_square_layout.md#blob-share-commitment-rules
func CreateCommitments ¶
func DefaultEstimateGas ¶ added in v1.0.0
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
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 GasToConsume ¶ added in v1.0.0
GasToConsume works out the extra gas charged to pay for a set of blobs in a PFB. Note that tranasctions will incur other gas costs, such as the signature verification and reads to the user's account.
func InheritTxConfig ¶
InheritTxConfig sets all of the accessible configurations from a given tx into a a give client.TxBuilder
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable returns the param key table for the blob module
func QueryAccount ¶
func QueryAccount(ctx context.Context, conn *grpc.ClientConn, encCfg encoding.Config, address string) (accNum uint64, seqNum uint64, err error)
QueryAccount fetches the account number and sequence number from the celestia-app node.
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
func RegisterMsgHandler ¶
RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMsgHandlerClient ¶
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 ¶
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 RegisterQueryHandler ¶
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
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 tmproto.BlobTx) error
ValidateBlobTx performs stateless checks on the BlobTx to ensure that the blobs attached to the transaction are valid.
func ValidateBlobs ¶
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) 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) 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 KeyringSigner ¶
type KeyringSigner struct { keyring.Keyring sync.RWMutex // contains filtered or unexported fields }
KeyringSigner uses a keyring to sign and build celestia-app transactions
func GenerateKeyringSigner ¶
func GenerateKeyringSigner(t *testing.T, accts ...string) *KeyringSigner
func NewKeyringSigner ¶
func NewKeyringSigner(ring keyring.Keyring, name string, chainID string) *KeyringSigner
NewKeyringSigner returns a new KeyringSigner using the provided keyring
func (*KeyringSigner) BuildSignedTx ¶
func (k *KeyringSigner) BuildSignedTx(builder sdkclient.TxBuilder, msg ...sdktypes.Msg) (authsigning.Tx, error)
BuildSignedTx creates and signs a sdk.Tx that contains the provided message. The interal account number must be set by calling k.QueryAccountNumber or by manually setting it via k.SetAccountNumber for the built transactions to be valid.
func (*KeyringSigner) EncodeTx ¶
func (k *KeyringSigner) EncodeTx(tx sdktypes.Tx) ([]byte, error)
EncodeTx uses the keyring signer's encoding config to encode the provided sdk transaction
func (*KeyringSigner) GetSignerData ¶
func (k *KeyringSigner) GetSignerData() (authsigning.SignerData, error)
func (*KeyringSigner) GetSignerInfo ¶
func (k *KeyringSigner) GetSignerInfo() *keyring.Record
GetSignerInfo returns the signer info for the KeyringSigner's account. panics if the account in KeyringSigner does not exist.
func (*KeyringSigner) NewTxBuilder ¶
func (k *KeyringSigner) NewTxBuilder(opts ...TxBuilderOption) sdkclient.TxBuilder
NewTxBuilder returns the default sdk Tx builder using the celestia-app encoding config
func (*KeyringSigner) QueryAccountNumber ¶
func (k *KeyringSigner) QueryAccountNumber(ctx context.Context, conn *grpc.ClientConn) error
QueryAccountNumber queries the application to find the latest account number and sequence, updating the respective internal fields. The internal account number must be set by this method or by manually calling k.SetAccountNumber in order for any built transactions to be valid
func (*KeyringSigner) SetAccountNumber ¶
func (k *KeyringSigner) SetAccountNumber(n uint64)
SetAccountNumber manually sets the underlying account number
func (*KeyringSigner) SetEncodingConfig ¶
func (k *KeyringSigner) SetEncodingConfig(encCfg encoding.Config)
SetEncodingConfig manually overides the encoding config of the underlying signer
func (*KeyringSigner) SetKeyringAccName ¶
func (k *KeyringSigner) SetKeyringAccName(name string)
SetKeyringAccName manually sets the underlying keyring account name
func (*KeyringSigner) SetSequence ¶
func (k *KeyringSigner) SetSequence(n uint64)
SetSequence manually sets the underlying sequence number
func (*KeyringSigner) UpdateAccountFromClient ¶
func (k *KeyringSigner) UpdateAccountFromClient(clientCtx sdkclient.Context) 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 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"` BlobSizes []uint32 `protobuf:"varint,3,rep,packed,name=blob_sizes,json=blobSizes,proto3" json:"blob_sizes,omitempty"` ShareCommitments [][]byte `protobuf:"bytes,4,rep,name=share_commitments,json=shareCommitments,proto3" json:"share_commitments,omitempty"` // 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) (*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) 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 (*Params) Descriptor ¶
func (*Params) GetGasPerBlobByte ¶
func (*Params) GetGovMaxSquareSize ¶ added in v1.0.0
func (*Params) MarshalToSizedBuffer ¶
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) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
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 TxBuilderOption ¶
func SetFeeAmount ¶
func SetFeeAmount(fees sdk.Coins) TxBuilderOption
func SetFeeGranter ¶
func SetFeeGranter(feeGranter sdk.AccAddress) TxBuilderOption
func SetFeePayer ¶
func SetFeePayer(feePayer sdk.AccAddress) TxBuilderOption
func SetGasLimit ¶
func SetGasLimit(limit uint64) TxBuilderOption
func SetMemo ¶
func SetMemo(memo string) TxBuilderOption
func SetTimeoutHeight ¶
func SetTimeoutHeight(height uint64) TxBuilderOption
func SetTip ¶
func SetTip(tip *tx.Tip) TxBuilderOption
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) PayForBlobs ¶
func (*UnimplementedMsgServer) PayForBlobs(ctx context.Context, req *MsgPayForBlobs) (*MsgPayForBlobsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)