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

Increase length of historical vectors #1109

Closed
wants to merge 1 commit into from
Closed

Conversation

JustinDrake
Copy link
Collaborator

@JustinDrake JustinDrake commented May 22, 2019

Address item 11 of #1054. This stores 8-month old historical start shards so that historical committees to be recomputed (e.g. for attester slashings).

Notice this makes slashing quite harsh:

state.validator_registry[slashed_index].withdrawable_epoch = current_epoch + EPOCHS_PER_HISTORICAL_VECTOR

Address item 11 of #1054. This stores 8-month old historical start shards so that historical committees to be recomputed (e.g. for attester slashings).
@djrtwo
Copy link
Contributor

djrtwo commented Jun 5, 2019

Two options to reduce slashing severity

  • Just use a different vector length for the slashing accumulation array
  • Do not use the entire array of history for calculating the total slashed in the period. Can make total_at_start be something like the following total_at_start = state.latest_slashed_balances[(current_epoch + EPOCHS_PER_HISTORICAL_VECTOR - EPOCHS_PER_SLASHING_PERIOD) % EPOCHS_PER_HISTORICAL_VECTOR]

@JustinDrake JustinDrake added the milestone:June 30 freeze 🥶 Phase 0 spec freeze for long-lived cross-client testnet label Jun 15, 2019
@vbuterin
Copy link
Contributor

Agree that we don't need to make slashing lead to an 8 month delay; probably best to keep the current ~36 days.

@djrtwo
Copy link
Contributor

djrtwo commented Jun 18, 2019

@JustinDrake What route do you want to go here?

@JustinDrake
Copy link
Collaborator Author

What route do you want to go here?

"Just use a different vector length for the slashing accumulation array" sounds fine :) (I'm at a zkSNARKs workshop this week—do you mind going ahead on this one?)

@djrtwo
Copy link
Contributor

djrtwo commented Jun 19, 2019

on it

@djrtwo
Copy link
Contributor

djrtwo commented Jun 19, 2019

closing in favor of #1196

@djrtwo djrtwo closed this Jun 19, 2019
@djrtwo djrtwo deleted the JustinDrake-patch-11 branch September 7, 2019 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
milestone:June 30 freeze 🥶 Phase 0 spec freeze for long-lived cross-client testnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants