Skip to content

Commit

Permalink
Remove LFS fixes from the PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatfate committed Jan 10, 2025
1 parent 8bd4a9d commit 9326a72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
6 changes: 3 additions & 3 deletions beacon_chain/consensus_object_pools/block_clearance.nim
Original file line number Diff line number Diff line change
Expand Up @@ -509,16 +509,16 @@ proc addBackfillBlockData*(
withBlck(parentBlock):
forkyBlck.message.state_root
clearanceBlock = BlockSlotId.init(parent.bid, forkyBlck.message.slot)
updateFlags1 = dag.updateFlags
# {skipLastStateRootCalculation} flag here could improve performance by
# 100%, but its not enough.
updateFlags1 = dag.updateFlags + {skipLastStateRootCalculation}

if not updateState(dag, dag.clearanceState, clearanceBlock, true, cache,
updateFlags1):
error "Unable to load clearance state for parent block, " &
"database corrupt?", clearanceBlock = shortLog(clearanceBlock)
return err(VerifierError.MissingParent)

dag.clearanceState.setStateRoot(trustedStateRoot)

let proposerVerifyTick = Moment.now()

if not(isNil(onStateUpdated)):
Expand Down
9 changes: 3 additions & 6 deletions beacon_chain/nimbus_beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,11 @@ proc initFullNode(
else:
dag.tail.slot

proc getUntrustedBackfillSlot(): Slot =
func getUntrustedBackfillSlot(): Slot =
if clist.tail.isSome():
clist.tail.get().blck.slot
else:
getLocalWallSlot()

func getUntrustedFrontfillSlot(): Slot =
getFirstSlotAtFinalizedEpoch()
dag.tail.slot

func getFrontfillSlot(): Slot =
max(dag.frontfill.get(BlockId()).slot, dag.horizon)
Expand Down Expand Up @@ -531,7 +528,7 @@ proc initFullNode(
dag.cfg.DENEB_FORK_EPOCH, dag.cfg.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS,
SyncQueueKind.Backward, getLocalHeadSlot,
getLocalWallSlot, getFirstSlotAtFinalizedEpoch, getUntrustedBackfillSlot,
getUntrustedFrontfillSlot, isWithinWeakSubjectivityPeriod,
getFrontfillSlot, isWithinWeakSubjectivityPeriod,
clistPivotSlot, untrustedBlockVerifier, maxHeadAge = 0,
shutdownEvent = node.shutdownEvent,
flags = syncManagerFlags)
Expand Down
15 changes: 2 additions & 13 deletions beacon_chain/sync/sync_overseer.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# beacon_chain
# Copyright (c) 2018-2025 Status Research & Development GmbH
# Copyright (c) 2018-2024 Status Research & Development GmbH
# Licensed and distributed under either of
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
Expand Down Expand Up @@ -184,7 +184,7 @@ proc updatePerformance(overseer: SyncOverseerRef, startTick: Moment,

# Update status string
overseer.statusMsg = Opt.some(
"fill: " & timeleft.toTimeLeftString() & " (" &
timeleft.toTimeLeftString() & " (" &
(done * 100).formatBiggestFloat(ffDecimal, 2) & "%) " &
overseer.avgSpeed.formatBiggestFloat(ffDecimal, 4) &
"slots/s (" & $dag.head.slot & ")")
Expand Down Expand Up @@ -418,15 +418,6 @@ proc mainLoop*(
clist = overseer.clist
currentSlot = overseer.beaconClock.now().slotOrZero()

notice "Sync overseer starting",
wall_slot = currentSlot,
dag_head_slot = dag.head.slot,
dag_finalized_head_slot = dag.finalizedHead.slot,
dag_horizon = dag.horizon(),
dag_backfill_slot = dag.backfill.slot,
untrusted_tail = shortLog(clist.tail),
untrusted_head = shortLog(clist.head)

if overseer.isWithinWeakSubjectivityPeriod(currentSlot):
# Starting forward sync manager/monitor.
overseer.forwardSync.start()
Expand Down Expand Up @@ -495,8 +486,6 @@ proc mainLoop*(
quit 1

overseer.untrustedInProgress = false
# Reset status bar
overseer.statusMsg = Opt.none(string)

# When we finished state rebuilding process - we could start forward
# SyncManager which could perform finish sync.
Expand Down

0 comments on commit 9326a72

Please sign in to comment.