-
Notifications
You must be signed in to change notification settings - Fork 997
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
Attestation changes + persistent committee changes #1294
Conversation
vbuterin
commented
Jul 13, 2019
•
edited
Loading
edited
- Shard slots
- Attestation list -> single attestation
- One-day periods
- Committee simplification
@vbuterin Should this be reviewed, tests fixed, and merged? |
If we change |
Is there a discussion on why we want to change it to one day? Isn't that worse for light clients? |
See the "implementation alternative" section here #1293 The shard period (I'm proposing to rename "persistent committee period" to "shard period" because the former is waaaay too long) goes down to 1 day, but the committee size drops to 128, so on net it's still a savings for light clients. |
|
||
```python | ||
class ShardBlockHeader(Container): | ||
slot: Slot | ||
shard: Shard |
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.
I think we are losing value by removing shard
here by not being able to immediately recognize a shard block as being from a particular shard and instead just understanding it in the context of it's parent and the state (that must be calculated) related to the state_root
.
We still have 80 bytes to play with in ShardBlockCore
now that we have divided it into two 256-byte halves
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.
I can see that; I'd be ok with putting it back in (though we'd have to take it back out if we decide we want to add another slot as then we would exceed 8; or we could add slot offsets for different shards 😄)
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
@@ -75,207 +91,191 @@ The following types are defined, mapping into `DomainType` (little endian): | |||
|
|||
| Name | Value | | |||
| - | - | | |||
| `PLACEHOLDER` | `2**32` | | |||
| `PLACEHOLDER` | `2**3` | |
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.
| `PLACEHOLDER` | `2**3` | |
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.
And the whole ### TODO PLACEHOLDER
section.
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
@@ -75,207 +91,191 @@ The following types are defined, mapping into `DomainType` (little endian): | |||
|
|||
| Name | Value | | |||
| - | - | | |||
| `PLACEHOLDER` | `2**32` | | |||
| `PLACEHOLDER` | `2**3` | |
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.
And the whole ### TODO PLACEHOLDER
section.
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
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.
Needs more testing but we'll add that in iterative testing PRs
* Minimal attestation simplification * minor fix * Make the tests pass * Decrease `PLACEHOLDER`, Use `compute_epoch_of_shard_slot` * Fix proposer signature name and use get_seed() to calculate current_shuffling_seed * Fix linter error * Add the WIP `test_is_valid_shard_block` * Add `get_shard_block_attester_committee` * Simplified committee selection * Added some helpers and simplified * Update specs/core/1_shard-data-chains.md * Update 1_shard-data-chains.md * Simplified switchover epochs, changed block structure, changed crosslink structure * Update 1_shard-data-chains.md * Moved balance dependency to proposer selection * Update specs/core/1_shard-data-chains.md Co-Authored-By: Danny Ryan <dannyjryan@gmail.com> * Update specs/core/1_shard-data-chains.md Co-Authored-By: Danny Ryan <dannyjryan@gmail.com> * Update specs/core/1_shard-data-chains.md Co-Authored-By: Danny Ryan <dannyjryan@gmail.com> * Update specs/core/1_shard-data-chains.md Co-Authored-By: Danny Ryan <dannyjryan@gmail.com> * Update specs/core/1_shard-data-chains.md Co-Authored-By: Danny Ryan <dannyjryan@gmail.com> * Update specs/core/1_shard-data-chains.md Co-Authored-By: Danny Ryan <dannyjryan@gmail.com> * Update specs/core/1_shard-data-chains.md Co-Authored-By: Danny Ryan <dannyjryan@gmail.com> * Update specs/core/1_shard-data-chains.md * Fixed shard header flattening * Update specs/core/1_shard-data-chains.md * Minor fixes * Update specs/core/1_shard-data-chains.md * Update specs/core/1_shard-data-chains.md Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com> * cleanup testing and lint * return none if not active validators in persistent committee * only allow active validators as shard proposer