Skip to content
Open
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/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
check-latest: true
go-version: "1.26"
go-version: "1.27"

- name: Verify setup
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
- cron: "18 19 * * 6"

env:
GOLANG_VERSION: "1.26"
GOLANG_VERSION: "1.27"

jobs:
analyze:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.12.2
version: v2.13.2
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "2"
run:
go: "1.26"
go: "1.27"
linters:
default: all
disable:
Expand All @@ -9,6 +9,7 @@ linters:
- cyclop
- err113
- exhaustruct
- exhaustruct_v5
- forcetypeassert
- funlen
- funcorder
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
rev: v0.0.6
hooks:
- id: check-go-version
args: [-v=go1.26] # Only check minor version locally
args: [-v=go1.27] # Only check minor version locally
pass_filenames: false
additional_dependencies: [packaging]
- id: check-licence-header
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ testutil/ # Test utilities, mocks, golden files
## Code Style and Guidelines

### Go Version
Requires Go 1.26 (enforced by pre-commit hooks)
Requires Go 1.27 (enforced by pre-commit hooks)

### Core Principles (from [docs/goguidelines.md](docs/goguidelines.md))
1. **Functions over methods**: Prefer stateless functions over stateful objects
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Container for building Go binary.
FROM golang:1.26.6-trixie AS builder
FROM golang:1.27.0-trixie AS builder
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends build-essential git

Expand Down
12 changes: 5 additions & 7 deletions app/obolapi/exit_model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ import (

func TestPartialExitRequest(t *testing.T) {
pr := obolapi.PartialExitRequest{
UnsignedPartialExitRequest: obolapi.UnsignedPartialExitRequest{
PartialExits: []obolapi.ExitBlob{
{
PublicKey: string(testutil.RandomCorePubKey(t)),
SignedExitMessage: *testutil.RandomExit(),
},
PartialExits: []obolapi.ExitBlob{
{
PublicKey: string(testutil.RandomCorePubKey(t)),
SignedExitMessage: *testutil.RandomExit(),
},
ShareIdx: 0,
},
ShareIdx: 0,
Signature: testutil.RandomSecp256k1Signature(),
}

Expand Down
72 changes: 30 additions & 42 deletions cmd/feerecipientfetch_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,14 @@ func signConfigForOperator(c feeRecipientTestCluster, opIdx int, validatorPubkey
baseDir := filepath.Join(c.root, fmt.Sprintf("op%d", opIdx))

return feerecipientSignConfig{
feerecipientConfig: feerecipientConfig{
ValidatorPublicKeys: []string{validatorPubkey},
PrivateKeyPath: filepath.Join(baseDir, "charon-enr-private-key"),
LockFilePath: filepath.Join(baseDir, "cluster-lock.json"),
PublishAddress: c.srvURL,
PublishTimeout: 10 * time.Second,
},
ValidatorKeysDir: filepath.Join(baseDir, "validator_keys"),
FeeRecipient: feeRecipient,
Timestamp: timestamp,
ValidatorPublicKeys: []string{validatorPubkey},
PrivateKeyPath: filepath.Join(baseDir, "charon-enr-private-key"),
LockFilePath: filepath.Join(baseDir, "cluster-lock.json"),
PublishAddress: c.srvURL,
PublishTimeout: 10 * time.Second,
ValidatorKeysDir: filepath.Join(baseDir, "validator_keys"),
FeeRecipient: feeRecipient,
Timestamp: timestamp,
}
}

Expand All @@ -102,13 +100,11 @@ func fetchFeeRecipient(ctx context.Context, t *testing.T, c feeRecipientTestClus
t.Helper()

fetchConfig := feerecipientFetchConfig{
feerecipientConfig: feerecipientConfig{
ValidatorPublicKeys: validatorPubkeys,
LockFilePath: filepath.Join(c.root, "op0", "cluster-lock.json"),
OverridesFilePath: overridesFile,
PublishAddress: c.srvURL,
PublishTimeout: 10 * time.Second,
},
ValidatorPublicKeys: validatorPubkeys,
LockFilePath: filepath.Join(c.root, "op0", "cluster-lock.json"),
OverridesFilePath: overridesFile,
PublishAddress: c.srvURL,
PublishTimeout: 10 * time.Second,
}

require.NoError(t, runFeeRecipientFetch(ctx, fetchConfig))
Expand Down Expand Up @@ -287,11 +283,9 @@ func TestFeeRecipientFetchSkipsInvalidSignature(t *testing.T) {

func TestFeeRecipientFetchInvalidLockFile(t *testing.T) {
config := feerecipientFetchConfig{
feerecipientConfig: feerecipientConfig{
LockFilePath: "nonexistent-lock.json",
PublishAddress: "http://localhost:0",
PublishTimeout: time.Second,
},
LockFilePath: "nonexistent-lock.json",
PublishAddress: "http://localhost:0",
PublishTimeout: time.Second,
}

err := runFeeRecipientFetch(t.Context(), config)
Expand All @@ -308,11 +302,9 @@ func TestFeeRecipientFetchAPIUnreachable(t *testing.T) {
srv.Close()

config := feerecipientFetchConfig{
feerecipientConfig: feerecipientConfig{
LockFilePath: filepath.Join(c.root, "op0", "cluster-lock.json"),
PublishAddress: srv.URL,
PublishTimeout: time.Second,
},
LockFilePath: filepath.Join(c.root, "op0", "cluster-lock.json"),
PublishAddress: srv.URL,
PublishTimeout: time.Second,
}

err := runFeeRecipientFetch(ctx, config)
Expand Down Expand Up @@ -357,15 +349,13 @@ func TestFeeRecipientFetchNoQuorum(t *testing.T) {
baseDir := filepath.Join(root, "op0")

signConfig := feerecipientSignConfig{
feerecipientConfig: feerecipientConfig{
ValidatorPublicKeys: []string{validatorPubkey},
PrivateKeyPath: filepath.Join(baseDir, "charon-enr-private-key"),
LockFilePath: filepath.Join(baseDir, "cluster-lock.json"),
PublishAddress: srv.URL,
PublishTimeout: 10 * time.Second,
},
ValidatorKeysDir: filepath.Join(baseDir, "validator_keys"),
FeeRecipient: newFeeRecipient,
ValidatorPublicKeys: []string{validatorPubkey},
PrivateKeyPath: filepath.Join(baseDir, "charon-enr-private-key"),
LockFilePath: filepath.Join(baseDir, "cluster-lock.json"),
PublishAddress: srv.URL,
PublishTimeout: 10 * time.Second,
ValidatorKeysDir: filepath.Join(baseDir, "validator_keys"),
FeeRecipient: newFeeRecipient,
}

require.NoError(t, runFeeRecipientSign(ctx, signConfig))
Expand All @@ -374,12 +364,10 @@ func TestFeeRecipientFetchNoQuorum(t *testing.T) {
overridesFile := filepath.Join(root, "output", "builder_registrations_overrides.json")

fetchConfig := feerecipientFetchConfig{
feerecipientConfig: feerecipientConfig{
LockFilePath: filepath.Join(root, "op0", "cluster-lock.json"),
OverridesFilePath: overridesFile,
PublishAddress: srv.URL,
PublishTimeout: 10 * time.Second,
},
LockFilePath: filepath.Join(root, "op0", "cluster-lock.json"),
OverridesFilePath: overridesFile,
PublishAddress: srv.URL,
PublishTimeout: 10 * time.Second,
}

require.NoError(t, runFeeRecipientFetch(ctx, fetchConfig))
Expand Down
Loading
Loading