Skip to content

Commit

Permalink
Lower the maximum block range in getLogs requests to 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
zah committed Mar 14, 2023
1 parent 17c0eee commit 6fb48ac
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion beacon_chain/eth1/eth1_monitor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,29 @@ contract(DepositContract):
const
hasDepositRootChecks = defined(has_deposit_root_checks)

targetBlocksPerLogsRequest = 5000'u64 # This is roughly a day of Eth1 blocks
targetBlocksPerLogsRequest = 1000'u64
# TODO
#
# This is currently set to 1000, because this was the default maximum
# value in Besu circa our 22.3.0 release. Previously, we've used 5000,
# but this was effectively forcing the fallback logic in `syncBlockRange`
# to always execute multiple requests before getting a successful response.
#
# Besu have raised this default to 5000 in https://github.com/hyperledger/besu/pull/5209
# which is expected to ship in their next release.
#
# Full deposits sync time with various values for this parameter:
#
# Blocks per request | Geth running on the same host | Geth running on a more distant host
# ----------------------------------------------------------------------------------------
# 1000 | 11m 20s | 22m
# 5000 | 5m 20s | 15m 40s
# 100000 | 4m 10s | not tested
#
# The number of requests scales linearly with the parameter value as you would expect.
#
# These results suggest that it would be reasonable for us to get back to 5000 once the
# Besu release is well-spread within their userbase.

# Engine API timeouts
engineApiConnectionTimeout = 5.seconds # How much we wait before giving up connecting to the Engine API
Expand Down

0 comments on commit 6fb48ac

Please sign in to comment.