Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: update to go version 1.22.1 #76

Merged
merged 3 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '**.md'
- .gitignore
env:
GO_VERSION: 1.21.0
GO_VERSION: 1.22.1
jobs:
lint:
name: 'Code linters'
Expand Down
7 changes: 2 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ run:
linters:
disable-all: true
enable:
- goconst
- goimports
- gosimple
- govet
Expand Down Expand Up @@ -59,10 +58,8 @@ issues:
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
- path: plugin/account/internal/testutils/matchers.go
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
- path: rpc/
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
- path: rpc/
text: 'SA1019: "github.com/golang/protobuf/ptypes" is deprecated: Well-known types have specialized functionality directly injected into the generated packages for each message type. See the deprecation notice for each function for the suggested alternative'
- path: consensus/ethash/
text: 'SA1019: reflect.SliceHeader has been deprecated since Go 1.21 and an alternative has been available since Go 1.17: Use unsafe.Slice or unsafe.SliceData instead.'
Comment on lines +61 to +62
Copy link
Member Author

@YoshihitoAso YoshihitoAso Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We plan to fix it in the following issue.

exclude:
- 'SA1019: event.TypeMux is deprecated: use Feed'
- 'SA1019: strings.Title is deprecated'
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION=""
ARG BUILDNUM=""

# Build Geth in a stock Go builder container
FROM golang:1.21-alpine as builder
FROM golang:1.22-alpine as builder

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

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alltools
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION=""
ARG BUILDNUM=""

# Build Geth in a stock Go builder container
FROM golang:1.21-alpine as builder
FROM golang:1.22-alpine as builder

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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ The version control policy of this project follows that of ibet-Network.
Currently, the ibet Network is built using a node client based on v23.4.0 of GoQuorum.
However, it has been variously patched to be optimized for ibet Network. For example:
- The default block generation interval is set to 1 second.
- Fully supports Go 1.21 and applies new 3rd party packages from a security perspective.
- Fully supports Go 1.22 and applies new 3rd party packages from a security perspective.
- Made temporary fixes for bugs before they were fixed in the original GoQuorum.

## Building the source
Building quorum requires both a Go (version 1.21) and a C compiler.
Building quorum requires both a Go (version 1.22) and a C compiler.
You can install them using your favourite package manager.
Once the dependencies are installed, run
```
Expand Down
5 changes: 2 additions & 3 deletions accounts/scwallet/securechannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/elliptic"
"crypto/rand"
"crypto/sha256"
"crypto/sha512"
Expand Down Expand Up @@ -71,11 +70,11 @@ func NewSecureChannelSession(card *pcsc.Card, keyData []byte) (*SecureChannelSes
if err != nil {
return nil, fmt.Errorf("could not unmarshal public key from card: %v", err)
}
secret, _ := key.Curve.ScalarMult(cardPublic.X, cardPublic.Y, key.D.Bytes())
secret, _ := crypto.S256().ScalarMult(cardPublic.X, cardPublic.Y, key.D.Bytes())
return &SecureChannelSession{
card: card,
secret: secret.Bytes(),
publicKey: elliptic.Marshal(crypto.S256(), key.PublicKey.X, key.PublicKey.Y),
publicKey: crypto.FromECDSAPub(&key.PublicKey),
}, nil
}

Expand Down
128 changes: 64 additions & 64 deletions build/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
# This file contains sha256 checksums of optional build dependencies.

818d46ede85682dd551ad378ef37a4d247006f12ec59b5b755601d2ce114369a go1.21.0.src.tar.gz
b314de9f704ab122c077d2ec8e67e3670affe8865479d1f01991e7ac55d65e70 go1.21.0.darwin-amd64.tar.gz
3aca44de55c5e098de2f406e98aba328898b05d509a2e2a356416faacf2c4566 go1.21.0.darwin-arm64.tar.gz
312a0065714a50862af714e7a5b3fbbd70fe68f905ffb9bcc56d42eadf6bffab go1.21.0.freebsd-386.tar.gz
b8eaa36654625df799654f77f4af0ea7bd9e5e760ebe86e68fe7c484748ae995 go1.21.0.freebsd-amd64.tar.gz
0e6f378d9b072fab0a3d9ff4d5e990d98487d47252dba8160015a61e6bd0bcba go1.21.0.linux-386.tar.gz
d0398903a16ba2232b389fb31032ddf57cac34efda306a0eebac34f0965a0742 go1.21.0.linux-amd64.tar.gz
f3d4548edf9b22f26bbd49720350bbfe59d75b7090a1a2bff1afad8214febaf3 go1.21.0.linux-arm64.tar.gz
e377a0004957c8c560a3ff99601bce612330a3d95ba3b0a2ae144165fc87deb1 go1.21.0.linux-armv6l.tar.gz
e938ffc81d8ebe5efc179240960ba22da6a841ff05d5cab7ce2547112b14a47f go1.21.0.linux-ppc64le.tar.gz
be7338df8e5d5472dfa307b0df2b446d85d001b0a2a3cdb1a14048d751b70481 go1.21.0.linux-s390x.tar.gz
af920fbb74fc3d173118dc3cc35f02a709c1de642700e92a91a7d16981df3fec go1.21.0.windows-386.zip
732121e64e0ecb07c77fdf6cc1bc5ce7b242c2d40d4ac29021ad4c64a08731f6 go1.21.0.windows-amd64.zip
41342f5a0f8c083b14c68bde738ddcd313a4f53a5854bfdfab47f0e88247de12 go1.21.0.windows-arm64.zip
79c9b91d7f109515a25fc3ecdaad125d67e6bdb54f6d4d98580f46799caea321 go1.22.1.src.tar.gz
3bc971772f4712fec0364f4bc3de06af22a00a12daab10b6f717fdcd13156cc0 go1.22.1.darwin-amd64.tar.gz
943e4f9f038239f9911c44366f52ab9202f6ee13610322a668fe42406fb3deef go1.22.1.darwin-arm64.tar.gz
99f81c10d5a3f8a886faf8fa86aaa2aaf929fbed54a972ae5eec3c5e0bdb961a go1.22.1.freebsd-386.tar.gz
51c614ddd92ee4a9913a14c39bf80508d9cfba08561f24d2f075fd00f3cfb067 go1.22.1.freebsd-amd64.tar.gz
8484df36d3d40139eaf0fe5e647b006435d826cc12f9ae72973bf7ec265e0ae4 go1.22.1.linux-386.tar.gz
aab8e15785c997ae20f9c88422ee35d962c4562212bb0f879d052a35c8307c7f go1.22.1.linux-amd64.tar.gz
e56685a245b6a0c592fc4a55f0b7803af5b3f827aaa29feab1f40e491acf35b8 go1.22.1.linux-arm64.tar.gz
8cb7a90e48c20daed39a6ac8b8a40760030ba5e93c12274c42191d868687c281 go1.22.1.linux-armv6l.tar.gz
ac775e19d93cc1668999b77cfe8c8964abfbc658718feccfe6e0eb87663cd668 go1.22.1.linux-ppc64le.tar.gz
7bb7dd8e10f95c9a4cc4f6bef44c816a6e7c9e03f56ac6af6efbb082b19b379f go1.22.1.linux-s390x.tar.gz
0c5ebb7eb39b7884ec99f92b425d4c03a96a72443562aafbf6e7d15c42a3108a go1.22.1.windows-386.zip
cf9c66a208a106402a527f5b956269ca506cfe535fc388e828d249ea88ed28ba go1.22.1.windows-amd64.zip
85b8511b298c9f4199ecae26afafcc3d46155bac934d43f2357b9224bcaa310f go1.22.1.windows-arm64.zip

0a373e99404809dbcb208feb0ca4b9b42dbc41cb94b8e591dbe6fb4ec419ff9d golangci-lint-1.53.3-linux-riscv64.rpm
10fdd75707d078086de3d21dd1a8d815ed455b603b1e66ef2261da284b3d4cde golangci-lint-1.53.3-windows-armv6.zip
18f464d8a788f59238d2a7265ce74eb24137ece9f8d87fa352638198cfb060fb golangci-lint-1.53.3-source.tar.gz
1dda9778ca1b9d521033f57db7bf07a1958f24f648fcc8715e071c5ec62c5326 golangci-lint-1.53.3-linux-armv6.tar.gz
235e1fe20de11f3886aee03a2963da34ca0dd90ce6a233ac303eec15c53868b1 golangci-lint-1.53.3-freebsd-armv6.tar.gz
24da27dd28a1cb867cd2f1cb5a5b7ed7381052417411ddeb409f05d50682612d golangci-lint-1.53.3-linux-ppc64le.deb
2a053ce8c15783fd3462e12dbe1c4eb6f52c5a6c78e71f19777fade7f39f1ab9 golangci-lint-1.53.3-linux-armv6.rpm
2bec2e7c0eb20d9a7859d9a2a534ec44e3782946b4e4928546c1fd54b8644bc4 golangci-lint-1.53.3-linux-arm64.tar.gz
2c06778bb3ba2e46dac099b32d28f12042ec8b5f59a5503a11c6b2e8c9050e1a golangci-lint-1.53.3-linux-mips64le.deb
2c5e1425ad893d43bd12efaba4628f93f49094320b8818f4a1864970f4122de7 golangci-lint-1.53.3-linux-mips64.deb
30a570b646954205ef347610d98097822abfae763b2a0a1c195e27cda2adfc13 golangci-lint-1.53.3-linux-armv7.rpm
30ea439c93753d456154c69029b83a05f11896f1f4a43eeade8d083d4f056ba1 golangci-lint-1.53.3-linux-loong64.deb
33e70b307af34701938d6ff2cd8485d0829c71eb0a744a76e308d9d498f7c57a golangci-lint-1.53.3-windows-386.zip
3ce194afa80d726c5cb2bd3180c3750dc304cabdd7c3a0391c8de7c4bbf74c1b golangci-lint-1.53.3-linux-riscv64.tar.gz
3e09704175b60a98c8fca331b71d808c94c29200fbc219dc8dc5e0ba77021711 golangci-lint-1.53.3-linux-mips64.tar.gz
3e0983b9f6ace705ceede19f37f24a785dbc785469808b5868236f277188bd99 golangci-lint-1.53.3-netbsd-386.tar.gz
3eb1a121cecc60468545339f9b91c7b5909314fffa97deadc66f2efc8222137f golangci-lint-1.53.3-linux-amd64.deb
4c9ffc9ad512ef4fcc926624c7a5c4ddd610b9ed3201e4a1cc28188184572cfa golangci-lint-1.53.3-linux-riscv64.deb
4cb26a202f43459d20235cb9865595b9e6995fc568d7f031c79aa2a50222b69c golangci-lint-1.53.3-linux-s390x.rpm
4f62007ca96372ccba54760e2ed39c2446b40ec24d9a90c21aad9f2fdf6cf0da golangci-lint-1.53.3-linux-amd64.tar.gz
55513fe334a9a0c0c8619c2196f46459176a1ea535b07ed0527041ad86462888 golangci-lint-1.53.3-linux-ppc64le.tar.gz
714df5c976e1ff3f7d3b5f7ce3cbd7641c9282298b7305d9ec507ab1c632e4f6 golangci-lint-1.53.3-linux-arm64.rpm
76607909a15e825a39bd61f1c5805997746b365bd285314277dccde1b86edae6 golangci-lint-1.53.3-darwin-arm64.tar.gz
800dc7cff5721b9a0240dbd9649e188739b42e8994c6b3b97d029a48208bfe8e golangci-lint-1.53.3-linux-s390x.deb
875fe78b686f4106b75b9eeeab6d5407e62f0ce27b39a06beb60893aba1985b8 golangci-lint-1.53.3-linux-s390x.tar.gz
87cfdcfbae6affca6a436c0d564c92deefa8f1d57074bfb6ea5af3d5f989414c golangci-lint-1.53.3-linux-mips64.rpm
8d9942a30bedf078f987bb8f67486566b783233ae44a1e658ed2c8aa179384c9 golangci-lint-1.53.3-linux-loong64.rpm
8dc76886936b14335b587404369811c1421033a34412c820847949f4a2e22f1c golangci-lint-1.53.3-linux-armv6.deb
8ee5aef21ea766e09a61fa8fee55ed4915b1c21364ee0b7007b7b3fc899db7a0 golangci-lint-1.53.3-freebsd-386.tar.gz
8f2c9636caac0ec2b1122e246708b934abd615189d1bc4492279f90ea8cb599e golangci-lint-1.53.3-linux-386.rpm
a02afb351fdb814e97f2561dd3820ab35468264ab723f3eef1a6224ce63b859e golangci-lint-1.53.3-linux-armv7.tar.gz
a7ce9c80fe88869e8baf5a8b458dbc587ea2b7c0ffaeac4f1c90cd227426c295 golangci-lint-1.53.3-linux-mips64le.tar.gz
ad2d7a90d692e22e2276d41997d6f8e6e4c0b1ace0b8ddc157870a03420c3b52 golangci-lint-1.53.3-freebsd-amd64.tar.gz
b1cd9bd1f64389793abe0dea77dcd9d1b8f4090e74b698adecab100feacd4bb6 golangci-lint-1.53.3-linux-386.deb
bd23cc509f00990eecebeb2f1a12ba1b07f395c53313a27da969fad99b686ceb golangci-lint-1.53.3-windows-amd64.zip
c54d0839645e506e7750c26b501a319966824d6291adb286eeea3dc1ad2deada golangci-lint-1.53.3-netbsd-armv6.tar.gz
ce6c878f088d7dc1fb0dd4cf44f7d6769ce4405aa9ef6c02a9972e5ce629e8b4 golangci-lint-1.53.3-linux-ppc64le.rpm
d5deb03978ba25bd4e2d8f95467a83fdf1aebb416c86bbfb9540150b075c45f0 golangci-lint-1.53.3-freebsd-armv7.tar.gz
d92ad8a0daba87bd31ceec8155e0397d82d33b02deea61b499402643f6eba7cf golangci-lint-1.53.3-windows-arm64.zip
da27c89f7982f4d9bc6a461ee12cc4fc47503162d046b2baf354e483e2552fca golangci-lint-1.53.3-linux-loong64.tar.gz
db1bb21fca878fe13b6a46ced6b8e4c588fe923c355313892f391aa49a01821b golangci-lint-1.53.3-netbsd-amd64.tar.gz
dc0d92235f7cb6a1b950d28b76594d7e6a61c0f0ece1bd6bda44297142df7164 golangci-lint-1.53.3-linux-armv7.deb
e01c0f687de34fd023cd06edb24b7987a313af08a7a357b79770628dadb518f9 golangci-lint-1.53.3-linux-mips64le.rpm
e6fe5df023c35482cf9858eeb0a14aeecea58e64549be9084268b4a1fb632ece golangci-lint-1.53.3-darwin-amd64.tar.gz
e9d3d7ef790537a2e6aa87961cfa48d47050dca395c26774d45a49b8bb2817a3 golangci-lint-1.53.3-netbsd-armv7.tar.gz
ea94da60ca3957a3e35eef2c61a2024bdfb7b11e25d86bffc8bc7067a70cc10b golangci-lint-1.53.3-linux-386.tar.gz
ec054685860bf044198bfbf5401b5516fe0ba4e28e1113668b680988615b0ff4 golangci-lint-1.53.3-windows-armv7.zip
f2d3f2a5733267de0894ee098ac0204676672a9853eaee12a48fe9dfc1203a20 golangci-lint-1.53.3-linux-amd64.rpm
f3834f5a842019874c35eb4061c1855dbfbc2f69059192ec91c18eea23028229 golangci-lint-1.53.3-illumos-amd64.tar.gz
fdf1f064ae0ad09ea813534d96675e30bac6cc05324ca96266621e0740ef369b golangci-lint-1.53.3-linux-arm64.deb
15c4d19a2c85a04f67779047dbb9467ba176c71fff762a0d514a21bb75e4b42c golangci-lint-1.56.2-darwin-amd64.tar.gz
5f9ecda712c7ae08fbf872336fae3db866720e5865903d4c53903184b2a2c2dc golangci-lint-1.56.2-darwin-arm64.tar.gz
c0ec61f2ce9a9f258c9999260889f6185f086b387ebbe50fe845c9e149ce1419 golangci-lint-1.56.2-freebsd-386.tar.gz
08dfbc60a8e7288b07d539b2ca635d64292ba367d9a14714a68d38747c373f99 golangci-lint-1.56.2-freebsd-amd64.tar.gz
eae3d1adb12787c1f7ed47732be63ad079c460e1f788962c0ea6162a90a20f4f golangci-lint-1.56.2-freebsd-armv6.tar.gz
da23333672dcbe8a7cf353c5f1adb793d7a49e2fd9bc6f9b3dacaa963e70886d golangci-lint-1.56.2-freebsd-armv7.tar.gz
6245d150ea2badaf2f8fc0cce2a901956c39b9a5f862374c8aae5c108a74e251 golangci-lint-1.56.2-illumos-amd64.tar.gz
d8a2f1172e9db40268ba99a573a4fe5cca27bdd7cf6264aec1bd800b0b138b84 golangci-lint-1.56.2-linux-386.deb
78547895ac893f8bed64dd18f75c1c74bf29f2d28dd60097a2bcb4b4957d1776 golangci-lint-1.56.2-linux-386.rpm
c483ad83964bd3d53f71ce9c8d23e9230f57d8663acaf57caf13da75524a6b9a golangci-lint-1.56.2-linux-386.tar.gz
79268c391914a93b8cc6d0e486360204d3d4387e580e849ab18ccfebf4a7f6c5 golangci-lint-1.56.2-linux-amd64.deb
f0881fa8be94b377ea9849d79fdd8e9cbc27bccf81b59086d979120a5451345e golangci-lint-1.56.2-linux-amd64.rpm
e1c313fb5fc85a33890fdee5dbb1777d1f5829c84d655a47a55688f3aad5e501 golangci-lint-1.56.2-linux-amd64.tar.gz
62d0a6eb502b47fdadd8b0fdd98172a3c0231b8dd072cbaa667a5d0fdc606cc4 golangci-lint-1.56.2-linux-arm64.deb
2101accf58ec0e04358d8776f657447dbc6dc894b1a328cb9e5d93efe554c9e7 golangci-lint-1.56.2-linux-arm64.rpm
0041594fde41ce43b75e65476a050fe9057881d8b5bccd472f18357e2ead3e04 golangci-lint-1.56.2-linux-arm64.tar.gz
5d8e078dbe01aef743ccf3cab425ad5dc97f8cce25a071a032fafcfcbf7c21e2 golangci-lint-1.56.2-linux-armv6.deb
e94cbcd96471a78306df995fca44507d1a5ecbbaf3d44ff8c816c3137c510b32 golangci-lint-1.56.2-linux-armv6.rpm
4820c7b0a2832812bc243328c5046bc06cca71874ca31f0001e2f8f5effaa0d7 golangci-lint-1.56.2-linux-armv6.tar.gz
5100abd223476750fe724b9847abdaab53f48ecaacc8d6177536993266bce157 golangci-lint-1.56.2-linux-armv7.deb
65e4c3a049a1a4dec403220f4c8630826ab9ce2e75d719c501b1f219abd94e64 golangci-lint-1.56.2-linux-armv7.rpm
ea7422a38742e2e0867f75f639f31cd2157516188475216f3b5f1673a749da0d golangci-lint-1.56.2-linux-armv7.tar.gz
85824d48aaee70606975c7a274d30e8a350a1d9f080b2ff32d0bb4b411fab2ee golangci-lint-1.56.2-linux-loong64.deb
26b0acae6ec6aa610fc591f36129b397ae740477b3c0680ca0e29129a7a26831 golangci-lint-1.56.2-linux-loong64.rpm
07215d4083781b5e133837eb2fe32dee568f66c0ac19ce6969a20f34535389ed golangci-lint-1.56.2-linux-loong64.tar.gz
7b9fb82c8577b458b85e2241f0884cab567dcd9e627ccc5488e17c4df4156fc5 golangci-lint-1.56.2-linux-mips64.deb
b697f75f608120e92a64aea249ea4d3ee14018983056715207fd677e478c10c2 golangci-lint-1.56.2-linux-mips64.rpm
277bc15d2665bf2dbd48fa2149c987d355e67cabffe1312a534db8e62005fa80 golangci-lint-1.56.2-linux-mips64.tar.gz
784bda0c90d70ac01789081f70d6d04f37ffc175108059bbfacf3985222a9fd3 golangci-lint-1.56.2-linux-mips64le.deb
dca642bf458908cdcf60266081761fee6fce937525265e4056533c56e389f47d golangci-lint-1.56.2-linux-mips64le.rpm
2c751ecd22fcff660fb5e1fd54a4a8f90ac9ca348a80c3e944a142f3ba8f9e88 golangci-lint-1.56.2-linux-mips64le.tar.gz
759e895f26ffc869ca93db79391e352561d0a7d6eb4aeb6d4842d82b02aed955 golangci-lint-1.56.2-linux-ppc64le.deb
08c8d66849534adb856ad6474994671d7bbbbc9b794c7bbad8fc2a2e98d1b6e0 golangci-lint-1.56.2-linux-ppc64le.rpm
24ae315f9bb10e1f0842918797d558913ea378063923bed56d12415da79cea02 golangci-lint-1.56.2-linux-ppc64le.tar.gz
d37e01de56ffdf41355fcd1db5d9cd9d59af78fca2eef049bcea876c49d183d0 golangci-lint-1.56.2-linux-riscv64.deb
96418ca4f2eff71c6482f26d821a75dd0e797cf45eb09d66d41666bc40d1a28e golangci-lint-1.56.2-linux-riscv64.rpm
8afbff2b7d216d8e90e254b65329036d996f9639811375f79fe05f75e0e43907 golangci-lint-1.56.2-linux-riscv64.tar.gz
8581ac09f134f2e68aeb9f1f87dc7386dea114fd6edc94ad3fc9829606333be7 golangci-lint-1.56.2-linux-s390x.deb
cff6629c84064e8e69e46d7cb0f8f0b8e8c78b2c13e28c7bd60add7fd6579e3d golangci-lint-1.56.2-linux-s390x.rpm
d83a60b0337bd9e1c5dc0bd2a002585df9ce8191365b5efa7472e2a5187ad7f4 golangci-lint-1.56.2-linux-s390x.tar.gz
921f468ccdebe4d1946f4b5eddcbaf4854d905a0d6d1f62e9ec0ab772d283ae5 golangci-lint-1.56.2-netbsd-386.tar.gz
8cba71ffe1a1d40d990e7df782623fc9d47271764d56c994b32ac89b855e7d4b golangci-lint-1.56.2-netbsd-amd64.tar.gz
d70025aa51e630e058b36c46729803b68055f542ef7d96327c9bacac32923e83 golangci-lint-1.56.2-netbsd-armv6.tar.gz
26d28560dc43a4d8f898f1a12ff246aeaea31e0b7b6aa16d74e632183a393cac golangci-lint-1.56.2-netbsd-armv7.tar.gz
f704e7251a6fe4d52e6afe189a95c2501dbbbbe06e593f3210fe2eb4c36e3462 golangci-lint-1.56.2-source.tar.gz
e26282d0abcdc3e12b8b1ad80f6c8992969fd0a10b590cb0e95019f3822722b7 golangci-lint-1.56.2-windows-386.zip
d02df32c581281ef46af62d4ab71da6e24b47ef3e93e7f05d719fada74440185 golangci-lint-1.56.2-windows-amd64.zip
6e34ffbfa763fcc7108b69735d00db8ee2cc14f93a0ba67b0ac564b552582052 golangci-lint-1.56.2-windows-arm64.zip
c6a91ccc55715f638354fdf71927d27a8125c4b14a3608f3216fecef3b125c6a golangci-lint-1.56.2-windows-armv6.zip
b0add488bd0f1873ca0892e7a4bebe8d217a0679ec9ecd277f16c4a56da9733b golangci-lint-1.56.2-windows-armv7.zip
4 changes: 2 additions & 2 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ var (
// This is the version of go that will be downloaded by
//
// go run ci.go install -dlgo
dlgoVersion = "1.21.0"
dlgoVersion = "1.22.1"
)

var GOBIN, _ = filepath.Abs(filepath.Join("build", "bin"))
Expand Down Expand Up @@ -324,7 +324,7 @@ func doLint(cmdline []string) {

// downloadLinter downloads and unpacks golangci-lint.
func downloadLinter(cachedir string) string {
const version = "1.53.3"
const version = "1.56.2"

csdb := build.MustLoadChecksums("build/checksums.txt")
arch := runtime.GOARCH
Expand Down
15 changes: 12 additions & 3 deletions crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ var (

var errInvalidPubkey = errors.New("invalid secp256k1 public key")

// EllipticCurve contains curve operations.
type EllipticCurve interface {
elliptic.Curve

// Point marshaling/unmarshaing.
Marshal(x, y *big.Int) []byte
Unmarshal(data []byte) (x, y *big.Int)
}

// KeccakState wraps sha3.state. In addition to the usual hash methods, it also supports
// Read to get a variable amount of data from the hash state. Read is faster than Sum
// because it doesn't copy the internal state, but also modifies the internal state.
Expand Down Expand Up @@ -148,7 +157,7 @@ func toECDSA(d []byte, strict bool) (*ecdsa.PrivateKey, error) {
return nil, fmt.Errorf("invalid private key, zero or negative")
}

priv.PublicKey.X, priv.PublicKey.Y = priv.PublicKey.Curve.ScalarBaseMult(d)
priv.PublicKey.X, priv.PublicKey.Y = S256().ScalarBaseMult(d)
if priv.PublicKey.X == nil {
return nil, errors.New("invalid private key")
}
Expand All @@ -165,7 +174,7 @@ func FromECDSA(priv *ecdsa.PrivateKey) []byte {

// UnmarshalPubkey converts bytes to a secp256k1 public key.
func UnmarshalPubkey(pub []byte) (*ecdsa.PublicKey, error) {
x, y := elliptic.Unmarshal(S256(), pub)
x, y := S256().Unmarshal(pub)
if x == nil {
return nil, errInvalidPubkey
}
Expand All @@ -176,7 +185,7 @@ func FromECDSAPub(pub *ecdsa.PublicKey) []byte {
if pub == nil || pub.X == nil || pub.Y == nil {
return nil
}
return elliptic.Marshal(S256(), pub.X, pub.Y)
return S256().Marshal(pub.X, pub.Y)
}

// HexToECDSA parses a secp256k1 private key.
Expand Down
Loading
Loading