Skip to content

Commit 3144c96

Browse files
uri-99JuArce
andauthored
hotfix: explorer operator metadata mainnet (#1545)
Co-authored-by: Julian Arce <[email protected]>
1 parent 0cac6ab commit 3144c96

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -838,11 +838,11 @@ explorer_recover_db: explorer_run_db
838838

839839
explorer_fetch_old_batches:
840840
@cd explorer && \
841-
./scripts/fetch_old_batches.sh 1728056 1729806
841+
./scripts/fetch_old_batches.sh $(FROM_BLOCK) $(TO_BLOCK)
842842

843-
explorer_fetch_old_operators_strategies_restakes:
843+
explorer_fetch_old_operators_strategies_restakes: # recommended for prod: 19000000
844844
@cd explorer && \
845-
./scripts/fetch_old_operators_strategies_restakes.sh 0
845+
./scripts/fetch_old_operators_strategies_restakes.sh $(FROM_BLOCK)
846846

847847
explorer_create_env:
848848
@cd explorer && \

explorer/lib/explorer/contract_managers/aligned_layer_service_manager.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ defmodule AlignedLayerServiceManager do
3737
@first_block (case @environment do
3838
"devnet" -> 0
3939
"holesky" -> 1_728_056
40-
"mainnet" -> 20_020_000
40+
"mainnet" -> 19_000_000
4141
_ -> raise("Invalid environment")
4242
end)
4343

explorer/lib/explorer/contract_managers/batcher_payment_service_manager.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule BatcherPaymentServiceManager do
77
@first_block (case @environment do
88
"devnet" -> 0
99
"holesky" -> 1_728_056
10-
"mainnet" -> 20_020_000
10+
"mainnet" -> 19_000_000
1111
_ -> raise("Invalid environment")
1212
end)
1313

explorer/lib/explorer/contract_managers/delegation_manager.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule DelegationManager do
66
@first_block (case @environment do
77
"devnet" -> 0
88
"holesky" -> 1_210_000
9-
"mainnet" -> 20_020_000
9+
"mainnet" -> 19_000_000
1010
_ -> raise("Invalid environment")
1111
end)
1212

explorer/lib/scripts/fetch_old_batches.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule Scripts.FetchOldBatches do
1111

1212
def fetch_old_events(fromBlock, toBlock) do
1313
"Fetching old events, from #{fromBlock} to #{toBlock}" |> Logger.debug()
14-
chunk_size = 32 # do in smaller chunks, if there are too many blocks to process
14+
chunk_size = 500 # do in smaller chunks, if there are too many blocks to process
1515
chunkify(fromBlock, toBlock, chunk_size) |> Enum.each(&make_request/1)
1616
"✅ Done fetching old events" |> Logger.debug()
1717
end

explorer/scripts/fetch_old_batches.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ export ALIGNED_CONFIG_FILE=$ALIGNED_CONFIG_FILE
1414

1515
if [ "$#" -eq 0 ]; then
1616
echo "Error, No arguments provided."
17+
echo "Try running the make target with FROM_BLOCK=<n> TO_BLOCK=<m>"
1718
exit 1
1819
elif [ "$#" -eq 2 ]; then
1920
# Two arguments provided, use them
2021
FROM=$1
2122
TO=$2
2223
else
2324
echo "Please provide 2 arguments."
25+
echo "Try running the make target with FROM_BLOCK=<n> TO_BLOCK=<m>"
2426
exit 1
2527
fi
2628

@@ -29,4 +31,4 @@ echo "Running fetch_old_batches.sh from block: $FROM to block: $TO"
2931

3032
mix compile --force #force recompile to get the latest .env values
3133

32-
iex --sname fetch_old_batches --remsh explorer@$ELIXIR_HOSTNAME -S mix run -e "Scripts.FetchOldBatches.run($FROM, $TO)"
34+
iex --sname fetch_old_batches --remsh explorer@$ELIXIR_HOSTNAME -S mix run -e "Scripts.FetchOldBatches.run($FROM, $TO)"

explorer/scripts/fetch_old_operators_strategies_restakes.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export ALIGNED_CONFIG_FILE=$ALIGNED_CONFIG_FILE
1414

1515
if [ "$#" -eq 0 ]; then
1616
echo "Error, No arguments provided."
17+
echo "Try running the make target with FROM_BLOCK=<n>"
1718
exit 1
1819
elif [ "$#" -eq 1 ]; then
1920
# argument provided, use it

0 commit comments

Comments
 (0)