Skip to content

Commit 016aaa6

Browse files
authored
Revert "core, params, beacon/engine: implement EIP 4788 BeaconRoot (ethereum#27849)"
This reverts commit 2e9477f.
1 parent ae10f30 commit 016aaa6

File tree

19 files changed

+187
-436
lines changed

19 files changed

+187
-436
lines changed

beacon/engine/types.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ func ExecutableDataToBlock(params ExecutableData, versionedHashes []common.Hash)
226226
WithdrawalsHash: withdrawalsRoot,
227227
ExcessBlobGas: params.ExcessBlobGas,
228228
BlobGasUsed: params.BlobGasUsed,
229-
// TODO BeaconRoot
230229
}
231230
block := types.NewBlockWithHeader(header).WithBody(txs, nil /* uncles */).WithWithdrawals(params.Withdrawals)
232231
if block.Hash() != params.BlockHash {
@@ -256,7 +255,6 @@ func BlockToExecutableData(block *types.Block, fees *big.Int, blobs []kzg4844.Bl
256255
Withdrawals: block.Withdrawals(),
257256
BlobGasUsed: block.BlobGasUsed(),
258257
ExcessBlobGas: block.ExcessBlobGas(),
259-
// TODO BeaconRoot
260258
}
261259
blobsBundle := BlobsBundleV1{
262260
Commitments: make([]hexutil.Bytes, 0),

cmd/evm/internal/t8ntool/execution.go

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,25 @@ type ommer struct {
6969

7070
//go:generate go run github.com/fjl/gencodec -type stEnv -field-override stEnvMarshaling -out gen_stenv.go
7171
type stEnv struct {
72-
Coinbase common.Address `json:"currentCoinbase" gencodec:"required"`
73-
Difficulty *big.Int `json:"currentDifficulty"`
74-
Random *big.Int `json:"currentRandom"`
75-
ParentDifficulty *big.Int `json:"parentDifficulty"`
76-
ParentBaseFee *big.Int `json:"parentBaseFee,omitempty"`
77-
ParentGasUsed uint64 `json:"parentGasUsed,omitempty"`
78-
ParentGasLimit uint64 `json:"parentGasLimit,omitempty"`
79-
GasLimit uint64 `json:"currentGasLimit" gencodec:"required"`
80-
Number uint64 `json:"currentNumber" gencodec:"required"`
81-
Timestamp uint64 `json:"currentTimestamp" gencodec:"required"`
82-
ParentTimestamp uint64 `json:"parentTimestamp,omitempty"`
83-
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"`
84-
Ommers []ommer `json:"ommers,omitempty"`
85-
Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"`
86-
BaseFee *big.Int `json:"currentBaseFee,omitempty"`
87-
ParentUncleHash common.Hash `json:"parentUncleHash"`
88-
ExcessBlobGas *uint64 `json:"excessBlobGas,omitempty"`
89-
ParentExcessBlobGas *uint64 `json:"parentExcessBlobGas,omitempty"`
90-
ParentBlobGasUsed *uint64 `json:"parentBlobGasUsed,omitempty"`
91-
ParentBeaconBlockRoot *common.Hash `json:"parentBeaconBlockRoot"`
72+
Coinbase common.Address `json:"currentCoinbase" gencodec:"required"`
73+
Difficulty *big.Int `json:"currentDifficulty"`
74+
Random *big.Int `json:"currentRandom"`
75+
ParentDifficulty *big.Int `json:"parentDifficulty"`
76+
ParentBaseFee *big.Int `json:"parentBaseFee,omitempty"`
77+
ParentGasUsed uint64 `json:"parentGasUsed,omitempty"`
78+
ParentGasLimit uint64 `json:"parentGasLimit,omitempty"`
79+
GasLimit uint64 `json:"currentGasLimit" gencodec:"required"`
80+
Number uint64 `json:"currentNumber" gencodec:"required"`
81+
Timestamp uint64 `json:"currentTimestamp" gencodec:"required"`
82+
ParentTimestamp uint64 `json:"parentTimestamp,omitempty"`
83+
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"`
84+
Ommers []ommer `json:"ommers,omitempty"`
85+
Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"`
86+
BaseFee *big.Int `json:"currentBaseFee,omitempty"`
87+
ParentUncleHash common.Hash `json:"parentUncleHash"`
88+
ExcessBlobGas *uint64 `json:"excessBlobGas,omitempty"`
89+
ParentExcessBlobGas *uint64 `json:"parentExcessBlobGas,omitempty"`
90+
ParentBlobGasUsed *uint64 `json:"parentBlobGasUsed,omitempty"`
9291
}
9392

9493
type stEnvMarshaling struct {
@@ -183,10 +182,6 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
183182
chainConfig.DAOForkBlock.Cmp(new(big.Int).SetUint64(pre.Env.Number)) == 0 {
184183
misc.ApplyDAOHardFork(statedb)
185184
}
186-
if beaconRoot := pre.Env.ParentBeaconBlockRoot; beaconRoot != nil {
187-
evm := vm.NewEVM(vmContext, vm.TxContext{}, statedb, chainConfig, vmConfig)
188-
core.ProcessBeaconBlockRoot(*beaconRoot, evm, statedb)
189-
}
190185
var blobGasUsed uint64
191186
for i, tx := range txs {
192187
if tx.Type() == types.BlobTxType && vmContext.ExcessBlobGas == nil {

cmd/evm/internal/t8ntool/gen_stenv.go

Lines changed: 38 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)