Documentation ¶
Index ¶
- Variables
- type BlockDataProvider
- type BlockProcessor
- type EngineBackend
- type KZGPointEvaluationOracle
- type L2EngineAPI
- func (ea *L2EngineAPI) ForcedEmpty() bool
- func (ea *L2EngineAPI) ForkchoiceUpdatedV1(ctx context.Context, state *eth.ForkchoiceState, attr *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)
- func (ea *L2EngineAPI) ForkchoiceUpdatedV2(ctx context.Context, state *eth.ForkchoiceState, attr *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)
- func (ea *L2EngineAPI) ForkchoiceUpdatedV3(ctx context.Context, state *eth.ForkchoiceState, attr *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)
- func (ea *L2EngineAPI) GetPayloadV1(ctx context.Context, payloadId eth.PayloadID) (*eth.ExecutionPayload, error)
- func (ea *L2EngineAPI) GetPayloadV2(ctx context.Context, payloadId eth.PayloadID) (*eth.ExecutionPayloadEnvelope, error)
- func (ea *L2EngineAPI) GetPayloadV3(ctx context.Context, payloadId eth.PayloadID) (*eth.ExecutionPayloadEnvelope, error)
- func (ea *L2EngineAPI) IncludeTx(tx *types.Transaction, from common.Address) error
- func (ea *L2EngineAPI) NewPayloadV1(ctx context.Context, payload *eth.ExecutionPayload) (*eth.PayloadStatusV1, error)
- func (ea *L2EngineAPI) NewPayloadV2(ctx context.Context, payload *eth.ExecutionPayload) (*eth.PayloadStatusV1, error)
- func (ea *L2EngineAPI) NewPayloadV3(ctx context.Context, params *eth.ExecutionPayload, ...) (*eth.PayloadStatusV1, error)
- func (ea *L2EngineAPI) PendingIndices(from common.Address) uint64
- func (ea *L2EngineAPI) RemainingBlockGas() uint64
- type OracleKZGPointEvaluation
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExceedsGasLimit = errors.New("tx gas exceeds block gas limit") ErrUsesTooMuchGas = errors.New("action takes too much gas") )
View Source
var ( STATUS_INVALID = ð.ForkchoiceUpdatedResult{PayloadStatus: eth.PayloadStatusV1{Status: eth.ExecutionInvalid}, PayloadID: nil} STATUS_SYNCING = ð.ForkchoiceUpdatedResult{PayloadStatus: eth.PayloadStatusV1{Status: eth.ExecutionSyncing}, PayloadID: nil} )
View Source
var ErrNotBuildingBlock = errors.New("not currently building a block, cannot include tx from queue")
Functions ¶
This section is empty.
Types ¶
type BlockDataProvider ¶
type BlockProcessor ¶
type BlockProcessor struct {
// contains filtered or unexported fields
}
func NewBlockProcessorFromHeader ¶
func NewBlockProcessorFromHeader(provider BlockDataProvider, h *types.Header) (*BlockProcessor, error)
func NewBlockProcessorFromPayloadAttributes ¶
func NewBlockProcessorFromPayloadAttributes(provider BlockDataProvider, parent common.Hash, params *eth.PayloadAttributes) (*BlockProcessor, error)
func (*BlockProcessor) AddTx ¶
func (b *BlockProcessor) AddTx(tx *types.Transaction) error
func (*BlockProcessor) CheckTxWithinGasLimit ¶
func (b *BlockProcessor) CheckTxWithinGasLimit(tx *types.Transaction) error
func (*BlockProcessor) Commit ¶
func (b *BlockProcessor) Commit() error
type EngineBackend ¶
type EngineBackend interface { CurrentSafeBlock() *types.Header CurrentFinalBlock() *types.Header GetBlockByHash(hash common.Hash) *types.Block GetBlock(hash common.Hash, number uint64) *types.Block HasBlockAndState(hash common.Hash, number uint64) bool GetCanonicalHash(n uint64) common.Hash GetVMConfig() *vm.Config Config() *params.ChainConfig // Engine retrieves the chain's consensus engine. Engine() consensus.Engine StateAt(root common.Hash) (*state.StateDB, error) InsertBlockWithoutSetHead(block *types.Block) error SetCanonical(head *types.Block) (common.Hash, error) SetFinalized(header *types.Header) SetSafe(header *types.Header) consensus.ChainHeaderReader }
type KZGPointEvaluationOracle ¶ added in v1.6.1
KZGPointEvaluationOracle defines the high-level API used to retrieve the result of the KZG point evaluation precompile
type L2EngineAPI ¶
type L2EngineAPI struct {
// contains filtered or unexported fields
}
L2EngineAPI wraps an engine actor, and implements the RPC backend required to serve the engine API. This re-implements some of the Geth API work, but changes the API backend so we can deterministically build and control the L2 block contents to reach very specific edge cases as desired for testing.
func NewL2EngineAPI ¶
func NewL2EngineAPI(log log.Logger, backend EngineBackend, downloader *downloader.Downloader) *L2EngineAPI
func (*L2EngineAPI) ForcedEmpty ¶
func (ea *L2EngineAPI) ForcedEmpty() bool
func (*L2EngineAPI) ForkchoiceUpdatedV1 ¶
func (ea *L2EngineAPI) ForkchoiceUpdatedV1(ctx context.Context, state *eth.ForkchoiceState, attr *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)
func (*L2EngineAPI) ForkchoiceUpdatedV2 ¶ added in v1.4.2
func (ea *L2EngineAPI) ForkchoiceUpdatedV2(ctx context.Context, state *eth.ForkchoiceState, attr *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)
func (*L2EngineAPI) ForkchoiceUpdatedV3 ¶ added in v1.5.0
func (ea *L2EngineAPI) ForkchoiceUpdatedV3(ctx context.Context, state *eth.ForkchoiceState, attr *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)
func (*L2EngineAPI) GetPayloadV1 ¶
func (ea *L2EngineAPI) GetPayloadV1(ctx context.Context, payloadId eth.PayloadID) (*eth.ExecutionPayload, error)
func (*L2EngineAPI) GetPayloadV2 ¶ added in v1.4.2
func (ea *L2EngineAPI) GetPayloadV2(ctx context.Context, payloadId eth.PayloadID) (*eth.ExecutionPayloadEnvelope, error)
func (*L2EngineAPI) GetPayloadV3 ¶ added in v1.5.0
func (ea *L2EngineAPI) GetPayloadV3(ctx context.Context, payloadId eth.PayloadID) (*eth.ExecutionPayloadEnvelope, error)
func (*L2EngineAPI) IncludeTx ¶
func (ea *L2EngineAPI) IncludeTx(tx *types.Transaction, from common.Address) error
func (*L2EngineAPI) NewPayloadV1 ¶
func (ea *L2EngineAPI) NewPayloadV1(ctx context.Context, payload *eth.ExecutionPayload) (*eth.PayloadStatusV1, error)
func (*L2EngineAPI) NewPayloadV2 ¶ added in v1.4.2
func (ea *L2EngineAPI) NewPayloadV2(ctx context.Context, payload *eth.ExecutionPayload) (*eth.PayloadStatusV1, error)
func (*L2EngineAPI) NewPayloadV3 ¶ added in v1.5.0
func (ea *L2EngineAPI) NewPayloadV3(ctx context.Context, params *eth.ExecutionPayload, versionedHashes []common.Hash, beaconRoot *common.Hash) (*eth.PayloadStatusV1, error)
func (*L2EngineAPI) PendingIndices ¶
func (ea *L2EngineAPI) PendingIndices(from common.Address) uint64
func (*L2EngineAPI) RemainingBlockGas ¶
func (ea *L2EngineAPI) RemainingBlockGas() uint64
type OracleKZGPointEvaluation ¶ added in v1.6.1
type OracleKZGPointEvaluation struct {
Oracle KZGPointEvaluationOracle
}
OracleKZGPointEvaluation implements the EIP-4844 point evaluation precompile, using the preimage-oracle to perform the evaluation.
func (*OracleKZGPointEvaluation) RequiredGas ¶ added in v1.6.1
func (b *OracleKZGPointEvaluation) RequiredGas(input []byte) uint64
RequiredGas estimates the gas required for running the point evaluation precompile.
Click to show internal directories.
Click to hide internal directories.