|
|
|
@ -20,6 +20,7 @@ package catalyst |
|
|
|
|
import ( |
|
|
|
|
"errors" |
|
|
|
|
"fmt" |
|
|
|
|
"strconv" |
|
|
|
|
"sync" |
|
|
|
|
"time" |
|
|
|
|
|
|
|
|
@ -540,7 +541,33 @@ func (api *ConsensusAPI) newPayload(params engine.ExecutableData, versionedHashe |
|
|
|
|
log.Trace("Engine API request received", "method", "NewPayload", "number", params.Number, "hash", params.BlockHash) |
|
|
|
|
block, err := engine.ExecutableDataToBlock(params, versionedHashes, beaconRoot) |
|
|
|
|
if err != nil { |
|
|
|
|
log.Warn("Invalid NewPayload params", "params", params, "error", err) |
|
|
|
|
bgu := "nil" |
|
|
|
|
if params.BlobGasUsed != nil { |
|
|
|
|
bgu = strconv.Itoa(int(*params.BlobGasUsed)) |
|
|
|
|
} |
|
|
|
|
ebg := "nil" |
|
|
|
|
if params.BlobGasUsed != nil { |
|
|
|
|
ebg = strconv.Itoa(int(*params.ExcessBlobGas)) |
|
|
|
|
} |
|
|
|
|
log.Warn("Invalid NewPayload params", |
|
|
|
|
"params.Number", params.Number, |
|
|
|
|
"params.ParentHash", params.ParentHash, |
|
|
|
|
"params.BlockHash", params.BlockHash, |
|
|
|
|
"params.StateRoot", params.StateRoot, |
|
|
|
|
"params.FeeRecipient", params.FeeRecipient, |
|
|
|
|
"params.LogsBloom", common.PrettyBytes(params.LogsBloom), |
|
|
|
|
"params.Random", params.Random, |
|
|
|
|
"params.GasLimit", params.GasLimit, |
|
|
|
|
"params.GasUsed", params.GasUsed, |
|
|
|
|
"params.Timestamp", params.Timestamp, |
|
|
|
|
"params.ExtraData", common.PrettyBytes(params.ExtraData), |
|
|
|
|
"params.BaseFeePerGas", params.BaseFeePerGas, |
|
|
|
|
"params.BlobGasUsed", bgu, |
|
|
|
|
"params.ExcessBlobGas", ebg, |
|
|
|
|
"len(params.Transactions)", len(params.Transactions), |
|
|
|
|
"len(params.Withdrawals)", len(params.Withdrawals), |
|
|
|
|
"beaconRoot", beaconRoot, |
|
|
|
|
"error", err) |
|
|
|
|
return api.invalid(err, nil), nil |
|
|
|
|
} |
|
|
|
|
// Stash away the last update to warn the user if the beacon client goes offline
|
|
|
|
|