addressed reviews

This commit is contained in:
Agnish Ghosh 2024-11-08 12:27:36 +07:00
parent 317b604478
commit 44531ad23f
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
4 changed files with 30 additions and 9 deletions

View File

@ -508,7 +508,7 @@ proc new*(T: type BeaconChainDB,
# V1 - expected-to-be small rows get without rowid optimizations
keyValues = kvStore db.openKvStore("key_values", true).expectDb()
blocks = [
blocks = if cfg.FULU_FORK_EPOCH != FAR_FUTURE_EPOCH: [
kvStore db.openKvStore("blocks").expectDb(),
kvStore db.openKvStore("altair_blocks").expectDb(),
kvStore db.openKvStore("bellatrix_blocks").expectDb(),
@ -517,16 +517,34 @@ proc new*(T: type BeaconChainDB,
kvStore db.openKvStore("electra_blocks").expectDb(),
kvStore db.openKvStore("fulu_blocks").expectDb()]
else: [
kvStore db.openKvStore("blocks").expectDb(),
kvStore db.openKvStore("altair_blocks").expectDb(),
kvStore db.openKvStore("bellatrix_blocks").expectDb(),
kvStore db.openKvStore("capella_blocks").expectDb(),
kvStore db.openKvStore("deneb_blocks").expectDb(),
kvStore db.openKvStore("electra_blocks").expectDb(),
kvStore db.openKvStore("").expectDb()]
stateRoots = kvStore db.openKvStore("state_roots", true).expectDb()
statesNoVal = [
kvStore db.openKvStore("state_no_validators2").expectDb(),
kvStore db.openKvStore("altair_state_no_validators").expectDb(),
kvStore db.openKvStore("bellatrix_state_no_validators").expectDb(),
kvStore db.openKvStore("capella_state_no_validator_pubkeys").expectDb(),
kvStore db.openKvStore("deneb_state_no_validator_pubkeys").expectDb(),
kvStore db.openKvStore("electra_state_no_validator_pubkeys").expectDb(),
kvStore db.openKvStore("fulu_state_no_validator_pubkeys").expectDb()]
statesNoVal = if cfg.FULU_FORK_EPOCH != FAR_FUTURE_EPOCH: [
kvStore db.openKvStore("state_no_validators").expectDb(),
kvStore db.openKvStore("altair_state_no_validators").expectDb(),
kvStore db.openKvStore("bellatrix_state_no_validators").expectDb(),
kvStore db.openKvStore("capella_state_no_validator_pubkeys").expectDb(),
kvStore db.openKvStore("deneb_state_no_validator_pubkeys").expectDb(),
kvStore db.openKvStore("electra_state_no_validator_pubkeys").expectDb(),
kvStore db.openKvStore("fulu_state_no_validator_pubkeys").expectDb()]
else: [
kvStore db.openKvStore("state_no_validators").expectDb(),
kvStore db.openKvStore("altair_state_no_validators").expectDb(),
kvStore db.openKvStore("bellatrix_state_no_validators").expectDb(),
kvStore db.openKvStore("capella_state_no_validator_pubkeys").expectDb(),
kvStore db.openKvStore("deneb_state_no_validator_pubkeys").expectDb(),
kvStore db.openKvStore("electra_state_no_validator_pubkeys").expectDb(),
kvStore db.openKvStore("").expectDb()]
stateDiffs = kvStore db.openKvStore("state_diffs").expectDb()
summaries = kvStore db.openKvStore("beacon_block_summaries", true).expectDb()

View File

@ -379,6 +379,7 @@ proc runProposalForkchoiceUpdated*(
debug "Fork-choice updated for proposal", status
static: doAssert high(ConsensusFork) == ConsensusFork.Fulu
debugFuluComment "Will Fulu need fcuV4? Or there shall be a new fcuV introduced in Fulu? We don't know"
when consensusFork >= ConsensusFork.Deneb:
# https://github.com/ethereum/execution-apis/blob/90a46e9137c89d58e818e62fa33a0347bba50085/src/engine/prague.md
# does not define any new forkchoiceUpdated, so reuse V3 from Dencun

View File

@ -772,6 +772,7 @@ proc storeBlock(
deadlineObj = deadlineObj,
maxRetriesCount = getRetriesCount())
debugFuluComment "We don't know yet if there'd be new PayloadAttributes version in Fulu."
template callForkChoiceUpdated: auto =
case self.consensusManager.dag.cfg.consensusForkAtEpoch(
newHead.get.blck.bid.slot.epoch)

View File

@ -727,6 +727,7 @@ template writeValue*(w: var JsonWriter,
func parseProvenBlockProperty*(propertyPath: string): Result[ProvenProperty, string] =
if propertyPath == ".execution_payload.fee_recipient":
debugFuluComment "We don't know yet if `GeneralizedIndex` will stay same in Fulu yet."
ok ProvenProperty(
path: propertyPath,
capellaIndex: some GeneralizedIndex(401),