From dcacb7164f812d1a7161f956615a5123ed266202 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Tue, 3 Jan 2023 21:50:06 +0800 Subject: [PATCH] Rename `block_batch_root` to `block_summary_root` and `state_batch_root` to `state_summary_root` --- specs/capella/beacon-chain.md | 8 ++++---- .../test_process_historical_batches_update.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specs/capella/beacon-chain.md b/specs/capella/beacon-chain.md index 5d322ca92..bd7a2c50c 100644 --- a/specs/capella/beacon-chain.md +++ b/specs/capella/beacon-chain.md @@ -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 @@ -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) ``` diff --git a/tests/core/pyspec/eth2spec/test/capella/epoch_processing/test_process_historical_batches_update.py b/tests/core/pyspec/eth2spec/test/capella/epoch_processing/test_process_historical_batches_update.py index 16620b38d..f1f8292eb 100644 --- a/tests/core/pyspec/eth2spec/test/capella/epoch_processing/test_process_historical_batches_update.py +++ b/tests/core/pyspec/eth2spec/test/capella/epoch_processing/test_process_historical_batches_update.py @@ -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()