Skip to content

Commit 0b55d41

Browse files
committed
Merge branch 'feat/aggregation-mode-explorer' into feat/aggregation-mode-explorer-views
2 parents 08c26b5 + 981828d commit 0b55d41

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

explorer/lib/explorer/beacon_client.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ defmodule Explorer.BeaconClient do
5353
beacon_get("/eth/v1/beacon/blob_sidecars/#{slot}")
5454
end
5555

56-
def beacon_get(method) do
56+
defp beacon_get(method) do
5757
headers = [{"Content-Type", "application/json"}]
5858
request = Finch.build(:get, "#{@beacon_url}#{method}", headers)
5959
response = Finch.request(request, Explorer.Finch)

explorer/lib/explorer/eth_client.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule Explorer.EthClient do
66
eth_send("eth_getBlockByNumber", [block_number, false])
77
end
88

9-
def eth_send(method, params, id \\ 1) do
9+
defp eth_send(method, params, id \\ 1) do
1010
headers = [{"Content-Type", "application/json"}]
1111
body = Jason.encode!(%{jsonrpc: "2.0", method: method, params: params, id: id})
1212
request = Finch.build(:post, @rpc_url, headers, body)

explorer/lib/explorer/periodically.ex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule Explorer.Periodically do
2222
:timer.send_interval(one_second * 12, :batches)
2323
# every 1 hour
2424
:timer.send_interval(one_second * seconds_in_an_hour, :restakings)
25-
:timer.send_interval(one_second * 12, :aggregated_proofs)
25+
:timer.send_interval(one_second * seconds_in_an_hour, :aggregated_proofs)
2626
end
2727

2828
# Reads and process last blocks for operators and restaking changes
@@ -74,7 +74,9 @@ defmodule Explorer.Periodically do
7474
end
7575

7676
def handle_info(:aggregated_proofs, state) do
77-
read_block_qty = 50000
77+
# This task runs every hour
78+
# We read a bit more than 300 blocks (1hr) to make sure we don't lose any event
79+
read_block_qty = 310
7880
latest_block_number = AlignedLayerServiceManager.get_latest_block_number()
7981
read_from_block = max(0, latest_block_number - read_block_qty)
8082

0 commit comments

Comments
 (0)