Skip to content

Commit 1015a42

Browse files
authored
Merge pull request #30522 from ethereum/master
Release Geth v1.14.10
2 parents c350d3a + 2695518 commit 1015a42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1366
-436
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ les/ @zsfelfoldi @rjl493456442
2020
light/ @zsfelfoldi @rjl493456442
2121
node/ @fjl
2222
p2p/ @fjl @zsfelfoldi
23+
params/ @fjl @holiman @karalabe @gballet @rjl493456442 @zsfelfoldi
2324
rpc/ @fjl @holiman
2425
signer/ @holiman

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ jobs:
8585
if: type = push
8686
os: osx
8787
osx_image: xcode14.2
88-
go: 1.23.x
88+
go: 1.23.1 # See https://github.com/ethereum/go-ethereum/pull/30478
8989
env:
9090
- azure-osx
9191
git:
9292
submodules: false # avoid cloning ethereum/tests
9393
script:
94+
- ln -sf /Users/travis/gopath/bin/go1.23.1 /usr/local/bin/go # Work around travis go-setup bug
9495
- go run build/ci.go install -dlgo
9596
- go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
9697
- go run build/ci.go install -dlgo -arch arm64

beacon/engine/gen_epe.go

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

beacon/engine/types.go

+31-10
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,22 @@ type executableDataMarshaling struct {
9494
ExcessBlobGas *hexutil.Uint64
9595
}
9696

97+
// StatelessPayloadStatusV1 is the result of a stateless payload execution.
98+
type StatelessPayloadStatusV1 struct {
99+
Status string `json:"status"`
100+
StateRoot common.Hash `json:"stateRoot"`
101+
ReceiptsRoot common.Hash `json:"receiptsRoot"`
102+
ValidationError *string `json:"validationError"`
103+
}
104+
97105
//go:generate go run github.com/fjl/gencodec -type ExecutionPayloadEnvelope -field-override executionPayloadEnvelopeMarshaling -out gen_epe.go
98106

99107
type ExecutionPayloadEnvelope struct {
100108
ExecutionPayload *ExecutableData `json:"executionPayload" gencodec:"required"`
101109
BlockValue *big.Int `json:"blockValue" gencodec:"required"`
102110
BlobsBundle *BlobsBundleV1 `json:"blobsBundle"`
103111
Override bool `json:"shouldOverrideBuilder"`
112+
Witness *hexutil.Bytes `json:"witness"`
104113
}
105114

106115
type BlobsBundleV1 struct {
@@ -115,9 +124,10 @@ type executionPayloadEnvelopeMarshaling struct {
115124
}
116125

117126
type PayloadStatusV1 struct {
118-
Status string `json:"status"`
119-
LatestValidHash *common.Hash `json:"latestValidHash"`
120-
ValidationError *string `json:"validationError"`
127+
Status string `json:"status"`
128+
Witness *hexutil.Bytes `json:"witness"`
129+
LatestValidHash *common.Hash `json:"latestValidHash"`
130+
ValidationError *string `json:"validationError"`
121131
}
122132

123133
type TransitionConfigurationV1 struct {
@@ -198,6 +208,20 @@ func decodeTransactions(enc [][]byte) ([]*types.Transaction, error) {
198208
// Withdrawals value will propagate through the returned block. Empty
199209
// Withdrawals value must be passed via non-nil, length 0 value in data.
200210
func ExecutableDataToBlock(data ExecutableData, versionedHashes []common.Hash, beaconRoot *common.Hash) (*types.Block, error) {
211+
block, err := ExecutableDataToBlockNoHash(data, versionedHashes, beaconRoot)
212+
if err != nil {
213+
return nil, err
214+
}
215+
if block.Hash() != data.BlockHash {
216+
return nil, fmt.Errorf("blockhash mismatch, want %x, got %x", data.BlockHash, block.Hash())
217+
}
218+
return block, nil
219+
}
220+
221+
// ExecutableDataToBlockNoHash is analogous to ExecutableDataToBlock, but is used
222+
// for stateless execution, so it skips checking if the executable data hashes to
223+
// the requested hash (stateless has to *compute* the root hash, it's not given).
224+
func ExecutableDataToBlockNoHash(data ExecutableData, versionedHashes []common.Hash, beaconRoot *common.Hash) (*types.Block, error) {
201225
txs, err := decodeTransactions(data.Transactions)
202226
if err != nil {
203227
return nil, err
@@ -267,13 +291,10 @@ func ExecutableDataToBlock(data ExecutableData, versionedHashes []common.Hash, b
267291
ParentBeaconRoot: beaconRoot,
268292
RequestsHash: requestsHash,
269293
}
270-
block := types.NewBlockWithHeader(header)
271-
block = block.WithBody(types.Body{Transactions: txs, Uncles: nil, Withdrawals: data.Withdrawals, Requests: requests})
272-
block = block.WithWitness(data.ExecutionWitness)
273-
if block.Hash() != data.BlockHash {
274-
return nil, fmt.Errorf("blockhash mismatch, want %x, got %x", data.BlockHash, block.Hash())
275-
}
276-
return block, nil
294+
return types.NewBlockWithHeader(header).
295+
WithBody(types.Body{Transactions: txs, Uncles: nil, Withdrawals: data.Withdrawals, Requests: requests}).
296+
WithWitness(data.ExecutionWitness),
297+
nil
277298
}
278299

279300
// BlockToExecutableData constructs the ExecutableData structure by filling the

cmd/geth/main.go

-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ var (
156156
utils.BeaconGenesisRootFlag,
157157
utils.BeaconGenesisTimeFlag,
158158
utils.BeaconCheckpointFlag,
159-
utils.CollectWitnessFlag,
160159
}, utils.NetworkFlags, utils.DatabaseFlags)
161160

162161
rpcFlags = []cli.Flag{

cmd/utils/flags.go

-10
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,6 @@ var (
600600
Usage: "Disables db compaction after import",
601601
Category: flags.LoggingCategory,
602602
}
603-
CollectWitnessFlag = &cli.BoolFlag{
604-
Name: "collectwitness",
605-
Usage: "Enable state witness generation during block execution. Work in progress flag, don't use.",
606-
Category: flags.MiscCategory,
607-
}
608603

609604
// MISC settings
610605
SyncTargetFlag = &cli.StringFlag{
@@ -1312,7 +1307,6 @@ func MakeAddress(ks *keystore.KeyStore, account string) (accounts.Account, error
13121307
func setEtherbase(ctx *cli.Context, cfg *ethconfig.Config) {
13131308
if ctx.IsSet(MinerEtherbaseFlag.Name) {
13141309
log.Warn("Option --miner.etherbase is deprecated as the etherbase is set by the consensus client post-merge")
1315-
return
13161310
}
13171311
if !ctx.IsSet(MinerPendingFeeRecipientFlag.Name) {
13181312
return
@@ -1767,9 +1761,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
17671761
// TODO(fjl): force-enable this in --dev mode
17681762
cfg.EnablePreimageRecording = ctx.Bool(VMEnableDebugFlag.Name)
17691763
}
1770-
if ctx.IsSet(CollectWitnessFlag.Name) {
1771-
cfg.EnableWitnessCollection = ctx.Bool(CollectWitnessFlag.Name)
1772-
}
17731764

17741765
if ctx.IsSet(RPCGlobalGasCapFlag.Name) {
17751766
cfg.RPCGasCap = ctx.Uint64(RPCGlobalGasCapFlag.Name)
@@ -2194,7 +2185,6 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
21942185
}
21952186
vmcfg := vm.Config{
21962187
EnablePreimageRecording: ctx.Bool(VMEnableDebugFlag.Name),
2197-
EnableWitnessCollection: ctx.Bool(CollectWitnessFlag.Name),
21982188
}
21992189
if ctx.IsSet(VMTraceFlag.Name) {
22002190
if name := ctx.String(VMTraceFlag.Name); name != "" {

core/block_validator.go

-24
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ import (
2020
"errors"
2121
"fmt"
2222

23-
"github.com/ethereum/go-ethereum/common"
2423
"github.com/ethereum/go-ethereum/consensus"
2524
"github.com/ethereum/go-ethereum/core/state"
26-
"github.com/ethereum/go-ethereum/core/stateless"
2725
"github.com/ethereum/go-ethereum/core/types"
2826
"github.com/ethereum/go-ethereum/params"
2927
"github.com/ethereum/go-ethereum/trie"
@@ -160,28 +158,6 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD
160158
return nil
161159
}
162160

163-
// ValidateWitness cross validates a block execution with stateless remote clients.
164-
//
165-
// Normally we'd distribute the block witness to remote cross validators, wait
166-
// for them to respond and then merge the results. For now, however, it's only
167-
// Geth, so do an internal stateless run.
168-
func (v *BlockValidator) ValidateWitness(witness *stateless.Witness, receiptRoot common.Hash, stateRoot common.Hash) error {
169-
// Run the cross client stateless execution
170-
// TODO(karalabe): Self-stateless for now, swap with other clients
171-
crossReceiptRoot, crossStateRoot, err := ExecuteStateless(v.config, witness)
172-
if err != nil {
173-
return fmt.Errorf("stateless execution failed: %v", err)
174-
}
175-
// Stateless cross execution suceeeded, validate the withheld computed fields
176-
if crossReceiptRoot != receiptRoot {
177-
return fmt.Errorf("cross validator receipt root mismatch (cross: %x local: %x)", crossReceiptRoot, receiptRoot)
178-
}
179-
if crossStateRoot != stateRoot {
180-
return fmt.Errorf("cross validator state root mismatch (cross: %x local: %x)", crossStateRoot, stateRoot)
181-
}
182-
return nil
183-
}
184-
185161
// CalcGasLimit computes the gas limit of the next block after parent. It aims
186162
// to keep the baseline gas close to the provided target, and increase it towards
187163
// the target if the baseline gas is lower.

core/block_validator_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func testHeaderVerificationForMerging(t *testing.T, isClique bool) {
201201
t.Fatalf("post-block %d: unexpected result returned: %v", i, result)
202202
case <-time.After(25 * time.Millisecond):
203203
}
204-
chain.InsertBlockWithoutSetHead(postBlocks[i])
204+
chain.InsertBlockWithoutSetHead(postBlocks[i], false)
205205
}
206206

207207
// Verify the blocks with pre-merge blocks and post-merge blocks

0 commit comments

Comments
 (0)