@@ -30,4 +30,4 @@ If you’re looking for other ways to get involved, here are a few options:
- Grab an idea from the [project ideas list](https://github.com/ethereum-optimism/optimism-project-ideas) to and building
- Suggest a new idea for the [project ideas list](https://github.com/ethereum-optimism/optimism-project-ideas)
- Improve the [Optimism Community Hub](https://community.optimism.io/)[documentation](https://github.com/ethereum-optimism/community-hub) or [tutorials](https://github.com/ethereum-optimism/optimism-tutorial)
- Become an Optimism Ambassador, Support Nerd, and more in the [Optimism Discord](https://discord-gateway.optimism.io/)
- Become an Optimism Ambassador, Support Nerd, and more in the [Optimism Discord](https://discord.gg/optimism)
l2BuildingHeader*types.Header// block header that we add txs to for block building
l2BuildingState*state.StateDB// state used for block building
l2GasPool*core.GasPool// track gas used of ongoing building
pendingIndicesmap[common.Address]uint64// per account, how many txs from the pool were already included in the block, since the pool is lagging behind block mining.
l2Transactions[]*types.Transaction// collects txs that were successfully included into current block build
l2Receipts[]*types.Receipt// collect receipts of ongoing building
l2ForceEmptybool// when no additional txs may be processed (i.e. when sequencer drift runs out)
l2TxFailed[]*types.Transaction// log of failed transactions which could not be included
payloadIDengine.PayloadID// ID of payload that is currently being built
// 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.
typeL2EngineAPIL2Engine
typeL2EngineAPIstruct{
loglog.Logger
backendEngineBackend
// L2 block building data
l2BuildingHeader*types.Header// block header that we add txs to for block building
l2BuildingState*state.StateDB// state used for block building
l2GasPool*core.GasPool// track gas used of ongoing building
pendingIndicesmap[common.Address]uint64// per account, how many txs from the pool were already included in the block, since the pool is lagging behind block mining.
l2Transactions[]*types.Transaction// collects txs that were successfully included into current block build
l2Receipts[]*types.Receipt// collect receipts of ongoing building
l2ForceEmptybool// when no additional txs may be processed (i.e. when sequencer drift runs out)
l2TxFailed[]*types.Transaction// log of failed transactions which could not be included
payloadIDengine.PayloadID// ID of payload that is currently being built
ea.log.Error("TDs unavailable for TTD check","number",block.NumberU64(),"hash",state.HeadBlockHash,"td",td,"parent",block.ParentHash(),"ptd",ptd)
returnSTATUS_INVALID,errors.New("TDs unavailable for TDD check")
}
iftd.Cmp(ttd)<0{
ea.log.Error("Refusing beacon update to pre-merge","number",block.NumberU64(),"hash",state.HeadBlockHash,"diff",block.Difficulty(),"age",common.PrettyAge(time.Unix(int64(block.Time()),0)))
ea.log.Error("Parent block is already post-ttd","number",block.NumberU64(),"hash",state.HeadBlockHash,"diff",block.Difficulty(),"age",common.PrettyAge(time.Unix(int64(block.Time()),0)))
ea.log.Warn("Ignoring already known beacon payload","number",payload.BlockNumber,"hash",payload.BlockHash,"age",common.PrettyAge(time.Unix(int64(block.Time()),0)))