diff --git a/test_libs/pyspec/eth2spec/test/phase_1/shard_data_chain/test_beacon_attestation.py b/test_libs/pyspec/eth2spec/test/phase_1/shard_data_chain/test_beacon_attestation.py deleted file mode 100644 index aface905b..000000000 --- a/test_libs/pyspec/eth2spec/test/phase_1/shard_data_chain/test_beacon_attestation.py +++ /dev/null @@ -1,48 +0,0 @@ -from eth2spec.test.context import ( - with_all_phases_except, - spec_state_test, - always_bls, -) -from eth2spec.test.helpers.phase1.shard_block import ( - build_empty_shard_block, -) -from eth2spec.test.helpers.attestations import get_valid_attestation - - -@with_all_phases_except(['phase0']) -@always_bls -@spec_state_test -def test_process_empty_shard_block(spec, state): - beacon_state = state - - shard_slot = spec.PHASE_1_FORK_SLOT - beacon_state.slot = spec.Slot(spec.PHASE_1_FORK_EPOCH * spec.SLOTS_PER_EPOCH) - shard_state = spec.get_default_shard_state(beacon_state, shard=spec.Shard(0)) - shard_state.slot = shard_slot - - block = build_empty_shard_block( - spec, - shard_state, - beacon_state, - slot=shard_slot + 1, - parent_root=spec.Hash(), - signed=True, - full_attestation=True, - ) - - yield 'pre', shard_state - yield 'beacon_state', beacon_state - yield 'block', block - - beacon_attestation = get_valid_attestation(spec, beacon_state, signed=True) - yield 'beacon_attestation', beacon_attestation - - is_valid_beacon_attestation = spec.is_valid_beacon_attestation( - pre_state=shard_state, - shard_blocks_or_state_roots=(block,), - beacon_state=beacon_state, - valid_attestations=set([beacon_attestation]), - candidate=beacon_attestation, - ) - assert is_valid_beacon_attestation - yield 'is_valid_beacon_attestation', is_valid_beacon_attestation diff --git a/test_libs/pyspec/eth2spec/test/phase_1/shard_data_chain/test_shard_block.py b/test_libs/pyspec/eth2spec/test/phase_1/shard_data_chain/test_shard_block.py index b0d8ad5e6..6622c1940 100644 --- a/test_libs/pyspec/eth2spec/test/phase_1/shard_data_chain/test_shard_block.py +++ b/test_libs/pyspec/eth2spec/test/phase_1/shard_data_chain/test_shard_block.py @@ -11,8 +11,7 @@ from eth2spec.test.context import ( @with_all_phases_except(['phase0']) @spec_state_test @always_bls -def test_process_empty_shard_block(spec, state): - beacon_state = state +def test_process_empty_shard_block(spec, beacon_state): beacon_state.slot = spec.Slot(spec.SHARD_GENESIS_EPOCH * spec.SLOTS_PER_EPOCH) shard_state = spec.get_genesis_shard_state(spec.Shard(0)) shard_state.slot = spec.ShardSlot(spec.SHARD_GENESIS_EPOCH * spec.SHARD_SLOTS_PER_EPOCH) @@ -38,8 +37,7 @@ def test_process_empty_shard_block(spec, state): @with_all_phases_except(['phase0']) @spec_state_test @always_bls -def test_process_full_attestation_shard_block(spec, state): - beacon_state = state +def test_process_full_attestation_shard_block(spec, beacon_state): beacon_state.slot = spec.Slot(spec.SHARD_GENESIS_EPOCH * spec.SLOTS_PER_EPOCH) shard_state = spec.get_genesis_shard_state(spec.Shard(0)) shard_state.slot = spec.SHARD_GENESIS_EPOCH * spec.SHARD_SLOTS_PER_EPOCH