This changes the go mod tidy check to use the go mod tidy -diff command,
removing the custom diffing for go.mod. The check for go.mod/go.sum is now
performed in the check_generate action.
Also included is a change where check_generate and check_baddeps will now
run on the GitHub Actions lint step.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
This is for fixing the PPA build, which has been failing since the
update to Go 1.24. In Go 1.24, the required Go version for bootstrapping
was updated to 1.22. In general, they are following through with always
depending on the Go version two releases ago for bootstrapping.
Since we still support Ubuntu Xenial (16.04) until its EOL date of
04/2026, and Xenial only has golang 1.10 as a package, we now need to
build Go a total of four times to get the most recent version. I'm adding a step
for Go 1.23 here. This should last us until Go 1.25, which should be out around
04/2026, and we can hopefully drop the first bootstrapping step at that time.
Fixes lint issue
>>> /home/appveyor/.gvm/gos/go1.24.0/bin/go generate ./...
ci.go:404: File changed: .git/index
ci.go:407: One or more generated files were updated by running 'go generate ./...'
exit status 1
This PR upgrades `golangci-lint` to v1.63.4 and fixes a warn message
which is reported by v1.63.4:
```text
WARN [config_reader] The configuration option `run.skip-dirs-use-default` is deprecated, please use `issues.exclude-dirs-use-default`.
```
Also fixes 2 warnings which are reported by v1.63.4:
```text
core/txpool/blobpool/blobpool.go:1754:12: S1005: unnecessary assignment to the blank identifier (gosimple)
for acct, _ := range p.index {
^
core/txpool/legacypool/legacypool.go:1989:19: S1005: unnecessary assignment to the blank identifier (gosimple)
for localSender, _ := range pool.locals.accounts {
^
```
Since we don't really support custom networks anymore, we don't need the
bootnode utility. In case a discovery-only node is wanted, it can still be run using cmd/devp2p.
Changelog: https://golangci-lint.run/product/changelog/#1610
Removes `exportloopref` (no longer needed), replaces it with
`copyloopvar` which is basically the opposite.
Also adds:
- `durationcheck`
- `gocheckcompilerdirectives`
- `reassign`
- `mirror`
- `tenv`
---------
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This PR updates the version of go used in builds and docker to
1.23.0. Release notes: https://go.dev/doc/go1.23
More importantly, following our policy of maintaining the last two
versions (which now becomes 1.23 and 1.22), we can now make use of
the things that were introduced in 1.22: https://go.dev/doc/go1.22
Go 1.22 makes two changes to “for” loops.
- each iteration creates new variables,
- for loops may range over integers
Other than that, some interesting library changes and other stuff.
This PR implements the conclusions from
https://github.com/ethereum/go-ethereum/issues/28987#issuecomment-2296075028,
that is:
Building with `--strip-all` as a ld-flag to the cgo linker, to remove
symbols. Without that, some spurious reference to a temporary file is
included into the kzg-related library.
Building with `--build-id=none`, to avoid putting a `build id` into the file.
The package `github.com/golang/protobuf/proto` is deprecated in favor
`google.golang.org/protobuf/proto`. We should update the codes to
recommended package.
Signed-off-by: Icarus Wu <icaruswu66@qq.com>
Since Go 1.22 has deprecated certain elliptic curve operations, this PR removes
references to the affected functions and replaces them with a custom implementation
in package crypto. This causes backwards-incompatible changes in some places.
---------
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>