rename to custody game
This commit is contained in:
parent
5e186fc136
commit
2bc3e814b0
|
@ -50,9 +50,9 @@ Sharding follows the merge, and is divided into three parts:
|
|||
* Sharding base functionality - In early engineering phase
|
||||
* [Beacon Chain changes](specs/sharding/beacon-chain.md)
|
||||
* [P2P Network changes](specs/sharding/p2p-interface.md)
|
||||
* Proof of Custody - Ready, dependent on sharding
|
||||
* [Custody Game](specs/proof_of_custody/custody-game.md)
|
||||
* [Validator custody work](specs/proof_of_custody/validator.md)
|
||||
* Custody Game - Ready, dependent on sharding
|
||||
* [Custody Game](specs/custody_game/custody-game.md)
|
||||
* [Validator custody work](specs/custody_game/validator.md)
|
||||
* Data Availability Sampling - In active R&D
|
||||
* Technical details [here](https://hackmd.io/@HWeNw8hNRimMm2m2GH56Cw/B1YJPGkpD).
|
||||
* [Core types and functions](specs/das/das-core.md)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Mainnet preset - Proof of Custody
|
||||
# Mainnet preset - Custody Game
|
||||
|
||||
# Time parameters
|
||||
# ---------------------------------------------------------------
|
|
@ -1,4 +1,4 @@
|
|||
# Minimal preset - Proof of Custody
|
||||
# Minimal preset - Custody Game
|
||||
|
||||
# Time parameters
|
||||
# ---------------------------------------------------------------
|
|
@ -32,7 +32,7 @@ ALTAIR = SpecForkName('altair')
|
|||
# Experimental phases (not included in default "ALL_PHASES"):
|
||||
MERGE = SpecForkName('merge')
|
||||
SHARDING = SpecForkName('sharding')
|
||||
PROOF_OF_CUSTODY = SpecForkName('proof_of_custody')
|
||||
CUSTODY_GAME = SpecForkName('custody_game')
|
||||
DAS = SpecForkName('das')
|
||||
|
||||
ALL_PHASES = (PHASE0, ALTAIR)
|
||||
|
@ -357,7 +357,7 @@ def with_phases(phases, other_phases=None):
|
|||
if ALTAIR in run_phases:
|
||||
ret = fn(spec=spec_altair, phases=phase_dir, *args, **kw)
|
||||
|
||||
# TODO: merge, sharding, proof_of_custody and das are not executable yet.
|
||||
# TODO: merge, sharding, custody_game and das are not executable yet.
|
||||
# Tests that specify these features will not run, and get ignored for these specific phases.
|
||||
return ret
|
||||
return wrapper
|
||||
|
@ -383,6 +383,6 @@ def with_configs(configs, reason=None):
|
|||
def is_post_altair(spec):
|
||||
# TODO: everything runs in parallel to Altair.
|
||||
# After features are rebased on the Altair fork, this can be reduced to just PHASE0.
|
||||
if spec.fork in [PHASE0, MERGE, SHARDING, PROOF_OF_CUSTODY, DAS]:
|
||||
if spec.fork in [PHASE0, MERGE, SHARDING, CUSTODY_GAME, DAS]:
|
||||
return False
|
||||
return True
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from eth2spec.test.context import (
|
||||
PROOF_OF_CUSTODY,
|
||||
CUSTODY_GAME,
|
||||
with_phases,
|
||||
spec_state_test,
|
||||
always_bls,
|
||||
|
@ -12,7 +12,7 @@ from eth2spec.test.helpers.attestations import (
|
|||
)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_on_time_success(spec, state):
|
||||
|
@ -23,7 +23,7 @@ def test_on_time_success(spec, state):
|
|||
yield from run_attestation_processing(spec, state, attestation)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_late_success(spec, state):
|
|
@ -8,7 +8,7 @@ from eth2spec.test.helpers.attestations import (
|
|||
)
|
||||
from eth2spec.test.helpers.state import transition_to, transition_to_valid_shard_slot
|
||||
from eth2spec.test.context import (
|
||||
PROOF_OF_CUSTODY,
|
||||
CUSTODY_GAME,
|
||||
MINIMAL,
|
||||
expect_assertion_error,
|
||||
disable_process_reveal_deadlines,
|
||||
|
@ -68,7 +68,7 @@ def run_custody_chunk_response_processing(spec, state, custody_response, valid=T
|
|||
yield 'post', state
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
@disable_process_reveal_deadlines
|
||||
|
@ -92,7 +92,7 @@ def test_challenge_appended(spec, state):
|
|||
yield from run_chunk_challenge_processing(spec, state, challenge)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -118,7 +118,7 @@ def test_challenge_empty_element_replaced(spec, state):
|
|||
yield from run_chunk_challenge_processing(spec, state, challenge)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -144,7 +144,7 @@ def test_duplicate_challenge(spec, state):
|
|||
yield from run_chunk_challenge_processing(spec, state, challenge, valid=False)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -172,7 +172,7 @@ def test_second_challenge(spec, state):
|
|||
yield from run_chunk_challenge_processing(spec, state, challenge1)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -197,7 +197,7 @@ def test_multiple_epochs_custody(spec, state):
|
|||
yield from run_chunk_challenge_processing(spec, state, challenge)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -222,7 +222,7 @@ def test_many_epochs_custody(spec, state):
|
|||
yield from run_chunk_challenge_processing(spec, state, challenge)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -243,7 +243,7 @@ def test_off_chain_attestation(spec, state):
|
|||
yield from run_chunk_challenge_processing(spec, state, challenge)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -275,7 +275,7 @@ def test_custody_response(spec, state):
|
|||
yield from run_custody_chunk_response_processing(spec, state, custody_response)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -306,7 +306,7 @@ def test_custody_response_chunk_index_2(spec, state):
|
|||
yield from run_custody_chunk_response_processing(spec, state, custody_response)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -338,7 +338,7 @@ def test_custody_response_multiple_epochs(spec, state):
|
|||
yield from run_custody_chunk_response_processing(spec, state, custody_response)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
|
@ -1,6 +1,6 @@
|
|||
from eth2spec.test.helpers.custody import get_valid_custody_key_reveal
|
||||
from eth2spec.test.context import (
|
||||
PROOF_OF_CUSTODY,
|
||||
CUSTODY_GAME,
|
||||
with_phases,
|
||||
spec_state_test,
|
||||
expect_assertion_error,
|
||||
|
@ -39,7 +39,7 @@ def run_custody_key_reveal_processing(spec, state, custody_key_reveal, valid=Tru
|
|||
yield 'post', state
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_success(spec, state):
|
||||
|
@ -49,7 +49,7 @@ def test_success(spec, state):
|
|||
yield from run_custody_key_reveal_processing(spec, state, custody_key_reveal)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_reveal_too_early(spec, state):
|
||||
|
@ -58,7 +58,7 @@ def test_reveal_too_early(spec, state):
|
|||
yield from run_custody_key_reveal_processing(spec, state, custody_key_reveal, False)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_wrong_period(spec, state):
|
||||
|
@ -67,7 +67,7 @@ def test_wrong_period(spec, state):
|
|||
yield from run_custody_key_reveal_processing(spec, state, custody_key_reveal, False)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_late_reveal(spec, state):
|
||||
|
@ -77,7 +77,7 @@ def test_late_reveal(spec, state):
|
|||
yield from run_custody_key_reveal_processing(spec, state, custody_key_reveal)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_double_reveal(spec, state):
|
|
@ -10,7 +10,7 @@ from eth2spec.utils.ssz.ssz_typing import ByteList
|
|||
from eth2spec.test.helpers.state import get_balance, transition_to
|
||||
from eth2spec.test.context import (
|
||||
MINIMAL,
|
||||
PROOF_OF_CUSTODY,
|
||||
CUSTODY_GAME,
|
||||
with_phases,
|
||||
spec_state_test,
|
||||
expect_assertion_error,
|
||||
|
@ -112,7 +112,7 @@ def run_standard_custody_slashing_test(spec,
|
|||
yield from run_custody_slashing_processing(spec, state, slashing, valid=valid, correct=correct)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -120,7 +120,7 @@ def test_custody_slashing(spec, state):
|
|||
yield from run_standard_custody_slashing_test(spec, state)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -128,7 +128,7 @@ def test_incorrect_custody_slashing(spec, state):
|
|||
yield from run_standard_custody_slashing_test(spec, state, correct=False)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -136,7 +136,7 @@ def test_multiple_epochs_custody(spec, state):
|
|||
yield from run_standard_custody_slashing_test(spec, state, shard_lateness=spec.SLOTS_PER_EPOCH * 3)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
|
@ -144,7 +144,7 @@ def test_many_epochs_custody(spec, state):
|
|||
yield from run_standard_custody_slashing_test(spec, state, shard_lateness=spec.SLOTS_PER_EPOCH * 5)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@disable_process_reveal_deadlines
|
||||
@with_configs([MINIMAL], reason="too slow")
|
|
@ -1,7 +1,7 @@
|
|||
from eth2spec.test.helpers.custody import get_valid_early_derived_secret_reveal
|
||||
from eth2spec.test.helpers.state import next_epoch_via_block, get_balance
|
||||
from eth2spec.test.context import (
|
||||
PROOF_OF_CUSTODY,
|
||||
CUSTODY_GAME,
|
||||
with_phases,
|
||||
spec_state_test,
|
||||
expect_assertion_error,
|
||||
|
@ -41,7 +41,7 @@ def run_early_derived_secret_reveal_processing(spec, state, randao_key_reveal, v
|
|||
yield 'post', state
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_success(spec, state):
|
||||
|
@ -50,7 +50,7 @@ def test_success(spec, state):
|
|||
yield from run_early_derived_secret_reveal_processing(spec, state, randao_key_reveal)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@never_bls
|
||||
def test_reveal_from_current_epoch(spec, state):
|
||||
|
@ -59,7 +59,7 @@ def test_reveal_from_current_epoch(spec, state):
|
|||
yield from run_early_derived_secret_reveal_processing(spec, state, randao_key_reveal, False)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@never_bls
|
||||
def test_reveal_from_past_epoch(spec, state):
|
||||
|
@ -69,7 +69,7 @@ def test_reveal_from_past_epoch(spec, state):
|
|||
yield from run_early_derived_secret_reveal_processing(spec, state, randao_key_reveal, False)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_reveal_with_custody_padding(spec, state):
|
||||
|
@ -81,7 +81,7 @@ def test_reveal_with_custody_padding(spec, state):
|
|||
yield from run_early_derived_secret_reveal_processing(spec, state, randao_key_reveal, True)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@always_bls
|
||||
def test_reveal_with_custody_padding_minus_one(spec, state):
|
||||
|
@ -93,7 +93,7 @@ def test_reveal_with_custody_padding_minus_one(spec, state):
|
|||
yield from run_early_derived_secret_reveal_processing(spec, state, randao_key_reveal, True)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@never_bls
|
||||
def test_double_reveal(spec, state):
|
||||
|
@ -114,7 +114,7 @@ def test_double_reveal(spec, state):
|
|||
yield from run_early_derived_secret_reveal_processing(spec, state, randao_key_reveal2, False)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@never_bls
|
||||
def test_revealer_is_slashed(spec, state):
|
||||
|
@ -124,7 +124,7 @@ def test_revealer_is_slashed(spec, state):
|
|||
yield from run_early_derived_secret_reveal_processing(spec, state, randao_key_reveal, False)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@never_bls
|
||||
def test_far_future_epoch(spec, state):
|
|
@ -7,7 +7,7 @@ from eth2spec.test.helpers.attestations import (
|
|||
)
|
||||
from eth2spec.test.helpers.state import transition_to, transition_to_valid_shard_slot
|
||||
from eth2spec.test.context import (
|
||||
PROOF_OF_CUSTODY,
|
||||
CUSTODY_GAME,
|
||||
MINIMAL,
|
||||
spec_state_test,
|
||||
with_phases,
|
||||
|
@ -16,7 +16,7 @@ from eth2spec.test.context import (
|
|||
from eth2spec.test.phase0.block_processing.test_process_attestation import run_attestation_processing
|
||||
from eth2spec.test.helpers.epoch_processing import run_epoch_processing_with
|
||||
|
||||
from eth2spec.test.proof_of_custody.block_processing.test_process_chunk_challenge import (
|
||||
from eth2spec.test.custody_game.block_processing.test_process_chunk_challenge import (
|
||||
run_chunk_challenge_processing,
|
||||
)
|
||||
|
||||
|
@ -25,7 +25,7 @@ def run_process_challenge_deadlines(spec, state):
|
|||
yield from run_epoch_processing_with(spec, state, 'process_challenge_deadlines')
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
def test_validator_slashed_after_chunk_challenge(spec, state):
|
|
@ -1,5 +1,5 @@
|
|||
from eth2spec.test.context import (
|
||||
PROOF_OF_CUSTODY,
|
||||
CUSTODY_GAME,
|
||||
)
|
||||
from eth2spec.test.helpers.custody import (
|
||||
get_valid_chunk_challenge,
|
||||
|
@ -18,11 +18,11 @@ from eth2spec.test.context import (
|
|||
from eth2spec.test.phase0.block_processing.test_process_attestation import run_attestation_processing
|
||||
from eth2spec.test.helpers.epoch_processing import run_epoch_processing_with
|
||||
|
||||
from eth2spec.test.proof_of_custody.block_processing.test_process_chunk_challenge import (
|
||||
from eth2spec.test.custody_game.block_processing.test_process_chunk_challenge import (
|
||||
run_chunk_challenge_processing,
|
||||
run_custody_chunk_response_processing,
|
||||
)
|
||||
from eth2spec.test.proof_of_custody.block_processing.test_process_custody_key_reveal import (
|
||||
from eth2spec.test.custody_game.block_processing.test_process_custody_key_reveal import (
|
||||
run_custody_key_reveal_processing,
|
||||
)
|
||||
|
||||
|
@ -31,7 +31,7 @@ def run_process_custody_final_updates(spec, state):
|
|||
yield from run_epoch_processing_with(spec, state, 'process_custody_final_updates')
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
def test_validator_withdrawal_delay(spec, state):
|
||||
transition_to_valid_shard_slot(spec, state)
|
||||
|
@ -44,7 +44,7 @@ def test_validator_withdrawal_delay(spec, state):
|
|||
assert state.validators[0].withdrawable_epoch == spec.FAR_FUTURE_EPOCH
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
def test_validator_withdrawal_reenable_after_custody_reveal(spec, state):
|
||||
transition_to_valid_shard_slot(spec, state)
|
||||
|
@ -69,7 +69,7 @@ def test_validator_withdrawal_reenable_after_custody_reveal(spec, state):
|
|||
assert state.validators[0].withdrawable_epoch < spec.FAR_FUTURE_EPOCH
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
def test_validator_withdrawal_suspend_after_chunk_challenge(spec, state):
|
||||
transition_to_valid_shard_slot(spec, state)
|
||||
|
@ -118,7 +118,7 @@ def test_validator_withdrawal_suspend_after_chunk_challenge(spec, state):
|
|||
assert state.validators[validator_index].withdrawable_epoch == spec.FAR_FUTURE_EPOCH
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
def test_validator_withdrawal_resume_after_chunk_challenge_response(spec, state):
|
||||
transition_to_valid_shard_slot(spec, state)
|
|
@ -3,14 +3,14 @@ from eth2spec.test.helpers.custody import (
|
|||
)
|
||||
from eth2spec.test.helpers.state import transition_to
|
||||
from eth2spec.test.context import (
|
||||
PROOF_OF_CUSTODY,
|
||||
CUSTODY_GAME,
|
||||
MINIMAL,
|
||||
with_phases,
|
||||
with_configs,
|
||||
spec_state_test,
|
||||
)
|
||||
from eth2spec.test.helpers.epoch_processing import run_epoch_processing_with
|
||||
from eth2spec.test.proof_of_custody.block_processing.test_process_custody_key_reveal import (
|
||||
from eth2spec.test.custody_game.block_processing.test_process_custody_key_reveal import (
|
||||
run_custody_key_reveal_processing,
|
||||
)
|
||||
|
||||
|
@ -19,7 +19,7 @@ def run_process_challenge_deadlines(spec, state):
|
|||
yield from run_epoch_processing_with(spec, state, 'process_challenge_deadlines')
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
def test_validator_slashed_after_reveal_deadline(spec, state):
|
||||
|
@ -39,7 +39,7 @@ def test_validator_slashed_after_reveal_deadline(spec, state):
|
|||
assert state.validators[0].slashed == 1
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@with_configs([MINIMAL], reason="too slow")
|
||||
def test_validator_not_slashed_after_reveal(spec, state):
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Dict, Sequence
|
||||
|
||||
from eth2spec.test.context import (
|
||||
PROOF_OF_CUSTODY,
|
||||
CUSTODY_GAME,
|
||||
MINIMAL,
|
||||
with_phases,
|
||||
spec_state_test,
|
||||
|
@ -46,7 +46,7 @@ def run_beacon_block(spec, state, block, valid=True):
|
|||
#
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
def test_with_shard_transition_with_custody_challenge_and_response(spec, state):
|
||||
transition_to_valid_shard_slot(spec, state)
|
||||
|
@ -79,7 +79,7 @@ def test_with_shard_transition_with_custody_challenge_and_response(spec, state):
|
|||
yield from run_beacon_block(spec, state, block)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
@with_configs([MINIMAL])
|
||||
def test_custody_key_reveal(spec, state):
|
||||
|
@ -93,7 +93,7 @@ def test_custody_key_reveal(spec, state):
|
|||
yield from run_beacon_block(spec, state, block)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
def test_early_derived_secret_reveal(spec, state):
|
||||
transition_to_valid_shard_slot(spec, state)
|
||||
|
@ -104,7 +104,7 @@ def test_early_derived_secret_reveal(spec, state):
|
|||
yield from run_beacon_block(spec, state, block)
|
||||
|
||||
|
||||
@with_phases([PROOF_OF_CUSTODY])
|
||||
@with_phases([CUSTODY_GAME])
|
||||
@spec_state_test
|
||||
def test_custody_slashing(spec, state):
|
||||
transition_to_valid_shard_slot(spec, state)
|
|
@ -30,7 +30,7 @@ def get_process_calls(spec):
|
|||
# Merge
|
||||
'process_application_payload':
|
||||
lambda state, block: spec.process_application_payload(state, block.body),
|
||||
# Proof of custody
|
||||
# Custody Game
|
||||
'process_custody_game_operations':
|
||||
lambda state, block: spec.process_custody_game_operations(state, block.body),
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@ def get_process_calls(spec):
|
|||
'process_justification_and_finalization',
|
||||
'process_rewards_and_penalties',
|
||||
'process_registry_updates',
|
||||
'process_reveal_deadlines', # proof of custody
|
||||
'process_challenge_deadlines', # proof of custody
|
||||
'process_reveal_deadlines', # custody game
|
||||
'process_challenge_deadlines', # custody game
|
||||
'process_slashings',
|
||||
'process_pending_header.', # sharding
|
||||
'charge_confirmed_header_fees', # sharding
|
||||
|
|
Loading…
Reference in New Issue