From ded5c44e646cbfe128927891501b4f08d5f8e321 Mon Sep 17 00:00:00 2001 From: Jean Date: Tue, 11 Nov 2025 11:47:36 +0100 Subject: [PATCH 1/6] update golangci-lint to version 2 --- .github/workflows/golangci-lint.yml | 40 +- .golangci.yml | 546 ++++++++++++++-------------- Makefile | 11 +- go.sum | 2 + 4 files changed, 287 insertions(+), 312 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index bd624c384..90ab6b92a 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -3,7 +3,6 @@ on: push: branches: [ master ] pull_request: - types: [opened, synchronize, reopened] permissions: contents: read @@ -15,40 +14,11 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-go@v6 with: - go-version: '1.21' - cache: false + go-version: stable - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v8 with: - # Require: The version of golangci-lint to use. - # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. - # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. - version: v1.60.3 - - # Optional: working directory, useful for monorepos - # working-directory: somedir - - # Optional: golangci-lint command line arguments. - # - # Note: By default, the `.golangci.yml` file should be at the root of the repository. - # The location of the configuration file can be changed by using `--config=` - # args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0 - - # Optional: show only new issues if it's a pull request. The default value is `false`. - # only-new-issues: true - - # Optional: if set to true, then all caching functionality will be completely disabled, - # takes precedence over all other caching options. - # skip-cache: true - - # Optional: if set to true, then the action won't cache or restore ~/go/pkg. - # skip-pkg-cache: true - - # Optional: if set to true, then the action won't cache or restore ~/.cache/go-build. - # skip-build-cache: true - - # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. - # install-mode: "goinstall" + version: v2.6.1 diff --git a/.golangci.yml b/.golangci.yml index 5914dd1ab..c7f6d47fa 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,276 +1,282 @@ -# This code is licensed under the terms of the MIT license. - -run: - # Timeout for analysis, e.g. 30s, 5m. - # Default: 1m - timeout: 3m - -# This file contains only configs which differ from defaults. -# All possible options can be found here https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml -linters-settings: - staticcheck: - checks: - - all - - "-SA1019" # Ignore deprecated for now - cyclop: - # The maximal code complexity to report. - # Default: 10 - max-complexity: 30 - # The maximal average package complexity. - # If it's higher than 0.0 (float) the check is enabled - # Default: 0.0 - package-average: 10.0 - - errcheck: - # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. - # Such cases aren't reported by default. - # Default: false - check-type-assertions: true - - funlen: - # Checks the number of lines in a function. - # If lower than 0, disable the check. - # Default: 60 - lines: 100 - # Checks the number of statements in a function. - # If lower than 0, disable the check. - # Default: 40 - statements: 50 - - gocognit: - # Minimal code complexity to report - # Default: 30 (but we recommend 10-20) - min-complexity: 20 - - govet: - # Enable all analyzers. - # Default: false - enable-all: true - # Disable analyzers by name. - # Run `go tool vet help` to see all analyzers. - # Default: [] - disable: - - fieldalignment # too strict - - shadow # too many false positives - - nakedret: - # Make an issue if func has more lines of code than this setting, and it has naked returns. - # Default: 30 - max-func-lines: 10 - - nolintlint: - # Exclude following linters from requiring an explanation. - # Default: [] - allow-no-explanation: [funlen, gocognit, lll] - # Enable to require an explanation of nonzero length after each nolint directive. - # Default: false - require-explanation: true - # Enable to require nolint directives to mention the specific linter being suppressed. - # Default: false - require-specific: true - - tenv: - # The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures. - # Otherwise, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked. - # Default: false - all: true - - gosec: - excludes: - - G107 # variables in URLs - - G404 # use of weak random generator - - G115 # Disable for now due to the *many* warnings - - gocritic: - disabled-checks: - - captLocal - +version: "2" linters: - disable-all: true + # from 'golangci-lint help linters' + # Enabled by default linters: + disable: + #- errcheck # Errcheck is a program for checking for unchecked errors in Go code. These unchecked errors can be critical bugs in some cases. + #- govet # Vet examines Go source code and reports suspicious constructs. It is roughly the same as 'go vet' and uses its passes. [auto-fix] + #- ineffassign # Detects when assignments to existing variables are not used. [fast] + - staticcheck # It's the set of rules from staticcheck. [auto-fix] + #- unused # Checks Go code for unused constants, variables, functions and types. + # Disabled by default linters: enable: - ## enabled by default - - errcheck # checking for unchecked errors, these unchecked errors can be critical bugs in some cases - - gosimple # specializes in simplifying a code - - govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string - - ineffassign # detects when assignments to existing variables are not used - - staticcheck # is a go vet on steroids, applying a ton of static analysis checks - - typecheck # like the front-end of a Go compiler, parses and type-checks Go code - - unused # checks for unused constants, variables, functions and types - ## disabled by default - - asasalint # checks for pass []any as any in variadic func(...any) - - asciicheck # checks that your code does not contain non-ASCII identifiers - - bidichk # checks for dangerous unicode character sequences - - bodyclose # checks whether HTTP response body is closed successfully - - contextcheck # checks the function whether use a non-inherited context - - cyclop # checks function and package cyclomatic complexity - - dupl # tool for code clone detection - - durationcheck # checks for two durations multiplied together - - errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error - - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13 - - execinquery # checks query string in Query function which reads your Go src files and warning it finds - - exhaustive # checks exhaustiveness of enum switch statements - - exportloopref # checks for pointers to enclosing loop variables - - forbidigo # forbids identifiers - - funlen # tool for detection of long functions - #- gochecknoglobals # checks that no global variables exist - #- gochecknoinits # checks that no init functions are present in Go code - - gocognit # computes and checks the cognitive complexity of functions - - goconst # finds repeated strings that could be replaced by a constant - - gocritic # provides diagnostics that check for bugs, performance and style issues - - gocyclo # computes and checks the cyclomatic complexity of functions - #- godot # checks if comments end in a period - #- goimports # in addition to fixing imports, goimports also formats your code in the same style as gofmt - #- gomnd # detects magic numbers - ENABLE LATER - - gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod - - gomodguard # allow and block lists linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations - - goprintffuncname # checks that printf-like functions are named with f at the end - - gosec # inspects source code for security problems - - lll # reports long lines - #- makezero # finds slice declarations with non-zero initial length - - nakedret # finds naked returns in functions greater than a specified function length - - nestif # reports deeply nested if statements - - nilerr # finds the code that returns nil even if it checks that the error is not nil - - nilnil # checks that there is no simultaneous return of nil error and an invalid value - #- noctx # finds sending http request without context.Context - - nolintlint # reports ill-formed or insufficient nolint directives - #- nonamedreturns # reports all named returns - - nosprintfhostport # checks for misuse of Sprintf to construct a host with port in a URL - - predeclared # finds code that shadows one of Go's predeclared identifiers - #- promlinter # checks Prometheus metrics naming via promlint - - reassign # checks that package variables are not reassigned - - revive # fast, configurable, extensible, flexible, and beautiful linter for Go, drop-in replacement of golint - #- rowserrcheck # checks whether Err of rows is checked successfully - #- sqlclosecheck # checks that sql.Rows and sql.Stmt are closed - - stylecheck # is a replacement for golint - - tenv # detects using os.Setenv instead of t.Setenv since Go1.17 - #- testpackage # makes you use a separate _test package - - tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes - #- unconvert # removes unnecessary type conversions - - unparam # reports unused function parameters - - usestdlibvars # detects the possibility to use variables/constants from the Go standard library - #- wastedassign # finds wasted assignment statements - #- whitespace # detects leading and trailing whitespace - - ## you may want to enable - #- decorder # checks declaration order and count of types, constants, variables and functions - #- exhaustruct # checks if all structure fields are initialized - #- gci # controls golang package import order and makes it always deterministic - #- godox # detects FIXME, TODO and other comment keywords - #- goheader # checks is file header matches to pattern - - interfacebloat # checks the number of methods inside an interface - #- ireturn # accept interfaces, return concrete types - #- prealloc # [premature optimization, but can be used in some cases] finds slice declarations that could potentially be preallocated - #- varnamelen # [great idea, but too many false positives] checks that the length of a variable's name matches its scope - #- wrapcheck # checks that errors returned from external packages are wrapped + #- arangolint # Opinionated best practices for arangodb client. + - asasalint # Check for pass []any as any in variadic func(...any). + - asciicheck # Checks that all code identifiers does not have non-ASCII symbols in the name. [fast] + - bidichk # Checks for dangerous unicode character sequences. [fast] + - bodyclose # Checks whether HTTP response body is closed successfully. + #- canonicalheader # Canonicalheader checks whether net/http.Header uses canonical header. [auto-fix] + #- containedctx # Containedctx is a linter that detects struct contained context.Context field. + - contextcheck # Check whether the function uses a non-inherited context. + #- copyloopvar # A linter detects places where loop variables are copied. [fast, auto-fix] + - cyclop # Checks function and package cyclomatic complexity. [fast] + #- decorder # Check declaration order and count of types, constants, variables and functions. [fast] + #- depguard # Go linter that checks if package imports are in a list of acceptable packages. [fast] + #- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()). [fast] + - dupl # Detects duplicate fragments of code. [fast] + #- dupword # Checks for duplicate words in the source code. [fast, auto-fix] + - durationcheck # Check for two durations multiplied together. + #- embeddedstructfieldcheck # Embedded types should be at the top of the field list of a struct, and there must be an empty line separating embedded fields from regular fields. [fast] #- errchkjson # [don't see profit + I'm against of omitting errors like in the first example https://github.com/breml/errchkjson] checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted + #- err113 # Check errors handling expressions. [auto-fix] + #- errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and reports occurrences where the check for the returned error can be omitted. + - errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`. + - errorlint # Find code that can cause problems with the error wrapping scheme introduced in Go 1.13. [auto-fix] + #- execinquery # checks query string in Query function which reads your Go src files and warning it finds + - exhaustive # Check exhaustiveness of enum switch statements. + #- exhaustruct # Checks if all structure fields are initialized. + #- exptostd # Detects functions from golang.org/x/exp/ that can be replaced by std functions. [auto-fix] + #- fatcontext # Detects nested contexts in loops and function literals. [auto-fix] + - forbidigo # Forbids identifiers. + #- forcetypeassert # Find forced type assertions. + #- funcorder # Checks the order of functions, methods, and constructors. [fast] + #- funlen # Checks for long functions. [fast] + #- ginkgolinter # Enforces standards of using ginkgo and gomega. [auto-fix] + #- gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid. [fast] + #- gochecknoglobals # Check that no global variables exist. + #- gochecknoinits # Checks that no init functions are present in Go code. [fast] + #- gochecksumtype # Run exhaustiveness checks on Go "sum types". + #- gocognit # Computes and checks the cognitive complexity of functions. [fast] + #- goconst # Finds repeated strings that could be replaced by a constant. + #- gocritic # Provides diagnostics that check for bugs, performance and style issues. [auto-fix] + #- gocyclo # Computes and checks the cyclomatic complexity of functions. [fast] + #- godoclint # Checks Golang's documentation practice (godoc). [fast] + #- godot # Check if comments end in a period. [fast, auto-fix] + #- godox # Detects usage of FIXME, TODO and other keywords inside comments. [fast] + #- goheader # Check if file header matches to pattern. [fast, auto-fix] + #- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod. [fast] + #- gomodguard # Allow and blocklist linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast] + #- goprintffuncname # Checks that printf-like functions are named with `f` at the end. [fast] + #- gosec # Inspects source code for security problems. + #- gosmopolitan # Report certain i18n/l10n anti-patterns in your Go codebase. + #- grouper # Analyze expression groups. [fast] + #- iface # Detect the incorrect use of interfaces, helping developers avoid interface pollution. [auto-fix] + #- importas # Enforces consistent import aliases. [auto-fix] + #- inamedparam # Reports interfaces with unnamed method parameters. [fast] + - interfacebloat # A linter that checks the number of methods inside an interface. [fast] + #- intrange # Intrange is a linter to find places where for loops could make use of an integer range. [auto-fix] + #- iotamixing # Checks if iotas are being used in const blocks with other non-iota declarations. [fast] + #- ireturn # Accept Interfaces, Return Concrete Types. + - lll # Reports long lines. [fast] + #- loggercheck # Checks key value pairs for common logger libraries (kitlog,klog,logr,slog,zap). + #- maintidx # Maintidx measures the maintainability index of each function. [fast] + #- makezero # Find slice declarations with non-zero initial length. + #- mirror # Reports wrong mirror patterns of bytes/strings usage. [auto-fix] + #- misspell # Finds commonly misspelled English words. [fast, auto-fix] + #- mnd # An analyzer to detect magic numbers. [fast] + #- modernize # A suite of analyzers that suggest simplifications to Go code, using modern language and library features. + #- musttag # Enforce field tags in (un)marshaled structs. + - nakedret # Checks that functions with naked returns are not longer than a maximum size (can be zero). [fast, auto-fix] + - nestif # Reports deeply nested if statements. [fast] + - nilerr # Find the code that returns nil even if it checks that the error is not nil. + - nilnesserr # Reports constructs that checks for err != nil, but returns a different nil value error. + - nilnil # Checks that there is no simultaneous return of `nil` error and an invalid value. + #- nlreturn # Checks for a new line before return and branch statements to increase code clarity. [fast, auto-fix] + #- noctx # Detects function and method with missing usage of context.Context. + #- noinlineerr # Disallows inline error handling (`if err := ...; err != nil {`). + - nolintlint # Reports ill-formed or insufficient nolint directives. [fast, auto-fix] + #- nonamedreturns # Reports all named returns. + - nosprintfhostport # Checks for misuse of Sprintf to construct a host with port in a URL. [fast] + #- paralleltest # Detects missing usage of t.Parallel() method in your Go test. + #- perfsprint # Checks that fmt.Sprintf can be replaced with a faster alternative. [auto-fix] + #- prealloc # Find slice declarations that could potentially be pre-allocated. [fast] + - predeclared # Find code that shadows one of Go's predeclared identifiers. [fast] + #- promlinter # Check Prometheus metrics naming via promlint. [fast] + #- protogetter # Reports direct reads from proto message fields when getters should be used. [auto-fix] + - reassign # Checks that package variables are not reassigned. + - recvcheck # Checks for receiver type consistency. + - revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. [auto-fix] + #- rowserrcheck # Checks whether Rows.Err of rows is checked successfully. + #- sloglint # Ensure consistent code style when using log/slog. [auto-fix] + #- spancheck # Checks for mistakes with OpenTelemetry/Census spans. + #- sqlclosecheck # Checks that sql.Rows, sql.Stmt, sqlx.NamedStmt, pgx.Query are closed. + #- tagalign # Check that struct tags are well aligned. [fast, auto-fix] + #- tagliatelle # Checks the struct tags. + #- testableexamples # Linter checks if examples are testable (have an expected output). [fast] + #- testifylint # Checks usage of github.com/stretchr/testify. [auto-fix] + #- testpackage # Linter that makes you use a separate _test package. [fast] + #- thelper # Thelper detects tests helpers which do not start with the t.Helper() method. + - tparallel # Tparallel detects inappropriate usage of t.Parallel() method in your Go test codes. + #- unconvert # Remove unnecessary type conversions. + - unparam # Reports unused function parameters. + - unqueryvet # Detects SELECT * in SQL queries and SQL builders, preventing performance issues and encouraging explicit column selection. [fast] + - usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library. [fast, auto-fix] + #- varnamelen # Checks that the length of a variable's name matches its scope. + #- wastedassign # Finds wasted assignment statements. + #- whitespace # Whitespace is a linter that checks for unnecessary newlines at the start and end of functions, if, for, etc. [fast, auto-fix] + #- wrapcheck # Checks that errors returned from external packages are wrapped. + #- wsl_v5 # Add or remove empty lines. [auto-fix] + #- zerologlint # Detects the wrong usage of `zerolog` that a user forgets to dispatch with `Send` or `Msg`. + #- wsl [deprecated] # Add or remove empty lines. [fast, auto-fix] - ## disabled - #- containedctx # detects struct contained context.Context field - #- depguard # [replaced by gomodguard] checks if package imports are in a list of acceptable packages - #- dogsled # checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) - #- errchkjson # [don't see profit + I'm against of omitting errors like in the first example https://github.com/breml/errchkjson] checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted - #- forcetypeassert # [replaced by errcheck] finds forced type assertions - #- goerr113 # [too strict] checks the errors handling expressions - #- gofmt # [replaced by goimports] checks whether code was gofmt-ed - #- gofumpt # [replaced by goimports, gofumports is not available yet] checks whether code was gofumpt-ed - #- grouper # analyzes expression groups - #- importas # enforces consistent import aliases - #- logrlint # [owner archived repository] checks logr arguments - #- maintidx # measures the maintainability index of each function - #- misspell # [useless] finds commonly misspelled English words in comments - #- nlreturn # [too strict and mostly code is not more readable] checks for a new line before return and branch statements to increase code clarity - #- paralleltest # [too many false positives] detects missing usage of t.Parallel() method in your Go test - #- tagliatelle # checks the struct tags - #- thelper # detects golang test helpers without t.Helper() call and checks the consistency of test helpers - #- wsl # [too strict and mostly code is not more readable] whitespace linter forces you to use empty lines - - ## deprecated - #- deadcode # [deprecated, replaced by unused] finds unused code - #- exhaustivestruct # [deprecated, replaced by exhaustruct] checks if all struct's fields are initialized - #- golint # [deprecated, replaced by revive] golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes - #- ifshort # [deprecated] checks that your code uses short syntax for if-statements whenever possible - #- interfacer # [deprecated] suggests narrower interface types - #- maligned # [deprecated, replaced by govet fieldalignment] detects Go structs that would take less memory if their fields were sorted - #- nosnakecase # [deprecated, replaced by revive var-naming] detects snake case of variable naming and function name - #- scopelint # [deprecated, replaced by exportloopref] checks for unpinned variables in go programs - #- structcheck # [deprecated, replaced by unused] finds unused struct fields - #- varcheck # [deprecated, replaced by unused] finds unused global variables and constants - -issues: - # Maximum count of issues with the same text. - # Set to 0 to disable. - # Default: 3 - max-same-issues: 50 - - exclude-rules: - - source: "^//\\s*go:generate\\s" - linters: [lll] - - source: "(noinspection|TODO)" - linters: [godot] - - source: "//noinspection" - linters: [gocritic] - - source: "^\\s+if _, ok := err\\.\\([^.]+\\.InternalError\\); ok {" - linters: [errorlint] - - path: ".skeleton" - linters: - - unused - - unparam - - path: ".*_test.go" - linters: - - bodyclose - - dupl - - errcheck + settings: + cyclop: + # The maximal code complexity to report. + # Default: 10 + max-complexity: 30 + # The maximal average package complexity. + # If it's higher than 0.0 (float) the check is enabled + # Default: 0.0 + package-average: 10.0 + errcheck: + # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. + # Such cases aren't reported by default. + # Default: false + check-type-assertions: true + funlen: + # Checks the number of lines in a function. + # If lower than 0, disable the check. + # Default: 60 + lines: 100 + # Checks the number of statements in a function. + # If lower than 0, disable the check. + # Default: 40 + statements: 50 + gocognit: + # Minimal code complexity to report + # Default: 30 (but we recommend 10-20) + min-complexity: 20 + gocritic: + disabled-checks: + - captLocal + gosec: + excludes: + - G107 + - G404 + - G115 + govet: + # Enable all analyzers. + # Default: false + enable-all: true + # Disable analyzers by name. + # Run `go tool vet help` to see all analyzers. + # Default: [] + disable: + - fieldalignment # too strict + - shadow # too many false positives + nakedret: + # Make an issue if func has more lines of code than this setting, and it has naked returns. + # Default: 30 + max-func-lines: 10 + nolintlint: + # Enable to require an explanation of nonzero length after each nolint directive. + # Default: false + require-explanation: true + # Enable to require nolint directives to mention the specific linter being suppressed. + # Default: false + require-specific: true + # Exclude following linters from requiring an explanation. + # Default: [] + allow-no-explanation: - funlen - - gochecknoglobals - gocognit - - goconst - - gosec - - lll - - noctx - - unparam - - wrapcheck - - linters: - - gocritic - text: "appendAssign:" - - linters: - - revive - text: "unexported-return:" - - linters: - - govet - text: 'shadow: declaration of "err" shadows declaration' - - path: "group.go" - linters: - - interfacebloat - - path: "group/edwards25519/scalar.go" - linters: - - ineffassign - - funlen - - path: "group/edwards25519/const.go" - linters: - lll - - path: "group/edwards25519/fe.go" - linters: - - funlen - - path: "share/dkg/pedersen" - linters: - - gocognit - - funlen - - gocyclo - - cyclop - - path: "group/edwards25519/scalar.go" - linters: - - ineffassign - - path: "pairing/(bls12381|bn254)/." - linters: - - errcheck #TODO: proper error handling - text: "Error return value is not checked" - - path: "encrypt/ibe/ibe.go" - linters: - - stylecheck # Keep variable name as is - text: "var Gid should be GID|var hrGid should be hrGID|rGid should be rGID|var hGidT should be hGIDT|var GidT should be GIDT" - - path: "pairing/bls12381/circl/*|pairing/bls12381/kilic/*" - linters: - - errcheck - text: "Error return value is not checked" - - path: "benchmark/*" - linters: - - forbidigo + staticcheck: + checks: + - all + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - lll + source: ^//\s*go:generate\s + - linters: + - godot + source: (noinspection|TODO) + - linters: + - gocritic + source: //noinspection + - linters: + - errorlint + source: ^\s+if _, ok := err\.\([^.]+\.InternalError\); ok { + - linters: + - unparam + - unused + path: .skeleton + - linters: + - bodyclose + - dupl + - errcheck + - funlen + - gochecknoglobals + - gocognit + - goconst + - gosec + - lll + - noctx + - unparam + - wrapcheck + path: .*_test.go + - linters: + - gocritic + text: 'appendAssign:' + - linters: + - revive + text: 'unexported-return:' + - linters: + - govet + text: 'shadow: declaration of "err" shadows declaration' + - linters: + - interfacebloat + path: group.go + - linters: + - funlen + - ineffassign + path: group/edwards25519/scalar.go + - linters: + - lll + path: group/edwards25519/const.go + - linters: + - funlen + path: group/edwards25519/fe.go + - linters: + - cyclop + - funlen + - gocognit + - gocyclo + path: share/dkg/pedersen + - linters: + - ineffassign + path: group/edwards25519/scalar.go + - linters: + - errcheck + path: pairing/(bls12381|bn254)/. + text: Error return value is not checked + - linters: + - staticcheck + path: encrypt/ibe/ibe.go + text: var Gid should be GID|var hrGid should be hrGID|rGid should be rGID|var hGidT should be hGIDT|var GidT should be GIDT + - linters: + - errcheck + path: pairing/bls12381/circl/*|pairing/bls12381/kilic/* + text: Error return value is not checked + - linters: + - forbidigo + path: benchmark/* + paths: + - third_party$ + - builtin$ + - examples$ +issues: + max-same-issues: 50 +formatters: + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/Makefile b/Makefile index b71342497..d3d691948 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,4 @@ tidy: - #go install honnef.co/go/tools/cmd/staticcheck@latest go mod tidy generate: tidy @@ -7,13 +6,11 @@ generate: tidy # Coding style static check. lint: tidy - @go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3 - @go mod tidy + # keep this in sync with .github/workflows/golangci-lint.yml + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.1 + go mod tidy golangci-lint run -vet: tidy - go vet ./... - test: tidy go test ./... @@ -22,5 +19,5 @@ coverage: tidy # target to run all the possible checks; it's a good habit to run it before # pushing code -check: lint vet test +check: lint test echo "check done" diff --git a/go.sum b/go.sum index 9b70591fb..f4e247d34 100644 --- a/go.sum +++ b/go.sum @@ -51,6 +51,8 @@ golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= From 4f7295eea05db3cffd05fb6668ffd0b10f80b902 Mon Sep 17 00:00:00 2001 From: Jean Date: Tue, 11 Nov 2025 12:12:25 +0100 Subject: [PATCH 2/6] disable some lint warnings to have a non blocking linter for now --- .golangci.yml | 7 ++++--- examples/bn256_enc_test.go | 11 ++++------- examples/enc_test.go | 11 ++++------- group/edwards25519vartime/basic.go | 1 - group/edwards25519vartime/basic_test.go | 1 - pairing/bn254/gfp_decl.go | 1 - pairing/bn254/gfp_generic.go | 1 - 7 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c7f6d47fa..5f3b9e164 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,8 +3,9 @@ linters: # from 'golangci-lint help linters' # Enabled by default linters: disable: - #- errcheck # Errcheck is a program for checking for unchecked errors in Go code. These unchecked errors can be critical bugs in some cases. - #- govet # Vet examines Go source code and reports suspicious constructs. It is roughly the same as 'go vet' and uses its passes. [auto-fix] + # TODO: re-enable the defaults by commenting the lines asap + - errcheck # Errcheck is a program for checking for unchecked errors in Go code. These unchecked errors can be critical bugs in some cases. + - govet # Vet examines Go source code and reports suspicious constructs. It is roughly the same as 'go vet' and uses its passes. [auto-fix] #- ineffassign # Detects when assignments to existing variables are not used. [fast] - staticcheck # It's the set of rules from staticcheck. [auto-fix] #- unused # Checks Go code for unused constants, variables, functions and types. @@ -93,7 +94,7 @@ linters: #- promlinter # Check Prometheus metrics naming via promlint. [fast] #- protogetter # Reports direct reads from proto message fields when getters should be used. [auto-fix] - reassign # Checks that package variables are not reassigned. - - recvcheck # Checks for receiver type consistency. + #TODO: - recvcheck # Checks for receiver type consistency. - revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. [auto-fix] #- rowserrcheck # Checks whether Rows.Err of rows is checked successfully. #- sloglint # Ensure consistent code style when using log/slog. [auto-fix] diff --git a/examples/bn256_enc_test.go b/examples/bn256_enc_test.go index 329310e5c..f2a509d09 100644 --- a/examples/bn256_enc_test.go +++ b/examples/bn256_enc_test.go @@ -14,17 +14,14 @@ func ElGamalEncryptBn256(suite pairing.Suite, pubkey kyber.Point, message []byte // Embed the message (or as much of it as will fit) into a curve point. M := suite.G1().Point().Embed(message, random.New()) - max := suite.G1().Point().EmbedLen() - if max > len(message) { - max = len(message) - } - remainder = message[max:] + maxLen := max(suite.G1().Point().EmbedLen(), len(message)) + remainder = message[maxLen:] // ElGamal-encrypt the point to produce ciphertext (K,C). k := suite.G1().Scalar().Pick(random.New()) // ephemeral private key K = suite.G1().Point().Mul(k, nil) // ephemeral DH public key S := suite.G1().Point().Mul(k, pubkey) // ephemeral DH shared secret C = suite.G1().Point().Add(S, M) // message blinded with secret - return + return K, C, remainder } func ElGamalDecryptBn256(suite pairing.Suite, prikey kyber.Scalar, K, C kyber.Point) ( @@ -34,7 +31,7 @@ func ElGamalDecryptBn256(suite pairing.Suite, prikey kyber.Scalar, K, C kyber.Po S := suite.G1().Point().Mul(prikey, K) // regenerate shared secret M := suite.G1().Point().Sub(C, S) // use to un-blind the message message, err = M.Data() // extract the embedded data - return + return message, err } /* diff --git a/examples/enc_test.go b/examples/enc_test.go index 9be2a2575..d33553f38 100644 --- a/examples/enc_test.go +++ b/examples/enc_test.go @@ -13,17 +13,14 @@ func ElGamalEncrypt(group kyber.Group, pubkey kyber.Point, message []byte) ( // Embed the message (or as much of it as will fit) into a curve point. M := group.Point().Embed(message, random.New()) - max := group.Point().EmbedLen() - if max > len(message) { - max = len(message) - } - remainder = message[max:] + maxLen := max(group.Point().EmbedLen(), len(message)) + remainder = message[maxLen:] // ElGamal-encrypt the point to produce ciphertext (K,C). k := group.Scalar().Pick(random.New()) // ephemeral private key K = group.Point().Mul(k, nil) // ephemeral DH public key S := group.Point().Mul(k, pubkey) // ephemeral DH shared secret C = S.Add(S, M) // message blinded with secret - return + return K, C, remainder } func ElGamalDecrypt(group kyber.Group, prikey kyber.Scalar, K, C kyber.Point) ( @@ -33,7 +30,7 @@ func ElGamalDecrypt(group kyber.Group, prikey kyber.Scalar, K, C kyber.Point) ( S := group.Point().Mul(prikey, K) // regenerate shared secret M := group.Point().Sub(C, S) // use to un-blind the message message, err = M.Data() // extract the embedded data - return + return message, err } /* diff --git a/group/edwards25519vartime/basic.go b/group/edwards25519vartime/basic.go index 10df0a55d..fa1a2fed2 100644 --- a/group/edwards25519vartime/basic.go +++ b/group/edwards25519vartime/basic.go @@ -1,5 +1,4 @@ //go:build experimental -// +build experimental package edwards25519vartime diff --git a/group/edwards25519vartime/basic_test.go b/group/edwards25519vartime/basic_test.go index 60af4de4e..fb2e7146a 100644 --- a/group/edwards25519vartime/basic_test.go +++ b/group/edwards25519vartime/basic_test.go @@ -1,5 +1,4 @@ //go:build experimental -// +build experimental package edwards25519vartime diff --git a/pairing/bn254/gfp_decl.go b/pairing/bn254/gfp_decl.go index 63e6d930b..42ed65a30 100644 --- a/pairing/bn254/gfp_decl.go +++ b/pairing/bn254/gfp_decl.go @@ -1,5 +1,4 @@ //go:build (amd64 && !generic) || (arm64 && !generic) -// +build amd64,!generic arm64,!generic package bn254 diff --git a/pairing/bn254/gfp_generic.go b/pairing/bn254/gfp_generic.go index 6e8d8cf94..8dd656a86 100644 --- a/pairing/bn254/gfp_generic.go +++ b/pairing/bn254/gfp_generic.go @@ -1,5 +1,4 @@ //go:build (!amd64 && !arm64) || generic -// +build !amd64,!arm64 generic package bn254 From 018f605484b18e1a23041aadd87c871d954bf1fd Mon Sep 17 00:00:00 2001 From: Jean Date: Tue, 11 Nov 2025 12:24:15 +0100 Subject: [PATCH 3/6] use go 1.24 and update dependencies --- .github/workflows/golangci-lint.yml | 2 +- go.mod | 21 ++++++++------- go.sum | 40 ++++++++++++----------------- share/dkg/pedersen/dkg_test.go | 2 +- 4 files changed, 28 insertions(+), 37 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 90ab6b92a..18e20454b 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-go@v6 with: - go-version: stable + go-version: '1.24' - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: diff --git a/go.mod b/go.mod index cbe35f0ec..f876859bd 100644 --- a/go.mod +++ b/go.mod @@ -1,27 +1,26 @@ module go.dedis.ch/kyber/v4 -go 1.21 +go 1.24.0 + +toolchain go1.24.2 require ( - github.com/cloudflare/circl v1.3.9 - github.com/consensys/gnark-crypto v0.12.1 - github.com/jonboulle/clockwork v0.4.0 + github.com/cloudflare/circl v1.6.1 + github.com/consensys/gnark-crypto v0.19.2 + github.com/jonboulle/clockwork v0.5.0 github.com/kilic/bls12-381 v0.1.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.11.1 go.dedis.ch/fixbuf v1.0.3 go.dedis.ch/protobuf v1.0.11 - golang.org/x/crypto v0.21.0 - golang.org/x/sys v0.18.0 + golang.org/x/crypto v0.43.0 + golang.org/x/sys v0.38.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/bits-and-blooms/bitset v1.13.0 // indirect - github.com/consensys/bavard v0.1.13 // indirect + github.com/bits-and-blooms/bitset v1.20.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect - rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index f4e247d34..aa6ece112 100644 --- a/go.sum +++ b/go.sum @@ -1,37 +1,31 @@ -github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= -github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/cloudflare/circl v1.3.9 h1:QFrlgFYf2Qpi8bSpVPK1HBvWpx16v/1TZivyo7pGuBE= -github.com/cloudflare/circl v1.3.9/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU= -github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= -github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= -github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3MdfoPyRVU= +github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= +github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= +github.com/consensys/gnark-crypto v0.19.2 h1:qrEAIXq3T4egxqiliFFoNrepkIWVEeIYwt3UL0fvS80= +github.com/consensys/gnark-crypto v0.19.2/go.mod h1:rT23F0XSZqE0mUA0+pRtnL56IbPxs6gp4CeRsBk4XS0= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= -github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= +github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I= +github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= -github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= +github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= 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/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -42,12 +36,12 @@ go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= +golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -55,5 +49,3 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/share/dkg/pedersen/dkg_test.go b/share/dkg/pedersen/dkg_test.go index ef0a6d1cb..980ded8de 100644 --- a/share/dkg/pedersen/dkg_test.go +++ b/share/dkg/pedersen/dkg_test.go @@ -26,7 +26,7 @@ type TestNode struct { proto *Protocol phaser *TimePhaser board *TestBoard - clock clock.FakeClock + clock *clock.FakeClock } func NewTestNode(s Suite, index int) *TestNode { From 1211b33a13bbca6277ff8678cdcbded11326990a Mon Sep 17 00:00:00 2001 From: Jean Date: Tue, 11 Nov 2025 15:00:56 +0100 Subject: [PATCH 4/6] revert to go 1.21 --- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/tests.yml | 2 +- go.mod | 21 +++++++-------- go.sum | 40 +++++++++++++++++------------ share/dkg/pedersen/dkg_test.go | 2 +- 5 files changed, 38 insertions(+), 29 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 18e20454b..9eac215c0 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-go@v6 with: - go-version: '1.24' + go-version: '1.21' - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4f9e2f2a3..61a76ff7d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,7 +39,7 @@ jobs: matrix: os: [windows-latest, ubuntu-latest, macos-latest] size: ['64b', '32b'] - golang: ['1.21.10', '1.22.3'] + golang: ['1.21.10', '1.22.3', '1.24.2'] exclude: - os: windows-latest size: '32b' diff --git a/go.mod b/go.mod index f876859bd..cbe35f0ec 100644 --- a/go.mod +++ b/go.mod @@ -1,26 +1,27 @@ module go.dedis.ch/kyber/v4 -go 1.24.0 - -toolchain go1.24.2 +go 1.21 require ( - github.com/cloudflare/circl v1.6.1 - github.com/consensys/gnark-crypto v0.19.2 - github.com/jonboulle/clockwork v0.5.0 + github.com/cloudflare/circl v1.3.9 + github.com/consensys/gnark-crypto v0.12.1 + github.com/jonboulle/clockwork v0.4.0 github.com/kilic/bls12-381 v0.1.0 - github.com/stretchr/testify v1.11.1 + github.com/stretchr/testify v1.9.0 go.dedis.ch/fixbuf v1.0.3 go.dedis.ch/protobuf v1.0.11 - golang.org/x/crypto v0.43.0 - golang.org/x/sys v0.38.0 + golang.org/x/crypto v0.21.0 + golang.org/x/sys v0.18.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/bits-and-blooms/bitset v1.20.0 // indirect + github.com/bits-and-blooms/bitset v1.13.0 // indirect + github.com/consensys/bavard v0.1.13 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/text v0.2.0 // indirect + github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect + rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index aa6ece112..f4e247d34 100644 --- a/go.sum +++ b/go.sum @@ -1,31 +1,37 @@ -github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3MdfoPyRVU= -github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= -github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= -github.com/consensys/gnark-crypto v0.19.2 h1:qrEAIXq3T4egxqiliFFoNrepkIWVEeIYwt3UL0fvS80= -github.com/consensys/gnark-crypto v0.19.2/go.mod h1:rT23F0XSZqE0mUA0+pRtnL56IbPxs6gp4CeRsBk4XS0= +github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= +github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/cloudflare/circl v1.3.9 h1:QFrlgFYf2Qpi8bSpVPK1HBvWpx16v/1TZivyo7pGuBE= +github.com/cloudflare/circl v1.3.9/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU= +github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= +github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= +github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I= -github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= +github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= -github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= 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/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +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= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -36,12 +42,12 @@ go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= -golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -49,3 +55,5 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/share/dkg/pedersen/dkg_test.go b/share/dkg/pedersen/dkg_test.go index 980ded8de..ef0a6d1cb 100644 --- a/share/dkg/pedersen/dkg_test.go +++ b/share/dkg/pedersen/dkg_test.go @@ -26,7 +26,7 @@ type TestNode struct { proto *Protocol phaser *TimePhaser board *TestBoard - clock *clock.FakeClock + clock clock.FakeClock } func NewTestNode(s Suite, index int) *TestNode { From 1056c264018e0823704f869b2b32bcdb0e7851a8 Mon Sep 17 00:00:00 2001 From: Jean Date: Wed, 12 Nov 2025 08:22:34 +0100 Subject: [PATCH 5/6] fixed workflow for golangci-lint 2.6.1 and go 1.24 --- .github/workflows/deploy.yaml | 2 +- .github/workflows/golangci-lint.yml | 4 +-- .github/workflows/tests.yml | 6 ++-- go.mod | 21 ++++++-------- go.sum | 44 ++++++++++++----------------- share/dkg/pedersen/dkg_test.go | 2 +- 6 files changed, 34 insertions(+), 45 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 73d03dde4..330151d54 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 9eac215c0..86da08b15 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -17,8 +17,8 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-go@v6 with: - go-version: '1.21' + go-version: '1.24' - name: golangci-lint - uses: golangci/golangci-lint-action@v8 + uses: golangci/golangci-lint-action@v9 with: version: v2.6.1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 61a76ff7d..d74371a46 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,7 +39,7 @@ jobs: matrix: os: [windows-latest, ubuntu-latest, macos-latest] size: ['64b', '32b'] - golang: ['1.21.10', '1.22.3', '1.24.2'] + golang: ['1.24.10', '1.25.4'] exclude: - os: windows-latest size: '32b' @@ -53,14 +53,14 @@ jobs: steps: - name: Set up Go ${{ matrix.golang }} - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 if: ${{ matrix.size == '64b' }} with: go-version: ${{ matrix.golang }} check-latest: false - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 diff --git a/go.mod b/go.mod index cbe35f0ec..14040945e 100644 --- a/go.mod +++ b/go.mod @@ -1,27 +1,24 @@ module go.dedis.ch/kyber/v4 -go 1.21 +go 1.24.0 require ( - github.com/cloudflare/circl v1.3.9 - github.com/consensys/gnark-crypto v0.12.1 - github.com/jonboulle/clockwork v0.4.0 + github.com/cloudflare/circl v1.6.1 + github.com/consensys/gnark-crypto v0.19.2 + github.com/jonboulle/clockwork v0.5.0 github.com/kilic/bls12-381 v0.1.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.11.1 go.dedis.ch/fixbuf v1.0.3 go.dedis.ch/protobuf v1.0.11 - golang.org/x/crypto v0.21.0 - golang.org/x/sys v0.18.0 + golang.org/x/crypto v0.44.0 + golang.org/x/sys v0.38.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/bits-and-blooms/bitset v1.13.0 // indirect - github.com/consensys/bavard v0.1.13 // indirect + github.com/bits-and-blooms/bitset v1.24.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect - rsc.io/tmplfunc v0.0.3 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect ) diff --git a/go.sum b/go.sum index f4e247d34..c09d02a8e 100644 --- a/go.sum +++ b/go.sum @@ -1,37 +1,31 @@ -github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= -github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/cloudflare/circl v1.3.9 h1:QFrlgFYf2Qpi8bSpVPK1HBvWpx16v/1TZivyo7pGuBE= -github.com/cloudflare/circl v1.3.9/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU= -github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= -github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= -github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/bits-and-blooms/bitset v1.24.3 h1:Bte86SlO3lwPQqww+7BE9ZuUCKIjfqnG5jtEyqA9y9Y= +github.com/bits-and-blooms/bitset v1.24.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= +github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= +github.com/consensys/gnark-crypto v0.19.2 h1:qrEAIXq3T4egxqiliFFoNrepkIWVEeIYwt3UL0fvS80= +github.com/consensys/gnark-crypto v0.19.2/go.mod h1:rT23F0XSZqE0mUA0+pRtnL56IbPxs6gp4CeRsBk4XS0= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= -github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= +github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I= +github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= -github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= +github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= 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/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -42,12 +36,12 @@ go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= +golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -55,5 +49,3 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/share/dkg/pedersen/dkg_test.go b/share/dkg/pedersen/dkg_test.go index ef0a6d1cb..980ded8de 100644 --- a/share/dkg/pedersen/dkg_test.go +++ b/share/dkg/pedersen/dkg_test.go @@ -26,7 +26,7 @@ type TestNode struct { proto *Protocol phaser *TimePhaser board *TestBoard - clock clock.FakeClock + clock *clock.FakeClock } func NewTestNode(s Suite, index int) *TestNode { From fe119a72fccb9c1b8eee34d4bb58926e31a74844 Mon Sep 17 00:00:00 2001 From: Jean Date: Wed, 12 Nov 2025 09:29:26 +0100 Subject: [PATCH 6/6] upgrade to go 1.25 --- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/tests.yml | 2 +- go.mod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 86da08b15..4772116eb 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-go@v6 with: - go-version: '1.24' + go-version: '1.25' - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d74371a46..8619b9502 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,7 +39,7 @@ jobs: matrix: os: [windows-latest, ubuntu-latest, macos-latest] size: ['64b', '32b'] - golang: ['1.24.10', '1.25.4'] + golang: ['1.25.4'] exclude: - os: windows-latest size: '32b' diff --git a/go.mod b/go.mod index 14040945e..a34730270 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.dedis.ch/kyber/v4 -go 1.24.0 +go 1.25.0 require ( github.com/cloudflare/circl v1.6.1