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

[WIP] New shard proposal #1427

Open
wants to merge 47 commits into
base: dev
from

Conversation

@vbuterin
Copy link
Contributor

vbuterin commented Oct 12, 2019

Still very incomplete and being worked on.

Known TODOs:

  • Flesh out fraud proofs into a complete specification
@vbuterin vbuterin changed the title Added new shards [WIP] New shard proposal Oct 12, 2019
@hwwhww hwwhww added the phase 1 label Oct 12, 2019
vbuterin added 4 commits Oct 12, 2019
@ethereum ethereum deleted a comment from Good2no1 Oct 15, 2019
vbuterin and others added 8 commits Oct 27, 2019
Copy link
Contributor

djrtwo left a comment

Great start! We'll need a little bit of back and forth on cleaning up and figuring out how to best integrate this as an executable extension to Phase 0.

Take a look at the more question focused items at least.
From there I can do a round of cleanup

specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
vbuterin and others added 6 commits Nov 1, 2019
Copy link
Contributor

hwwhww left a comment

👍👍
First look before going to bed. 👀

specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
vbuterin and others added 2 commits Nov 5, 2019
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
vbuterin and others added 7 commits Nov 5, 2019
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
vbuterin and others added 8 commits Nov 5, 2019
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
```python
class ShardState(Container):
slot: Slot
gasprice: Gwei

This comment has been minimized.

Copy link
@hwwhww

hwwhww Nov 6, 2019

Contributor

Need to set initial gasprice value.

specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Show resolved Hide resolved
# Type 2: delayed attestations
else:
assert state.slot - slot_to_epoch(data.slot) < EPOCH_LENGTH
assert data.shard_transition_root == Hash()

This comment has been minimized.

Copy link
@hwwhww

hwwhww Nov 6, 2019

Contributor
  • Is it a kind of reduced form of attestation data?
  • If so, does that mean the late attesters have to rebuild AttestationData of the old slot with empty custody_bits and shard_transition_root, and broadcast it?
  • It seems the proposer can help transform ReducedAttestation in the previous version?

This comment has been minimized.

Copy link
@vbuterin

vbuterin Nov 12, 2019

Author Contributor

Yes, it's a reduced form, and late attesters do have to rebroadcast.

Copy link
Contributor

djrtwo left a comment

I think the approach here is reasonable. I'm on board from a high level perspective. We'll need many cleanups and testing to get where we're ultimately going.

I can take a pass on getting the linter happy and a couple of sanity tests running after you address @hwwhww's comments

specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
specs/core/1_new_shards.md Outdated Show resolved Hide resolved
### Epoch transition

```python
def phase_1_epoch_transition(state: BeaconState) -> None:

This comment has been minimized.

Copy link
@djrtwo

djrtwo Nov 6, 2019

Contributor

These are additional functions to the existing epoch transition?

This comment has been minimized.

Copy link
@djrtwo

djrtwo Nov 6, 2019

Contributor

We really need to figure out the build process.
This spec currently has 3 different approaches to modifying phase 0

  • function/container replacement and modifications
  • field addition to containers
  • additional functions for epoch/block processing
vbuterin and others added 6 commits Nov 6, 2019
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
vbuterin added 2 commits Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.