diff --git a/specs/phase1/custody-game.md b/specs/phase1/custody-game.md index 8774dc337..8d9c89c56 100644 --- a/specs/phase1/custody-game.md +++ b/specs/phase1/custody-game.md @@ -516,12 +516,8 @@ def process_custody_slashing(state: BeaconState, signed_custody_slashing: Signed shard_transition = custody_slashing.shard_transition assert hash_tree_root(shard_transition) == attestation.data.shard_transition_root # Verify that the provided data matches the shard-transition - assert ( - hash_tree_root(custody_slashing.data) - == shard_transition.shard_data_roots[custody_slashing.data_index] - ) assert len(custody_slashing.data) == shard_transition.shard_block_lengths[custody_slashing.data_index] - + assert hash_tree_root(custody_slashing.data) == shard_transition.shard_data_roots[custody_slashing.data_index] # Verify existence and participation of claimed malefactor attesters = get_attesting_indices(state, attestation.data, attestation.aggregation_bits) assert custody_slashing.malefactor_index in attesters diff --git a/tests/core/pyspec/eth2spec/test/helpers/custody.py b/tests/core/pyspec/eth2spec/test/helpers/custody.py index c1e493931..162ca3263 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/custody.py +++ b/tests/core/pyspec/eth2spec/test/helpers/custody.py @@ -150,7 +150,7 @@ def get_valid_custody_chunk_response(spec, state, chunk_challenge, challenge_ind chunk_index = chunk_challenge.chunk_index leaf_index = chunk_index + 2**spec.CUSTODY_RESPONSE_DEPTH - serialized_length = (len(custody_data_block)).to_bytes(32, 'little') + serialized_length = len(custody_data_block).to_bytes(32, 'little') data_branch = build_proof(custody_data_block.get_backing().get_left(), leaf_index) + [serialized_length] return spec.CustodyChunkResponse(