Skip to content

Commit

Permalink
Rename block_batch_root to block_summary_root and `state_batch_ro…
Browse files Browse the repository at this point in the history
…ot` to `state_summary_root`
  • Loading branch information
hwwhww committed Jan 3, 2023
1 parent 1cfabcb commit dcacb71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions specs/capella/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ class HistoricalSummary(Container):
`HistoricalSummary` matches the components of the phase0 `HistoricalBatch`
making the two hash_tree_root-compatible.
"""
block_batch_root: Root
state_batch_root: Root
block_summary_root: Root
state_summary_root: Root
```

### Extended Containers
Expand Down Expand Up @@ -315,8 +315,8 @@ def process_historical_summaries_update(state: BeaconState) -> None:
next_epoch = Epoch(get_current_epoch(state) + 1)
if next_epoch % (SLOTS_PER_HISTORICAL_ROOT // SLOTS_PER_EPOCH) == 0:
historical_summary = HistoricalSummary(
block_batch_root=hash_tree_root(state.block_roots),
state_batch_root=hash_tree_root(state.state_roots),
block_summary_root=hash_tree_root(state.block_roots),
state_summary_root=hash_tree_root(state.state_roots),
)
state.historical_summaries.append(historical_summary)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ def test_historical_summaries_accumulator(spec, state):

assert len(state.historical_summaries) == len(pre_historical_summaries) + 1
summary = state.historical_summaries[len(state.historical_summaries) - 1]
assert summary.block_batch_root == state.block_roots.hash_tree_root()
assert summary.state_batch_root == state.state_roots.hash_tree_root()
assert summary.block_summary_root == state.block_roots.hash_tree_root()
assert summary.state_summary_root == state.state_roots.hash_tree_root()

0 comments on commit dcacb71

Please sign in to comment.