Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geth/v1.14.8 upstream merge #363

Merged
merged 61 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
bcaf374
params: begin v1.14.8 release cycle
fjl Jul 11, 2024
cf03784
core/state: fix prefetcher for verkle (#29760)
rjl493456442 Jul 11, 2024
a0631f3
core/txpool/blobpool: use nonce from argument instead of tx.Nonce() (…
minh-bq Jul 15, 2024
79d2327
trie: add RollBackAccount function to verkle trees (#30135)
gballet Jul 15, 2024
4bbe993
p2p: fix ip change log parameter (#30158)
qqqeck Jul 15, 2024
169aa91
cmd/utils: fix typo in flag description (#30127)
jeremyschlatter Jul 15, 2024
a0d2613
core/types: don't modify signature V when reading large chainID (#30157)
danyalprout Jul 15, 2024
8adce57
SECURITY.md: correct PGP key block formatting (#30123)
JeukHwang Jul 15, 2024
71210b0
all: simplify tests using t.TempDir() (#30150)
zhiqiangxu Jul 15, 2024
0d38b0c
eth/catalyst: fix (*SimulatedBeacon).AdjustTime() conversion (#30138)
jmank88 Jul 16, 2024
b530d8e
trie, triedb: remove unnecessary child resolver interface (#30167)
rjl493456442 Jul 16, 2024
15936c6
core/txpool/legacypool: use maps.Keys and maps.Copy (#30091)
mask-pp Jul 16, 2024
c54294b
core/state: don't compute verkle storage tree roots (#30130)
gballet Jul 16, 2024
f59d013
core/rawdb, triedb, cmd: create an isolated disk namespace for verkle…
rjl493456442 Jul 16, 2024
ad49c70
p2p/discover: remove type encPubkey (#30172)
fjl Jul 18, 2024
df3f0a8
go.mod: upgrade to btcsuite/btcd/btcec v2.3.4 (#30181)
AlexanderMint Jul 18, 2024
944718b
ethdb: remove snapshot (#30189)
s1na Jul 22, 2024
380688c
eth/gasprice: remove default from config (#30080)
MariusVanDerWijden Jul 22, 2024
7abe84c
rpc: use stable object in notifier test (#30193)
lightclient Jul 22, 2024
ef583e9
core/state: remove useless metrics (#30184)
rjl493456442 Jul 22, 2024
57e6627
rpc: show more error detail for `invalidMessageError` (#30191)
zhiqiangxu Jul 23, 2024
7026bae
core/tracing: update latest release version (#30211)
s1na Jul 23, 2024
6693fe1
core/txpool: use the cached address in ValidateTransactionWithState (…
minh-bq Jul 23, 2024
1939813
core/state: check db error after intermediate call (#30171)
rjl493456442 Jul 23, 2024
35b4183
cmd/utils: allow configurating blob pool from flags (#30203)
minh-bq Jul 23, 2024
766ce23
core/state: fix SetStorage override behavior (#30185)
rjl493456442 Jul 23, 2024
4ad88e9
triedb/pathdb: print out all trie owner and hash information (#30200)
rjl493456442 Jul 24, 2024
4dfc75d
beacon/types, cmd/devp2p, p2p/enr: clean up uses of fmt.Errorf (#30182)
yukionfire Jul 24, 2024
ac0f220
eth/tracers, internal/ethapi: remove unnecessary map pointer in state…
caseylove Jul 24, 2024
f94baab
internal/ethapi: fix state override test (#30228)
lightclient Jul 26, 2024
b0f66e3
p2p/nat: return correct port for ExtIP NAT (#30234)
dknopik Jul 27, 2024
6e33dbf
p2p: fix flaky test TestServerPortMapping (#30241)
bearpebble Jul 30, 2024
de6d597
p2p/discover: schedule revalidation also when all nodes are excluded …
dknopik Jul 31, 2024
ff6e43e
miner: remove outdated comment (#30248)
darioush Aug 1, 2024
dad8f23
eth/downloader: correct sync mode logging to show old mode (#30219)
smin-k Aug 1, 2024
b635089
all: remove deprecated protobuf dependencies (#30232)
Icarus9913 Aug 1, 2024
67b8137
accounts/abi/bind: add accessList support to base bond contract (#30195)
ysh0566 Aug 1, 2024
e467577
internal/debug: remove memsize (#30253)
fjl Aug 2, 2024
16cf5c5
eth/downloader: gofmt (#30261)
fjl Aug 2, 2024
142c94d
cmd/evm: don't overwrite sender account (#30259)
lightclient Aug 2, 2024
1058695
eth/catalyst: get params.ExcessBlobGas but check with params.BlobGasU…
jsvisa Aug 5, 2024
cf8aa31
params: remove unused les parameters (#30268)
stevemilk Aug 6, 2024
dbc1d04
core/vm/runtime: ensure tracer benchmark calls `OnTxStart` (#30257)
lightclient Aug 6, 2024
e9981bc
ethclient: support networkID in hex format (#30263)
kkqy Aug 6, 2024
b37ac5c
core/vm: improved stack swap performance (#30249)
lmittmann Aug 6, 2024
978041f
signer/core: improve performance of isPrimitiveTypeValid function (#3…
llkhacquan Aug 8, 2024
4a3aed3
core/vm: use uint64 in memory for indices everywhere (#30252)
lmittmann Aug 8, 2024
9ea766d
build: upgrade -dlgo version to Go 1.22.6 (#30273)
sandakersmann Aug 8, 2024
d3dae66
tests: fix TransactionTest to actually run (#30272)
taiking Aug 8, 2024
ebe31df
eth/downloader, core/types: take withdrawals-size into account in dow…
psogv0308 Aug 8, 2024
83e70aa
cmd/evm: fix evm basefee (#30281)
holiman Aug 8, 2024
811a69c
go.mod: update uint256 to 1.3.1 (#30280)
holiman Aug 9, 2024
32a1e06
beacon/engine, consensus/beacon: use params.MaximumExtraDataSize inst…
artjoma Aug 10, 2024
33a13b6
p2p/simulations: remove packages (#30250)
lightclient Aug 12, 2024
5adf4ad
eth/protocols/snap: cleanup dangling account trie nodes due to incomp…
rjl493456442 Aug 12, 2024
880511d
params: release go-ethereum v1.14.8 stable
fjl Aug 12, 2024
a9523b6
Merge branch 'master' into release/1.14
fjl Aug 12, 2024
8f93f81
Merge tag 'v1.14.8' into seb/geth-v1.14.8
sebastianst Aug 14, 2024
25dbf70
Merge remote-tracking branch 'origin/optimism' into seb/geth-v1.14.8
sebastianst Aug 14, 2024
75b673d
update base hash in fork.yaml to v1.14.8
sebastianst Aug 14, 2024
9f481ea
eth/gasprice: adapt Optimism test
sebastianst Aug 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @ethereum-optimism/op-geth-maintainers
* @ethereum-optimism/op-geth-maintainers
4 changes: 0 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ issues:
text: 'SA1019: "golang.org/x/crypto/openpgp" is deprecated: this package is unmaintained except for security fixes.'
- path: core/vm/contracts.go
text: 'SA1019: "golang.org/x/crypto/ripemd160" is deprecated: RIPEMD-160 is a legacy hash and should not be used for new applications.'
- path: accounts/usbwallet/trezor.go
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
- path: accounts/usbwallet/trezor/
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
exclude:
- 'SA1019: event.TypeMux is deprecated: use Feed'
- 'SA1019: strings.Title is deprecated'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ clean:
devtools:
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
env GOBIN= go install github.com/fjl/gencodec@latest
env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
env GOBIN= go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
env GOBIN= go install ./cmd/abigen
@type "solc" 2> /dev/null || echo 'Please install solc'
@type "protoc" 2> /dev/null || echo 'Please install protoc'
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,5 @@ i4O1UeWKs9owWttan9+PI47ozBSKOTxmMqLSQ0f56Np9FJsV0ilGxRKfjhzJ4KniOMUBA7mP
epy6lH7HmxjjOR7eo0DaSxQGQpThAtFGwkWkFh8yki8j3E42kkrxvEyyYZDXn2YcI3bpqhJx
PtwCMZUJ3kc/skOrs6bOI19iBNaEoNX5Dllm7UHjOgWNDQkcCuOCxucKano=
=arte
-----END PGP PUBLIC KEY BLOCK------
-----END PGP PUBLIC KEY BLOCK-----
```
30 changes: 16 additions & 14 deletions accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ type TransactOpts struct {
Nonce *big.Int // Nonce to use for the transaction execution (nil = use pending state)
Signer SignerFn // Method to use for signing the transaction (mandatory)

Value *big.Int // Funds to transfer along the transaction (nil = 0 = no funds)
GasPrice *big.Int // Gas price to use for the transaction execution (nil = gas price oracle)
GasFeeCap *big.Int // Gas fee cap to use for the 1559 transaction execution (nil = gas price oracle)
GasTipCap *big.Int // Gas priority fee cap to use for the 1559 transaction execution (nil = gas price oracle)
GasLimit uint64 // Gas limit to set for the transaction execution (0 = estimate)
Value *big.Int // Funds to transfer along the transaction (nil = 0 = no funds)
GasPrice *big.Int // Gas price to use for the transaction execution (nil = gas price oracle)
GasFeeCap *big.Int // Gas fee cap to use for the 1559 transaction execution (nil = gas price oracle)
GasTipCap *big.Int // Gas priority fee cap to use for the 1559 transaction execution (nil = gas price oracle)
GasLimit uint64 // Gas limit to set for the transaction execution (0 = estimate)
AccessList types.AccessList // Access list to set for the transaction execution (nil = no access list)

Context context.Context // Network context to support cancellation and timeouts (nil = no timeout)

Expand Down Expand Up @@ -300,20 +301,21 @@ func (c *BoundContract) createDynamicTx(opts *TransactOpts, contract *common.Add
return nil, err
}
baseTx := &types.DynamicFeeTx{
To: contract,
Nonce: nonce,
GasFeeCap: gasFeeCap,
GasTipCap: gasTipCap,
Gas: gasLimit,
Value: value,
Data: input,
To: contract,
Nonce: nonce,
GasFeeCap: gasFeeCap,
GasTipCap: gasTipCap,
Gas: gasLimit,
Value: value,
Data: input,
AccessList: opts.AccessList,
}
return types.NewTx(baseTx), nil
}

func (c *BoundContract) createLegacyTx(opts *TransactOpts, contract *common.Address, input []byte) (*types.Transaction, error) {
if opts.GasFeeCap != nil || opts.GasTipCap != nil {
return nil, errors.New("maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet")
if opts.GasFeeCap != nil || opts.GasTipCap != nil || opts.AccessList != nil {
return nil, errors.New("maxFeePerGas or maxPriorityFeePerGas or accessList specified but london is not active yet")
}
// Normalize value
value := opts.Value
Expand Down
3 changes: 1 addition & 2 deletions accounts/keystore/account_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func TestWatchNewFile(t *testing.T) {
func TestWatchNoDir(t *testing.T) {
t.Parallel()
// Create ks but not the directory that it watches.
dir := filepath.Join(os.TempDir(), fmt.Sprintf("eth-keystore-watchnodir-test-%d-%d", os.Getpid(), rand.Int()))
dir := filepath.Join(t.TempDir(), fmt.Sprintf("eth-keystore-watchnodir-test-%d-%d", os.Getpid(), rand.Int()))
ks := NewKeyStore(dir, LightScryptN, LightScryptP)
list := ks.Accounts()
if len(list) > 0 {
Expand All @@ -126,7 +126,6 @@ func TestWatchNoDir(t *testing.T) {
}
// Create the directory and copy a key file into it.
os.MkdirAll(dir, 0700)
defer os.RemoveAll(dir)
file := filepath.Join(dir, "aaa")
if err := cp.CopyFile(file, cachetestAccounts[0].URL.Path); err != nil {
t.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion accounts/usbwallet/trezor.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
)

// ErrTrezorPINNeeded is returned if opening the trezor requires a PIN code. In
Expand Down
6 changes: 3 additions & 3 deletions accounts/usbwallet/trezor/trezor.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
// - Download the latest protoc https://github.com/protocolbuffers/protobuf/releases
// - Build with the usual `./configure && make` and ensure it's on your $PATH
// - Delete all the .proto and .pb.go files, pull in fresh ones from Trezor
// - Grab the latest Go plugin `go get -u github.com/golang/protobuf/protoc-gen-go`
// - Vendor in the latest Go plugin `govendor fetch github.com/golang/protobuf/...`
// - Grab the latest Go plugin `go get -u google.golang.org/protobuf/cmd/protoc-gen-go`
// - Vendor in the latest Go plugin `govendor fetch google.golang.org/protobuf/...`

//go:generate protoc -I/usr/local/include:. --go_out=paths=source_relative:. messages.proto messages-common.proto messages-management.proto messages-ethereum.proto

Expand All @@ -50,7 +50,7 @@ package trezor
import (
"reflect"

"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
)

// Type returns the protocol buffer type number of a specific message. If the
Expand Down
57 changes: 29 additions & 28 deletions beacon/engine/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/trie"
)

Expand Down Expand Up @@ -207,21 +208,21 @@ func decodeTransactions(enc [][]byte) ([]*types.Transaction, error) {
//
// and that the blockhash of the constructed block matches the parameters. Nil
// Withdrawals value will propagate through the returned block. Empty
// Withdrawals value must be passed via non-nil, length 0 value in params.
func ExecutableDataToBlock(params ExecutableData, versionedHashes []common.Hash, beaconRoot *common.Hash) (*types.Block, error) {
txs, err := decodeTransactions(params.Transactions)
// Withdrawals value must be passed via non-nil, length 0 value in data.
func ExecutableDataToBlock(data ExecutableData, versionedHashes []common.Hash, beaconRoot *common.Hash) (*types.Block, error) {
txs, err := decodeTransactions(data.Transactions)
if err != nil {
return nil, err
}
if len(params.ExtraData) > 32 {
return nil, fmt.Errorf("invalid extradata length: %v", len(params.ExtraData))
if len(data.ExtraData) > int(params.MaximumExtraDataSize) {
return nil, fmt.Errorf("invalid extradata length: %v", len(data.ExtraData))
}
if len(params.LogsBloom) != 256 {
return nil, fmt.Errorf("invalid logsBloom length: %v", len(params.LogsBloom))
if len(data.LogsBloom) != 256 {
return nil, fmt.Errorf("invalid logsBloom length: %v", len(data.LogsBloom))
}
// Check that baseFeePerGas is not negative or too big
if params.BaseFeePerGas != nil && (params.BaseFeePerGas.Sign() == -1 || params.BaseFeePerGas.BitLen() > 256) {
return nil, fmt.Errorf("invalid baseFeePerGas: %v", params.BaseFeePerGas)
if data.BaseFeePerGas != nil && (data.BaseFeePerGas.Sign() == -1 || data.BaseFeePerGas.BitLen() > 256) {
return nil, fmt.Errorf("invalid baseFeePerGas: %v", data.BaseFeePerGas)
}
var blobHashes = make([]common.Hash, 0, len(txs))
for _, tx := range txs {
Expand All @@ -239,34 +240,34 @@ func ExecutableDataToBlock(params ExecutableData, versionedHashes []common.Hash,
// ExecutableData before withdrawals are enabled by marshaling
// Withdrawals as the json null value.
var withdrawalsRoot *common.Hash
if params.Withdrawals != nil {
h := types.DeriveSha(types.Withdrawals(params.Withdrawals), trie.NewStackTrie(nil))
if data.Withdrawals != nil {
h := types.DeriveSha(types.Withdrawals(data.Withdrawals), trie.NewStackTrie(nil))
withdrawalsRoot = &h
}
header := &types.Header{
ParentHash: params.ParentHash,
ParentHash: data.ParentHash,
UncleHash: types.EmptyUncleHash,
Coinbase: params.FeeRecipient,
Root: params.StateRoot,
Coinbase: data.FeeRecipient,
Root: data.StateRoot,
TxHash: types.DeriveSha(types.Transactions(txs), trie.NewStackTrie(nil)),
ReceiptHash: params.ReceiptsRoot,
Bloom: types.BytesToBloom(params.LogsBloom),
ReceiptHash: data.ReceiptsRoot,
Bloom: types.BytesToBloom(data.LogsBloom),
Difficulty: common.Big0,
Number: new(big.Int).SetUint64(params.Number),
GasLimit: params.GasLimit,
GasUsed: params.GasUsed,
Time: params.Timestamp,
BaseFee: params.BaseFeePerGas,
Extra: params.ExtraData,
MixDigest: params.Random,
Number: new(big.Int).SetUint64(data.Number),
GasLimit: data.GasLimit,
GasUsed: data.GasUsed,
Time: data.Timestamp,
BaseFee: data.BaseFeePerGas,
Extra: data.ExtraData,
MixDigest: data.Random,
WithdrawalsHash: withdrawalsRoot,
ExcessBlobGas: params.ExcessBlobGas,
BlobGasUsed: params.BlobGasUsed,
ExcessBlobGas: data.ExcessBlobGas,
BlobGasUsed: data.BlobGasUsed,
ParentBeaconRoot: beaconRoot,
}
block := types.NewBlockWithHeader(header).WithBody(types.Body{Transactions: txs, Uncles: nil, Withdrawals: params.Withdrawals})
if block.Hash() != params.BlockHash {
return nil, fmt.Errorf("blockhash mismatch, want %x, got %x", params.BlockHash, block.Hash())
block := types.NewBlockWithHeader(header).WithBody(types.Body{Transactions: txs, Uncles: nil, Withdrawals: data.Withdrawals})
if block.Hash() != data.BlockHash {
return nil, fmt.Errorf("blockhash mismatch, want %x, got %x", data.BlockHash, block.Hash())
}
return block, nil
}
Expand Down
2 changes: 1 addition & 1 deletion beacon/types/beacon_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func BlockFromJSON(forkName string, data []byte) (*BeaconBlock, error) {
case "capella":
obj = new(capella.BeaconBlock)
default:
return nil, fmt.Errorf("unsupported fork: " + forkName)
return nil, fmt.Errorf("unsupported fork: %s", forkName)
}
if err := json.Unmarshal(data, obj); err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion beacon/types/exec_header.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func ExecutionHeaderFromJSON(forkName string, data []byte) (*ExecutionHeader, er
case "deneb":
obj = new(deneb.ExecutionPayloadHeader)
default:
return nil, fmt.Errorf("unsupported fork: " + forkName)
return nil, fmt.Errorf("unsupported fork: %s", forkName)
}
if err := json.Unmarshal(data, obj); err != nil {
return nil, err
Expand Down
Loading