fix missing frontfill index (fixes #3658) (#3675)

* fix key load duration log
* log broken frontfill block root
This commit is contained in:
Jacek Sieka 2022-05-31 10:09:01 +02:00 committed by GitHub
parent 301331e54e
commit f31f52e24a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -316,7 +316,8 @@ proc addBackfillBlock*(
head = shortLog(dag.head)
quit 1
dag.backfill = blck.toBeaconBlockSummary()
# Signal that we're done by resetting backfill
reset(dag.backfill)
dag.db.finalizedBlocks.insert(blck.slot, blockRoot)
dag.updateFrontfillBlocks()

View File

@ -856,7 +856,7 @@ proc init*(T: type ChainDAGRef, cfg: RuntimeConfig, db: BeaconChainDB,
"low to be loadable")
db.getBeaconBlockSummary(backfillRoot).expect(
"Backfill block must have a summary")
"Backfill block must have a summary: " & $backfillRoot)
else:
withBlck(tailBlock): blck.message.toBeaconBlockSummary()
@ -935,7 +935,7 @@ proc init*(T: type ChainDAGRef, cfg: RuntimeConfig, db: BeaconChainDB,
summariesDur = summariesTick - loadTick,
finalizedDur = finalizedTick - summariesTick,
frontfillDur = frontfillTick - finalizedTick,
keysDur = Moment.now() - finalizedTick
keysDur = Moment.now() - frontfillTick
dag.initLightClientCache()