update sharding p2p doc

This commit is contained in:
protolambda 2021-03-18 00:53:55 +01:00
parent 0b8e3aee44
commit 8542d349bf
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623

View File

@ -23,27 +23,27 @@
## Introduction
With Phase 1, shard data is introduced, which requires various new additions and adjustments to the groundwork that Phase 0 implements.
The specification of these changes continues in the same format, and assumes Phase0 as pre-requisite.
The Phase 0 adjustments and additions for Shards are outlined in this document.
The specification of these changes continues in the same format as the [Phase0](../phase0/p2p-interface.md) and
[Altair](../altair/p2p-interface.md) network specifications, and assumes them as pre-requisite.
The adjustments and additions for Shards are outlined in this document.
## New containers
### ShardBlob
The blob of data, effectively a block. Network-only.
Network-only.
```python
class ShardBlob(Container):
# Slot and shard that this blob is intended for
slot: Slot
shard: Shard
# The actual data
# The actual data. Represented in header as data commitment and degree proof
data: List[BLSPoint, POINTS_PER_SAMPLE * MAX_SAMPLES_PER_BLOCK]
```
Note that the hash-tree-root of the `ShardBlob` does not match the `ShardHeader`,
since the blob deals with full data, whereas the header includes the KZG commitment instead.
since the blob deals with full data, whereas the header includes the KZG commitment and degree proof instead.
### SignedShardBlob
@ -51,7 +51,7 @@ Network-only.
```python
class SignedShardBlob(Container):
blob: ShardBlob
message: ShardBlob
# The signature, the message is the commitment on the blob
signature: BLSSignature
```