mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-09 01:04:14 +00:00
Fix the default testing genesis by setting deposit_receipts_start_index
and fork versions
This commit is contained in:
parent
890f574c12
commit
8acc31adce
@ -51,7 +51,7 @@ CAPELLA_FORK_EPOCH: 194048 # April 12, 2023, 10:27:35pm UTC
|
||||
DENEB_FORK_VERSION: 0x04000000
|
||||
DENEB_FORK_EPOCH: 18446744073709551615
|
||||
# EIP6110
|
||||
EIP6110_FORK_VERSION: 0x04000001
|
||||
EIP6110_FORK_VERSION: 0x04000001 # temporary stub
|
||||
EIP6110_FORK_EPOCH: 18446744073709551615
|
||||
|
||||
|
||||
|
@ -204,7 +204,7 @@ def process_operations(state: BeaconState, body: BeaconBlockBody) -> None:
|
||||
for_ops(body.proposer_slashings, process_proposer_slashing)
|
||||
for_ops(body.attester_slashings, process_attester_slashing)
|
||||
for_ops(body.attestations, process_attestation)
|
||||
for_ops(body.deposits, process_deposit) # [Modified in EIP-6110]
|
||||
for_ops(body.deposits, process_deposit)
|
||||
for_ops(body.voluntary_exits, process_voluntary_exit)
|
||||
for_ops(body.bls_to_execution_changes, process_bls_to_execution_change)
|
||||
|
||||
|
@ -432,6 +432,7 @@ with_altair_and_later = with_all_phases_from(ALTAIR)
|
||||
with_bellatrix_and_later = with_all_phases_from(BELLATRIX)
|
||||
with_capella_and_later = with_all_phases_from(CAPELLA)
|
||||
with_deneb_and_later = with_all_phases_from(DENEB)
|
||||
with_eip6110_and_later = with_all_phases_from(EIP6110)
|
||||
|
||||
|
||||
def _get_preset_targets(kw):
|
||||
|
@ -1,11 +1,11 @@
|
||||
from eth2spec.test.helpers.constants import (
|
||||
ALTAIR, BELLATRIX, CAPELLA, DENEB,
|
||||
ALTAIR, BELLATRIX, CAPELLA, DENEB, EIP6110,
|
||||
)
|
||||
from eth2spec.test.helpers.execution_payload import (
|
||||
compute_el_header_block_hash,
|
||||
)
|
||||
from eth2spec.test.helpers.forks import (
|
||||
is_post_altair, is_post_bellatrix, is_post_capella,
|
||||
is_post_altair, is_post_bellatrix, is_post_capella, is_post_eip6110,
|
||||
)
|
||||
from eth2spec.test.helpers.keys import pubkeys
|
||||
|
||||
@ -80,6 +80,9 @@ def create_genesis_state(spec, validator_balances, activation_threshold):
|
||||
elif spec.fork == DENEB:
|
||||
previous_version = spec.config.CAPELLA_FORK_VERSION
|
||||
current_version = spec.config.DENEB_FORK_VERSION
|
||||
elif spec.fork == EIP6110:
|
||||
previous_version = spec.config.CAPELLA_FORK_VERSION
|
||||
current_version = spec.config.EIP6110_FORK_VERSION
|
||||
|
||||
state = spec.BeaconState(
|
||||
genesis_time=0,
|
||||
@ -129,4 +132,7 @@ def create_genesis_state(spec, validator_balances, activation_threshold):
|
||||
eth1_block_hash=eth1_block_hash,
|
||||
)
|
||||
|
||||
if is_post_eip6110(spec):
|
||||
state.deposit_receipts_start_index = spec.UNSET_DEPOSIT_RECEIPTS_START_INDEX
|
||||
|
||||
return state
|
||||
|
Loading…
x
Reference in New Issue
Block a user