Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Commit da8aef1

Browse files
committed
Merge tag 'v1.10.12' into upgrade/1.10.12
2 parents 5d10e7c + 6c4dc6c commit da8aef1

File tree

106 files changed

+2245
-787
lines changed

Some content is hidden

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

106 files changed

+2245
-787
lines changed

Makefile

Lines changed: 1 addition & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
# with Go source code. If you know what GOPATH is then you probably
33
# don't need to bother with make.
44

5-
.PHONY: geth android ios geth-cross evm all test clean
6-
.PHONY: geth-linux geth-linux-386 geth-linux-amd64 geth-linux-mips64 geth-linux-mips64le
7-
.PHONY: geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
8-
.PHONY: geth-darwin geth-darwin-386 geth-darwin-amd64
9-
.PHONY: geth-windows geth-windows-386 geth-windows-amd64
5+
.PHONY: geth android ios evm all test clean
106

117
GOBIN = ./build/bin
128
GO ?= latest
@@ -53,95 +49,3 @@ devtools:
5349
env GOBIN= go install ./cmd/abigen
5450
@type "solc" 2> /dev/null || echo 'Please install solc'
5551
@type "protoc" 2> /dev/null || echo 'Please install protoc'
56-
57-
# Cross Compilation Targets (xgo)
58-
59-
geth-cross: geth-linux geth-darwin geth-windows geth-android geth-ios
60-
@echo "Full cross compilation done:"
61-
@ls -ld $(GOBIN)/geth-*
62-
63-
geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 geth-linux-mips64le
64-
@echo "Linux cross compilation done:"
65-
@ls -ld $(GOBIN)/geth-linux-*
66-
67-
geth-linux-386:
68-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth
69-
@echo "Linux 386 cross compilation done:"
70-
@ls -ld $(GOBIN)/geth-linux-* | grep 386
71-
72-
geth-linux-amd64:
73-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/geth
74-
@echo "Linux amd64 cross compilation done:"
75-
@ls -ld $(GOBIN)/geth-linux-* | grep amd64
76-
77-
geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
78-
@echo "Linux ARM cross compilation done:"
79-
@ls -ld $(GOBIN)/geth-linux-* | grep arm
80-
81-
geth-linux-arm-5:
82-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/geth
83-
@echo "Linux ARMv5 cross compilation done:"
84-
@ls -ld $(GOBIN)/geth-linux-* | grep arm-5
85-
86-
geth-linux-arm-6:
87-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/geth
88-
@echo "Linux ARMv6 cross compilation done:"
89-
@ls -ld $(GOBIN)/geth-linux-* | grep arm-6
90-
91-
geth-linux-arm-7:
92-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/geth
93-
@echo "Linux ARMv7 cross compilation done:"
94-
@ls -ld $(GOBIN)/geth-linux-* | grep arm-7
95-
96-
geth-linux-arm64:
97-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth
98-
@echo "Linux ARM64 cross compilation done:"
99-
@ls -ld $(GOBIN)/geth-linux-* | grep arm64
100-
101-
geth-linux-mips:
102-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/geth
103-
@echo "Linux MIPS cross compilation done:"
104-
@ls -ld $(GOBIN)/geth-linux-* | grep mips
105-
106-
geth-linux-mipsle:
107-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/geth
108-
@echo "Linux MIPSle cross compilation done:"
109-
@ls -ld $(GOBIN)/geth-linux-* | grep mipsle
110-
111-
geth-linux-mips64:
112-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/geth
113-
@echo "Linux MIPS64 cross compilation done:"
114-
@ls -ld $(GOBIN)/geth-linux-* | grep mips64
115-
116-
geth-linux-mips64le:
117-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/geth
118-
@echo "Linux MIPS64le cross compilation done:"
119-
@ls -ld $(GOBIN)/geth-linux-* | grep mips64le
120-
121-
geth-darwin: geth-darwin-386 geth-darwin-amd64
122-
@echo "Darwin cross compilation done:"
123-
@ls -ld $(GOBIN)/geth-darwin-*
124-
125-
geth-darwin-386:
126-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth
127-
@echo "Darwin 386 cross compilation done:"
128-
@ls -ld $(GOBIN)/geth-darwin-* | grep 386
129-
130-
geth-darwin-amd64:
131-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/geth
132-
@echo "Darwin amd64 cross compilation done:"
133-
@ls -ld $(GOBIN)/geth-darwin-* | grep amd64
134-
135-
geth-windows: geth-windows-386 geth-windows-amd64
136-
@echo "Windows cross compilation done:"
137-
@ls -ld $(GOBIN)/geth-windows-*
138-
139-
geth-windows-386:
140-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth
141-
@echo "Windows 386 cross compilation done:"
142-
@ls -ld $(GOBIN)/geth-windows-* | grep 386
143-
144-
geth-windows-amd64:
145-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth
146-
@echo "Windows amd64 cross compilation done:"
147-
@ls -ld $(GOBIN)/geth-windows-* | grep amd64

accounts/abi/bind/backends/simulated.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,9 @@ func (b *SimulatedBackend) PendingNonceAt(ctx context.Context, account common.Ad
462462
// SuggestGasPrice implements ContractTransactor.SuggestGasPrice. Since the simulated
463463
// chain doesn't have miners, we just return a gas price of 1 for any call.
464464
func (b *SimulatedBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error) {
465+
if b.pendingBlock.Header().BaseFee != nil {
466+
return b.pendingBlock.Header().BaseFee, nil
467+
}
465468
return big.NewInt(1), nil
466469
}
467470

accounts/abi/bind/backends/simulated_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,8 @@ func TestSuggestGasPrice(t *testing.T) {
916916
if err != nil {
917917
t.Errorf("could not get gas price: %v", err)
918918
}
919-
if gasPrice.Uint64() != uint64(1) {
920-
t.Errorf("gas price was not expected value of 1. actual: %v", gasPrice.Uint64())
919+
if gasPrice.Uint64() != sim.pendingBlock.Header().BaseFee.Uint64() {
920+
t.Errorf("gas price was not expected value of %v. actual: %v", sim.pendingBlock.Header().BaseFee.Uint64(), gasPrice.Uint64())
921921
}
922922
}
923923

accounts/abi/bind/base.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
370370
rawTx, err = c.createLegacyTx(opts, contract, input)
371371
} else {
372372
// Only query for basefee if gasPrice not specified
373-
if head, errHead := c.transactor.HeaderByNumber(ensureContext(opts.Context), nil); err != nil {
373+
if head, errHead := c.transactor.HeaderByNumber(ensureContext(opts.Context), nil); errHead != nil {
374374
return nil, errHead
375375
} else if head.BaseFee != nil {
376376
rawTx, err = c.createDynamicTx(opts, contract, input, head)

build/ci.go

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Available commands are:
3333
nsis -- creates a Windows NSIS installer
3434
aar [ -local ] [ -sign key-id ] [-deploy repo] [ -upload dest ] -- creates an Android archive
3535
xcode [ -local ] [ -sign key-id ] [-deploy repo] [ -upload dest ] -- creates an iOS XCode framework
36-
xgo [ -alltools ] [ options ] -- cross builds according to options
3736
purge [ -store blobstore ] [ -days threshold ] -- purges old archives from the blobstore
3837
3938
For all commands, -n prevents execution of external programs (dry run mode).
@@ -188,8 +187,6 @@ func main() {
188187
doAndroidArchive(os.Args[2:])
189188
case "xcode":
190189
doXCodeFramework(os.Args[2:])
191-
case "xgo":
192-
doXgo(os.Args[2:])
193190
case "purge":
194191
doPurge(os.Args[2:])
195192
default:
@@ -1209,48 +1206,6 @@ func newPodMetadata(env build.Environment, archive string) podMetadata {
12091206
}
12101207
}
12111208

1212-
// Cross compilation
1213-
1214-
func doXgo(cmdline []string) {
1215-
var (
1216-
alltools = flag.Bool("alltools", false, `Flag whether we're building all known tools, or only on in particular`)
1217-
)
1218-
flag.CommandLine.Parse(cmdline)
1219-
env := build.Env()
1220-
var tc build.GoToolchain
1221-
1222-
// Make sure xgo is available for cross compilation
1223-
build.MustRun(tc.Install(GOBIN, "github.com/karalabe/xgo@latest"))
1224-
1225-
// If all tools building is requested, build everything the builder wants
1226-
args := append(buildFlags(env), flag.Args()...)
1227-
1228-
if *alltools {
1229-
args = append(args, []string{"--dest", GOBIN}...)
1230-
for _, res := range allToolsArchiveFiles {
1231-
if strings.HasPrefix(res, GOBIN) {
1232-
// Binary tool found, cross build it explicitly
1233-
args = append(args, "./"+filepath.Join("cmd", filepath.Base(res)))
1234-
build.MustRun(xgoTool(args))
1235-
args = args[:len(args)-1]
1236-
}
1237-
}
1238-
return
1239-
}
1240-
1241-
// Otherwise execute the explicit cross compilation
1242-
path := args[len(args)-1]
1243-
args = append(args[:len(args)-1], []string{"--dest", GOBIN, path}...)
1244-
build.MustRun(xgoTool(args))
1245-
}
1246-
1247-
func xgoTool(args []string) *exec.Cmd {
1248-
cmd := exec.Command(filepath.Join(GOBIN, "xgo"), args...)
1249-
cmd.Env = os.Environ()
1250-
cmd.Env = append(cmd.Env, []string{"GOBIN=" + GOBIN}...)
1251-
return cmd
1252-
}
1253-
12541209
// Binary distribution cleanups
12551210

12561211
func doPurge(cmdline []string) {

cmd/devp2p/nodesetcmd.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ func ethFilter(args []string) (nodeFilter, error) {
235235
filter = forkid.NewStaticFilter(params.GoerliChainConfig, params.GoerliGenesisHash)
236236
case "ropsten":
237237
filter = forkid.NewStaticFilter(params.RopstenChainConfig, params.RopstenGenesisHash)
238+
case "sepolia":
239+
filter = forkid.NewStaticFilter(params.SepoliaChainConfig, params.SepoliaGenesisHash)
238240
default:
239241
return nil, fmt.Errorf("unknown network %q", args[0])
240242
}

cmd/evm/internal/t8ntool/execution.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ type rejectedTx struct {
9696
// Apply applies a set of transactions to a pre-state
9797
func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
9898
txs types.Transactions, miningReward int64,
99-
getTracerFn func(txIndex int, txHash common.Hash) (tracer vm.Tracer, err error)) (*state.StateDB, *ExecutionResult, error) {
99+
getTracerFn func(txIndex int, txHash common.Hash) (tracer vm.EVMLogger, err error)) (*state.StateDB, *ExecutionResult, error) {
100100

101101
// Capture errors for BLOCKHASH operation, if we haven't been supplied the
102102
// required blockhashes

cmd/evm/internal/t8ntool/transaction.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ func Transaction(ctx *cli.Context) error {
121121
}
122122
var results []result
123123
for it.Next() {
124+
if err := it.Err(); err != nil {
125+
return NewError(ErrorIO, err)
126+
}
124127
var tx types.Transaction
125128
err := rlp.DecodeBytes(it.Value(), &tx)
126129
if err != nil {

cmd/evm/internal/t8ntool/transition.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ func Transition(ctx *cli.Context) error {
8989

9090
var (
9191
err error
92-
tracer vm.Tracer
92+
tracer vm.EVMLogger
9393
baseDir = ""
9494
)
95-
var getTracer func(txIndex int, txHash common.Hash) (vm.Tracer, error)
95+
var getTracer func(txIndex int, txHash common.Hash) (vm.EVMLogger, error)
9696

9797
// If user specified a basedir, make sure it exists
9898
if ctx.IsSet(OutputBasedir.Name) {
@@ -119,7 +119,7 @@ func Transition(ctx *cli.Context) error {
119119
prevFile.Close()
120120
}
121121
}()
122-
getTracer = func(txIndex int, txHash common.Hash) (vm.Tracer, error) {
122+
getTracer = func(txIndex int, txHash common.Hash) (vm.EVMLogger, error) {
123123
if prevFile != nil {
124124
prevFile.Close()
125125
}
@@ -131,7 +131,7 @@ func Transition(ctx *cli.Context) error {
131131
return vm.NewJSONLogger(logConfig, traceFile), nil
132132
}
133133
} else {
134-
getTracer = func(txIndex int, txHash common.Hash) (tracer vm.Tracer, err error) {
134+
getTracer = func(txIndex int, txHash common.Hash) (tracer vm.EVMLogger, err error) {
135135
return nil, nil
136136
}
137137
}

cmd/evm/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func runCmd(ctx *cli.Context) error {
116116
}
117117

118118
var (
119-
tracer vm.Tracer
119+
tracer vm.EVMLogger
120120
debugLogger *vm.StructLogger
121121
statedb *state.StateDB
122122
chainConfig *params.ChainConfig

0 commit comments

Comments
 (0)