Merge pull request #15 from flashbots/fix/SUAVE-236-deuce

Set beaconRoot in block header field
This commit is contained in:
Louis Thibault 2024-02-14 16:22:55 +01:00 committed by GitHub
commit 8f45137bea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 9 deletions

View file

@ -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"
@ -19,6 +16,7 @@ type BuildBlockArgs struct {
Random common.Hash
Withdrawals []*Withdrawal
Extra []byte
BeaconRoot common.Hash
FillPending bool
}

View file

@ -934,6 +934,7 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) {
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 {
@ -1291,6 +1292,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 +1341,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,
}