Merge branch 'dev' into lc-testsuite
This commit is contained in:
commit
0941114acf
|
@ -682,7 +682,7 @@ def process_sync_committee_updates(state: BeaconState) -> None:
|
||||||
|
|
||||||
This helper function is only for initializing the state for pure Altair testnets and tests.
|
This helper function is only for initializing the state for pure Altair testnets and tests.
|
||||||
|
|
||||||
*Note*: The function `initialize_beacon_state_from_eth1` is modified: (1) using `ALTAIR_FORK_VERSION` as the current fork version, (2) utilizing the Altair `BeaconBlockBody` when constructing the initial `latest_block_header`, and (3) adding initial sync committees.
|
*Note*: The function `initialize_beacon_state_from_eth1` is modified: (1) using `ALTAIR_FORK_VERSION` as the previous and current fork version, (2) utilizing the Altair `BeaconBlockBody` when constructing the initial `latest_block_header`, and (3) adding initial sync committees.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def initialize_beacon_state_from_eth1(eth1_block_hash: Hash32,
|
def initialize_beacon_state_from_eth1(eth1_block_hash: Hash32,
|
||||||
|
|
|
@ -399,7 +399,7 @@ def process_slashings(state: BeaconState) -> None:
|
||||||
|
|
||||||
*Note*: The function `initialize_beacon_state_from_eth1` is modified for pure Bellatrix testing only.
|
*Note*: The function `initialize_beacon_state_from_eth1` is modified for pure Bellatrix testing only.
|
||||||
Modifications include:
|
Modifications include:
|
||||||
1. Use `BELLATRIX_FORK_VERSION` as the current fork version.
|
1. Use `BELLATRIX_FORK_VERSION` as the previous and current fork version.
|
||||||
2. Utilize the Bellatrix `BeaconBlockBody` when constructing the initial `latest_block_header`.
|
2. Utilize the Bellatrix `BeaconBlockBody` when constructing the initial `latest_block_header`.
|
||||||
3. Initialize `latest_execution_payload_header`.
|
3. Initialize `latest_execution_payload_header`.
|
||||||
If `execution_payload_header == ExecutionPayloadHeader()`, then the Merge has not yet occurred.
|
If `execution_payload_header == ExecutionPayloadHeader()`, then the Merge has not yet occurred.
|
||||||
|
|
|
@ -495,7 +495,7 @@ def process_bls_to_execution_change(state: BeaconState,
|
||||||
|
|
||||||
*Note*: The function `initialize_beacon_state_from_eth1` is modified for pure Capella testing only.
|
*Note*: The function `initialize_beacon_state_from_eth1` is modified for pure Capella testing only.
|
||||||
Modifications include:
|
Modifications include:
|
||||||
1. Use `CAPELLA_FORK_VERSION` as the current fork version.
|
1. Use `CAPELLA_FORK_VERSION` as the previous and current fork version.
|
||||||
2. Utilize the Capella `BeaconBlockBody` when constructing the initial `latest_block_header`.
|
2. Utilize the Capella `BeaconBlockBody` when constructing the initial `latest_block_header`.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
@ -541,7 +541,6 @@ def initialize_beacon_state_from_eth1(eth1_block_hash: Hash32,
|
||||||
state.next_sync_committee = get_next_sync_committee(state)
|
state.next_sync_committee = get_next_sync_committee(state)
|
||||||
|
|
||||||
# Initialize the execution payload header
|
# Initialize the execution payload header
|
||||||
# If empty, will initialize a chain that has not yet gone through the Merge transition
|
|
||||||
state.latest_execution_payload_header = execution_payload_header
|
state.latest_execution_payload_header = execution_payload_header
|
||||||
|
|
||||||
return state
|
return state
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from eth2spec.test.helpers.constants import (
|
from eth2spec.test.helpers.constants import (
|
||||||
ALTAIR, BELLATRIX, CAPELLA, EIP4844,
|
ALTAIR, BELLATRIX, CAPELLA, EIP4844,
|
||||||
FORKS_BEFORE_ALTAIR, FORKS_BEFORE_BELLATRIX
|
FORKS_BEFORE_ALTAIR, FORKS_BEFORE_BELLATRIX,
|
||||||
)
|
)
|
||||||
from eth2spec.test.helpers.keys import pubkeys
|
from eth2spec.test.helpers.keys import pubkeys
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue