Skip to content

Commit

Permalink
addressed reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
agnxsh committed Nov 8, 2024
1 parent 317b604 commit 44531ad
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
36 changes: 27 additions & 9 deletions beacon_chain/beacon_chain_db.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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()
Expand Down
1 change: 1 addition & 0 deletions beacon_chain/consensus_object_pools/consensus_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions beacon_chain/gossip_processing/block_processor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions beacon_chain/spec/keystore.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 44531ad

Please sign in to comment.