-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Remove Shards/Crosslinks from Phase 0 #1428
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far. Crosschecked by implementing the changes in this Prysm branch. Able to build beacon node & validator client binaries. Haven't tested run time yet
what's the timeline for this? do we plan to roll this out for the next release? : ) |
@terencechain, Made a few minor changes today. Still check out on your end?
Discussing this now. Want to get this out asap, but also want to keep things moving forward smoothly on the client/testnet side of things |
I'm loving the cleaner separation between phase 0 and phase 1 👍 Minor comments:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phase 1 documents reference crosslinks still. What is the plan there, leave it as-is till we have "packages" (or a new form of crosslink) for phase 1? In that case we should add a note to top of the documents, and maybe refer to an issue/PR for open discussion.
|
37bdc1e
to
d5a2535
Compare
@JustinDrake @protolambda @hwwhww @terencechain |
94a9868
to
a11b012
Compare
Co-Authored-By: Cayman <caymannava@gmail.com>
@@ -878,61 +855,37 @@ def get_seed(state: BeaconState, epoch: Epoch, domain_type: DomainType) -> Hash: | |||
return hash(domain_type + int_to_bytes(epoch, length=8) + mix) | |||
``` | |||
|
|||
#### `get_committee_count` | |||
#### `get_committee_count_at_slot` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is not in the ToC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, thanks. need to re-run ToC generator
specs/core/0_beacon-chain.md
Outdated
@@ -69,7 +68,7 @@ | |||
- [`compute_shuffled_index`](#compute_shuffled_index) | |||
- [`compute_proposer_index`](#compute_proposer_index) | |||
- [`compute_committee`](#compute_committee) | |||
- [`compute_epoch_of_slot`](#compute_epoch_of_slot) | |||
- [`compute_epoch_at_slot`](#compute_epoch_at_slot) | |||
- [`compute_start_slot_of_epoch`](#compute_start_slot_of_epoch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be compute_start_slot_at_epoch
for consistency with compute_epoch_at_slot
, get_block_root_at_slot
and get_committee_count_at_slot
.
|
@terencechain, yes. I've currently disabled phase 1 CI as most of it needs to be revamped. Prioritizing getting the phase 0 things out and then we'll circle back to get the phase 1 spec in place |
Great. Thank you |
In light of discussions around the alternate phase 1 proposal, this PR removes the notion of Shard and Crosslink entirely from Phase 0 to allow for (1) a clean slate to design phase 1 on top of and (2) to enable client implementers to keep moving forward on phase 0 testnets.
Crosslink
,AttestationData.crosslink
,BeaconState.start_shard
,process_crosslinks
,get_crosslink_deltas
, etc)CrosslinkIndex
,AttestationData.index
, andMAX_COMMITTEES_PER_SLOT
. This indexes committees on a per-slot basis. The notion of Shard will map on top of this in phase 1.slot
toAttestationData
. Required in this new context because with the removalshard
, we can't reverse engineer the slot. Also we've been planning on doing this anyway.SECONDS_PER_SLOT
from6
to12
-- more events will occur per slot in these modified proposals so 12 to be conservationSLOTS_PER_EPOCH
from64
to32
-- reduction of 64 to 32 here keeps epochs at 6 minutes and also help with crosslink committee sizes (wrtTARGET_COMMITTEE_SIZE
)BASE_REWARDS_PER_EPOCH
from5
to4
-- adjustment due to the removal of crosslinks. keeps rewards constantMAX_VALIDATORS_PER_COMMITTEE
to2048
--TOTAL_ETH_SUPPLY // ETH_PER_VALIDATOR // SLOTS_PER_EPOCH // MAX_COMMITTEES_PER_SLOT
--2**27 // 32 // 32 // 64