Skip to content

Commit 0f8ec2d

Browse files
authored
import datatypes/bellatrix as single package (#7325)
1 parent 34c1f91 commit 0f8ec2d

File tree

5 files changed

+11
-16
lines changed

5 files changed

+11
-16
lines changed

beacon_chain/spec/datatypes/electra.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ import
2222
ssz_serialization/[merkleization, proofs],
2323
ssz_serialization/types as sszTypes,
2424
../digest,
25-
"."/[base, phase0]
25+
"."/[base, phase0, bellatrix]
2626

2727
from kzg4844 import KzgCommitment, KzgProof
2828
from stew/bitops2 import log2trunc
2929
from stew/byteutils import to0xHex
3030
from ./altair import
3131
EpochParticipationFlags, InactivityScores, SyncAggregate, SyncCommittee,
3232
TrustedSyncAggregate, num_active_participants
33-
from ./bellatrix import BloomLogs, ExecutionAddress, Transaction
3433
from ./capella import
3534
ExecutionBranch, HistoricalSummary, SignedBLSToExecutionChange,
3635
SignedBLSToExecutionChangeList, Withdrawal, EXECUTION_PAYLOAD_GINDEX

beacon_chain/spec/datatypes/fulu.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import
1919
std/[sequtils, typetraits],
20-
"."/[phase0, base, electra],
20+
"."/[phase0, base, bellatrix, electra],
2121
chronicles,
2222
json_serialization,
2323
ssz_serialization/[merkleization, proofs],
@@ -31,7 +31,6 @@ from stew/byteutils import to0xHex
3131
from ./altair import
3232
EpochParticipationFlags, InactivityScores, SyncAggregate, SyncCommittee,
3333
TrustedSyncAggregate, SyncnetBits, num_active_participants
34-
from ./bellatrix import BloomLogs, ExecutionAddress, Transaction
3534
from ./capella import
3635
ExecutionBranch, HistoricalSummary, SignedBLSToExecutionChange,
3736
SignedBLSToExecutionChangeList, Withdrawal, EXECUTION_PAYLOAD_GINDEX

beacon_chain/spec/mev/deneb_mev.nim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77

88
{.push raises: [].}
99

10-
import ".."/datatypes/[altair, deneb]
10+
import ".."/datatypes/[altair, bellatrix, deneb]
1111

1212
from stew/byteutils import to0xHex
1313
from ".."/datatypes/phase0 import Attestation, AttesterSlashing
14-
from ../datatypes/bellatrix import ExecutionAddress
1514
from ".."/datatypes/capella import SignedBLSToExecutionChange
1615
from ".."/eth2_merkleization import hash_tree_root
1716

@@ -95,7 +94,7 @@ func toSignedBlindedBeaconBlock*(blck: deneb.SignedBeaconBlock):
9594
deposits: blck.message.body.deposits,
9695
voluntary_exits: blck.message.body.voluntary_exits,
9796
sync_aggregate: blck.message.body.sync_aggregate,
98-
execution_payload_header: ExecutionPayloadHeader(
97+
execution_payload_header: deneb.ExecutionPayloadHeader(
9998
parent_hash: blck.message.body.execution_payload.parent_hash,
10099
fee_recipient: blck.message.body.execution_payload.fee_recipient,
101100
state_root: blck.message.body.execution_payload.state_root,

beacon_chain/spec/mev/electra_mev.nim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77

88
{.push raises: [].}
99

10-
import ".."/datatypes/[altair, electra]
10+
import ".."/datatypes/[altair, bellatrix, electra]
1111

1212
from stew/byteutils import to0xHex
1313
from ".."/datatypes/phase0 import AttesterSlashing
14-
from ../datatypes/bellatrix import ExecutionAddress
1514
from ".."/datatypes/capella import SignedBLSToExecutionChange
1615
from ".."/datatypes/deneb import BlobsBundle, KzgCommitments
1716
from ".."/eth2_merkleization import hash_tree_root
@@ -149,7 +148,7 @@ func toSignedBlindedBeaconBlock*(blck: electra.SignedBeaconBlock):
149148
deposits: blck.message.body.deposits,
150149
voluntary_exits: blck.message.body.voluntary_exits,
151150
sync_aggregate: blck.message.body.sync_aggregate,
152-
execution_payload_header: ExecutionPayloadHeader(
151+
execution_payload_header: electra.ExecutionPayloadHeader(
153152
parent_hash: blck.message.body.execution_payload.parent_hash,
154153
fee_recipient: blck.message.body.execution_payload.fee_recipient,
155154
state_root: blck.message.body.execution_payload.state_root,

beacon_chain/spec/mev/fulu_mev.nim

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77

88
{.push raises: [].}
99

10-
import ".."/datatypes/[altair, fulu]
10+
import ".."/datatypes/[altair, bellatrix, fulu]
1111

1212
from stew/byteutils import to0xHex
1313
from ".."/datatypes/phase0 import AttesterSlashing
14-
from ../datatypes/bellatrix import ExecutionAddress
1514
from ".."/datatypes/capella import SignedBLSToExecutionChange
1615
from ".."/datatypes/deneb import BlobsBundle, KzgCommitments
1716
from ".."/datatypes/electra import
@@ -20,7 +19,7 @@ from ".."/eth2_merkleization import hash_tree_root
2019

2120
type
2221
BuilderBid* = object
23-
header*: ExecutionPayloadHeader
22+
header*: fulu.ExecutionPayloadHeader
2423
blob_kzg_commitments*: KzgCommitments
2524
execution_requests*: ExecutionRequests # [New in Electra]
2625
value*: UInt256
@@ -42,7 +41,7 @@ type
4241
deposits*: List[Deposit, Limit MAX_DEPOSITS]
4342
voluntary_exits*: List[SignedVoluntaryExit, Limit MAX_VOLUNTARY_EXITS]
4443
sync_aggregate*: SyncAggregate
45-
execution_payload_header*: ExecutionPayloadHeader
44+
execution_payload_header*: fulu.ExecutionPayloadHeader
4645
bls_to_execution_changes*:
4746
List[SignedBLSToExecutionChange,
4847
Limit MAX_BLS_TO_EXECUTION_CHANGES]
@@ -72,7 +71,7 @@ type
7271

7372
# Not spec, but suggested by spec
7473
BlindedExecutionPayloadAndBlobsBundle* = object
75-
execution_payload_header*: ExecutionPayloadHeader
74+
execution_payload_header*: fulu.ExecutionPayloadHeader
7675
blob_kzg_commitments*: KzgCommitments # [New in Deneb]
7776

7877
func shortLog*(v: BlindedBeaconBlock): auto =
@@ -122,7 +121,7 @@ func toSignedBlindedBeaconBlock*(blck: fulu.SignedBeaconBlock):
122121
deposits: blck.message.body.deposits,
123122
voluntary_exits: blck.message.body.voluntary_exits,
124123
sync_aggregate: blck.message.body.sync_aggregate,
125-
execution_payload_header: ExecutionPayloadHeader(
124+
execution_payload_header: fulu.ExecutionPayloadHeader(
126125
parent_hash: blck.message.body.execution_payload.parent_hash,
127126
fee_recipient: blck.message.body.execution_payload.fee_recipient,
128127
state_root: blck.message.body.execution_payload.state_root,

0 commit comments

Comments
 (0)