From 2bc3e814b0c6c085cf0af1a56fe17eb486e64969 Mon Sep 17 00:00:00 2001 From: protolambda Date: Sat, 27 Mar 2021 01:42:23 +0100 Subject: [PATCH] rename to custody game --- README.md | 6 ++--- ...roof_of_custody.yaml => custody_game.yaml} | 2 +- ...roof_of_custody.yaml => custody_game.yaml} | 2 +- .../custody-game.md | 0 .../validator.md | 0 tests/core/pyspec/eth2spec/test/context.py | 6 ++--- .../__init__.py | 0 .../block_processing/__init__.py | 0 .../test_process_attestation.py | 6 ++--- .../test_process_chunk_challenge.py | 24 +++++++++---------- .../test_process_custody_key_reveal.py | 12 +++++----- .../test_process_custody_slashing.py | 12 +++++----- ...est_process_early_derived_secret_reveal.py | 18 +++++++------- .../epoch_processing/__init__.py | 0 .../test_process_challenge_deadlines.py | 6 ++--- .../test_process_custody_final_updates.py | 14 +++++------ .../test_process_reveal_deadlines.py | 8 +++---- .../sanity/__init__.py | 0 .../sanity/test_blocks.py | 10 ++++---- .../eth2spec/test/helpers/block_processing.py | 2 +- .../eth2spec/test/helpers/epoch_processing.py | 4 ++-- 21 files changed, 66 insertions(+), 66 deletions(-) rename configs/mainnet/{proof_of_custody.yaml => custody_game.yaml} (97%) rename configs/minimal/{proof_of_custody.yaml => custody_game.yaml} (97%) rename specs/{proof_of_custody => custody_game}/custody-game.md (100%) rename specs/{proof_of_custody => custody_game}/validator.md (100%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/__init__.py (100%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/block_processing/__init__.py (100%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/block_processing/test_process_attestation.py (90%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/block_processing/test_process_chunk_challenge.py (97%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/block_processing/test_process_custody_key_reveal.py (93%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/block_processing/test_process_custody_slashing.py (96%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/block_processing/test_process_early_derived_secret_reveal.py (93%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/epoch_processing/__init__.py (100%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/epoch_processing/test_process_challenge_deadlines.py (93%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/epoch_processing/test_process_custody_final_updates.py (95%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/epoch_processing/test_process_reveal_deadlines.py (91%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/sanity/__init__.py (100%) rename tests/core/pyspec/eth2spec/test/{proof_of_custody => custody_game}/sanity/test_blocks.py (97%) diff --git a/README.md b/README.md index 290ca1084..8cb545cfa 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/configs/mainnet/proof_of_custody.yaml b/configs/mainnet/custody_game.yaml similarity index 97% rename from configs/mainnet/proof_of_custody.yaml rename to configs/mainnet/custody_game.yaml index eb299c621..ecb2dc377 100644 --- a/configs/mainnet/proof_of_custody.yaml +++ b/configs/mainnet/custody_game.yaml @@ -1,4 +1,4 @@ -# Mainnet preset - Proof of Custody +# Mainnet preset - Custody Game # Time parameters # --------------------------------------------------------------- diff --git a/configs/minimal/proof_of_custody.yaml b/configs/minimal/custody_game.yaml similarity index 97% rename from configs/minimal/proof_of_custody.yaml rename to configs/minimal/custody_game.yaml index 67394c35c..8b8992fb6 100644 --- a/configs/minimal/proof_of_custody.yaml +++ b/configs/minimal/custody_game.yaml @@ -1,4 +1,4 @@ -# Minimal preset - Proof of Custody +# Minimal preset - Custody Game # Time parameters # --------------------------------------------------------------- diff --git a/specs/proof_of_custody/custody-game.md b/specs/custody_game/custody-game.md similarity index 100% rename from specs/proof_of_custody/custody-game.md rename to specs/custody_game/custody-game.md diff --git a/specs/proof_of_custody/validator.md b/specs/custody_game/validator.md similarity index 100% rename from specs/proof_of_custody/validator.md rename to specs/custody_game/validator.md diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index f37829ee8..02968a266 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -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 diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/__init__.py b/tests/core/pyspec/eth2spec/test/custody_game/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/__init__.py rename to tests/core/pyspec/eth2spec/test/custody_game/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/__init__.py b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/__init__.py rename to tests/core/pyspec/eth2spec/test/custody_game/block_processing/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_attestation.py b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_attestation.py similarity index 90% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_attestation.py rename to tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_attestation.py index 1603d8f88..92633a8c5 100644 --- a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_attestation.py +++ b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_attestation.py @@ -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): diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_chunk_challenge.py b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_chunk_challenge.py similarity index 97% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_chunk_challenge.py rename to tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_chunk_challenge.py index 61e567504..69143812f 100644 --- a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_chunk_challenge.py +++ b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_chunk_challenge.py @@ -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") diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_custody_key_reveal.py b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_custody_key_reveal.py similarity index 93% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_custody_key_reveal.py rename to tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_custody_key_reveal.py index 64e207062..a825d7c75 100644 --- a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_custody_key_reveal.py +++ b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_custody_key_reveal.py @@ -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): diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_custody_slashing.py b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_custody_slashing.py similarity index 96% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_custody_slashing.py rename to tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_custody_slashing.py index 2765d2980..12ac708aa 100644 --- a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_custody_slashing.py +++ b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_custody_slashing.py @@ -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") diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_early_derived_secret_reveal.py b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_early_derived_secret_reveal.py similarity index 93% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_early_derived_secret_reveal.py rename to tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_early_derived_secret_reveal.py index fa8b045ac..d3da6c580 100644 --- a/tests/core/pyspec/eth2spec/test/proof_of_custody/block_processing/test_process_early_derived_secret_reveal.py +++ b/tests/core/pyspec/eth2spec/test/custody_game/block_processing/test_process_early_derived_secret_reveal.py @@ -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): diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/__init__.py b/tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/__init__.py rename to tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/test_process_challenge_deadlines.py b/tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/test_process_challenge_deadlines.py similarity index 93% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/test_process_challenge_deadlines.py rename to tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/test_process_challenge_deadlines.py index 516a761d1..f0e353cec 100644 --- a/tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/test_process_challenge_deadlines.py +++ b/tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/test_process_challenge_deadlines.py @@ -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): diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/test_process_custody_final_updates.py b/tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/test_process_custody_final_updates.py similarity index 95% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/test_process_custody_final_updates.py rename to tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/test_process_custody_final_updates.py index 4522c121a..acc076bce 100644 --- a/tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/test_process_custody_final_updates.py +++ b/tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/test_process_custody_final_updates.py @@ -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) diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/test_process_reveal_deadlines.py b/tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/test_process_reveal_deadlines.py similarity index 91% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/test_process_reveal_deadlines.py rename to tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/test_process_reveal_deadlines.py index 43078cd45..c82ebd8bb 100644 --- a/tests/core/pyspec/eth2spec/test/proof_of_custody/epoch_processing/test_process_reveal_deadlines.py +++ b/tests/core/pyspec/eth2spec/test/custody_game/epoch_processing/test_process_reveal_deadlines.py @@ -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): diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/sanity/__init__.py b/tests/core/pyspec/eth2spec/test/custody_game/sanity/__init__.py similarity index 100% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/sanity/__init__.py rename to tests/core/pyspec/eth2spec/test/custody_game/sanity/__init__.py diff --git a/tests/core/pyspec/eth2spec/test/proof_of_custody/sanity/test_blocks.py b/tests/core/pyspec/eth2spec/test/custody_game/sanity/test_blocks.py similarity index 97% rename from tests/core/pyspec/eth2spec/test/proof_of_custody/sanity/test_blocks.py rename to tests/core/pyspec/eth2spec/test/custody_game/sanity/test_blocks.py index b9afbc0eb..88dd54bda 100644 --- a/tests/core/pyspec/eth2spec/test/proof_of_custody/sanity/test_blocks.py +++ b/tests/core/pyspec/eth2spec/test/custody_game/sanity/test_blocks.py @@ -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) diff --git a/tests/core/pyspec/eth2spec/test/helpers/block_processing.py b/tests/core/pyspec/eth2spec/test/helpers/block_processing.py index e2dfcfe5b..676d8cb6d 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/block_processing.py +++ b/tests/core/pyspec/eth2spec/test/helpers/block_processing.py @@ -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), } diff --git a/tests/core/pyspec/eth2spec/test/helpers/epoch_processing.py b/tests/core/pyspec/eth2spec/test/helpers/epoch_processing.py index 4d508d0ce..3c47c4895 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/epoch_processing.py +++ b/tests/core/pyspec/eth2spec/test/helpers/epoch_processing.py @@ -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