Documentation ¶
Index ¶
- Variables
- func CreatePrecompileOverrides(precompileOracle PrecompileOracle) vm.PrecompileOverrides
- type BlockDataProvider
- type BlockProcessor
- type EngineBackend
- 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 PrecompileOracle
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 ¶
func CreatePrecompileOverrides ¶
func CreatePrecompileOverrides(precompileOracle PrecompileOracle) vm.PrecompileOverrides
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, attrs *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 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 ¶
func (ea *L2EngineAPI) ForkchoiceUpdatedV2(ctx context.Context, state *eth.ForkchoiceState, attr *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)
func (*L2EngineAPI) ForkchoiceUpdatedV3 ¶
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 ¶
func (ea *L2EngineAPI) GetPayloadV2(ctx context.Context, payloadId eth.PayloadID) (*eth.ExecutionPayloadEnvelope, error)
func (*L2EngineAPI) GetPayloadV3 ¶
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 ¶
func (ea *L2EngineAPI) NewPayloadV2(ctx context.Context, payload *eth.ExecutionPayload) (*eth.PayloadStatusV1, error)
func (*L2EngineAPI) NewPayloadV3 ¶
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
Click to show internal directories.
Click to hide internal directories.