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

Add seed domains #1415

Merged
merged 4 commits into from
Sep 23, 2019
Merged

Add seed domains #1415

merged 4 commits into from
Sep 23, 2019

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Sep 23, 2019

This PR reuses domain types for seeds (in addition to signatures) to isolate the source of randomness for different functions. The motivating factor was to cleanly prevent phase 1 persistent committees from colliding with phase 0 crosslink committees once per PERSISTENT_COMMITTEE_PERIOD.

ACTIVATION_EXIT_DELAY was also changed to MAX_SEED_LOOKAHEAD to be more generic and descriptive in its phase 1 usage. Also note that MAX_SEED_LOOKAHEAD will increase with VDF-based randomness.

1) Put `domain_type` and `epoch` upfront. This pattern can be reused for signature domains.
2) Change `int_to_bytes(epoch, length=32)` to `int_to_bytes(epoch, length=8)` to match `uint64` length.
@djrtwo djrtwo mentioned this pull request Sep 23, 2019
specs/core/0_beacon-chain.md Show resolved Hide resolved
specs/core/1_shard-data-chains.md Outdated Show resolved Hide resolved
@djrtwo
Copy link
Contributor Author

djrtwo commented Sep 23, 2019

@JustinDrake See review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants