Skip to content

Commit a398289

Browse files
MauroToscanoOppenJuArce
authored
Pull hotfix CI (#1813)
Co-authored-by: Mario Rugiero <[email protected]> Co-authored-by: Julian Arce <[email protected]>
2 parents 31019a9 + a2b31f7 commit a398289

File tree

8 files changed

+36
-9
lines changed

8 files changed

+36
-9
lines changed

.github/workflows/send-proofs-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- '**.md'
1111

1212
concurrency:
13-
group: pull_request-${{ github.event.pull_request.number }}
13+
group: ${{ github.event_name == 'merge_group' && format('merge_group-{0}', github.event.merge_group.head_sha) || format('pull_request-{0}', github.event.pull_request.number) }}
1414
cancel-in-progress: true
1515

1616
jobs:

aggregator/pkg/server.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
8181
defer cancel() // Ensure the cancel function is called to release resources
8282

8383
// Create a channel to signal when the task is done
84-
done := make(chan struct{})
84+
done := make(chan uint8)
8585

8686
agg.logger.Info("Starting bls signature process")
8787
go func() {
@@ -92,9 +92,11 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
9292

9393
if err != nil {
9494
agg.logger.Warnf("BLS aggregation service error: %s", err)
95+
done<- 1
9596
// todo shouldn't we here close the channel with a reply = 1?
9697
} else {
9798
agg.logger.Info("BLS process succeeded")
99+
done<- 0
98100
}
99101

100102
close(done)
@@ -106,10 +108,10 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
106108
case <-ctx.Done():
107109
// The context's deadline was exceeded or it was canceled
108110
agg.logger.Info("Bls process timed out, operator signature will be lost. Batch may not reach quorum")
109-
case <-done:
111+
case res := <-done:
110112
// The task completed successfully
111-
agg.logger.Info("Bls context finished correctly")
112-
*reply = 0
113+
agg.logger.Info("Bls context finished on time")
114+
*reply = res
113115
}
114116

115117
return nil

explorer/lib/explorer_web/router.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ defmodule ExplorerWeb.Router do
2929
end
3030

3131
pipeline :api do
32+
plug CORSPlug, origin: "*"
3233
plug :accepts, ["json"]
3334
end
3435

explorer/mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ defmodule Explorer.MixProject do
6262
{:postgrex, ">= 0.0.0"},
6363
{:cachex, "~> 3.6"},
6464
{:mutex, "~> 2.0"},
65-
{:tails, "~> 0.1.5"}
65+
{:tails, "~> 0.1.5"},
66+
{:cors_plug, "~> 3.0"},
6667
]
6768
end
6869

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/Layr-Labs/eigensdk-go v0.1.13
77
github.com/ethereum/go-ethereum v1.14.0
88
github.com/prometheus/client_golang v1.19.1
9-
github.com/urfave/cli/v2 v2.27.1
9+
github.com/urfave/cli/v2 v2.27.5
1010
golang.org/x/crypto v0.22.0
1111
)
1212

@@ -44,7 +44,7 @@ require (
4444
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
4545
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4646
github.com/consensys/bavard v0.1.13 // indirect
47-
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
47+
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
4848
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
4949
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5050
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
@@ -81,7 +81,7 @@ require (
8181
github.com/tklauser/go-sysconf v0.3.12 // indirect
8282
github.com/tklauser/numcpus v0.6.1 // indirect
8383
github.com/x448/float16 v0.8.4 // indirect
84-
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
84+
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
8585
go.uber.org/multierr v1.11.0 // indirect
8686
go.uber.org/zap v1.27.0 // indirect
8787
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoY
8888
github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=
8989
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
9090
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
91+
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
92+
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
9193
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ=
9294
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs=
9395
github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI=
@@ -313,10 +315,14 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E
313315
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
314316
github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho=
315317
github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
318+
github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w=
319+
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
316320
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
317321
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
318322
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
319323
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
324+
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
325+
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
320326
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
321327
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
322328
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=

telemetry_api/lib/telemetry_api/operators.ex

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
defmodule TelemetryApi.Operators do
2+
require Logger
3+
24
@moduledoc """
35
The Operators context.
46
"""
@@ -130,6 +132,7 @@ defmodule TelemetryApi.Operators do
130132
# {:error, string}
131133
#
132134
defp add_operator_metadata(op_data) do
135+
Logger.info("Fetching metadata for operator: #{op_data.address}")
133136
with {:ok, url} <- DelegationManager.get_operator_url(op_data.address),
134137
{:ok, metadata} <- TelemetryApi.Utils.fetch_json_data(url) do
135138
operator = %{
@@ -140,6 +143,17 @@ defmodule TelemetryApi.Operators do
140143
}
141144

142145
{:ok, operator}
146+
else
147+
{:error, reason} ->
148+
Logger.error("Failed to fetch metadata for operator: #{op_data.address}. Reason: #{inspect(reason)}")
149+
operator = %{
150+
id: op_data.id,
151+
address: op_data.address,
152+
stake: op_data.stake,
153+
name: op_data.address
154+
}
155+
156+
{:ok, operator}
143157
end
144158
end
145159

telemetry_api/lib/telemetry_api/utils.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
defmodule TelemetryApi.Utils do
2+
require Logger
3+
24
@moduledoc """
35
Some utility functions
46
"""
@@ -15,6 +17,7 @@ defmodule TelemetryApi.Utils do
1517
{:error, message}
1618
"""
1719
def fetch_json_data(url) do
20+
Logger.info("Fetching data from #{url}")
1821
with {:ok, %HTTPoison.Response{status_code: 200, body: body}} <- HTTPoison.get(url) do
1922
Jason.decode(body)
2023
else

0 commit comments

Comments
 (0)