Skip to content

Commit 344720f

Browse files
authored
Merge branch 'master' into upgrade_blobpool
2 parents 949bb0f + 59405c4 commit 344720f

File tree

254 files changed

+11605
-1911
lines changed

Some content is hidden

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

254 files changed

+11605
-1911
lines changed

.gitea/workflows/release-azure-cleanup.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
on:
2-
schedule:
3-
- cron: '0 15 * * *'
42
workflow_dispatch:
53

4+
### Note we cannot use cron-triggered builds right now, Gitea seems to have
5+
### a few bugs in that area. So this workflow is scheduled using an external
6+
### triggering mechanism and workflow_dispatch.
7+
#
8+
# schedule:
9+
# - cron: '0 15 * * *'
10+
611
jobs:
712
azure-cleanup:
813
runs-on: ubuntu-latest

.gitea/workflows/release-ppa.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
on:
2-
schedule:
3-
- cron: '0 16 * * *'
42
push:
53
tags:
64
- "v*"
75
workflow_dispatch:
86

7+
### Note we cannot use cron-triggered builds right now, Gitea seems to have
8+
### a few bugs in that area. So this workflow is scheduled using an external
9+
### triggering mechanism and workflow_dispatch.
10+
#
11+
# schedule:
12+
# - cron: '0 16 * * *'
13+
14+
915
jobs:
1016
ppa:
1117
name: PPA Upload

.gitea/workflows/release.yml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
- "master"
55
tags:
66
- "v*"
7+
workflow_dispatch:
78

89
jobs:
910
linux-intel:
@@ -25,7 +26,7 @@ jobs:
2526
2627
- name: Build (amd64)
2728
run: |
28-
go run build/ci.go install -arch amd64 -dlgo
29+
go run build/ci.go install -static -arch amd64 -dlgo
2930
3031
- name: Create/upload archive (amd64)
3132
run: |
@@ -37,7 +38,7 @@ jobs:
3738

3839
- name: Build (386)
3940
run: |
40-
go run build/ci.go install -arch 386 -dlgo
41+
go run build/ci.go install -static -arch 386 -dlgo
4142
4243
- name: Create/upload archive (386)
4344
run: |
@@ -67,7 +68,7 @@ jobs:
6768
6869
- name: Build (arm64)
6970
run: |
70-
go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
71+
go run build/ci.go install -static -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
7172
7273
- name: Create/upload archive (arm64)
7374
run: |
@@ -79,7 +80,7 @@ jobs:
7980

8081
- name: Run build (arm5)
8182
run: |
82-
go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
83+
go run build/ci.go install -static -dlgo -arch arm -cc arm-linux-gnueabi-gcc
8384
env:
8485
GOARM: "5"
8586

@@ -93,7 +94,7 @@ jobs:
9394

9495
- name: Run build (arm6)
9596
run: |
96-
go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
97+
go run build/ci.go install -static -dlgo -arch arm -cc arm-linux-gnueabi-gcc
9798
env:
9899
GOARM: "6"
99100

@@ -108,7 +109,7 @@ jobs:
108109

109110
- name: Run build (arm7)
110111
run: |
111-
go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
112+
go run build/ci.go install -static -dlgo -arch arm -cc arm-linux-gnueabi-gcc
112113
env:
113114
GOARM: "7"
114115

@@ -121,6 +122,37 @@ jobs:
121122
LINUX_SIGNING_KEY: ${{ secrets.LINUX_SIGNING_KEY }}
122123
AZURE_BLOBSTORE_TOKEN: ${{ secrets.AZURE_BLOBSTORE_TOKEN }}
123124

125+
windows:
126+
name: Windows Build
127+
runs-on: "win-11"
128+
steps:
129+
- uses: actions/checkout@v4
130+
131+
- name: Set up Go
132+
uses: actions/setup-go@v5
133+
with:
134+
go-version: 1.24
135+
cache: false
136+
137+
# Note: gcc.exe only works properly if the corresponding bin/ directory is
138+
# contained in PATH.
139+
140+
- name: "Build (amd64)"
141+
shell: cmd
142+
run: |
143+
set PATH=%GETH_MINGW%\bin;%PATH%
144+
go run build/ci.go install -dlgo -arch amd64 -cc %GETH_MINGW%\bin\gcc.exe
145+
env:
146+
GETH_MINGW: 'C:\msys64\mingw64'
147+
148+
- name: "Build (386)"
149+
shell: cmd
150+
run: |
151+
set PATH=%GETH_MINGW%\bin;%PATH%
152+
go run build/ci.go install -dlgo -arch 386 -cc %GETH_MINGW%\bin\gcc.exe
153+
env:
154+
GETH_MINGW: 'C:\msys64\mingw32'
155+
124156
docker:
125157
name: Docker Image
126158
runs-on: ubuntu-latest

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ miner/ @MariusVanDerWijden @fjl @rjl493456442
2929
node/ @fjl
3030
p2p/ @fjl @zsfelfoldi
3131
rlp/ @fjl
32-
params/ @fjl @karalabe @gballet @rjl493456442 @zsfelfoldi
32+
params/ @fjl @gballet @rjl493456442 @zsfelfoldi
3333
rpc/ @fjl

.github/workflows/go.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
name: i386 linux tests
2-
31
on:
42
push:
5-
branches: [ master ]
3+
branches:
4+
- master
65
pull_request:
7-
branches: [ master ]
6+
branches:
7+
- master
88
workflow_dispatch:
99

1010
jobs:
1111
lint:
1212
name: Lint
13-
runs-on: self-hosted
13+
runs-on: self-hosted-ghr
1414
steps:
1515
- uses: actions/checkout@v4
16+
with:
17+
submodules: false
1618

1719
# Cache build tools to avoid downloading them each time
1820
- uses: actions/cache@v4
@@ -23,7 +25,7 @@ jobs:
2325
- name: Set up Go
2426
uses: actions/setup-go@v5
2527
with:
26-
go-version: 1.23.0
28+
go-version: 1.24
2729
cache: false
2830

2931
- name: Run linters
@@ -32,17 +34,25 @@ jobs:
3234
go run build/ci.go check_generate
3335
go run build/ci.go check_baddeps
3436
35-
build:
36-
runs-on: self-hosted
37+
test:
38+
name: Test
39+
needs: lint
40+
runs-on: self-hosted-ghr
41+
strategy:
42+
matrix:
43+
go:
44+
- '1.24'
45+
- '1.23'
3746
steps:
3847
- uses: actions/checkout@v4
48+
with:
49+
submodules: true
50+
3951
- name: Set up Go
4052
uses: actions/setup-go@v5
4153
with:
42-
go-version: 1.24.0
54+
go-version: ${{ matrix.go }}
4355
cache: false
56+
4457
- name: Run tests
45-
run: go test -short ./...
46-
env:
47-
GOOS: linux
48-
GOARCH: 386
58+
run: go test ./...

accounts/abi/abigen/bind.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ import (
3333
"github.com/ethereum/go-ethereum/log"
3434
)
3535

36+
var (
37+
intRegex = regexp.MustCompile(`(u)?int([0-9]*)`)
38+
)
39+
3640
func isKeyWord(arg string) bool {
3741
switch arg {
3842
case "break":
@@ -299,7 +303,7 @@ func bindBasicType(kind abi.Type) string {
299303
case abi.AddressTy:
300304
return "common.Address"
301305
case abi.IntTy, abi.UintTy:
302-
parts := regexp.MustCompile(`(u)?int([0-9]*)`).FindStringSubmatch(kind.String())
306+
parts := intRegex.FindStringSubmatch(kind.String())
303307
switch parts[2] {
304308
case "8", "16", "32", "64":
305309
return fmt.Sprintf("%sint%s", parts[1], parts[2])

accounts/abi/abigen/bindv2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func TestBindingV2ConvertedV1Tests(t *testing.T) {
281281
}
282282
// Set this environment variable to regenerate the test outputs.
283283
if os.Getenv("WRITE_TEST_FILES") != "" {
284-
if err := os.WriteFile((fname), []byte(have), 0666); err != nil {
284+
if err := os.WriteFile(fname, []byte(have), 0666); err != nil {
285285
t.Fatalf("err writing expected output to file: %v\n", err)
286286
}
287287
}

accounts/abi/abigen/source2.go.tpl

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ var (
9090

9191
{{range .Calls}}
9292
// Pack{{.Normalized.Name}} is the Go binding used to pack the parameters required for calling
93-
// the contract method with ID 0x{{printf "%x" .Original.ID}}.
93+
// the contract method with ID 0x{{printf "%x" .Original.ID}}. This method will panic if any
94+
// invalid/nil inputs are passed.
9495
//
9596
// Solidity: {{.Original.String}}
9697
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Pack{{.Normalized.Name}}({{range .Normalized.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) []byte {
@@ -101,6 +102,15 @@ var (
101102
return enc
102103
}
103104

105+
// TryPack{{.Normalized.Name}} is the Go binding used to pack the parameters required for calling
106+
// the contract method with ID 0x{{printf "%x" .Original.ID}}. This method will return an error
107+
// if any inputs are invalid/nil.
108+
//
109+
// Solidity: {{.Original.String}}
110+
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) TryPack{{.Normalized.Name}}({{range .Normalized.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) ([]byte, error) {
111+
return {{ decapitalise $contract.Type}}.abi.Pack("{{.Original.Name}}" {{range .Normalized.Inputs}}, {{.Name}}{{end}})
112+
}
113+
104114
{{/* Unpack method is needed only when there are return args */}}
105115
{{if .Normalized.Outputs }}
106116
{{ if .Structured }}
@@ -133,8 +143,7 @@ var (
133143
outstruct.{{capitalise .Name}} = *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}})
134144
{{- end }}
135145
{{- end }}
136-
return *outstruct, err
137-
{{else}}
146+
return *outstruct, nil{{else}}
138147
if err != nil {
139148
return {{range $i, $_ := .Normalized.Outputs}}{{if ispointertype .Type}}new({{underlyingbindtype .Type }}), {{else}}*new({{bindtype .Type $structs}}), {{end}}{{end}} err
140149
}
@@ -145,8 +154,8 @@ var (
145154
out{{$i}} := *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}})
146155
{{- end }}
147156
{{- end}}
148-
return {{range $i, $t := .Normalized.Outputs}}out{{$i}}, {{end}} err
149-
{{- end}}
157+
return {{range $i, $t := .Normalized.Outputs}}out{{$i}}, {{end}} nil
158+
{{- end}}
150159
}
151160
{{end}}
152161
{{end}}

accounts/abi/abigen/testdata/v2/callbackparam.go.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ func (c *CallbackParam) Instance(backend bind.ContractBackend, addr common.Addre
5252
}
5353

5454
// PackTest is the Go binding used to pack the parameters required for calling
55-
// the contract method with ID 0xd7a5aba2.
55+
// the contract method with ID 0xd7a5aba2. This method will panic if any
56+
// invalid/nil inputs are passed.
5657
//
5758
// Solidity: function test(function callback) returns()
5859
func (callbackParam *CallbackParam) PackTest(callback [24]byte) []byte {
@@ -62,3 +63,12 @@ func (callbackParam *CallbackParam) PackTest(callback [24]byte) []byte {
6263
}
6364
return enc
6465
}
66+
67+
// TryPackTest is the Go binding used to pack the parameters required for calling
68+
// the contract method with ID 0xd7a5aba2. This method will return an error
69+
// if any inputs are invalid/nil.
70+
//
71+
// Solidity: function test(function callback) returns()
72+
func (callbackParam *CallbackParam) TryPackTest(callback [24]byte) ([]byte, error) {
73+
return callbackParam.abi.Pack("test", callback)
74+
}

0 commit comments

Comments
 (0)