move DepositReceipt, ExecutionLayerWithdrawalRequest to base

Preparation for EIP-7495 SSZ `StableContainer` which can only contain
immutable types in their fields.
This commit is contained in:
Etan Kissling 2024-05-26 15:12:29 +02:00
parent 0a0a27399b
commit 1384d7ee22
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
2 changed files with 19 additions and 19 deletions

View File

@ -224,6 +224,11 @@ type
CommitteeValidatorsBits* = BitList[Limit MAX_VALIDATORS_PER_COMMITTEE]
ElectraCommitteeValidatorsBits* =
BitList[Limit MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT]
AttestationCommitteeBits* = BitArray[MAX_COMMITTEES_PER_SLOT.int]
ForkDigest* = distinct array[4, byte]
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#forkdata
@ -389,6 +394,20 @@ type
address*: ExecutionAddress
amount*: Gwei
# https://github.com/ethereum/consensus-specs/blob/94a0b6c581f2809aa8aca4ef7ee6fbb63f9d74e9/specs/electra/beacon-chain.md#depositreceipt
DepositReceipt* = object
pubkey*: ValidatorPubKey
withdrawal_credentials*: Eth2Digest
amount*: Gwei
signature*: ValidatorSig
index*: uint64
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.2/specs/electra/beacon-chain.md#executionlayerwithdrawalrequest
ExecutionLayerWithdrawalRequest* = object
source_address*: ExecutionAddress
validator_pubkey*: ValidatorPubKey
amount*: Gwei
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.2/specs/capella/beacon-chain.md#historicalsummary
HistoricalSummary* = object
# `HistoricalSummary` matches the components of the phase0

View File

@ -49,14 +49,6 @@ const
NEXT_SYNC_COMMITTEE_GINDEX = 87.GeneralizedIndex # next_sync_committee
type
# https://github.com/ethereum/consensus-specs/blob/94a0b6c581f2809aa8aca4ef7ee6fbb63f9d74e9/specs/electra/beacon-chain.md#depositreceipt
DepositReceipt* = object
pubkey*: ValidatorPubKey
withdrawal_credentials*: Eth2Digest
amount*: Gwei
signature*: ValidatorSig
index*: uint64
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#indexedattestation
IndexedAttestation* = object
attesting_indices*:
@ -161,12 +153,6 @@ type
amount*: Gwei
withdrawable_epoch*: Epoch
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.2/specs/electra/beacon-chain.md#executionlayerwithdrawalrequest
ExecutionLayerWithdrawalRequest* = object
source_address*: ExecutionAddress
validator_pubkey*: ValidatorPubKey
amount*: Gwei
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.2/specs/electra/beacon-chain.md#consolidation
Consolidation* = object
source_index*: uint64
@ -593,11 +579,6 @@ type
root* {.dontSerialize.}: Eth2Digest # cached root of signed beacon block
ElectraCommitteeValidatorsBits* =
BitList[Limit MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT]
AttestationCommitteeBits* = BitArray[MAX_COMMITTEES_PER_SLOT.int]
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#attestation
Attestation* = object
aggregation_bits*: ElectraCommitteeValidatorsBits