move shard blob types from das to sharding spec

This commit is contained in:
protolambda 2021-03-18 00:38:18 +01:00
parent 306fc95c60
commit 0b8e3aee44
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
2 changed files with 31 additions and 30 deletions

View File

@ -13,8 +13,6 @@
- [Misc](#misc) - [Misc](#misc)
- [New containers](#new-containers) - [New containers](#new-containers)
- [DASSample](#dassample) - [DASSample](#dassample)
- [ShardBlob](#shardblob)
- [SignedShardBlob](#signedshardblob)
- [Helper functions](#helper-functions) - [Helper functions](#helper-functions)
- [Reverse bit ordering](#reverse-bit-ordering) - [Reverse bit ordering](#reverse-bit-ordering)
- [`reverse_bit_order`](#reverse_bit_order) - [`reverse_bit_order`](#reverse_bit_order)
@ -59,34 +57,6 @@ class DASSample(Container):
data: Vector[BLSPoint, POINTS_PER_SAMPLE] data: Vector[BLSPoint, POINTS_PER_SAMPLE]
``` ```
### ShardBlob
The blob of data, effectively a block. Network-only.
```python
class ShardBlob(Container):
# Slot and shard that this blob is intended for
slot: Slot
shard: Shard
# The actual data
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.
### SignedShardBlob
Network-only.
```python
class SignedShardBlob(Container):
blob: ShardBlob
# The signature, the message is the commitment on the blob
signature: BLSSignature
```
## Helper functions ## Helper functions
### Reverse bit ordering ### Reverse bit ordering

View File

@ -9,6 +9,9 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Introduction](#introduction) - [Introduction](#introduction)
- [New containers](#new-containers)
- [ShardBlob](#shardblob)
- [SignedShardBlob](#signedshardblob)
- [Gossip domain](#gossip-domain) - [Gossip domain](#gossip-domain)
- [Topics and messages](#topics-and-messages) - [Topics and messages](#topics-and-messages)
- [Shard blobs: `shard_blob_{shard}`](#shard-blobs-shard_blob_shard) - [Shard blobs: `shard_blob_{shard}`](#shard-blobs-shard_blob_shard)
@ -24,6 +27,34 @@ With Phase 1, shard data is introduced, which requires various new additions and
The specification of these changes continues in the same format, and assumes Phase0 as pre-requisite. 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 Phase 0 adjustments and additions for Shards are outlined in this document.
## New containers
### ShardBlob
The blob of data, effectively a block. Network-only.
```python
class ShardBlob(Container):
# Slot and shard that this blob is intended for
slot: Slot
shard: Shard
# The actual data
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.
### SignedShardBlob
Network-only.
```python
class SignedShardBlob(Container):
blob: ShardBlob
# The signature, the message is the commitment on the blob
signature: BLSSignature
```
## Gossip domain ## Gossip domain