diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33bea7e8..c33c8d1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25' cache: true - name: Run simulation diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a0b4a4a8..a0d50567 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,17 +20,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - go: [ '1.23', '1.24'] + go: [ '1.24', '1.25'] os: [ubuntu-latest, windows-2022, macos-14] exclude: # Only latest Go version for Windows and MacOS. - os: windows-2022 - go: '1.23' + go: '1.24' - os: macos-14 - go: '1.23' + go: '1.24' # Exclude latest Go version for Ubuntu as Coverage uses it. - os: ubuntu-latest - go: '1.24' + go: '1.25' steps: - name: Setup go @@ -52,7 +52,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: 1.25 - name: Check out uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 75b23fe7..50a8717d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ New features: Behaviour changes: Improvements: + * minimum required Go version is 1.24 (#144) Bugs fixed: @@ -80,7 +81,7 @@ Improvements: * add Commit message verification callback (#134) Bugs fixed: - * context-bound PreBlock and PreHeader are not reset properly (#127) + * context-bound PreBlock and PreHeader are not reset properly (#127) * PreHeader is constructed instead of PreBlock to create PreCommit message (#128) * enable anti-MEV extension with respect to the current block index (#132) * (*Context).PreBlock() method returns PreHeader instead of PreBlock (#133) diff --git a/context.go b/context.go index f161887a..28918446 100644 --- a/context.go +++ b/context.go @@ -322,10 +322,7 @@ func (c *Context[H]) Fill(force bool) bool { } b := make([]byte, 8) - _, err := rand.Read(b) - if err != nil { - panic(err) - } + _, _ = rand.Read(b) c.Nonce = binary.LittleEndian.Uint64(b) c.TransactionHashes = make([]H, len(txx)) diff --git a/go.mod b/go.mod index 789d0548..e3d5cf0e 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/nspcc-dev/dbft -go 1.23 +go 1.24 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.11.1 go.uber.org/zap v1.27.0 ) diff --git a/go.sum b/go.sum index af4ca60f..92630fbd 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= diff --git a/internal/consensus/message_test.go b/internal/consensus/message_test.go index c35cb1b5..f4bad7c2 100644 --- a/internal/consensus/message_test.go +++ b/internal/consensus/message_test.go @@ -202,6 +202,5 @@ func testMarshalUnmarshal(t *testing.T, expected, actual *Payload) { } func fillRandom(t *testing.T, arr []byte) { - _, err := rand.Read(arr) - require.NoError(t, err) + _, _ = rand.Read(arr) }