Skip to content

Commit 7dd1b05

Browse files
authored
build: upgrade go version to 1.20 (#1045)
1 parent bf2692b commit 7dd1b05

40 files changed

+550
-320
lines changed

.github/workflows/bridge_history_api.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install Go
3333
uses: actions/setup-go@v2
3434
with:
35-
go-version: 1.19.x
35+
go-version: 1.20.x
3636
- name: Checkout code
3737
uses: actions/checkout@v2
3838
- name: Lint
@@ -46,7 +46,7 @@ jobs:
4646
- name: Install Go
4747
uses: actions/setup-go@v2
4848
with:
49-
go-version: 1.19.x
49+
go-version: 1.20.x
5050
- name: Checkout code
5151
uses: actions/checkout@v2
5252
- name: Test
@@ -65,7 +65,7 @@ jobs:
6565
- name: Install Go
6666
uses: actions/setup-go@v2
6767
with:
68-
go-version: 1.19.x
68+
go-version: 1.20.x
6969
- name: Checkout code
7070
uses: actions/checkout@v2
7171
- name: Install goimports

.github/workflows/common.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Install Go
3636
uses: actions/setup-go@v2
3737
with:
38-
go-version: 1.19.x
38+
go-version: 1.20.x
3939
- name: Checkout code
4040
uses: actions/checkout@v2
4141
- name: Cache cargo
@@ -54,7 +54,7 @@ jobs:
5454
- name: Install Go
5555
uses: actions/setup-go@v2
5656
with:
57-
go-version: 1.19.x
57+
go-version: 1.20.x
5858
- name: Checkout code
5959
uses: actions/checkout@v2
6060
- name: Install goimports
@@ -79,7 +79,7 @@ jobs:
7979
- name: Install Go
8080
uses: actions/setup-go@v2
8181
with:
82-
go-version: 1.19.x
82+
go-version: 1.20.x
8383
- name: Checkout code
8484
uses: actions/checkout@v2
8585
- name: Install Solc

.github/workflows/coordinator.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Install Go
4040
uses: actions/setup-go@v2
4141
with:
42-
go-version: 1.19.x
42+
go-version: 1.20.x
4343
- name: Checkout code
4444
uses: actions/checkout@v2
4545
- name: Lint
@@ -54,7 +54,7 @@ jobs:
5454
- name: Install Go
5555
uses: actions/setup-go@v2
5656
with:
57-
go-version: 1.19.x
57+
go-version: 1.20.x
5858
- name: Checkout code
5959
uses: actions/checkout@v2
6060
- name: Install goimports
@@ -95,7 +95,7 @@ jobs:
9595
- name: Install Go
9696
uses: actions/setup-go@v2
9797
with:
98-
go-version: 1.19.x
98+
go-version: 1.20.x
9999
- name: Checkout code
100100
uses: actions/checkout@v2
101101
- name: Install Solc

.github/workflows/database.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install Go
3333
uses: actions/setup-go@v2
3434
with:
35-
go-version: 1.19.x
35+
go-version: 1.20.x
3636
- name: Checkout code
3737
uses: actions/checkout@v2
3838
- name: Lint
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install Go
4848
uses: actions/setup-go@v2
4949
with:
50-
go-version: 1.19.x
50+
go-version: 1.20.x
5151
- name: Checkout code
5252
uses: actions/checkout@v2
5353
- name: Install goimports
@@ -72,7 +72,7 @@ jobs:
7272
- name: Install Go
7373
uses: actions/setup-go@v2
7474
with:
75-
go-version: 1.19.x
75+
go-version: 1.20.x
7676
- name: Checkout code
7777
uses: actions/checkout@v2
7878
- name: Install Solc

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Go
2323
uses: actions/setup-go@v2
2424
with:
25-
go-version: 1.19.x
25+
go-version: 1.20.x
2626
- name: Checkout code
2727
uses: actions/checkout@v2
2828
- name: Install Solc

.github/workflows/intermediate-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
description: 'Go version'
88
required: true
99
type: string
10-
default: '1.19'
10+
default: '1.20'
1111
RUST_VERSION:
1212
description: 'Rust toolchain version'
1313
required: true

.github/workflows/prover.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install Go
3333
uses: actions/setup-go@v2
3434
with:
35-
go-version: 1.19.x
35+
go-version: 1.20.x
3636
- name: Checkout code
3737
uses: actions/checkout@v2
3838
- name: Test
@@ -56,7 +56,7 @@ jobs:
5656
- name: Install Go
5757
uses: actions/setup-go@v2
5858
with:
59-
go-version: 1.19.x
59+
go-version: 1.20.x
6060
- name: Checkout code
6161
uses: actions/checkout@v2
6262
- name: Cache cargo
@@ -73,7 +73,7 @@ jobs:
7373
- name: Install Go
7474
uses: actions/setup-go@v2
7575
with:
76-
go-version: 1.19.x
76+
go-version: 1.20.x
7777
- name: Checkout code
7878
uses: actions/checkout@v2
7979
- name: Lint
@@ -87,7 +87,7 @@ jobs:
8787
- name: Install Go
8888
uses: actions/setup-go@v2
8989
with:
90-
go-version: 1.19.x
90+
go-version: 1.20.x
9191
- name: Checkout code
9292
uses: actions/checkout@v2
9393
- name: Install goimports

.github/workflows/rollup.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Install Go
3535
uses: actions/setup-go@v2
3636
with:
37-
go-version: 1.19.x
37+
go-version: 1.20.x
3838
- name: Checkout code
3939
uses: actions/checkout@v2
4040
- name: Install Solc
@@ -58,7 +58,7 @@ jobs:
5858
- name: Install Go
5959
uses: actions/setup-go@v2
6060
with:
61-
go-version: 1.19.x
61+
go-version: 1.20.x
6262
- name: Checkout code
6363
uses: actions/checkout@v2
6464
- name: Install goimports
@@ -83,7 +83,7 @@ jobs:
8383
- name: Install Go
8484
uses: actions/setup-go@v2
8585
with:
86-
go-version: 1.19.x
86+
go-version: 1.20.x
8787
- name: Checkout code
8888
uses: actions/checkout@v2
8989
- name: Install Solc

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ We'd also love PRs. If you're thinking of a large PR, we advise opening up an is
2222
## Submitting a pull request
2323

2424
1. [Fork][fork] and clone the repository.
25-
1. Create a new branch: `git checkout -b my-branch-name`.
26-
1. Make your change, add tests, and make sure the tests still pass.
27-
1. Push to your fork and [submit a pull request][pr].
28-
1. Pat yourself on the back and wait for your pull request to be reviewed and merged.
25+
2. Create a new branch: `git checkout -b my-branch-name`.
26+
3. Make your change, add tests, and make sure the tests still pass.
27+
4. Format your code in scroll home directory: `make lint && make fmt`
28+
5. Push to your fork and [submit a pull request][pr].
29+
6. Pat yourself on the back and wait for your pull request to be reviewed and merged.
2930

3031
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
3132

Makefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.PHONY: check update dev_docker build_test_docker run_test_docker clean
1+
.PHONY: fmt dev_docker build_test_docker run_test_docker clean
22

3-
L2GETH_TAG=scroll-v4.3.55
3+
L2GETH_TAG=scroll-v5.1.6
44

55
help: ## Display this help message
66
@grep -h \
@@ -15,23 +15,22 @@ lint: ## The code's format and security checks.
1515
make -C prover lint
1616
make -C bridge-history-api lint
1717

18-
update: ## update dependencies
18+
fmt: ## format the code
1919
go work sync
20-
cd $(PWD)/rollup/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy
2120
cd $(PWD)/bridge-history-api/ && go get -u github.com/ethereum/go-ethereum@latest && go mod tidy
2221
cd $(PWD)/common/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy
2322
cd $(PWD)/coordinator/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy
2423
cd $(PWD)/database/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy
2524
cd $(PWD)/prover/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy
26-
cd $(PWD)/prover-stats-api/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy
25+
cd $(PWD)/rollup/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy
2726
cd $(PWD)/tests/integration-test/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy
28-
goimports -local $(PWD)/rollup/ -w .
27+
2928
goimports -local $(PWD)/bridge-history-api/ -w .
3029
goimports -local $(PWD)/common/ -w .
3130
goimports -local $(PWD)/coordinator/ -w .
3231
goimports -local $(PWD)/database/ -w .
3332
goimports -local $(PWD)/prover/ -w .
34-
goimports -local $(PWD)/prover-stats-api/ -w .
33+
goimports -local $(PWD)/rollup/ -w .
3534
goimports -local $(PWD)/tests/integration-test/ -w .
3635

3736
dev_docker: ## build docker images for development/testing usages

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
We welcome community contributions to this repository. Before you submit any issues or PRs, please read the [Code of Conduct](CODE_OF_CONDUCT.md) and the [Contribution Guideline](CONTRIBUTING.md).
3030

3131
## Prerequisites
32-
+ Go 1.19
32+
+ Go 1.20
3333
+ Rust (for version, see [rust-toolchain](./common/libzkp/impl/rust-toolchain))
3434
+ Hardhat / Foundry
3535
+ Docker

bridge-history-api/go.mod

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module bridge-history-api
22

3-
go 1.19
3+
go 1.20
44

55
require (
6-
github.com/bits-and-blooms/bitset v1.7.0
7-
github.com/ethereum/go-ethereum v1.12.2
6+
github.com/bits-and-blooms/bitset v1.12.0
7+
github.com/ethereum/go-ethereum v1.13.5
88
github.com/gin-contrib/cors v1.4.0
99
github.com/gin-contrib/pprof v1.4.0
1010
github.com/gin-gonic/gin v1.9.1
@@ -14,16 +14,17 @@ require (
1414
github.com/patrickmn/go-cache v2.1.0+incompatible
1515
github.com/pressly/goose/v3 v3.7.0
1616
github.com/prometheus/client_golang v1.14.0
17-
github.com/stretchr/testify v1.8.3
17+
github.com/stretchr/testify v1.8.4
1818
github.com/urfave/cli/v2 v2.25.7
19-
golang.org/x/sync v0.3.0
19+
golang.org/x/sync v0.5.0
2020
gorm.io/driver/postgres v1.5.0
2121
gorm.io/gorm v1.25.2
2222
)
2323

2424
require (
2525
github.com/DataDog/zstd v1.5.2 // indirect
26-
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
26+
github.com/Microsoft/go-winio v0.6.1 // indirect
27+
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
2728
github.com/beorn7/perks v1.0.1 // indirect
2829
github.com/btcsuite/btcd v0.20.1-beta // indirect
2930
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
@@ -32,18 +33,18 @@ require (
3233
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
3334
github.com/cockroachdb/errors v1.9.1 // indirect
3435
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
35-
github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 // indirect
36+
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect
3637
github.com/cockroachdb/redact v1.1.3 // indirect
38+
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
3739
github.com/consensys/bavard v0.1.13 // indirect
38-
github.com/consensys/gnark-crypto v0.10.0 // indirect
40+
github.com/consensys/gnark-crypto v0.12.1 // indirect
3941
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
40-
github.com/crate-crypto/go-kzg-4844 v0.3.0 // indirect
42+
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
4143
github.com/davecgh/go-spew v1.1.1 // indirect
4244
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
4345
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
4446
github.com/deepmap/oapi-codegen v1.8.2 // indirect
45-
github.com/docker/docker v23.0.6+incompatible // indirect
46-
github.com/ethereum/c-kzg-4844 v0.3.1 // indirect
47+
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
4748
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect
4849
github.com/fsnotify/fsnotify v1.6.0 // indirect
4950
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
@@ -59,16 +60,16 @@ require (
5960
github.com/gofrs/flock v0.8.1 // indirect
6061
github.com/gogo/protobuf v1.3.2 // indirect
6162
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
62-
github.com/golang/protobuf v1.5.2 // indirect
63+
github.com/golang/protobuf v1.5.3 // indirect
6364
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
6465
github.com/google/uuid v1.3.0 // indirect
6566
github.com/gorilla/websocket v1.5.0 // indirect
6667
github.com/graph-gophers/graphql-go v1.3.0 // indirect
6768
github.com/hashicorp/go-bexpr v0.1.10 // indirect
6869
github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect
6970
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
70-
github.com/holiman/uint256 v1.2.3 // indirect
71-
github.com/huin/goupnp v1.0.3 // indirect
71+
github.com/holiman/uint256 v1.2.4 // indirect
72+
github.com/huin/goupnp v1.3.0 // indirect
7273
github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect
7374
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect
7475
github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 // indirect
@@ -109,24 +110,24 @@ require (
109110
github.com/status-im/keycard-go v0.2.0 // indirect
110111
github.com/supranational/blst v0.3.11 // indirect
111112
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
112-
github.com/tklauser/go-sysconf v0.3.11 // indirect
113-
github.com/tklauser/numcpus v0.6.0 // indirect
113+
github.com/tklauser/go-sysconf v0.3.12 // indirect
114+
github.com/tklauser/numcpus v0.6.1 // indirect
114115
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
115116
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
116117
github.com/ugorji/go/codec v1.2.11 // indirect
117118
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
118119
github.com/yusufpapurcu/wmi v1.2.2 // indirect
119120
golang.org/x/arch v0.4.0 // indirect
120-
golang.org/x/crypto v0.12.0 // indirect
121-
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad // indirect
122-
golang.org/x/net v0.14.0 // indirect
123-
golang.org/x/sys v0.11.0 // indirect
124-
golang.org/x/text v0.12.0 // indirect
121+
golang.org/x/crypto v0.16.0 // indirect
122+
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
123+
golang.org/x/mod v0.12.0 // indirect
124+
golang.org/x/net v0.17.0 // indirect
125+
golang.org/x/sys v0.15.0 // indirect
126+
golang.org/x/text v0.14.0 // indirect
125127
golang.org/x/time v0.3.0 // indirect
126-
golang.org/x/tools v0.11.0 // indirect
128+
golang.org/x/tools v0.13.0 // indirect
127129
google.golang.org/protobuf v1.31.0 // indirect
128130
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
129-
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
130131
gopkg.in/yaml.v2 v2.4.0 // indirect
131132
gopkg.in/yaml.v3 v3.0.1 // indirect
132133
rsc.io/tmplfunc v0.0.3 // indirect

0 commit comments

Comments
 (0)