Skip to content

Commit

Permalink
add --finalized-checkpoint-state suggestion to the TNS state download…
Browse files Browse the repository at this point in the history
… timeout message (#6927)
  • Loading branch information
tersec authored Feb 15, 2025
1 parent e5f7c24 commit 7309f7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 0 additions & 6 deletions beacon_chain/consensus_object_pools/block_clearance.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
{.push raises: [].}

import
std/sequtils,
chronicles,
results,
stew/assign2,
../spec/[
beaconstate, forks, signatures, signatures_batch,
state_transition, state_transition_epoch],
Expand Down Expand Up @@ -504,10 +502,6 @@ proc addBackfillBlockData*(
return ok()
return err(error)
startTick = Moment.now()
parentBlock = dag.getForkedBlock(parent.bid.root).get()
trustedStateRoot =
withBlck(parentBlock):
forkyBlck.message.state_root
clearanceBlock = BlockSlotId.init(parent.bid, forkyBlck.message.slot)
updateFlags1 = dag.updateFlags
# TODO (cheatfate): {skipLastStateRootCalculation} flag here could
Expand Down
6 changes: 4 additions & 2 deletions beacon_chain/trusted_node_sync.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import
./spec/[beaconstate, eth2_merkleization, forks, light_client_sync,
network, presets,
state_transition, deposit_snapshots],
"."/[beacon_clock, beacon_chain_db, era_db]
"."/[beacon_chain_db, era_db]

from presto import RestDecodingError
from "."/beacon_clock import
BeaconClock, fromFloatSeconds, getBeaconTimeFn, init

const
largeRequestsTimeout = 120.seconds # Downloading large items such as states.
Expand Down Expand Up @@ -337,7 +339,7 @@ proc doTrustedNodeSync*(
else:
tmp
awaitWithTimeout(client.getStateV2(id, cfg), largeRequestsTimeout):
error "Attempt to download checkpoint state timed out"
error "Attempt to download checkpoint state timed out; https://nimbus.guide/trusted-node-sync.html#sync-from-checkpoint-files provides an alternative approach"
quit 1
except CatchableError as exc:
error "Unable to download checkpoint state",
Expand Down

0 comments on commit 7309f7d

Please sign in to comment.