Skip to content

Commit 12679bb

Browse files
committed
Merge upstream PR ethereum#27849
Conflicts: cmd/evm/internal/t8ntool/transition.go Callsite for IsShanghai moved to a different function, moved our modification there. Additions: go-ethereum/cmd/evm/testdata/29/exp.json Added Arbitrum field to expected receipt.
2 parents 3315708 + b8d38e7 commit 12679bb

File tree

75 files changed

+1440
-864
lines changed

Some content is hidden

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

75 files changed

+1440
-864
lines changed

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- stage: lint
1414
os: linux
1515
dist: bionic
16-
go: 1.20.x
16+
go: 1.21.x
1717
env:
1818
- lint
1919
git:
@@ -28,7 +28,7 @@ jobs:
2828
os: linux
2929
arch: amd64
3030
dist: bionic
31-
go: 1.20.x
31+
go: 1.21.x
3232
env:
3333
- docker
3434
services:
@@ -45,7 +45,7 @@ jobs:
4545
os: linux
4646
arch: arm64
4747
dist: bionic
48-
go: 1.20.x
48+
go: 1.21.x
4949
env:
5050
- docker
5151
services:
@@ -63,7 +63,7 @@ jobs:
6363
os: linux
6464
dist: bionic
6565
sudo: required
66-
go: 1.20.x
66+
go: 1.21.x
6767
env:
6868
- azure-linux
6969
- GO111MODULE=on
@@ -97,7 +97,7 @@ jobs:
9797
- stage: build
9898
if: type = push
9999
os: osx
100-
go: 1.20.x
100+
go: 1.21.x
101101
env:
102102
- azure-osx
103103
- GO111MODULE=on
@@ -112,7 +112,7 @@ jobs:
112112
os: linux
113113
arch: amd64
114114
dist: bionic
115-
go: 1.20.x
115+
go: 1.21.x
116116
env:
117117
- GO111MODULE=on
118118
script:
@@ -123,7 +123,7 @@ jobs:
123123
os: linux
124124
arch: arm64
125125
dist: bionic
126-
go: 1.19.x
126+
go: 1.20.x
127127
env:
128128
- GO111MODULE=on
129129
script:
@@ -132,7 +132,7 @@ jobs:
132132
- stage: build
133133
os: linux
134134
dist: bionic
135-
go: 1.19.x
135+
go: 1.20.x
136136
env:
137137
- GO111MODULE=on
138138
script:
@@ -143,7 +143,7 @@ jobs:
143143
if: type = cron || (type = push && tag ~= /^v[0-9]/)
144144
os: linux
145145
dist: bionic
146-
go: 1.20.x
146+
go: 1.21.x
147147
env:
148148
- ubuntu-ppa
149149
- GO111MODULE=on
@@ -167,7 +167,7 @@ jobs:
167167
if: type = cron
168168
os: linux
169169
dist: bionic
170-
go: 1.20.x
170+
go: 1.21.x
171171
env:
172172
- azure-purge
173173
- GO111MODULE=on
@@ -181,7 +181,7 @@ jobs:
181181
if: type = cron
182182
os: linux
183183
dist: bionic
184-
go: 1.20.x
184+
go: 1.21.x
185185
env:
186186
- GO111MODULE=on
187187
script:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG VERSION=""
44
ARG BUILDNUM=""
55

66
# Build Geth in a stock Go builder container
7-
FROM golang:1.20-alpine as builder
7+
FROM golang:1.21-alpine as builder
88

99
RUN apk add --no-cache gcc musl-dev linux-headers git
1010

beacon/engine/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ func ExecutableDataToBlock(params ExecutableData, versionedHashes []common.Hash)
226226
WithdrawalsHash: withdrawalsRoot,
227227
ExcessBlobGas: params.ExcessBlobGas,
228228
BlobGasUsed: params.BlobGasUsed,
229+
// TODO BeaconRoot
229230
}
230231
block := types.NewBlockWithHeader(header).WithBody(txs, nil /* uncles */).WithWithdrawals(params.Withdrawals)
231232
if block.Hash() != params.BlockHash {
@@ -255,6 +256,7 @@ func BlockToExecutableData(block *types.Block, fees *big.Int, blobs []kzg4844.Bl
255256
Withdrawals: block.Withdrawals(),
256257
BlobGasUsed: block.BlobGasUsed(),
257258
ExcessBlobGas: block.ExcessBlobGas(),
259+
// TODO BeaconRoot
258260
}
259261
blobsBundle := BlobsBundleV1{
260262
Commitments: make([]hexutil.Bytes, 0),

build/checksums.txt

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# This file contains sha256 checksums of optional build dependencies.
22

3-
2c5ee9c9ec1e733b0dbbc2bdfed3f62306e51d8172bf38f4f4e542b27520f597 go1.20.7.src.tar.gz
4-
785170eab380a8985d53896808b0a71336d0ea60e0a26099b4ccec77798b1cf4 go1.20.7.darwin-amd64.tar.gz
5-
eea1e7e4c2f75c72629050e6a6c7c46c446d64056732a7787fb3ba16ace1982e go1.20.7.darwin-arm64.tar.gz
6-
d8cff0357ac24eb06f3f280535397eeaacf95611d29f9b2abc3060f3d6dce3b4 go1.20.7.freebsd-386.tar.gz
7-
26918dcebf474a9e81ccf9f648cdf36968dfb76b481518cf615d78455dda4416 go1.20.7.freebsd-amd64.tar.gz
8-
ddb48145f05bda2f4617a22c979d4e94b22802cdb1a1fde1b1974e733b26f091 go1.20.7.linux-386.tar.gz
9-
f0a87f1bcae91c4b69f8dc2bc6d7e6bfcd7524fceec130af525058c0c17b1b44 go1.20.7.linux-amd64.tar.gz
10-
44781ae3b153c3b07651d93b6bc554e835a36e2d72a696281c1e4dad9efffe43 go1.20.7.linux-arm64.tar.gz
11-
7cc231b415b94f2f7065870a73f67dd2b0ec12b5a98052b7ee0121c42bc04f8d go1.20.7.linux-armv6l.tar.gz
12-
6318a1db307c12b8afe68808bd6fae4fba1e558a85b958216096869ed506dcb3 go1.20.7.linux-ppc64le.tar.gz
13-
26aea2ede8722ceecbd9db883328a8d963136fd96c11dacc356c44c4c19c6515 go1.20.7.linux-s390x.tar.gz
14-
5b0ef6f58d3e04d6cc003aa98e9172f41ba9e091b1c98e7339b41c4c87fb78a1 go1.20.7.windows-386.zip
15-
736dc6c7fcab1c96b682c8c93e38d7e371e62a17d34cb2c37d451a1147f66af9 go1.20.7.windows-amd64.zip
16-
fc6f79c1e1ed9e506c65f2112ac4e387479916f1accb0d046a6a19ff6938baa5 go1.20.7.windows-arm64.zip
3+
818d46ede85682dd551ad378ef37a4d247006f12ec59b5b755601d2ce114369a go1.21.0.src.tar.gz
4+
b314de9f704ab122c077d2ec8e67e3670affe8865479d1f01991e7ac55d65e70 go1.21.0.darwin-amd64.tar.gz
5+
3aca44de55c5e098de2f406e98aba328898b05d509a2e2a356416faacf2c4566 go1.21.0.darwin-arm64.tar.gz
6+
312a0065714a50862af714e7a5b3fbbd70fe68f905ffb9bcc56d42eadf6bffab go1.21.0.freebsd-386.tar.gz
7+
b8eaa36654625df799654f77f4af0ea7bd9e5e760ebe86e68fe7c484748ae995 go1.21.0.freebsd-amd64.tar.gz
8+
0e6f378d9b072fab0a3d9ff4d5e990d98487d47252dba8160015a61e6bd0bcba go1.21.0.linux-386.tar.gz
9+
d0398903a16ba2232b389fb31032ddf57cac34efda306a0eebac34f0965a0742 go1.21.0.linux-amd64.tar.gz
10+
f3d4548edf9b22f26bbd49720350bbfe59d75b7090a1a2bff1afad8214febaf3 go1.21.0.linux-arm64.tar.gz
11+
e377a0004957c8c560a3ff99601bce612330a3d95ba3b0a2ae144165fc87deb1 go1.21.0.linux-armv6l.tar.gz
12+
e938ffc81d8ebe5efc179240960ba22da6a841ff05d5cab7ce2547112b14a47f go1.21.0.linux-ppc64le.tar.gz
13+
be7338df8e5d5472dfa307b0df2b446d85d001b0a2a3cdb1a14048d751b70481 go1.21.0.linux-s390x.tar.gz
14+
af920fbb74fc3d173118dc3cc35f02a709c1de642700e92a91a7d16981df3fec go1.21.0.windows-386.zip
15+
732121e64e0ecb07c77fdf6cc1bc5ce7b242c2d40d4ac29021ad4c64a08731f6 go1.21.0.windows-amd64.zip
16+
41342f5a0f8c083b14c68bde738ddcd313a4f53a5854bfdfab47f0e88247de12 go1.21.0.windows-arm64.zip
17+
1718

1819
fba08acc4027f69f07cef48fbff70b8a7ecdfaa1c2aba9ad3fb31d60d9f5d4bc golangci-lint-1.51.1-darwin-amd64.tar.gz
1920
75b8f0ff3a4e68147156be4161a49d4576f1be37a0b506473f8c482140c1e7f2 golangci-lint-1.51.1-darwin-arm64.tar.gz

build/ci.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ var (
139139
// This is the version of Go that will be downloaded by
140140
//
141141
// go run ci.go install -dlgo
142-
dlgoVersion = "1.20.7"
142+
dlgoVersion = "1.21.0"
143143

144144
// This is the version of Go that will be used to bootstrap the PPA builder.
145145
//

cmd/evm/internal/t8ntool/execution.go

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,25 +69,26 @@ type ommer struct {
6969

7070
//go:generate go run github.com/fjl/gencodec -type stEnv -field-override stEnvMarshaling -out gen_stenv.go
7171
type stEnv struct {
72-
Coinbase common.Address `json:"currentCoinbase" gencodec:"required"`
73-
Difficulty *big.Int `json:"currentDifficulty"`
74-
Random *big.Int `json:"currentRandom"`
75-
ParentDifficulty *big.Int `json:"parentDifficulty"`
76-
ParentBaseFee *big.Int `json:"parentBaseFee,omitempty"`
77-
ParentGasUsed uint64 `json:"parentGasUsed,omitempty"`
78-
ParentGasLimit uint64 `json:"parentGasLimit,omitempty"`
79-
GasLimit uint64 `json:"currentGasLimit" gencodec:"required"`
80-
Number uint64 `json:"currentNumber" gencodec:"required"`
81-
Timestamp uint64 `json:"currentTimestamp" gencodec:"required"`
82-
ParentTimestamp uint64 `json:"parentTimestamp,omitempty"`
83-
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"`
84-
Ommers []ommer `json:"ommers,omitempty"`
85-
Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"`
86-
BaseFee *big.Int `json:"currentBaseFee,omitempty"`
87-
ParentUncleHash common.Hash `json:"parentUncleHash"`
88-
ExcessBlobGas *uint64 `json:"excessBlobGas,omitempty"`
89-
ParentExcessBlobGas *uint64 `json:"parentExcessBlobGas,omitempty"`
90-
ParentBlobGasUsed *uint64 `json:"parentBlobGasUsed,omitempty"`
72+
Coinbase common.Address `json:"currentCoinbase" gencodec:"required"`
73+
Difficulty *big.Int `json:"currentDifficulty"`
74+
Random *big.Int `json:"currentRandom"`
75+
ParentDifficulty *big.Int `json:"parentDifficulty"`
76+
ParentBaseFee *big.Int `json:"parentBaseFee,omitempty"`
77+
ParentGasUsed uint64 `json:"parentGasUsed,omitempty"`
78+
ParentGasLimit uint64 `json:"parentGasLimit,omitempty"`
79+
GasLimit uint64 `json:"currentGasLimit" gencodec:"required"`
80+
Number uint64 `json:"currentNumber" gencodec:"required"`
81+
Timestamp uint64 `json:"currentTimestamp" gencodec:"required"`
82+
ParentTimestamp uint64 `json:"parentTimestamp,omitempty"`
83+
BlockHashes map[math.HexOrDecimal64]common.Hash `json:"blockHashes,omitempty"`
84+
Ommers []ommer `json:"ommers,omitempty"`
85+
Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"`
86+
BaseFee *big.Int `json:"currentBaseFee,omitempty"`
87+
ParentUncleHash common.Hash `json:"parentUncleHash"`
88+
ExcessBlobGas *uint64 `json:"excessBlobGas,omitempty"`
89+
ParentExcessBlobGas *uint64 `json:"parentExcessBlobGas,omitempty"`
90+
ParentBlobGasUsed *uint64 `json:"parentBlobGasUsed,omitempty"`
91+
ParentBeaconBlockRoot *common.Hash `json:"parentBeaconBlockRoot"`
9192
}
9293

9394
type stEnvMarshaling struct {
@@ -185,6 +186,10 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
185186
chainConfig.DAOForkBlock.Cmp(new(big.Int).SetUint64(pre.Env.Number)) == 0 {
186187
misc.ApplyDAOHardFork(statedb)
187188
}
189+
if beaconRoot := pre.Env.ParentBeaconBlockRoot; beaconRoot != nil {
190+
evm := vm.NewEVM(vmContext, vm.TxContext{}, statedb, chainConfig, vmConfig)
191+
core.ProcessBeaconBlockRoot(*beaconRoot, evm, statedb)
192+
}
188193
var blobGasUsed uint64
189194
for i, tx := range txs {
190195
if tx.Type() == types.BlobTxType && vmContext.ExcessBlobGas == nil {

cmd/evm/internal/t8ntool/gen_stenv.go

Lines changed: 44 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)