Documentation ¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper *Keeper) types.MsgServiceServer
- func NewProposalServer(keeper *Keeper) types.MsgServiceServer
- type EvmengineStore
- type ExecutionHead
- func (*ExecutionHead) Descriptor() ([]byte, []int)deprecated
- func (x *ExecutionHead) GetBlockHash() []byte
- func (x *ExecutionHead) GetBlockHeight() uint64
- func (x *ExecutionHead) GetBlockTime() uint64
- func (x *ExecutionHead) GetCreatedHeight() uint64
- func (x *ExecutionHead) GetId() uint64
- func (h *ExecutionHead) Hash() (common.Hash, error)
- func (*ExecutionHead) ProtoMessage()
- func (x *ExecutionHead) ProtoReflect() protoreflect.Message
- func (x *ExecutionHead) Reset()
- func (x *ExecutionHead) String() string
- type ExecutionHeadIdIndexKey
- type ExecutionHeadIndexKey
- type ExecutionHeadIterator
- type ExecutionHeadPrimaryKey
- type ExecutionHeadTable
- type Hooks
- func (Hooks) AfterDelegationModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error
- func (Hooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (Hooks) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (Hooks) AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error
- func (Hooks) AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeDelegationCreated(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeDelegationRemoved(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeDelegationSharesModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (Hooks) BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error
- func (Hooks) BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, amount sdkmath.LegacyDec) error
- type Keeper
- func (k *Keeper) InsertGenesisHead(ctx context.Context, executionBlockHash []byte) error
- func (k *Keeper) PostFinalize(ctx sdk.Context) error
- func (k *Keeper) PrepareProposal(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
- func (k *Keeper) RegisterProposalService(server grpc1.Server)
- func (k *Keeper) SetBuildDelay(d time.Duration)
- func (k *Keeper) SetBuildOptimistic(b bool)
- func (k *Keeper) SetCometAPI(c comet.API)
- func (k *Keeper) SetVoteProvider(p types.VoteExtensionProvider)
Constants ¶
This section is empty.
Variables ¶
var File_octane_evmengine_keeper_evmengine_proto protoreflect.FileDescriptor
Functions ¶
func NewMsgServerImpl ¶
func NewMsgServerImpl(keeper *Keeper) types.MsgServiceServer
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NewProposalServer ¶
func NewProposalServer(keeper *Keeper) types.MsgServiceServer
NewProposalServer returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type EvmengineStore ¶
type EvmengineStore interface { ExecutionHeadTable() ExecutionHeadTable // contains filtered or unexported methods }
func NewEvmengineStore ¶
func NewEvmengineStore(db ormtable.Schema) (EvmengineStore, error)
type ExecutionHead ¶
type ExecutionHead struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Auto-incremented ID (always and only 1). CreatedHeight uint64 `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` // Consensus chain height this execution block was created in. BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // Execution block height. BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Execution block hash. BlockTime uint64 `protobuf:"varint,5,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` // Execution block time. // contains filtered or unexported fields }
ExecutionHead defines the execution chain head. It is a singleton table; it only has a single row with ID==1.
func (*ExecutionHead) Descriptor
deprecated
func (*ExecutionHead) Descriptor() ([]byte, []int)
Deprecated: Use ExecutionHead.ProtoReflect.Descriptor instead.
func (*ExecutionHead) GetBlockHash ¶
func (x *ExecutionHead) GetBlockHash() []byte
func (*ExecutionHead) GetBlockHeight ¶
func (x *ExecutionHead) GetBlockHeight() uint64
func (*ExecutionHead) GetBlockTime ¶
func (x *ExecutionHead) GetBlockTime() uint64
func (*ExecutionHead) GetCreatedHeight ¶
func (x *ExecutionHead) GetCreatedHeight() uint64
func (*ExecutionHead) GetId ¶
func (x *ExecutionHead) GetId() uint64
func (*ExecutionHead) ProtoMessage ¶
func (*ExecutionHead) ProtoMessage()
func (*ExecutionHead) ProtoReflect ¶
func (x *ExecutionHead) ProtoReflect() protoreflect.Message
func (*ExecutionHead) Reset ¶
func (x *ExecutionHead) Reset()
func (*ExecutionHead) String ¶
func (x *ExecutionHead) String() string
type ExecutionHeadIdIndexKey ¶
type ExecutionHeadIdIndexKey struct {
// contains filtered or unexported fields
}
func (ExecutionHeadIdIndexKey) WithId ¶
func (this ExecutionHeadIdIndexKey) WithId(id uint64) ExecutionHeadIdIndexKey
type ExecutionHeadIndexKey ¶
type ExecutionHeadIndexKey interface {
// contains filtered or unexported methods
}
type ExecutionHeadIterator ¶
func (ExecutionHeadIterator) Value ¶
func (i ExecutionHeadIterator) Value() (*ExecutionHead, error)
type ExecutionHeadPrimaryKey ¶
type ExecutionHeadPrimaryKey = ExecutionHeadIdIndexKey
primary key starting index..
type ExecutionHeadTable ¶
type ExecutionHeadTable interface { Insert(ctx context.Context, executionHead *ExecutionHead) error InsertReturningId(ctx context.Context, executionHead *ExecutionHead) (uint64, error) LastInsertedSequence(ctx context.Context) (uint64, error) Update(ctx context.Context, executionHead *ExecutionHead) error Save(ctx context.Context, executionHead *ExecutionHead) error Delete(ctx context.Context, executionHead *ExecutionHead) 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) (*ExecutionHead, error) List(ctx context.Context, prefixKey ExecutionHeadIndexKey, opts ...ormlist.Option) (ExecutionHeadIterator, error) ListRange(ctx context.Context, from, to ExecutionHeadIndexKey, opts ...ormlist.Option) (ExecutionHeadIterator, error) DeleteBy(ctx context.Context, prefixKey ExecutionHeadIndexKey) error DeleteRange(ctx context.Context, from, to ExecutionHeadIndexKey) error // contains filtered or unexported methods }
func NewExecutionHeadTable ¶
func NewExecutionHeadTable(db ormtable.Schema) (ExecutionHeadTable, error)
type Hooks ¶
type Hooks struct{}
Hooks implements the staking hooks. It just logs at this point.
func (Hooks) AfterDelegationModified ¶
func (Hooks) AfterDelegationModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Hooks) AfterUnbondingInitiated ¶
func (Hooks) AfterValidatorBeginUnbonding ¶
func (Hooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
func (Hooks) AfterValidatorBonded ¶
func (Hooks) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
AfterValidatorBonded updates the signing info start height or create a new signing info.
func (Hooks) AfterValidatorCreated ¶
AfterValidatorCreated adds the address-pubkey relation when a validator is created.
func (Hooks) AfterValidatorRemoved ¶
func (Hooks) AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
AfterValidatorRemoved deletes the address-pubkey relation when a validator is removed,.
func (Hooks) BeforeDelegationCreated ¶
func (Hooks) BeforeDelegationCreated(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Hooks) BeforeDelegationRemoved ¶
func (Hooks) BeforeDelegationRemoved(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Hooks) BeforeDelegationSharesModified ¶
func (Hooks) BeforeDelegationSharesModified(ctx context.Context, accAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Hooks) BeforeValidatorModified ¶
func (Hooks) BeforeValidatorSlashed ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, engineCl ethclient.EngineClient, txConfig client.TxConfig, addrProvider types.AddressProvider, feeRecProvider types.FeeRecipientProvider, eventProcs ...types.EvmEventProcessor, ) (*Keeper, error)
func (*Keeper) InsertGenesisHead ¶
InsertGenesisHead inserts the genesis execution head into the database.
func (*Keeper) PostFinalize ¶
PostFinalize is called by our custom ABCI wrapper after a block is finalized. It starts an optimistic build if enabled and if we are the next proposer.
This custom ABCI callback is used since we need to trigger optimistic builds immediately after FinalizeBlock with the latest app hash which isn't available from cosmosSDK otherwise.
func (*Keeper) PrepareProposal ¶
func (k *Keeper) PrepareProposal(ctx sdk.Context, req *abci.RequestPrepareProposal) ( *abci.ResponsePrepareProposal, error, )
PrepareProposal returns a proposal for the next block. Note returning an error results in a panic cometbft and CONSENSUS_FAILURE log.
func (*Keeper) RegisterProposalService ¶
RegisterProposalService registers the proposal service on the provided router. This implements abci.ProcessProposal verification of new proposals.
func (*Keeper) SetBuildDelay ¶
SetBuildDelay sets the build delay parameter.
func (*Keeper) SetBuildOptimistic ¶
SetBuildOptimistic sets the optimistic build parameter.
func (*Keeper) SetCometAPI ¶
SetCometAPI sets the comet API client.
func (*Keeper) SetVoteProvider ¶
func (k *Keeper) SetVoteProvider(p types.VoteExtensionProvider)