Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ issues:
# gosec
- "^G101: Potential hardcoded credentials"
- "^G108: Profiling endpoint is automatically exposed on /debug/pprof"
- "^G115: integer overflow conversion u?int(8|32|64)? -> u?int(8|32|64)?"
- "^G204: Subprocess launched with (variable|a potential tainted input or cmd arguments)"
- "^G301: Expect directory permissions to be 0750 or less"
- "^G302: Expect file permissions to be 0600 or less"
Expand All @@ -47,6 +48,7 @@ issues:
- "^var-naming: (method|range var) \\w*(Api|Http|Id|Rpc|Url)[^\\s]* should be \\w*(API|HTTP|ID|RPC|URL)"
- "^var-naming: don't use underscores in Go names"
- "^var-naming: don't use ALL_CAPS in Go names; use CamelCase"
- "^redefines-builtin-id: redefinition of the built-in (function|type) (max|min|cap|recover|new|error)"

exclude-use-default: false
exclude-rules:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
> * [CHANGELOG_1.2x.md](./documentation/changelog/CHANGELOG_1.2x.md) - v1.20.0 to v1.29.2

# UNRELEASED
- The minimum supported Golang version is now `1.24.7`
- feat(gateway): expose StateGetRandomnessDigestFromBeacon ([filecoin-project/lotus#13339](https://github.com/filecoin-project/lotus/pull/13339))

# Node and Miner v1.34.0 / 2025-09-11
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ sed -i 's/FROM golang:1.23.7-bullseye/FROM golang:1.23.10-bullseye/' Dockerfile
go mod tidy
make build
make unittests
make lint
```


Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#####################################
FROM golang:1.23.10-bullseye AS lotus-builder
FROM golang:1.24.7-bookworm AS lotus-builder
MAINTAINER Lotus Development Team

RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev
Expand Down
2 changes: 1 addition & 1 deletion GO_VERSION_MIN
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.10
1.24.7
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell
$(error Update Golang to version to at least $(shell cat GO_VERSION_MIN))
endif

GOLANGCI_LINT_VERSION=v1.60.1
GOLANGCI_LINT_VERSION=v1.64.8

# git modules that need to be loaded
MODULES:=
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<a href="https://github.com/filecoin-project/lotus/actions/workflows/check.yml"><img src="https://github.com/filecoin-project/lotus/actions/workflows/check.yml/badge.svg"></a>
<a href="https://github.com/filecoin-project/lotus/actions/workflows/test.yml"><img src="https://github.com/filecoin-project/lotus/actions/workflows/test.yml/badge.svg"></a>
<a href="https://goreportcard.com/report/github.com/filecoin-project/lotus"><img src="https://goreportcard.com/badge/github.com/filecoin-project/lotus" /></a>
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.23.10-blue.svg" /></a>
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.24.7-blue.svg" /></a>
<br>
</p>

Expand Down Expand Up @@ -58,10 +58,10 @@ For other distributions you can find the required dependencies [here.](https://l

#### Go

To build Lotus, you need a working installation of [Go 1.23.10 or higher](https://golang.org/dl/):
To build Lotus, you need a working installation of [Go 1.24.7 or higher](https://golang.org/dl/):

```bash
wget -c https://golang.org/dl/go1.23.10.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
wget -c https://golang.org/dl/go1.24.7.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
```

**TIP:**
Expand Down
11 changes: 10 additions & 1 deletion api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@ import (
"github.com/filecoin-project/go-jsonrpc"
)

func goRoot() (string, error) {
out, err := exec.Command("go", "env", "GOROOT").Output()
if err != nil {
return "", err
}
return strings.TrimSpace(string(out)), nil
}

func goCmd() string {
var exeSuffix string
if runtime.GOOS == "windows" {
exeSuffix = ".exe"
}
path := filepath.Join(runtime.GOROOT(), "bin", "go"+exeSuffix)
root, _ := goRoot()
path := filepath.Join(root, "bin", "go"+exeSuffix)
if _, err := os.Stat(path); err == nil {
return path
}
Expand Down
19 changes: 9 additions & 10 deletions chain/types/ethtypes/rlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,16 @@ func encodeRLP(val interface{}) ([]byte, error) {
} else if len(data) <= 55 {
prefix := byte(0x80 + len(data))
return append([]byte{prefix}, data...), nil
} else {
lenInBytes, err := encodeLength(len(data))
if err != nil {
return nil, err
}
prefix := byte(0xb7 + len(lenInBytes))
return append(
[]byte{prefix},
append(lenInBytes, data...)...,
), nil
}
lenInBytes, err := encodeLength(len(data))
if err != nil {
return nil, err
}
prefix := byte(0xb7 + len(lenInBytes))
return append(
[]byte{prefix},
append(lenInBytes, data...)...,
), nil
case []interface{}:
encodedList, err := encodeRLPListItems(data)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/filecoin-project/lotus

go 1.23.10
go 1.24.7

retract v1.14.0 // Accidentally force-pushed tag, use v1.14.1+ instead.

Expand Down
11 changes: 10 additions & 1 deletion node/config/dep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@ import (
"testing"
)

func goRoot() (string, error) {
out, err := exec.Command("go", "env", "GOROOT").Output()
if err != nil {
return "", err
}
return strings.TrimSpace(string(out)), nil
}

func goCmd() string {
var exeSuffix string
if runtime.GOOS == "windows" {
exeSuffix = ".exe"
}
path := filepath.Join(runtime.GOROOT(), "bin", "go"+exeSuffix)
root, _ := goRoot()
path := filepath.Join(root, "bin", "go"+exeSuffix)
if _, err := os.Stat(path); err == nil {
return path
}
Expand Down
Loading