Skip to content

Commit 1624952

Browse files
authored
*: v1.6.0-rc3 cherry-picking (#3918)
Cherry-picking for v1.6.0-rc3. category: misc ticket: none
1 parent b3e689c commit 1624952

27 files changed

+94
-70
lines changed

.github/actions/setup-go/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
id: setup-go
1313
uses: actions/setup-go@v5
1414
with:
15-
go-version: "1.24"
15+
go-version: "1.25"
1616

1717
- name: Verify setup
1818
shell: bash

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
- cron: "18 19 * * 6"
2222

2323
env:
24-
GOLANG_VERSION: "1.24"
24+
GOLANG_VERSION: "1.25"
2525

2626
jobs:
2727
analyze:

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
- name: golangci-lint
2020
uses: golangci/golangci-lint-action@v8
2121
with:
22-
version: v2.3.1
22+
version: v2.4.0

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: "2"
22
run:
3-
go: "1.24"
3+
go: "1.25"
44
linters:
55
default: all
66
disable:

.pre-commit/run_linter.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
VERSION="v2.3.1"
3+
VERSION="v2.4.0"
44

55
if ! command -v golangci-lint &>/dev/null; then
66
echo "golangci-lint could not be found"

Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Container for building Go binary.
2-
FROM golang:1.24.6-bookworm AS builder
2+
FROM golang:1.25.0-bookworm AS builder
33
# Install dependencies
44
RUN apt-get update && apt-get install -y --no-install-recommends build-essential git
55

@@ -15,9 +15,9 @@ RUN echo "Building with GO_BUILD_FLAG='${GO_BUILD_FLAG}'"
1515

1616
# Build with Go module and Go build caches.
1717
RUN \
18-
--mount=type=cache,target=/go/pkg \
19-
--mount=type=cache,target=/root/.cache/go-build \
20-
go build -o charon "${GO_BUILD_FLAG}" .
18+
--mount=type=cache,target=/go/pkg \
19+
--mount=type=cache,target=/root/.cache/go-build \
20+
go build -o charon "${GO_BUILD_FLAG}" .
2121
RUN echo "Built charon version=$(./charon version)"
2222

2323
# Copy final binary into light stage.
@@ -35,13 +35,13 @@ ENV UID=1000
3535
ENV GID=1000
3636
RUN addgroup --gid "$GID" "$USER" \
3737
&& adduser \
38-
--disabled-password \
39-
--gecos "charon" \
40-
--home "/opt/$USER" \
41-
--ingroup "$USER" \
42-
--no-create-home \
43-
--uid "$UID" \
44-
"$USER" \
38+
--disabled-password \
39+
--gecos "charon" \
40+
--home "/opt/$USER" \
41+
--ingroup "$USER" \
42+
--no-create-home \
43+
--uid "$UID" \
44+
"$USER" \
4545
&& chown "$USER" /usr/local/bin/charon \
4646
&& chmod u+x /usr/local/bin/charon
4747

app/app.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ type Config struct {
8787
JaegerAddr string
8888
JaegerService string
8989
OTLPAddress string
90+
OTLPHeaders []string
9091
OTLPServiceName string
9192
SimnetBMock bool
9293
SimnetVMock bool
@@ -916,7 +917,7 @@ func newETH2Client(ctx context.Context, conf Config, life *lifecycle.Manager, cl
916917
return nil, nil, err
917918
}
918919

919-
beaconNodeHeaders, err := eth2util.ParseBeaconNodeHeaders(conf.BeaconNodeHeaders)
920+
beaconNodeHeaders, err := eth2util.ParseHTTPHeaders(conf.BeaconNodeHeaders)
920921
if err != nil {
921922
return nil, nil, err
922923
}
@@ -959,7 +960,7 @@ func newETH2Client(ctx context.Context, conf Config, life *lifecycle.Manager, cl
959960
return nil, nil, err
960961
}
961962

962-
beaconNodeHeaders, err := eth2util.ParseBeaconNodeHeaders(conf.BeaconNodeHeaders)
963+
beaconNodeHeaders, err := eth2util.ParseHTTPHeaders(conf.BeaconNodeHeaders)
963964
if err != nil {
964965
return nil, nil, err
965966
}
@@ -990,7 +991,7 @@ func newETH2Client(ctx context.Context, conf Config, life *lifecycle.Manager, cl
990991
log.Info(ctx, "Synthetic block proposals enabled")
991992
}
992993

993-
beaconNodeHeaders, err := eth2util.ParseBeaconNodeHeaders(conf.BeaconNodeHeaders)
994+
beaconNodeHeaders, err := eth2util.ParseHTTPHeaders(conf.BeaconNodeHeaders)
994995
if err != nil {
995996
return nil, nil, err
996997
}
@@ -1120,8 +1121,13 @@ func wireTracing(life *lifecycle.Manager, conf Config, clusterHash []byte) error
11201121
return nil
11211122
}
11221123

1124+
otlpHeaders, err := eth2util.ParseHTTPHeaders(conf.OTLPHeaders)
1125+
if err != nil {
1126+
return err
1127+
}
1128+
11231129
stopTracer, err := tracer.Init(
1124-
tracer.WithOTLPTracer(conf.OTLPAddress),
1130+
tracer.WithOTLPTracer(conf.OTLPAddress, otlpHeaders),
11251131
tracer.WithServiceName(conf.OTLPServiceName),
11261132
tracer.WithNamespaceName(Hex7(clusterHash)),
11271133
)

app/sse/listener.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func StartListener(ctx context.Context, eth2Cl eth2wrap.Client, addresses, heade
6060
slotsPerEpoch: slotsPerEpoch,
6161
}
6262

63-
parsedHeaders, err := eth2util.ParseBeaconNodeHeaders(headers)
63+
parsedHeaders, err := eth2util.ParseHTTPHeaders(headers)
6464
if err != nil {
6565
return nil, err
6666
}

app/tracer/trace.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,19 @@ func WithStdOut(w io.Writer) func(*options) {
9595

9696
// WithOTLPTracer returns an option to configure an OpenTelemetry exporter for tracing
9797
// telemetry to be sent to an OpenTelemetry Collector via gRPC.
98-
func WithOTLPTracer(addr string) func(*options) {
98+
func WithOTLPTracer(addr string, headers map[string]string) func(*options) {
9999
return func(o *options) {
100100
o.expFunc = func() (sdktrace.SpanExporter, error) {
101-
client := otlptracegrpc.NewClient(
101+
opts := []otlptracegrpc.Option{
102102
otlptracegrpc.WithInsecure(),
103-
otlptracegrpc.WithEndpoint(addr))
103+
otlptracegrpc.WithEndpoint(addr),
104+
}
105+
106+
if len(headers) > 0 {
107+
opts = append(opts, otlptracegrpc.WithHeaders(headers))
108+
}
109+
110+
client := otlptracegrpc.NewClient(opts...)
104111

105112
return otlptrace.New(context.Background(), client)
106113
}

cmd/exit_broadcast.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func newBcastFullExitCmd(runFunc func(context.Context, exitConfig) error) *cobra
100100
return errors.New(fmt.Sprintf("if you want to specify exit file directory for all validators, you must provide %s and not %s.", exitFromDir.String(), exitFromFile.String()))
101101
}
102102

103-
err := eth2util.ValidateBeaconNodeHeaders(config.BeaconNodeHeaders)
103+
err := eth2util.ValidateHTTPHeaders(config.BeaconNodeHeaders)
104104
if err != nil {
105105
return err
106106
}
@@ -128,7 +128,7 @@ func runBcastFullExit(ctx context.Context, config exitConfig) error {
128128
return errors.Wrap(err, "load cluster lock", z.Str("lock_file_path", config.LockFilePath))
129129
}
130130

131-
beaconNodeHeaders, err := eth2util.ParseBeaconNodeHeaders(config.BeaconNodeHeaders)
131+
beaconNodeHeaders, err := eth2util.ParseHTTPHeaders(config.BeaconNodeHeaders)
132132
if err != nil {
133133
return err
134134
}

0 commit comments

Comments
 (0)