From 0b8e3aee440617aad6758b953833603f323e308f Mon Sep 17 00:00:00 2001 From: protolambda Date: Thu, 18 Mar 2021 00:38:18 +0100 Subject: [PATCH] move shard blob types from das to sharding spec --- specs/das/das-core.md | 30 ------------------------------ specs/sharding/p2p-interface.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/specs/das/das-core.md b/specs/das/das-core.md index 5cfb9af1c..71bb5d8ec 100644 --- a/specs/das/das-core.md +++ b/specs/das/das-core.md @@ -13,8 +13,6 @@ - [Misc](#misc) - [New containers](#new-containers) - [DASSample](#dassample) - - [ShardBlob](#shardblob) - - [SignedShardBlob](#signedshardblob) - [Helper functions](#helper-functions) - [Reverse bit ordering](#reverse-bit-ordering) - [`reverse_bit_order`](#reverse_bit_order) @@ -59,34 +57,6 @@ class DASSample(Container): 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 ### Reverse bit ordering diff --git a/specs/sharding/p2p-interface.md b/specs/sharding/p2p-interface.md index f6e4ced37..86c836c38 100644 --- a/specs/sharding/p2p-interface.md +++ b/specs/sharding/p2p-interface.md @@ -9,6 +9,9 @@ - [Introduction](#introduction) +- [New containers](#new-containers) + - [ShardBlob](#shardblob) + - [SignedShardBlob](#signedshardblob) - [Gossip domain](#gossip-domain) - [Topics and messages](#topics-and-messages) - [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 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