From 24427947b17060623047fca2fbc0b49d8b636fe7 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Tue, 2 Jun 2020 08:09:43 -0700 Subject: [PATCH] Moved transition_digest to last --- specs/phase1/shard-transition.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specs/phase1/shard-transition.md b/specs/phase1/shard-transition.md index f9de34b31..e6221a980 100644 --- a/specs/phase1/shard-transition.md +++ b/specs/phase1/shard-transition.md @@ -77,17 +77,17 @@ def shard_state_transition(beacon_state: BeaconState, shard_state.slot = block.slot prev_gasprice = shard_state.gasprice shard_state.gasprice = compute_updated_gasprice(prev_gasprice, len(block.body)) + if len(block.body) == 0: + latest_block_root = shard_state.latest_block_root + else: + latest_block_root = hash_tree_root(block) + shard_state.latest_block_root = latest_block_root shard_state.transition_digest = compute_shard_transition_digest( beacon_state, shard_state, block.beacon_parent_root, hash_tree_root(block.body), ) - if len(block.body) == 0: - latest_block_root = shard_state.latest_block_root - else: - latest_block_root = hash_tree_root(block) - shard_state.latest_block_root = latest_block_root ``` We have a pure function `get_post_shard_state` for describing the fraud proof verification and honest validator behavior.