Skip to content

Commit

Permalink
rename to custody game
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Mar 27, 2021
1 parent 5e186fc commit 2bc3e81
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 66 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Mainnet preset - Proof of Custody
# Mainnet preset - Custody Game

# Time parameters
# ---------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Minimal preset - Proof of Custody
# Minimal preset - Custody Game

# Time parameters
# ---------------------------------------------------------------
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/core/pyspec/eth2spec/test/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def reload_specs():
# 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)
Expand Down Expand Up @@ -357,7 +357,7 @@ def wrapper(*args, **kw):
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
Expand All @@ -383,6 +383,6 @@ def wrapper(*args, spec: Spec, **kw):
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from eth2spec.test.context import (
PROOF_OF_CUSTODY,
CUSTODY_GAME,
with_phases,
spec_state_test,
always_bls,
Expand All @@ -12,7 +12,7 @@
)


@with_phases([PROOF_OF_CUSTODY])
@with_phases([CUSTODY_GAME])
@spec_state_test
@always_bls
def test_on_time_success(spec, state):
Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
)
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,
Expand Down Expand Up @@ -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
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
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,
Expand Down Expand Up @@ -112,39 +112,39 @@ 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")
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")
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")
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")
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")
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
)
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,
Expand All @@ -16,7 +16,7 @@
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,
)

Expand All @@ -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):
Expand Down
Loading

0 comments on commit 2bc3e81

Please sign in to comment.