Disable `process_reveal_deadlines` in the custody tests that have `EPOCHS_PER_CUSTODY_PERIOD`-long transition

This commit is contained in:
Hsiao-Wei Wang 2020-08-25 13:46:29 +08:00
parent 7eeb754f7d
commit 42f368c45c
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
2 changed files with 18 additions and 0 deletions

View File

@ -12,6 +12,7 @@ from eth2spec.test.context import (
with_all_phases_except,
spec_state_test,
expect_assertion_error,
disable_process_reveal_deadlines,
)
from eth2spec.test.phase0.block_processing.test_process_attestation import run_attestation_processing
@ -67,6 +68,7 @@ def run_custody_chunk_response_processing(spec, state, custody_response, valid=T
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_challenge_appended(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + 1) # Make len(offset_slots) == 1
@ -89,6 +91,7 @@ def test_challenge_appended(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_challenge_empty_element_replaced(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + 1) # Make len(offset_slots) == 1
@ -113,6 +116,7 @@ def test_challenge_empty_element_replaced(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_duplicate_challenge(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + 1) # Make len(offset_slots) == 1
@ -137,6 +141,7 @@ def test_duplicate_challenge(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_second_challenge(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + 1) # Make len(offset_slots) == 1
@ -163,6 +168,7 @@ def test_second_challenge(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_multiple_epochs_custody(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + spec.SLOTS_PER_EPOCH * 3)
@ -186,6 +192,7 @@ def test_multiple_epochs_custody(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_many_epochs_custody(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + spec.SLOTS_PER_EPOCH * 20)
@ -209,6 +216,7 @@ def test_many_epochs_custody(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_off_chain_attestation(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + spec.SLOTS_PER_EPOCH)
@ -228,6 +236,7 @@ def test_off_chain_attestation(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_custody_response(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + spec.SLOTS_PER_EPOCH)
@ -258,6 +267,7 @@ def test_custody_response(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_custody_response_chunk_index_2(spec, state):
transition_to(spec, state, state.slot + spec.SLOTS_PER_EPOCH)
@ -287,6 +297,7 @@ def test_custody_response_chunk_index_2(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_custody_response_multiple_epochs(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + spec.SLOTS_PER_EPOCH * 3)
@ -317,6 +328,7 @@ def test_custody_response_multiple_epochs(spec, state):
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_custody_response_many_epochs(spec, state):
transition_to_valid_shard_slot(spec, state)
transition_to(spec, state, state.slot + spec.SLOTS_PER_EPOCH * 20)

View File

@ -13,6 +13,7 @@ from eth2spec.test.context import (
with_all_phases_except,
spec_state_test,
expect_assertion_error,
disable_process_reveal_deadlines,
)
from eth2spec.test.phase0.block_processing.test_process_attestation import run_attestation_processing
@ -106,30 +107,35 @@ def run_standard_custody_slashing_test(spec,
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_custody_slashing(spec, state):
yield from run_standard_custody_slashing_test(spec, state)
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_incorrect_custody_slashing(spec, state):
yield from run_standard_custody_slashing_test(spec, state, correct=False)
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_multiple_epochs_custody(spec, state):
yield from run_standard_custody_slashing_test(spec, state, shard_lateness=spec.SLOTS_PER_EPOCH * 3)
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_many_epochs_custody(spec, state):
yield from run_standard_custody_slashing_test(spec, state, shard_lateness=spec.SLOTS_PER_EPOCH * 5)
@with_all_phases_except([PHASE0])
@spec_state_test
@disable_process_reveal_deadlines
def test_invalid_custody_slashing(spec, state):
yield from run_standard_custody_slashing_test(
spec,