diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index df20ea3876..489a35a61c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.20', '1.21.x' ] + go-version: ['1.21.x', '1.22.x'] # goarch: [amd64, arm64] steps: diff --git a/core/types/suave_structs.go b/core/types/suave_structs.go index 849acfcf9b..d6f4d1171d 100644 --- a/core/types/suave_structs.go +++ b/core/types/suave_structs.go @@ -1,6 +1,3 @@ -// Code generated by suave/gen in https://github.com/flashbots/suave-geth. -// DO NOT EDIT. -// Hash: c60f303834fbdbbd940aae7cb3679cf3755a25f7384f1052c20bf6c38d9a0451 package types import "github.com/ethereum/go-ethereum/common" @@ -18,7 +15,9 @@ type BuildBlockArgs struct { GasLimit uint64 Random common.Hash Withdrawals []*Withdrawal + ParentBeaconBlockRoot common.Hash Extra []byte + BeaconRoot common.Hash FillPending bool } @@ -50,4 +49,4 @@ type SimulatedLog struct { Data []byte Addr common.Address Topics []common.Hash -} \ No newline at end of file +} diff --git a/miner/worker.go b/miner/worker.go index 6282aecc5b..0d3c400d98 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -929,15 +929,20 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) { } // Construct the sealing block header. header := &types.Header{ - ParentHash: parent.Hash(), - Number: new(big.Int).Add(parent.Number, common.Big1), - GasLimit: core.CalcGasLimit(parent.GasLimit, w.config.GasCeil), - Time: timestamp, - Coinbase: genParams.coinbase, + ParentHash: parent.Hash(), + Number: new(big.Int).Add(parent.Number, common.Big1), + GasLimit: core.CalcGasLimit(parent.GasLimit, w.config.GasCeil), + Time: timestamp, + Coinbase: genParams.coinbase, + ParentBeaconRoot: genParams.beaconRoot, } // Set the extra field. if len(w.extra) != 0 { - header.Extra = w.extra + if len(genParams.extra) != 0 { + header.Extra = genParams.extra + } else { + header.Extra = w.extra + } } // Set the randomness field from the beacon chain if it's available. if genParams.random != (common.Hash{}) { @@ -1291,6 +1296,7 @@ func (w *worker) buildBlockFromTxs(ctx context.Context, args *types.BuildBlockAr random: args.Random, extra: args.Extra, withdrawals: args.Withdrawals, + beaconRoot: &args.BeaconRoot, // noUncle: true, noTxs: false, } @@ -1339,6 +1345,7 @@ func (w *worker) buildBlockFromBundles(ctx context.Context, args *types.BuildBlo random: args.Random, extra: args.Extra, withdrawals: args.Withdrawals, + beaconRoot: &args.BeaconRoot, // noUncle: true, noTxs: false, }