most_recent_confirmed_commitments -> grantparent_epoch_confirmed_commitments
This commit is contained in:
parent
f44b7ffe48
commit
41f97162d6
|
@ -150,7 +150,7 @@ class BeaconState(phase0.BeaconState):
|
||||||
# New fields
|
# New fields
|
||||||
current_epoch_pending_shard_headers: List[PendingShardHeader, MAX_SHARD_HEADERS * SLOTS_PER_EPOCH]
|
current_epoch_pending_shard_headers: List[PendingShardHeader, MAX_SHARD_HEADERS * SLOTS_PER_EPOCH]
|
||||||
previous_epoch_pending_shard_headers: List[PendingShardHeader, MAX_SHARD_HEADERS * SLOTS_PER_EPOCH]
|
previous_epoch_pending_shard_headers: List[PendingShardHeader, MAX_SHARD_HEADERS * SLOTS_PER_EPOCH]
|
||||||
most_recent_confirmed_commitments: Vector[Vector[DataCommitment, SLOTS_PER_EPOCH], MAX_SHARDS]
|
grandparent_epoch_confirmed_commitments: Vector[Vector[DataCommitment, SLOTS_PER_EPOCH], MAX_SHARDS]
|
||||||
shard_gasprice: uint64
|
shard_gasprice: uint64
|
||||||
current_epoch_start_shard: Shard
|
current_epoch_start_shard: Shard
|
||||||
```
|
```
|
||||||
|
@ -591,10 +591,10 @@ def process_pending_headers(state: BeaconState):
|
||||||
candidates[winning_index].confirmed = True
|
candidates[winning_index].confirmed = True
|
||||||
for slot in range(SLOTS_PER_EPOCH):
|
for slot in range(SLOTS_PER_EPOCH):
|
||||||
for shard in range(SHARD_COUNT):
|
for shard in range(SHARD_COUNT):
|
||||||
state.most_recent_confirmed_commitments[shard][slot] = DataCommitment()
|
state.grandparent_epoch_confirmed_commitments[shard][slot] = DataCommitment()
|
||||||
for c in state.previous_epoch_pending_shard_headers:
|
for c in state.previous_epoch_pending_shard_headers:
|
||||||
if c.confirmed:
|
if c.confirmed:
|
||||||
state.most_recent_confirmed_commitments[c.shard][c.slot % SLOTS_PER_EPOCH] = c.commitment
|
state.grandparent_epoch_confirmed_commitments[c.shard][c.slot % SLOTS_PER_EPOCH] = c.commitment
|
||||||
```
|
```
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
|
@ -27,7 +27,7 @@ def get_new_dependencies(state: BeaconState) -> Set[DataCommitment]:
|
||||||
# Already confirmed during previous epoch
|
# Already confirmed during previous epoch
|
||||||
[c.commitment for c in state.previous_epoch_pending_headers if c.confirmed] +
|
[c.commitment for c in state.previous_epoch_pending_headers if c.confirmed] +
|
||||||
# Confirmed in the epoch before the previous
|
# Confirmed in the epoch before the previous
|
||||||
[c for c in shard for shard in state.most_recent_confirmed_commitments if c != DataCommitment()]
|
[c for c in shard for shard in state.grandparent_epoch_confirmed_commitments if c != DataCommitment()]
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue