Documentation
¶
Index ¶
- Variables
- func FetchProcEvents(ctx context.Context, cl ethclient.EngineClient, blockHash common.Hash, ...) ([]types.EVMEvent, error)
- 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) EligibleWithdrawals(ctx context.Context) ([]*Withdrawal, error)
- func (k *Keeper) InsertGenesisHead(ctx context.Context, executionBlockHash []byte) error
- func (k *Keeper) InsertWithdrawal(ctx context.Context, withdrawalAddr common.Address, amountGwei uint64) 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)
- func (k *Keeper) SumPendingWithdrawalsByAddress(ctx context.Context, req *types.SumPendingWithdrawalsByAddressRequest) (*types.SumPendingWithdrawalsByAddressResponse, error)
- type Withdrawal
- func (*Withdrawal) Descriptor() ([]byte, []int)deprecated
- func (x *Withdrawal) GetAddress() []byte
- func (x *Withdrawal) GetAmountGwei() uint64
- func (x *Withdrawal) GetCreatedHeight() uint64
- func (x *Withdrawal) GetId() uint64
- func (*Withdrawal) ProtoMessage()
- func (x *Withdrawal) ProtoReflect() protoreflect.Message
- func (x *Withdrawal) Reset()
- func (x *Withdrawal) String() string
- type WithdrawalAddressIndexKey
- type WithdrawalIdIndexKey
- type WithdrawalIndexKey
- type WithdrawalIterator
- type WithdrawalPrimaryKey
- type WithdrawalTable
Constants ¶
This section is empty.
Variables ¶
var File_octane_evmengine_keeper_evmengine_proto protoreflect.FileDescriptor
Functions ¶
func FetchProcEvents ¶ added in v0.13.0
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 WithdrawalTable() WithdrawalTable // 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, maxWithdrawalsPerBlock uint64, eventProcs ...types.EvmEventProcessor, ) (*Keeper, error)
func (*Keeper) EligibleWithdrawals ¶ added in v0.13.0
func (k *Keeper) EligibleWithdrawals(ctx context.Context) ([]*Withdrawal, error)
EligibleWithdrawals returns all withdrawals created below the specified height, sorted by the id (oldest to newest), limited by the provided count.
func (*Keeper) InsertGenesisHead ¶
InsertGenesisHead inserts the genesis execution head into the database.
func (*Keeper) InsertWithdrawal ¶ added in v0.13.0
func (k *Keeper) InsertWithdrawal(ctx context.Context, withdrawalAddr common.Address, amountGwei uint64) error
InsertWithdrawal inserts a new withdrawal.
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 proposing an empty block.
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)
func (*Keeper) SumPendingWithdrawalsByAddress ¶ added in v0.13.0
func (k *Keeper) SumPendingWithdrawalsByAddress( ctx context.Context, req *types.SumPendingWithdrawalsByAddressRequest, ) (*types.SumPendingWithdrawalsByAddressResponse, error)
type Withdrawal ¶ added in v0.13.0
type Withdrawal struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Auto-incremented ID. Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Target address of the withdrawal. CreatedHeight uint64 `protobuf:"varint,3,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` // Consensus chain height this withdrawal was created in. AmountGwei uint64 `protobuf:"varint,4,opt,name=amount_gwei,json=amountGwei,proto3" json:"amount_gwei,omitempty"` // Value of withdrawal in Gwei. // contains filtered or unexported fields }
Withdrawal defines a wirthdrawal request.
func (*Withdrawal) Descriptor
deprecated
added in
v0.13.0
func (*Withdrawal) Descriptor() ([]byte, []int)
Deprecated: Use Withdrawal.ProtoReflect.Descriptor instead.
func (*Withdrawal) GetAddress ¶ added in v0.13.0
func (x *Withdrawal) GetAddress() []byte
func (*Withdrawal) GetAmountGwei ¶ added in v0.13.0
func (x *Withdrawal) GetAmountGwei() uint64
func (*Withdrawal) GetCreatedHeight ¶ added in v0.13.0
func (x *Withdrawal) GetCreatedHeight() uint64
func (*Withdrawal) GetId ¶ added in v0.13.0
func (x *Withdrawal) GetId() uint64
func (*Withdrawal) ProtoMessage ¶ added in v0.13.0
func (*Withdrawal) ProtoMessage()
func (*Withdrawal) ProtoReflect ¶ added in v0.13.0
func (x *Withdrawal) ProtoReflect() protoreflect.Message
func (*Withdrawal) Reset ¶ added in v0.13.0
func (x *Withdrawal) Reset()
func (*Withdrawal) String ¶ added in v0.13.0
func (x *Withdrawal) String() string
type WithdrawalAddressIndexKey ¶ added in v0.13.0
type WithdrawalAddressIndexKey struct {
// contains filtered or unexported fields
}
func (WithdrawalAddressIndexKey) WithAddress ¶ added in v0.13.0
func (this WithdrawalAddressIndexKey) WithAddress(address []byte) WithdrawalAddressIndexKey
type WithdrawalIdIndexKey ¶ added in v0.13.0
type WithdrawalIdIndexKey struct {
// contains filtered or unexported fields
}
func (WithdrawalIdIndexKey) WithId ¶ added in v0.13.0
func (this WithdrawalIdIndexKey) WithId(id uint64) WithdrawalIdIndexKey
type WithdrawalIndexKey ¶ added in v0.13.0
type WithdrawalIndexKey interface {
// contains filtered or unexported methods
}
type WithdrawalIterator ¶ added in v0.13.0
func (WithdrawalIterator) Value ¶ added in v0.13.0
func (i WithdrawalIterator) Value() (*Withdrawal, error)
type WithdrawalPrimaryKey ¶ added in v0.13.0
type WithdrawalPrimaryKey = WithdrawalIdIndexKey
primary key starting index..
type WithdrawalTable ¶ added in v0.13.0
type WithdrawalTable interface { Insert(ctx context.Context, withdrawal *Withdrawal) error InsertReturningId(ctx context.Context, withdrawal *Withdrawal) (uint64, error) LastInsertedSequence(ctx context.Context) (uint64, error) Update(ctx context.Context, withdrawal *Withdrawal) error Save(ctx context.Context, withdrawal *Withdrawal) error Delete(ctx context.Context, withdrawal *Withdrawal) 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) (*Withdrawal, error) List(ctx context.Context, prefixKey WithdrawalIndexKey, opts ...ormlist.Option) (WithdrawalIterator, error) ListRange(ctx context.Context, from, to WithdrawalIndexKey, opts ...ormlist.Option) (WithdrawalIterator, error) DeleteBy(ctx context.Context, prefixKey WithdrawalIndexKey) error DeleteRange(ctx context.Context, from, to WithdrawalIndexKey) error // contains filtered or unexported methods }
func NewWithdrawalTable ¶ added in v0.13.0
func NewWithdrawalTable(db ormtable.Schema) (WithdrawalTable, error)