rename eip48844ImplementationMissing to denebImplementationMissing (#4654)

This commit is contained in:
tersec 2023-02-23 11:37:45 +01:00 committed by GitHub
parent c6cefd8914
commit 8f269c92d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 24 additions and 24 deletions

View File

@ -850,7 +850,7 @@ proc installBeaconApiHandlers*(router: var RestRouter, node: BeaconNode) =
case currentEpochFork case currentEpochFork
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
return RestApiResponse.jsonError(Http500, $eip4844ImplementationMissing) return RestApiResponse.jsonError(Http500, $denebImplementationMissing)
of ConsensusFork.Capella: of ConsensusFork.Capella:
let res = let res =
block: block:

View File

@ -473,7 +473,7 @@ proc installValidatorApiHandlers*(router: var RestRouter, node: BeaconNode) =
static: doAssert high(ConsensusFork) == ConsensusFork.EIP4844 static: doAssert high(ConsensusFork) == ConsensusFork.EIP4844
let currentEpoch = node.currentSlot().epoch() let currentEpoch = node.currentSlot().epoch()
if currentEpoch >= node.dag.cfg.DENEB_FORK_EPOCH: if currentEpoch >= node.dag.cfg.DENEB_FORK_EPOCH:
debugRaiseAssert $eip4844ImplementationMissing & ": GET /eth/v1/validator/blinded_blocks/{slot}" debugRaiseAssert $denebImplementationMissing & ": GET /eth/v1/validator/blinded_blocks/{slot}"
elif currentEpoch >= node.dag.cfg.CAPELLA_FORK_EPOCH: elif currentEpoch >= node.dag.cfg.CAPELLA_FORK_EPOCH:
let res = await makeBlindedBeaconBlockForHeadAndSlot[ let res = await makeBlindedBeaconBlockForHeadAndSlot[
capella_mev.BlindedBeaconBlock]( capella_mev.BlindedBeaconBlock](

View File

@ -1011,7 +1011,7 @@ func checkForkConsistency*(cfg: RuntimeConfig) =
# due to a Deneb implementation missing. checkForkConsistency() checks that # due to a Deneb implementation missing. checkForkConsistency() checks that
# Nimbus does not run any non-FAR_FUTURE_EPOCH Deneb network, so such cases # Nimbus does not run any non-FAR_FUTURE_EPOCH Deneb network, so such cases
# won't be hit. # won't be hit.
const eip4844ImplementationMissing* = false const denebImplementationMissing* = false
#template debugRaiseAssert*(x: string) = raiseAssert x #template debugRaiseAssert*(x: string) = raiseAssert x
template debugRaiseAssert*(x: string) = discard template debugRaiseAssert*(x: string) = discard

View File

@ -1002,7 +1002,7 @@ proc readValue*[BlockType: ForkedBeaconBlock](
reader.raiseUnexpectedValue("Incorrect capella block format") reader.raiseUnexpectedValue("Incorrect capella block format")
value = ForkedBeaconBlock.init(res.get()).BlockType value = ForkedBeaconBlock.init(res.get()).BlockType
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
reader.raiseUnexpectedValue($eip4844ImplementationMissing) reader.raiseUnexpectedValue($denebImplementationMissing)
proc readValue*[BlockType: ForkedBlindedBeaconBlock]( proc readValue*[BlockType: ForkedBlindedBeaconBlock](
reader: var JsonReader[RestJson], reader: var JsonReader[RestJson],
@ -1065,7 +1065,7 @@ proc readValue*[BlockType: ForkedBlindedBeaconBlock](
value = ForkedBlindedBeaconBlock(kind: ConsensusFork.Capella, value = ForkedBlindedBeaconBlock(kind: ConsensusFork.Capella,
capellaData: res) capellaData: res)
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
reader.raiseUnexpectedValue($eip4844ImplementationMissing) reader.raiseUnexpectedValue($denebImplementationMissing)
proc readValue*[BlockType: Web3SignerForkedBeaconBlock]( proc readValue*[BlockType: Web3SignerForkedBeaconBlock](
reader: var JsonReader[RestJson], reader: var JsonReader[RestJson],
@ -1135,7 +1135,7 @@ proc readValue*[BlockType: Web3SignerForkedBeaconBlock](
kind: ConsensusFork.Capella, kind: ConsensusFork.Capella,
capellaData: res.get()) capellaData: res.get())
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
reader.raiseUnexpectedValue($eip4844ImplementationMissing) reader.raiseUnexpectedValue($denebImplementationMissing)
proc writeValue*[ proc writeValue*[
BlockType: Web3SignerForkedBeaconBlock]( BlockType: Web3SignerForkedBeaconBlock](
@ -1394,7 +1394,7 @@ proc readValue*(reader: var JsonReader[RestJson],
value.capellaBody.execution_payload.withdrawals, value.capellaBody.execution_payload.withdrawals,
ep_src.withdrawals.get()) ep_src.withdrawals.get())
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
reader.raiseUnexpectedValue($eip4844ImplementationMissing) reader.raiseUnexpectedValue($denebImplementationMissing)
## RestPublishedBeaconBlock ## RestPublishedBeaconBlock
proc readValue*(reader: var JsonReader[RestJson], proc readValue*(reader: var JsonReader[RestJson],
@ -1492,7 +1492,7 @@ proc readValue*(reader: var JsonReader[RestJson],
) )
) )
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
reader.raiseUnexpectedValue($eip4844ImplementationMissing) reader.raiseUnexpectedValue($denebImplementationMissing)
) )
## RestPublishedSignedBeaconBlock ## RestPublishedSignedBeaconBlock
@ -1553,7 +1553,7 @@ proc readValue*(reader: var JsonReader[RestJson],
) )
) )
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
reader.raiseUnexpectedValue($eip4844ImplementationMissing) reader.raiseUnexpectedValue($denebImplementationMissing)
) )
## ForkedSignedBeaconBlock ## ForkedSignedBeaconBlock
@ -1647,7 +1647,7 @@ proc readValue*(reader: var JsonReader[RestJson],
reader.raiseUnexpectedValue("Incorrect capella block format") reader.raiseUnexpectedValue("Incorrect capella block format")
value = ForkedSignedBeaconBlock.init(res.get()) value = ForkedSignedBeaconBlock.init(res.get())
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
reader.raiseUnexpectedValue($eip4844ImplementationMissing) reader.raiseUnexpectedValue($denebImplementationMissing)
withBlck(value): withBlck(value):
blck.root = hash_tree_root(blck.message) blck.root = hash_tree_root(blck.message)
@ -2730,7 +2730,7 @@ proc decodeBody*(
return err("Unexpected deserialization error") return err("Unexpected deserialization error")
ok(RestPublishedSignedBeaconBlock(ForkedSignedBeaconBlock.init(blck))) ok(RestPublishedSignedBeaconBlock(ForkedSignedBeaconBlock.init(blck)))
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
return err($eip4844ImplementationMissing) return err($denebImplementationMissing)
else: else:
return err("Unsupported or invalid content media type") return err("Unsupported or invalid content media type")

View File

@ -425,7 +425,7 @@ func init*(T: type ForkedSignedBlindedBeaconBlock,
capellaData: capella_mev.SignedBlindedBeaconBlock(message: forked.capellaData, capellaData: capella_mev.SignedBlindedBeaconBlock(message: forked.capellaData,
signature: signature)) signature: signature))
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
discard $eip4844ImplementationMissing & "forks.nim:init(T: type ForkedSignedBlindedBeaconBlock)" discard $denebImplementationMissing & "forks.nim:init(T: type ForkedSignedBlindedBeaconBlock)"
T(kind: ConsensusFork.EIP4844, T(kind: ConsensusFork.EIP4844,
eip4844Data: capella_mev.SignedBlindedBeaconBlock(message: forked.eip4844Data, eip4844Data: capella_mev.SignedBlindedBeaconBlock(message: forked.eip4844Data,
signature: signature)) signature: signature))

View File

@ -582,7 +582,7 @@ proc makeBeaconBlock*[T: bellatrix.ExecutionPayload | capella.ExecutionPayload |
execution_payload_root.get, execution_payload_root.get,
hash_tree_root(validator_changes.bls_to_execution_changes)]) hash_tree_root(validator_changes.bls_to_execution_changes)])
elif stateFork > ConsensusFork.Capella: elif stateFork > ConsensusFork.Capella:
discard eip4844ImplementationMissing discard denebImplementationMissing
state.`kind Data`.root = hash_tree_root(state.`kind Data`.data) state.`kind Data`.root = hash_tree_root(state.`kind Data`.data)
blck.`kind Data`.state_root = state.`kind Data`.root blck.`kind Data`.state_root = state.`kind Data`.root

View File

@ -775,7 +775,7 @@ proc validate_blobs_sidecar*(slot: Slot, root: Eth2Digest,
func is_data_available( func is_data_available(
slot: Slot, beacon_block_root: Eth2Digest, slot: Slot, beacon_block_root: Eth2Digest,
blob_kzg_commitments: seq[deneb.KZGCommitment]): bool = blob_kzg_commitments: seq[deneb.KZGCommitment]): bool =
discard $eip4844ImplementationMissing & ": state_transition_block.nim:is_data_available" discard $denebImplementationMissing & ": state_transition_block.nim:is_data_available"
true true

View File

@ -2084,7 +2084,7 @@ proc publishBlock*(
of ConsensusFork.Capella: of ConsensusFork.Capella:
publishBlock(it, data.capellaData) publishBlock(it, data.capellaData)
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
debugRaiseAssert $eip4844ImplementationMissing & debugRaiseAssert $denebImplementationMissing &
": validator_client/api.nim:publishBlock (1)" ": validator_client/api.nim:publishBlock (1)"
let f = newFuture[RestPlainResponse]("") let f = newFuture[RestPlainResponse]("")
f.fail(new RestError) f.fail(new RestError)
@ -2154,7 +2154,7 @@ proc publishBlock*(
of ConsensusFork.Capella: of ConsensusFork.Capella:
publishBlock(it, data.capellaData) publishBlock(it, data.capellaData)
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
debugRaiseAssert $eip4844ImplementationMissing & debugRaiseAssert $denebImplementationMissing &
": validator_client/api.nim:publishBlock (2)" ": validator_client/api.nim:publishBlock (2)"
let f = newFuture[RestPlainResponse]("") let f = newFuture[RestPlainResponse]("")
f.fail(new RestError) f.fail(new RestError)
@ -2347,7 +2347,7 @@ proc publishBlindedBlock*(
of ConsensusFork.Capella: of ConsensusFork.Capella:
publishBlindedBlock(it, data.capellaData) publishBlindedBlock(it, data.capellaData)
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
debugRaiseAssert $eip4844ImplementationMissing & debugRaiseAssert $denebImplementationMissing &
": validator_client/api.nim:publishBlindedBlock (1)" ": validator_client/api.nim:publishBlindedBlock (1)"
let f = newFuture[RestPlainResponse]("") let f = newFuture[RestPlainResponse]("")
f.fail(new RestError) f.fail(new RestError)
@ -2416,7 +2416,7 @@ proc publishBlindedBlock*(
of ConsensusFork.Capella: of ConsensusFork.Capella:
publishBlindedBlock(it, data.capellaData) publishBlindedBlock(it, data.capellaData)
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
debugRaiseAssert $eip4844ImplementationMissing & debugRaiseAssert $denebImplementationMissing &
": validator_client/api.nim:publishBlindedBlock (2)" ": validator_client/api.nim:publishBlindedBlock (2)"
let f = newFuture[RestPlainResponse]("") let f = newFuture[RestPlainResponse]("")
f.fail(new RestError) f.fail(new RestError)

View File

@ -724,7 +724,7 @@ proc getBlindedBeaconBlock[
Future[Result[T, string]] {.async.} = Future[Result[T, string]] {.async.} =
withBlck(forkedBlock): withBlck(forkedBlock):
when stateFork >= ConsensusFork.EIP4844: when stateFork >= ConsensusFork.EIP4844:
debugRaiseAssert $eip4844ImplementationMissing & ": getBlindedBeaconBlock" debugRaiseAssert $denebImplementationMissing & ": getBlindedBeaconBlock"
return err("getBlindedBeaconBlock: Deneb blinded block creation not implemented") return err("getBlindedBeaconBlock: Deneb blinded block creation not implemented")
elif stateFork >= ConsensusFork.Bellatrix: elif stateFork >= ConsensusFork.Bellatrix:
when not ( when not (
@ -909,7 +909,7 @@ proc makeBlindedBeaconBlockForHeadAndSlot*[
let (executionPayloadHeader, forkedBlck) = blindedBlockParts.get let (executionPayloadHeader, forkedBlck) = blindedBlockParts.get
withBlck(forkedBlck): withBlck(forkedBlck):
when stateFork >= ConsensusFork.EIP4844: when stateFork >= ConsensusFork.EIP4844:
debugRaiseAssert $eip4844ImplementationMissing & ": makeBlindedBeaconBlockForHeadAndSlot" debugRaiseAssert $denebImplementationMissing & ": makeBlindedBeaconBlockForHeadAndSlot"
elif stateFork >= ConsensusFork.Bellatrix: elif stateFork >= ConsensusFork.Bellatrix:
when ((stateFork == ConsensusFork.Bellatrix and when ((stateFork == ConsensusFork.Bellatrix and
EPH is bellatrix.ExecutionPayloadHeader) or EPH is bellatrix.ExecutionPayloadHeader) or
@ -952,7 +952,7 @@ proc proposeBlock(node: BeaconNode,
if node.config.payloadBuilderEnable: if node.config.payloadBuilderEnable:
let newBlockMEV = let newBlockMEV =
if slot.epoch >= node.dag.cfg.DENEB_FORK_EPOCH: if slot.epoch >= node.dag.cfg.DENEB_FORK_EPOCH:
debugRaiseAssert $eip4844ImplementationMissing & ": proposeBlock" debugRaiseAssert $denebImplementationMissing & ": proposeBlock"
await proposeBlockMEV[ await proposeBlockMEV[
capella_mev.SignedBlindedBeaconBlock]( capella_mev.SignedBlindedBeaconBlock](
node, head, validator, slot, randao, validator_index) node, head, validator, slot, randao, validator_index)

View File

@ -264,7 +264,7 @@ proc cmdBench(conf: DbConf, cfg: RuntimeConfig) =
blocks[3].add dag.db.getBlock( blocks[3].add dag.db.getBlock(
blck.root, capella.TrustedSignedBeaconBlock).get() blck.root, capella.TrustedSignedBeaconBlock).get()
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
raiseAssert $eip4844ImplementationMissing raiseAssert $denebImplementationMissing
let stateData = newClone(dag.headState) let stateData = newClone(dag.headState)
@ -334,7 +334,7 @@ proc cmdBench(conf: DbConf, cfg: RuntimeConfig) =
doAssert dbBenchmark.getState( doAssert dbBenchmark.getState(
forkyState.root, loadedState[3][].data, noRollback) forkyState.root, loadedState[3][].data, noRollback)
of ConsensusFork.EIP4844: of ConsensusFork.EIP4844:
raiseAssert $eip4844ImplementationMissing & ": ncli_db.nim: cmdBench (1)" raiseAssert $denebImplementationMissing & ": ncli_db.nim: cmdBench (1)"
if forkyState.data.slot.epoch mod 16 == 0: if forkyState.data.slot.epoch mod 16 == 0:
let loadedRoot = case stateFork let loadedRoot = case stateFork
@ -342,7 +342,7 @@ proc cmdBench(conf: DbConf, cfg: RuntimeConfig) =
of ConsensusFork.Altair: hash_tree_root(loadedState[1][].data) of ConsensusFork.Altair: hash_tree_root(loadedState[1][].data)
of ConsensusFork.Bellatrix: hash_tree_root(loadedState[2][].data) of ConsensusFork.Bellatrix: hash_tree_root(loadedState[2][].data)
of ConsensusFork.Capella: hash_tree_root(loadedState[3][].data) of ConsensusFork.Capella: hash_tree_root(loadedState[3][].data)
of ConsensusFork.EIP4844: raiseAssert $eip4844ImplementationMissing & ": ncli_db.nim: cmdBench (2)" of ConsensusFork.EIP4844: raiseAssert $denebImplementationMissing & ": ncli_db.nim: cmdBench (2)"
doAssert hash_tree_root(forkyState.data) == loadedRoot doAssert hash_tree_root(forkyState.data) == loadedRoot
processBlocks(blocks[0]) processBlocks(blocks[0])