Skip to content

Commit b21d178

Browse files
authored
Merge branch 'ethereum:master' into gethintegration
2 parents e050c62 + ee30681 commit b21d178

File tree

93 files changed

+2632
-3443
lines changed

Some content is hidden

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

93 files changed

+2632
-3443
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,16 @@ profile.cov
4343
.vscode
4444

4545
tests/spec-tests/
46+
47+
# binaries
48+
cmd/abidump/abidump
49+
cmd/abigen/abigen
50+
cmd/blsync/blsync
51+
cmd/clef/clef
52+
cmd/devp2p/devp2p
53+
cmd/era/era
54+
cmd/ethkey/ethkey
55+
cmd/evm/evm
56+
cmd/geth/geth
57+
cmd/rlpdump/rlpdump
58+
cmd/workload/workload

.travis.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ language: go
22
go_import_path: github.com/ethereum/go-ethereum
33
sudo: false
44
jobs:
5-
allow_failures:
6-
- stage: build
7-
os: osx
8-
env:
9-
- azure-osx
10-
115
include:
126
# This builder create and push the Docker images for all architectures
137
- stage: build
@@ -62,23 +56,6 @@ jobs:
6256
- go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
6357
- go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
6458

65-
# This builder does the OSX Azure uploads
66-
- stage: build
67-
if: type = push
68-
os: osx
69-
osx_image: xcode14.2
70-
go: 1.23.1 # See https://github.com/ethereum/go-ethereum/pull/30478
71-
env:
72-
- azure-osx
73-
git:
74-
submodules: false # avoid cloning ethereum/tests
75-
script:
76-
- ln -sf /Users/travis/gopath/bin/go1.23.1 /usr/local/bin/go # Work around travis go-setup bug
77-
- go run build/ci.go install -dlgo
78-
- go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
79-
- go run build/ci.go install -dlgo -arch arm64
80-
- go run build/ci.go archive -arch arm64 -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
81-
8259
# These builders run the tests
8360
- stage: build
8461
if: type = push

accounts/abi/abigen/bind_test.go

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -541,15 +541,15 @@ var bindTests = []struct {
541541
struct A {
542542
bytes32 B;
543543
}
544-
544+
545545
function F() public view returns (A[] memory a, uint256[] memory c, bool[] memory d) {
546546
A[] memory a = new A[](2);
547547
a[0].B = bytes32(uint256(1234) << 96);
548548
uint256[] memory c;
549549
bool[] memory d;
550550
return (a, c, d);
551551
}
552-
552+
553553
function G() public view returns (A[] memory a) {
554554
A[] memory a = new A[](2);
555555
a[0].B = bytes32(uint256(1234) << 96);
@@ -571,10 +571,10 @@ var bindTests = []struct {
571571
// Generate a new random account and a funded simulator
572572
key, _ := crypto.GenerateKey()
573573
auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
574-
574+
575575
sim := backends.NewSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000)
576576
defer sim.Close()
577-
577+
578578
// Deploy a structs method invoker contract and execute its default method
579579
_, _, structs, err := DeployStructs(auth, sim)
580580
if err != nil {
@@ -1701,13 +1701,13 @@ var bindTests = []struct {
17011701
`NewFallbacks`,
17021702
`
17031703
pragma solidity >=0.6.0 <0.7.0;
1704-
1704+
17051705
contract NewFallbacks {
17061706
event Fallback(bytes data);
17071707
fallback() external {
17081708
emit Fallback(msg.data);
17091709
}
1710-
1710+
17111711
event Received(address addr, uint value);
17121712
receive() external payable {
17131713
emit Received(msg.sender, msg.value);
@@ -1719,7 +1719,7 @@ var bindTests = []struct {
17191719
`
17201720
"bytes"
17211721
"math/big"
1722-
1722+
17231723
"github.com/ethereum/go-ethereum/accounts/abi/bind"
17241724
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
17251725
"github.com/ethereum/go-ethereum/core/types"
@@ -1728,22 +1728,22 @@ var bindTests = []struct {
17281728
`
17291729
key, _ := crypto.GenerateKey()
17301730
addr := crypto.PubkeyToAddress(key.PublicKey)
1731-
1731+
17321732
sim := backends.NewSimulatedBackend(types.GenesisAlloc{addr: {Balance: big.NewInt(10000000000000000)}}, 1000000)
17331733
defer sim.Close()
1734-
1734+
17351735
opts, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
17361736
_, _, c, err := DeployNewFallbacks(opts, sim)
17371737
if err != nil {
17381738
t.Fatalf("Failed to deploy contract: %v", err)
17391739
}
17401740
sim.Commit()
1741-
1741+
17421742
// Test receive function
17431743
opts.Value = big.NewInt(100)
17441744
c.Receive(opts)
17451745
sim.Commit()
1746-
1746+
17471747
var gotEvent bool
17481748
iter, _ := c.FilterReceived(nil)
17491749
defer iter.Close()
@@ -1760,14 +1760,14 @@ var bindTests = []struct {
17601760
if !gotEvent {
17611761
t.Fatal("Expect to receive event emitted by receive")
17621762
}
1763-
1763+
17641764
// Test fallback function
17651765
gotEvent = false
17661766
opts.Value = nil
17671767
calldata := []byte{0x01, 0x02, 0x03}
17681768
c.Fallback(opts, calldata)
17691769
sim.Commit()
1770-
1770+
17711771
iter2, _ := c.FilterFallback(nil)
17721772
defer iter2.Close()
17731773
for iter2.Next() {
@@ -1806,7 +1806,9 @@ var bindTests = []struct {
18061806
[]string{"608060405234801561001057600080fd5b50610113806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806324ec1d3f14602d575b600080fd5b60336035565b005b7fb4b2ff75e30cb4317eaae16dd8a187dd89978df17565104caa6c2797caae27d460405180604001604052806001815260200160028152506040516078919060ba565b60405180910390a1565b6040820160008201516096600085018260ad565b50602082015160a7602085018260ad565b50505050565b60b48160d3565b82525050565b600060408201905060cd60008301846082565b92915050565b600081905091905056fea26469706673582212208823628796125bf9941ce4eda18da1be3cf2931b231708ab848e1bd7151c0c9a64736f6c63430008070033"},
18071807
[]string{`[{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"indexed":false,"internalType":"struct Test.MyStruct","name":"s","type":"tuple"}],"name":"StructEvent","type":"event"},{"inputs":[],"name":"TestEvent","outputs":[],"stateMutability":"nonpayable","type":"function"}]`},
18081808
`
1809+
"context"
18091810
"math/big"
1811+
"time"
18101812
18111813
"github.com/ethereum/go-ethereum/accounts/abi/bind"
18121814
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
@@ -1828,12 +1830,23 @@ var bindTests = []struct {
18281830
}
18291831
sim.Commit()
18301832
1831-
_, err = d.TestEvent(user)
1833+
tx, err := d.TestEvent(user)
18321834
if err != nil {
18331835
t.Fatalf("Failed to call contract %v", err)
18341836
}
18351837
sim.Commit()
18361838
1839+
// Wait for the transaction to be mined
1840+
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
1841+
defer cancel()
1842+
receipt, err := bind.WaitMined(ctx, sim, tx)
1843+
if err != nil {
1844+
t.Fatalf("Failed to wait for tx to be mined: %v", err)
1845+
}
1846+
if receipt.Status != types.ReceiptStatusSuccessful {
1847+
t.Fatal("Transaction failed")
1848+
}
1849+
18371850
it, err := d.FilterStructEvent(nil)
18381851
if err != nil {
18391852
t.Fatalf("Failed to filter contract event %v", err)
@@ -1862,7 +1875,7 @@ var bindTests = []struct {
18621875
`NewErrors`,
18631876
`
18641877
pragma solidity >0.8.4;
1865-
1878+
18661879
contract NewErrors {
18671880
error MyError(uint256);
18681881
error MyError1(uint256);
@@ -1878,7 +1891,7 @@ var bindTests = []struct {
18781891
`
18791892
"context"
18801893
"math/big"
1881-
1894+
18821895
"github.com/ethereum/go-ethereum/accounts/abi/bind"
18831896
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
18841897
"github.com/ethereum/go-ethereum/core/types"
@@ -1892,7 +1905,7 @@ var bindTests = []struct {
18921905
sim = backends.NewSimulatedBackend(types.GenesisAlloc{user.From: {Balance: big.NewInt(1000000000000000000)}}, ethconfig.Defaults.Miner.GasCeil)
18931906
)
18941907
defer sim.Close()
1895-
1908+
18961909
_, tx, contract, err := DeployNewErrors(user, sim)
18971910
if err != nil {
18981911
t.Fatal(err)
@@ -1917,12 +1930,12 @@ var bindTests = []struct {
19171930
name: `ConstructorWithStructParam`,
19181931
contract: `
19191932
pragma solidity >=0.8.0 <0.9.0;
1920-
1933+
19211934
contract ConstructorWithStructParam {
19221935
struct StructType {
19231936
uint256 field;
19241937
}
1925-
1938+
19261939
constructor(StructType memory st) {}
19271940
}
19281941
`,
@@ -1951,7 +1964,7 @@ var bindTests = []struct {
19511964
t.Fatalf("DeployConstructorWithStructParam() got err %v; want nil err", err)
19521965
}
19531966
sim.Commit()
1954-
1967+
19551968
if _, err = bind.WaitDeployed(context.Background(), sim, tx); err != nil {
19561969
t.Logf("Deployment tx: %+v", tx)
19571970
t.Errorf("bind.WaitDeployed(nil, %T, <deployment tx>) got err %v; want nil err", sim, err)
@@ -2000,7 +2013,7 @@ var bindTests = []struct {
20002013
t.Fatalf("DeployNameConflict() got err %v; want nil err", err)
20012014
}
20022015
sim.Commit()
2003-
2016+
20042017
if _, err = bind.WaitDeployed(context.Background(), sim, tx); err != nil {
20052018
t.Logf("Deployment tx: %+v", tx)
20062019
t.Errorf("bind.WaitDeployed(nil, %T, <deployment tx>) got err %v; want nil err", sim, err)

accounts/abi/bind/v2/base.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,14 @@ func (c *BoundContract) estimateGasLimit(opts *TransactOpts, contract *common.Ad
383383
}
384384
}
385385
msg := ethereum.CallMsg{
386-
From: opts.From,
387-
To: contract,
388-
GasPrice: gasPrice,
389-
GasTipCap: gasTipCap,
390-
GasFeeCap: gasFeeCap,
391-
Value: value,
392-
Data: input,
386+
From: opts.From,
387+
To: contract,
388+
GasPrice: gasPrice,
389+
GasTipCap: gasTipCap,
390+
GasFeeCap: gasFeeCap,
391+
Value: value,
392+
Data: input,
393+
AccessList: opts.AccessList,
393394
}
394395
return c.transactor.EstimateGas(ensureContext(opts.Context), msg)
395396
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0xf5606a019f0f1006e9ec2070695045f4334450362a48da4c5965314510e0b4c3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0x3c0cb4aa83beded1803d262664ba4392b1023f334d9cca02dc3a6925987ebe91
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0xa8d56457aa414523d93659aef1f7409bbfb72ad75e94d917c8c0b1baa38153ef

beacon/params/networks.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,25 @@
1717
package params
1818

1919
import (
20+
_ "embed"
21+
2022
"github.com/ethereum/go-ethereum/common"
2123
)
2224

25+
//go:embed checkpoint_mainnet.hex
26+
var checkpointMainnet string
27+
28+
//go:embed checkpoint_sepolia.hex
29+
var checkpointSepolia string
30+
31+
//go:embed checkpoint_holesky.hex
32+
var checkpointHolesky string
33+
2334
var (
2435
MainnetLightConfig = (&ChainConfig{
2536
GenesisValidatorsRoot: common.HexToHash("0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95"),
2637
GenesisTime: 1606824023,
27-
Checkpoint: common.HexToHash("0x6509b691f4de4f7b083f2784938fd52f0e131675432b3fd85ea549af9aebd3d0"),
38+
Checkpoint: common.HexToHash(checkpointMainnet),
2839
}).
2940
AddFork("GENESIS", 0, []byte{0, 0, 0, 0}).
3041
AddFork("ALTAIR", 74240, []byte{1, 0, 0, 0}).
@@ -35,7 +46,7 @@ var (
3546
SepoliaLightConfig = (&ChainConfig{
3647
GenesisValidatorsRoot: common.HexToHash("0xd8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b8078"),
3748
GenesisTime: 1655733600,
38-
Checkpoint: common.HexToHash("0x456e85f5608afab3465a0580bff8572255f6d97af0c5f939e3f7536b5edb2d3f"),
49+
Checkpoint: common.HexToHash(checkpointSepolia),
3950
}).
4051
AddFork("GENESIS", 0, []byte{144, 0, 0, 105}).
4152
AddFork("ALTAIR", 50, []byte{144, 0, 0, 112}).
@@ -47,7 +58,7 @@ var (
4758
HoleskyLightConfig = (&ChainConfig{
4859
GenesisValidatorsRoot: common.HexToHash("0x9143aa7c615a7f7115e2b6aac319c03529df8242ae705fba9df39b79c59fa8b1"),
4960
GenesisTime: 1695902400,
50-
Checkpoint: common.HexToHash("0x6456a1317f54d4b4f2cb5bc9d153b5af0988fe767ef0609f0236cf29030bcff7"),
61+
Checkpoint: common.HexToHash(checkpointHolesky),
5162
}).
5263
AddFork("GENESIS", 0, []byte{1, 1, 112, 0}).
5364
AddFork("ALTAIR", 0, []byte{2, 1, 112, 0}).

0 commit comments

Comments
 (0)