Skip to content

Commit 969c6f7

Browse files
authored
misc local EIP4844 > Deneb bumps (#4717)
* misc local `EIP4844` > `Deneb` bumps * fix
1 parent f91fe56 commit 969c6f7

20 files changed

+57
-59
lines changed

AllTests-mainnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ OK: 10/12 Fail: 0/12 Skip: 2/12
167167
+ Rewrite HTTPS Infura URLs OK
168168
+ Roundtrip engine RPC V1 and bellatrix ExecutionPayload representations OK
169169
+ Roundtrip engine RPC V2 and capella ExecutionPayload representations OK
170-
+ Roundtrip engine RPC V3 and eip4844 ExecutionPayload representations OK
170+
+ Roundtrip engine RPC V3 and deneb ExecutionPayload representations OK
171171
```
172172
OK: 5/5 Fail: 0/5 Skip: 0/5
173173
## Eth2 specific discovery tests

beacon_chain/nimbus_beacon_node.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ proc updateGossipStatus(node: BeaconNode, slot: Slot) {.async.} =
10851085
removeAltairMessageHandlers,
10861086
removeAltairMessageHandlers, # bellatrix (altair handlers, different forkDigest)
10871087
removeCapellaMessageHandlers,
1088-
removeCapellaMessageHandlers # eip4844 (capella handlers, different forkDigest)
1088+
removeCapellaMessageHandlers # deneb (capella handlers, different forkDigest)
10891089
]
10901090

10911091
for gossipFork in oldGossipForks:
@@ -1096,7 +1096,7 @@ proc updateGossipStatus(node: BeaconNode, slot: Slot) {.async.} =
10961096
addAltairMessageHandlers,
10971097
addAltairMessageHandlers, # bellatrix (altair handlers, different forkDigest)
10981098
addCapellaMessageHandlers,
1099-
addCapellaMessageHandlers # eip4844 (capella handlers, different forkDigest)
1099+
addCapellaMessageHandlers # deneb (capella handlers, different forkDigest)
11001100
]
11011101

11021102
for gossipFork in newGossipForks:

beacon_chain/rpc/rest_beacon_api.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ proc installBeaconApiHandlers*(router: var RestRouter, node: BeaconNode) =
803803

804804
withBlck(forked):
805805
blck.root = hash_tree_root(blck.message)
806-
# TODO: Fetch blobs from EE when blck is eip4844.SignedBeaconBlock
806+
# TODO: Fetch blobs from EE when blck is deneb.SignedBeaconBlock
807807
await node.router.routeSignedBeaconBlock(blck)
808808

809809
if res.isErr():

beacon_chain/spec/beaconstate.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ proc initialize_hashed_beacon_state_from_eth1*(
921921

922922
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/bellatrix/beacon-chain.md#testing
923923
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/capella/beacon-chain.md#testing
924-
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/eip4844/beacon-chain.md#testing
924+
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/deneb/beacon-chain.md#testing
925925
proc initialize_beacon_state_from_eth1*(
926926
cfg: RuntimeConfig,
927927
eth1_block_hash: Eth2Digest,

beacon_chain/spec/datatypes/deneb.nim

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ import
2727
export json_serialization, base
2828

2929
const
30-
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.2/specs/eip4844/polynomial-commitments.md#constants
30+
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/deneb/polynomial-commitments.md#constants
3131
BYTES_PER_FIELD_ELEMENT = 32
3232

33-
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.2/specs/eip4844/beacon-chain.md#blob
33+
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/deneb/beacon-chain.md#blob
3434
BLOB_TX_TYPE* = 0x05'u8
3535

36-
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.2/specs/eip4844/polynomial-commitments.md#constants
36+
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/deneb/polynomial-commitments.md#constants
3737
BLS_MODULUS* = "52435875175126190479447740508185965837690552500527637822603658699938581184513".u256
38-
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.0/specs/eip4844/p2p-interface.md#configuration
39-
MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS* = 4096'u64
38+
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/deneb/p2p-interface.md#configuration
39+
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS* = 4096'u64
4040

4141
type
4242
# this block belongs elsewhere - will figure out after implementing c-kzg bindings
@@ -366,7 +366,7 @@ type
366366
state_root*: Eth2Digest
367367
body*: TrustedBeaconBlockBody
368368

369-
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.2/specs/eip4844/beacon-chain.md#beaconblockbody
369+
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/deneb/beacon-chain.md#beaconblockbody
370370
BeaconBlockBody* = object
371371
randao_reveal*: ValidatorSig
372372
eth1_data*: Eth1Data
@@ -385,9 +385,9 @@ type
385385
sync_aggregate*: SyncAggregate
386386

387387
# Execution
388-
execution_payload*: ExecutionPayload
388+
execution_payload*: ExecutionPayload # [Modified in Deneb]
389389
bls_to_execution_changes*: SignedBLSToExecutionChangeList
390-
blob_kzg_commitments*: KZGCommitments # [New in EIP-4844]
390+
blob_kzg_commitments*: KZGCommitments # [New in Deneb]
391391

392392
SigVerifiedBeaconBlockBody* = object
393393
## A BeaconBlock body with signatures verified
@@ -420,9 +420,9 @@ type
420420
sync_aggregate*: TrustedSyncAggregate
421421

422422
# Execution
423-
execution_payload*: ExecutionPayload
423+
execution_payload*: ExecutionPayload # [Modified in Deneb]
424424
bls_to_execution_changes*: SignedBLSToExecutionChangeList
425-
blob_kzg_commitments*: List[KZGCommitment, Limit MAX_BLOBS_PER_BLOCK] # [New in EIP-4844]
425+
blob_kzg_commitments*: List[KZGCommitment, Limit MAX_BLOBS_PER_BLOCK] # [New in Deneb]
426426

427427
TrustedBeaconBlockBody* = object
428428
## A full verified block
@@ -443,9 +443,9 @@ type
443443
sync_aggregate*: TrustedSyncAggregate
444444

445445
# Execution
446-
execution_payload*: ExecutionPayload
446+
execution_payload*: ExecutionPayload # [Modified in Deneb]
447447
bls_to_execution_changes*: SignedBLSToExecutionChangeList
448-
blob_kzg_commitments*: List[KZGCommitment, Limit MAX_BLOBS_PER_BLOCK] # [New in EIP-4844]
448+
blob_kzg_commitments*: List[KZGCommitment, Limit MAX_BLOBS_PER_BLOCK] # [New in Deneb]
449449

450450
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/specs/phase0/beacon-chain.md#signedbeaconblock
451451
SignedBeaconBlock* = object

beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ proc readValue*(reader: var JsonReader[RestJson],
17731773
requireAllFields = true,
17741774
allowUnknownFields = true)
17751775
except SerializationError:
1776-
reader.raiseUnexpectedValue("Incorrect EIP4844 beacon state format")
1776+
reader.raiseUnexpectedValue("Incorrect deneb beacon state format")
17771777
toValue(denebData)
17781778

17791779
proc writeValue*(writer: var JsonWriter[RestJson], value: ForkedHashedBeaconState)

beacon_chain/spec/eth2_apis/rest_types.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ type
311311
of ConsensusFork.Altair: altairBody*: altair.BeaconBlockBody
312312
of ConsensusFork.Bellatrix: bellatrixBody*: bellatrix.BeaconBlockBody
313313
of ConsensusFork.Capella: capellaBody*: capella.BeaconBlockBody
314-
of ConsensusFork.Deneb: eip4844Body*: deneb.BeaconBlockBody
314+
of ConsensusFork.Deneb: denebBody*: deneb.BeaconBlockBody
315315

316316
RestSpec* = object
317317
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/presets/mainnet/phase0.yaml

beacon_chain/spec/forks.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ template init*(T: type ForkedMsgTrustedSignedBeaconBlock, blck: bellatrix.MsgTru
417417
template init*(T: type ForkedMsgTrustedSignedBeaconBlock, blck: capella.MsgTrustedSignedBeaconBlock): T =
418418
T(kind: ConsensusFork.Capella, capellaData: blck)
419419
template init*(T: type ForkedMsgTrustedSignedBeaconBlock, blck: deneb.MsgTrustedSignedBeaconBlock): T =
420-
T(kind: ConsensusFork.Deneb, eip4844Data: blck)
420+
T(kind: ConsensusFork.Deneb, denebData: blck)
421421

422422
template init*(T: type ForkedTrustedSignedBeaconBlock, blck: phase0.TrustedSignedBeaconBlock): T =
423423
T(kind: ConsensusFork.Phase0, phase0Data: blck)

beacon_chain/spec/presets/gnosis/eip4844_preset.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Mainnet preset - EIP-4844
2-
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.2/presets/mainnet/eip4844.yaml
1+
# Mainnet preset - Deneb
2+
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/presets/mainnet/deneb.yaml
33
const
44
# `uint64(4096)`
55
FIELD_ELEMENTS_PER_BLOB*: uint64 = 4096

beacon_chain/spec/presets/mainnet/eip4844_preset.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Mainnet preset - EIP-4844
2-
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.2/presets/mainnet/eip4844.yaml
1+
# Mainnet preset - Deneb
2+
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.3/presets/mainnet/deneb.yaml
33
const
44
# `uint64(4096)`
55
FIELD_ELEMENTS_PER_BLOB*: uint64 = 4096

0 commit comments

Comments
 (0)