Documentation ¶
Index ¶
- Variables
- type Block
- type BlockCreatedHeightIndexKey
- type BlockIdIndexKey
- type BlockIndexKey
- type BlockIterator
- type BlockPrimaryKey
- type BlockTable
- type Keeper
- type Msg
- func (*Msg) Descriptor() ([]byte, []int)deprecated
- func (x *Msg) GetBlockId() uint64
- func (x *Msg) GetDestChainId() uint64
- func (x *Msg) GetId() uint64
- func (x *Msg) GetMsgType() uint32
- func (x *Msg) GetMsgTypeId() uint64
- func (x *Msg) GetShardId() uint64
- func (x *Msg) GetStreamOffset() uint64
- func (*Msg) ProtoMessage()
- func (x *Msg) ProtoReflect() protoreflect.Message
- func (x *Msg) Reset()
- func (x *Msg) String() string
- type MsgBlockIdIndexKey
- type MsgIdIndexKey
- type MsgIndexKey
- type MsgIterator
- type MsgPrimaryKey
- type MsgTable
- type Offset
- func (*Offset) Descriptor() ([]byte, []int)deprecated
- func (x *Offset) GetDestChainId() uint64
- func (x *Offset) GetId() uint64
- func (x *Offset) GetOffset() uint64
- func (x *Offset) GetShardId() uint64
- func (*Offset) ProtoMessage()
- func (x *Offset) ProtoReflect() protoreflect.Message
- func (x *Offset) Reset()
- func (x *Offset) String() string
- type OffsetDestChainIdShardIdIndexKey
- type OffsetIdIndexKey
- type OffsetIndexKey
- type OffsetIterator
- type OffsetPrimaryKey
- type OffsetTable
- type PortalStore
Constants ¶
This section is empty.
Variables ¶
View Source
var File_halo_portal_keeper_portal_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Auto-incremented ID (BlockHeight, BlockOffset) CreatedHeight uint64 `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` // Height this block was created at. // contains filtered or unexported fields }
Block groups a set of Msgs adding height and offset.
func (*Block) Descriptor
deprecated
func (*Block) GetCreatedHeight ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type BlockCreatedHeightIndexKey ¶
type BlockCreatedHeightIndexKey struct {
// contains filtered or unexported fields
}
func (BlockCreatedHeightIndexKey) WithCreatedHeight ¶
func (this BlockCreatedHeightIndexKey) WithCreatedHeight(created_height uint64) BlockCreatedHeightIndexKey
type BlockIdIndexKey ¶
type BlockIdIndexKey struct {
// contains filtered or unexported fields
}
func (BlockIdIndexKey) WithId ¶
func (this BlockIdIndexKey) WithId(id uint64) BlockIdIndexKey
type BlockIndexKey ¶
type BlockIndexKey interface {
// contains filtered or unexported methods
}
type BlockIterator ¶
func (BlockIterator) Value ¶
func (i BlockIterator) Value() (*Block, error)
type BlockTable ¶
type BlockTable interface { Insert(ctx context.Context, block *Block) error InsertReturningId(ctx context.Context, block *Block) (uint64, error) LastInsertedSequence(ctx context.Context) (uint64, error) Update(ctx context.Context, block *Block) error Save(ctx context.Context, block *Block) error Delete(ctx context.Context, block *Block) error Has(ctx context.Context, id uint64) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id uint64) (*Block, error) HasByCreatedHeight(ctx context.Context, created_height uint64) (found bool, err error) // GetByCreatedHeight returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. GetByCreatedHeight(ctx context.Context, created_height uint64) (*Block, error) List(ctx context.Context, prefixKey BlockIndexKey, opts ...ormlist.Option) (BlockIterator, error) ListRange(ctx context.Context, from, to BlockIndexKey, opts ...ormlist.Option) (BlockIterator, error) DeleteBy(ctx context.Context, prefixKey BlockIndexKey) error DeleteRange(ctx context.Context, from, to BlockIndexKey) error // contains filtered or unexported methods }
func NewBlockTable ¶
func NewBlockTable(db ormtable.Schema) (BlockTable, error)
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) Block ¶
func (k Keeper) Block(ctx context.Context, req *types.BlockRequest) (*types.BlockResponse, error)
type Msg ¶
type Msg struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Auto-incremented ID BlockId uint64 `protobuf:"varint,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` // Block ID to which this msg belongs MsgType uint32 `protobuf:"varint,3,opt,name=msg_type,json=msgType,proto3" json:"msg_type,omitempty"` // Message type (ValidatorSet, Withdrawal, etc.) MsgTypeId uint64 `protobuf:"varint,4,opt,name=msg_type_id,json=msgTypeId,proto3" json:"msg_type_id,omitempty"` // ID of the type referred to be MsgType DestChainId uint64 `protobuf:"varint,5,opt,name=dest_chain_id,json=destChainId,proto3" json:"dest_chain_id,omitempty"` // Destination chain ID ShardId uint64 `protobuf:"varint,6,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` // Shard of the message StreamOffset uint64 `protobuf:"varint,7,opt,name=stream_offset,json=streamOffset,proto3" json:"stream_offset,omitempty"` // Offset of the message in the stream // contains filtered or unexported fields }
Msg represents a single cross-chain message emitted by the consensus chain portal.
func (*Msg) Descriptor
deprecated
func (*Msg) GetBlockId ¶
func (*Msg) GetDestChainId ¶
func (*Msg) GetMsgType ¶
func (*Msg) GetMsgTypeId ¶
func (*Msg) GetShardId ¶
func (*Msg) GetStreamOffset ¶
func (*Msg) ProtoMessage ¶
func (*Msg) ProtoMessage()
func (*Msg) ProtoReflect ¶
func (x *Msg) ProtoReflect() protoreflect.Message
type MsgBlockIdIndexKey ¶
type MsgBlockIdIndexKey struct {
// contains filtered or unexported fields
}
func (MsgBlockIdIndexKey) WithBlockId ¶
func (this MsgBlockIdIndexKey) WithBlockId(block_id uint64) MsgBlockIdIndexKey
type MsgIdIndexKey ¶
type MsgIdIndexKey struct {
// contains filtered or unexported fields
}
func (MsgIdIndexKey) WithId ¶
func (this MsgIdIndexKey) WithId(id uint64) MsgIdIndexKey
type MsgIndexKey ¶
type MsgIndexKey interface {
// contains filtered or unexported methods
}
type MsgIterator ¶
func (MsgIterator) Value ¶
func (i MsgIterator) Value() (*Msg, error)
type MsgTable ¶
type MsgTable interface { Insert(ctx context.Context, msg *Msg) error InsertReturningId(ctx context.Context, msg *Msg) (uint64, error) LastInsertedSequence(ctx context.Context) (uint64, error) Update(ctx context.Context, msg *Msg) error Save(ctx context.Context, msg *Msg) error Delete(ctx context.Context, msg *Msg) error Has(ctx context.Context, id uint64) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id uint64) (*Msg, error) List(ctx context.Context, prefixKey MsgIndexKey, opts ...ormlist.Option) (MsgIterator, error) ListRange(ctx context.Context, from, to MsgIndexKey, opts ...ormlist.Option) (MsgIterator, error) DeleteBy(ctx context.Context, prefixKey MsgIndexKey) error DeleteRange(ctx context.Context, from, to MsgIndexKey) error // contains filtered or unexported methods }
type Offset ¶
type Offset struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Auto-incremented ID DestChainId uint64 `protobuf:"varint,2,opt,name=dest_chain_id,json=destChainId,proto3" json:"dest_chain_id,omitempty"` // Destination chain ID ShardId uint64 `protobuf:"varint,3,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` // Shard ID Offset uint64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` // Offset of the last message in the stream // contains filtered or unexported fields }
func (*Offset) Descriptor
deprecated
func (*Offset) GetDestChainId ¶
func (*Offset) GetShardId ¶
func (*Offset) ProtoMessage ¶
func (*Offset) ProtoMessage()
func (*Offset) ProtoReflect ¶
func (x *Offset) ProtoReflect() protoreflect.Message
type OffsetDestChainIdShardIdIndexKey ¶
type OffsetDestChainIdShardIdIndexKey struct {
// contains filtered or unexported fields
}
func (OffsetDestChainIdShardIdIndexKey) WithDestChainId ¶
func (this OffsetDestChainIdShardIdIndexKey) WithDestChainId(dest_chain_id uint64) OffsetDestChainIdShardIdIndexKey
func (OffsetDestChainIdShardIdIndexKey) WithDestChainIdShardId ¶
func (this OffsetDestChainIdShardIdIndexKey) WithDestChainIdShardId(dest_chain_id uint64, shard_id uint64) OffsetDestChainIdShardIdIndexKey
type OffsetIdIndexKey ¶
type OffsetIdIndexKey struct {
// contains filtered or unexported fields
}
func (OffsetIdIndexKey) WithId ¶
func (this OffsetIdIndexKey) WithId(id uint64) OffsetIdIndexKey
type OffsetIndexKey ¶
type OffsetIndexKey interface {
// contains filtered or unexported methods
}
type OffsetIterator ¶
func (OffsetIterator) Value ¶
func (i OffsetIterator) Value() (*Offset, error)
type OffsetTable ¶
type OffsetTable interface { Insert(ctx context.Context, offset *Offset) error InsertReturningId(ctx context.Context, offset *Offset) (uint64, error) LastInsertedSequence(ctx context.Context) (uint64, error) Update(ctx context.Context, offset *Offset) error Save(ctx context.Context, offset *Offset) error Delete(ctx context.Context, offset *Offset) error Has(ctx context.Context, id uint64) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id uint64) (*Offset, error) HasByDestChainIdShardId(ctx context.Context, dest_chain_id uint64, shard_id uint64) (found bool, err error) // GetByDestChainIdShardId returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. GetByDestChainIdShardId(ctx context.Context, dest_chain_id uint64, shard_id uint64) (*Offset, error) List(ctx context.Context, prefixKey OffsetIndexKey, opts ...ormlist.Option) (OffsetIterator, error) ListRange(ctx context.Context, from, to OffsetIndexKey, opts ...ormlist.Option) (OffsetIterator, error) DeleteBy(ctx context.Context, prefixKey OffsetIndexKey) error DeleteRange(ctx context.Context, from, to OffsetIndexKey) error // contains filtered or unexported methods }
func NewOffsetTable ¶
func NewOffsetTable(db ormtable.Schema) (OffsetTable, error)
type PortalStore ¶
type PortalStore interface { BlockTable() BlockTable MsgTable() MsgTable OffsetTable() OffsetTable // contains filtered or unexported methods }
func NewPortalStore ¶
func NewPortalStore(db ormtable.Schema) (PortalStore, error)
Click to show internal directories.
Click to hide internal directories.