Documentation ¶
Index ¶
- Constants
- Variables
- func NewMsgServerImpl(keeper *Keeper) tiablob.MsgServer
- func NewQueryServerImpl(k *Keeper) tiablob.QueryServer
- type InjectedData
- func (*InjectedData) Descriptor() ([]byte, []int)
- func (m *InjectedData) GetCreateClient() *celestia.CreateClient
- func (m *InjectedData) GetHeaders() []*celestia.Header
- func (m *InjectedData) GetPendingBlocks() PendingBlocks
- func (m *InjectedData) GetProofs() []*celestia.BlobProof
- func (d InjectedData) IsEmpty() bool
- func (m *InjectedData) Marshal() (dAtA []byte, err error)
- func (m *InjectedData) MarshalTo(dAtA []byte) (int, error)
- func (m *InjectedData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*InjectedData) ProtoMessage()
- func (m *InjectedData) Reset()
- func (m *InjectedData) Size() (n int)
- func (m *InjectedData) String() string
- func (m *InjectedData) Unmarshal(dAtA []byte) error
- func (m *InjectedData) XXX_DiscardUnknown()
- func (m *InjectedData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InjectedData) XXX_Merge(src proto.Message)
- func (m *InjectedData) XXX_Size() int
- func (m *InjectedData) XXX_Unmarshal(b []byte) error
- type Keeper
- func (k *Keeper) AddPendingBlockToTimeoutsMap(ctx context.Context, height int64, expiration int64) error
- func (k *Keeper) AddUpdatePendingBlock(ctx context.Context, pendingBlock int64, currentBlockTime time.Time) error
- func (k Keeper) CanUpdateClient(ctx sdk.Context, clientMsg celestia.ClientMessage) error
- func (k Keeper) CreateClient(ctx sdk.Context, clientState celestia.ClientState, ...) error
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *tiablob.GenesisState
- func (k *Keeper) GetAllValidators(ctx context.Context) (tiablob.Validators, error)
- func (k Keeper) GetCelestiaGenesisState(ctx sdk.Context) *celestia.GenesisState
- func (k *Keeper) GetClientID(ctx context.Context) (string, error)
- func (k Keeper) GetClientState(ctx sdk.Context) (*celestia.ClientState, bool)
- func (k Keeper) GetExpiredBlocks(ctx context.Context, currentBlockTime time.Time) []int64
- func (k *Keeper) GetPendingBlocksWithExpiration(ctx context.Context) ([]*tiablob.BlockWithExpiration, error)
- func (k *Keeper) GetProvenHeight(ctx context.Context) (int64, error)
- func (k *Keeper) GetValidatorCelestiaAddress(ctx context.Context, validatorAddress string) (string, error)
- func (k *Keeper) InitGenesis(ctx sdk.Context, data *tiablob.GenesisState) error
- func (k *Keeper) IsBlockExpired(ctx context.Context, currentBlockTime time.Time, blockHeight int64) bool
- func (k Keeper) IsBlockPending(ctx context.Context, blockHeight int64) bool
- func (k *Keeper) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) error
- func (k *Keeper) RemovePendingBlock(ctx context.Context, provenBlock int64) error
- func (k Keeper) SetCelestiaGenesisState(ctx sdk.Context, gs *celestia.GenesisState)
- func (k *Keeper) SetClientID(ctx context.Context, clientID string) error
- func (k *Keeper) SetProvenHeight(ctx context.Context, height int64) error
- func (k *Keeper) SetRelayer(r *tiablobrelayer.Relayer)
- func (k *Keeper) SetValidatorCelestiaAddress(ctx context.Context, validator tiablob.Validator) error
- func (k Keeper) UpdateClient(ctx sdk.Context, clientMsg celestia.ClientMessage) error
- func (k Keeper) VerifyMembership(ctx sdk.Context, height uint64, proof *celestia.ShareProof) error
- type PendingBlocks
- func (*PendingBlocks) Descriptor() ([]byte, []int)
- func (m *PendingBlocks) GetBlockHeights() []int64
- func (m *PendingBlocks) Marshal() (dAtA []byte, err error)
- func (m *PendingBlocks) MarshalTo(dAtA []byte) (int, error)
- func (m *PendingBlocks) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PendingBlocks) ProtoMessage()
- func (m *PendingBlocks) Reset()
- func (m *PendingBlocks) Size() (n int)
- func (m *PendingBlocks) String() string
- func (m *PendingBlocks) Unmarshal(dAtA []byte) error
- func (m *PendingBlocks) XXX_DiscardUnknown()
- func (m *PendingBlocks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PendingBlocks) XXX_Merge(src proto.Message)
- func (m *PendingBlocks) XXX_Size() int
- func (m *PendingBlocks) XXX_Unmarshal(b []byte) error
- type ProofOfBlobProposalHandler
Constants ¶
const ( // Window for a transaction to be committed on Celestia CelestiaResubmissionTime = 75 * time.Second // Buffer for relayer polling logic to retrieve a proof RelayerPollingBuffer = 15 * time.Second )
const DelayAfterUpgrade = int64(10)
Variables ¶
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the module MsgServer interface.
func NewQueryServerImpl ¶
func NewQueryServerImpl(k *Keeper) tiablob.QueryServer
NewQueryServerImpl returns an implementation of the module QueryServer.
Types ¶
type InjectedData ¶
type InjectedData struct { CreateClient *celestia.CreateClient `protobuf:"bytes,1,opt,name=create_client,json=createClient,proto3" json:"create_client,omitempty"` Headers []*celestia.Header `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` Proofs []*celestia.BlobProof `protobuf:"bytes,3,rep,name=proofs,proto3" json:"proofs,omitempty"` PendingBlocks PendingBlocks `protobuf:"bytes,4,opt,name=pending_blocks,json=pendingBlocks,proto3" json:"pending_blocks"` }
func (*InjectedData) Descriptor ¶
func (*InjectedData) Descriptor() ([]byte, []int)
func (*InjectedData) GetCreateClient ¶
func (m *InjectedData) GetCreateClient() *celestia.CreateClient
func (*InjectedData) GetHeaders ¶
func (m *InjectedData) GetHeaders() []*celestia.Header
func (*InjectedData) GetPendingBlocks ¶
func (m *InjectedData) GetPendingBlocks() PendingBlocks
func (*InjectedData) GetProofs ¶
func (m *InjectedData) GetProofs() []*celestia.BlobProof
func (InjectedData) IsEmpty ¶
func (d InjectedData) IsEmpty() bool
func (*InjectedData) Marshal ¶
func (m *InjectedData) Marshal() (dAtA []byte, err error)
func (*InjectedData) MarshalToSizedBuffer ¶
func (m *InjectedData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InjectedData) ProtoMessage ¶
func (*InjectedData) ProtoMessage()
func (*InjectedData) Reset ¶
func (m *InjectedData) Reset()
func (*InjectedData) Size ¶
func (m *InjectedData) Size() (n int)
func (*InjectedData) String ¶
func (m *InjectedData) String() string
func (*InjectedData) Unmarshal ¶
func (m *InjectedData) Unmarshal(dAtA []byte) error
func (*InjectedData) XXX_DiscardUnknown ¶
func (m *InjectedData) XXX_DiscardUnknown()
func (*InjectedData) XXX_Marshal ¶
func (m *InjectedData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InjectedData) XXX_Merge ¶
func (m *InjectedData) XXX_Merge(src proto.Message)
func (*InjectedData) XXX_Size ¶
func (m *InjectedData) XXX_Size() int
func (*InjectedData) XXX_Unmarshal ¶
func (m *InjectedData) XXX_Unmarshal(b []byte) error
type Keeper ¶
type Keeper struct { Validators collections.Map[string, string] ClientID collections.Item[string] ProvenHeight collections.Item[int64] PendingBlocksToTimeouts collections.Map[int64, int64] TimeoutsToPendingBlocks collections.Map[int64, PendingBlocks] // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, appOpts servertypes.AppOptions, storeService storetypes.KVStoreService, sk *stakingkeeper.Keeper, uk *upgradekeeper.Keeper, key storetypes2.StoreKey, publishToCelestiaBlockInterval int, celestiaNamespace share.Namespace, ) *Keeper
func (*Keeper) AddPendingBlockToTimeoutsMap ¶
func (*Keeper) AddUpdatePendingBlock ¶
func (k *Keeper) AddUpdatePendingBlock(ctx context.Context, pendingBlock int64, currentBlockTime time.Time) error
AddUpdatePendingBlock will add a new pending block or update an existing pending block
func (Keeper) CanUpdateClient ¶
func (Keeper) CreateClient ¶
func (k Keeper) CreateClient(ctx sdk.Context, clientState celestia.ClientState, consensusState celestia.ConsensusState) error
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx sdk.Context) *tiablob.GenesisState
ExportGenesis exports the module's state to a genesis state.
func (*Keeper) GetAllValidators ¶
func (Keeper) GetCelestiaGenesisState ¶
func (k Keeper) GetCelestiaGenesisState(ctx sdk.Context) *celestia.GenesisState
GetCelestiaGenesisState exports the celestia light client's full state
func (Keeper) GetClientState ¶
func (Keeper) GetExpiredBlocks ¶
GetExpiredBlocks returns all expired blocks, proposer will propose publishing based on this set
func (*Keeper) GetPendingBlocksWithExpiration ¶
func (*Keeper) GetProvenHeight ¶
func (*Keeper) GetValidatorCelestiaAddress ¶
func (*Keeper) InitGenesis ¶
InitGenesis initializes the module's state from a genesis state.
func (*Keeper) IsBlockExpired ¶
func (k *Keeper) IsBlockExpired(ctx context.Context, currentBlockTime time.Time, blockHeight int64) bool
IsBlockExpired will return true if a block is pending and expired, otherwise it returns false
func (Keeper) IsBlockPending ¶
IsBlockPending return true if a block height is already pending
func (*Keeper) PreBlocker ¶
func (*Keeper) RemovePendingBlock ¶
RemovePendingBlock removes proven block from pending state This function will remove the proven block from the PendingBlocksToTimeouts map and TimeoutsToPendingBlocks map
func (Keeper) SetCelestiaGenesisState ¶
func (k Keeper) SetCelestiaGenesisState(ctx sdk.Context, gs *celestia.GenesisState)
SetCelestiaGenesisState imports celestia light client's full state
func (*Keeper) SetClientID ¶
func (*Keeper) SetProvenHeight ¶
func (*Keeper) SetRelayer ¶
func (k *Keeper) SetRelayer(r *tiablobrelayer.Relayer)
func (*Keeper) SetValidatorCelestiaAddress ¶
func (Keeper) UpdateClient ¶
func (Keeper) VerifyMembership ¶
type PendingBlocks ¶
type PendingBlocks struct {
BlockHeights []int64 `protobuf:"varint,1,rep,packed,name=block_heights,json=blockHeights,proto3" json:"block_heights,omitempty"`
}
func (*PendingBlocks) Descriptor ¶
func (*PendingBlocks) Descriptor() ([]byte, []int)
func (*PendingBlocks) GetBlockHeights ¶
func (m *PendingBlocks) GetBlockHeights() []int64
func (*PendingBlocks) Marshal ¶
func (m *PendingBlocks) Marshal() (dAtA []byte, err error)
func (*PendingBlocks) MarshalToSizedBuffer ¶
func (m *PendingBlocks) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PendingBlocks) ProtoMessage ¶
func (*PendingBlocks) ProtoMessage()
func (*PendingBlocks) Reset ¶
func (m *PendingBlocks) Reset()
func (*PendingBlocks) Size ¶
func (m *PendingBlocks) Size() (n int)
func (*PendingBlocks) String ¶
func (m *PendingBlocks) String() string
func (*PendingBlocks) Unmarshal ¶
func (m *PendingBlocks) Unmarshal(dAtA []byte) error
func (*PendingBlocks) XXX_DiscardUnknown ¶
func (m *PendingBlocks) XXX_DiscardUnknown()
func (*PendingBlocks) XXX_Marshal ¶
func (m *PendingBlocks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PendingBlocks) XXX_Merge ¶
func (m *PendingBlocks) XXX_Merge(src proto.Message)
func (*PendingBlocks) XXX_Size ¶
func (m *PendingBlocks) XXX_Size() int
func (*PendingBlocks) XXX_Unmarshal ¶
func (m *PendingBlocks) XXX_Unmarshal(b []byte) error
type ProofOfBlobProposalHandler ¶
type ProofOfBlobProposalHandler struct {
// contains filtered or unexported fields
}
func NewProofOfBlobProposalHandler ¶
func NewProofOfBlobProposalHandler( k *Keeper, prepareProposalHandler sdk.PrepareProposalHandler, processProposalHandler sdk.ProcessProposalHandler, ) *ProofOfBlobProposalHandler
func (*ProofOfBlobProposalHandler) PrepareProposal ¶
func (h *ProofOfBlobProposalHandler) PrepareProposal(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
func (*ProofOfBlobProposalHandler) ProcessProposal ¶
func (h *ProofOfBlobProposalHandler) ProcessProposal(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)