Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custody punishments & period staggering Take 2 #934

Closed
wants to merge 10 commits into from
Closed

Conversation

CarlBeek
Copy link
Contributor

This PR implements the following (and supersedes my previous attempt #872):

  • Forced timely key reveals Validators who have not revealed by the end of their reveal period are slashed.
  • Staggers reveal periods Reveal periods are deterministically staggered by taking the validator_index%EPOCHS_PER_CUSTODY_PERIOD.
  • max_reveal_lateness is gradually reduced for timely responses

Hereby items 6 and 8 from #864 are addressed.

* dev: (108 commits)
  Update scripts/phase0/function_puller.py
  Update sync_protocol.md
  Update simple-serialize.md
  implement assertion sanity check suggested in PR
  fix argument typing for auxilary transition func
  Update test_generators/ssz/main.py
  Update test_libs/config_helpers/README.md
  Update test_generators/ssz/uint_test_cases.py
  Update test_generators/ssz/main.py
  Update test_generators/ssz/renderers.py
  Update test_generators/operations/deposits.py
  Update test_generators/operations/README.md
  Update test_generators/operations/README.md
  Update test_generators/README.md
  Update specs/test_formats/shuffling/README.md
  Update specs/test_formats/operations/deposits.md
  forks coverage description cleanup
  Update test_generators/README.md
  Update test_generators/README.md
  cleanup deposit tests
  ...
@vbuterin
Copy link
Contributor

Would it make sense to just merge in the proposal to make the custody key be the RANDAO 2 periods in the future (#880) into this PR?

So CustodyKeyReveal would be removed, it would just be RandaoReveal, and the masked reveal clause would have two sub-clauses, a partial penalty if the reveal is early by less than 2 custody periods, and a slashing if the reveal is early by more than 2 custody periods.

@@ -251,7 +274,7 @@ def verify_custody_key(state: BeaconState, reveal: CustodyKeyReveal) -> bool:
signature=reveal.key,
domain=get_domain(
fork=state.fork,
epoch=reveal.period * EPOCHS_PER_CUSTODY_PERIOD,
epoch=reveal.period * EPOCHS_PER_CUSTODY_PERIOD + reveal.revealer_index % EPOCHS_PER_CUSTODY_PERIOD,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a mistake (no need to change this line)

# Conflicts:
#	specs/core/1_custody-game.md
@dankrad
Copy link
Contributor

dankrad commented Apr 29, 2019

I would suggest closing this in favour of #880, where I made an attempt to merge all the changes suggested here

@CarlBeek
Copy link
Contributor Author

This has been incorporated into #880 and thus is no longer relevant.

@CarlBeek CarlBeek closed this Apr 30, 2019
@CarlBeek CarlBeek deleted the carl-patch-0 branch June 18, 2019 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants