From 995f68572488469b1f32618e70bf3ada5aa5fdcf Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 1 Mar 2023 14:47:07 -0500 Subject: [PATCH 1/9] docs: replace evidence with PFBs in square diagram --- specs/src/specs/data_structures.md | 6 +++--- specs/src/specs/figures/rs2d_originaldata_message.svg | 2 +- specs/src/specs/figures/rs2d_originaldata_reserved.svg | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/specs/src/specs/data_structures.md b/specs/src/specs/data_structures.md index 8800c3bcbd..ec88d1ac6e 100644 --- a/specs/src/specs/data_structures.md +++ b/specs/src/specs/data_structures.md @@ -567,17 +567,17 @@ The first [`NAMESPACE_ID_BYTES`](./consensus.md#constants) of a share's raw data ### Arranging Available Data Into Shares -The previous sections described how some original data, arranged into a `k * k` matrix, can be extended into a `2k * 2k` matrix and committed to with NMT roots. This section specifies how [available data](#available-data) (which includes [transactions](#transactiondata), [intermediate state roots](#intermediatestaterootdata), [evidence](#evidencedata), and [messages](#messagedata)) is arranged into the matrix in the first place. +The previous sections described how some original data, arranged into a `k * k` matrix, can be extended into a `2k * 2k` matrix and committed to with NMT roots. This section specifies how [available data](#available-data) (which includes [transactions](#transactiondata), [intermediate state roots](#intermediatestaterootdata), PayForBlob transactions, and [messages](#messagedata)) is arranged into the matrix in the first place. Then, -1. For each of `transactionData`, `intermediateStateRootData`, and `evidenceData`, [serialize](#serialization): +1. For each of `transactionData`, `intermediateStateRootData`, PayForBlob transactions, [serialize](#serialization): 1. For each request in the list: 1. [Serialize](#serialization) the request (individually). 1. Compute the length of each serialized request, [serialize the length](#serialization), and pre-pend the serialized request with its serialized length. 1. Split up the length/request pairs into [`SHARE_SIZE`](./consensus.md#constants)`-`[`NAMESPACE_ID_BYTES`](./consensus.md#constants)`-`[`SHARE_RESERVED_BYTES`](./consensus.md#constants)-byte chunks. 1. Create a [share](#share) out of each chunk. This data has a _reserved_ namespace ID, so the first [`NAMESPACE_ID_BYTES`](./consensus.md#constants)`+`[`SHARE_RESERVED_BYTES`](./consensus.md#constants) bytes for these shares must be [set specially](#share). -1. Concatenate the lists of shares in the order: transactions, intermediate state roots, evidence. +1. Concatenate the lists of shares in the order: transactions, intermediate state roots, PayForBlob transactions. Note that by construction, each share only has a single namespace, and that the list of concatenated shares is [lexicographically ordered by namespace ID](consensus.md#reserved-namespace-ids). diff --git a/specs/src/specs/figures/rs2d_originaldata_message.svg b/specs/src/specs/figures/rs2d_originaldata_message.svg index 23f2065d77..0e1c5dec3f 100644 --- a/specs/src/specs/figures/rs2d_originaldata_message.svg +++ b/specs/src/specs/figures/rs2d_originaldata_message.svg @@ -26,7 +26,7 @@ TXs ISRs - evi. + PFBs msg1 msg1 diff --git a/specs/src/specs/figures/rs2d_originaldata_reserved.svg b/specs/src/specs/figures/rs2d_originaldata_reserved.svg index 5e74465a38..3b64e73edc 100644 --- a/specs/src/specs/figures/rs2d_originaldata_reserved.svg +++ b/specs/src/specs/figures/rs2d_originaldata_reserved.svg @@ -26,5 +26,5 @@ TXs ISRs - evi. + PFBs From 56a2a4e4bd87df9db52f08d35a466386c9ec7b06 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 1 Mar 2023 15:28:37 -0500 Subject: [PATCH 2/9] docs: remove evidence --- specs/src/rationale/message_block_layout.md | 2 +- specs/src/specs/consensus.md | 13 ++---- specs/src/specs/data_structures.md | 50 +-------------------- 3 files changed, 6 insertions(+), 59 deletions(-) diff --git a/specs/src/rationale/message_block_layout.md b/specs/src/rationale/message_block_layout.md index 2fef2fa9a3..bbb81b11c8 100644 --- a/specs/src/rationale/message_block_layout.md +++ b/specs/src/rationale/message_block_layout.md @@ -11,7 +11,7 @@ Celestia uses [a data availability scheme](https://arxiv.org/abs/1809.09044) tha ## Message Layout Rationale -Block data consists of transactions (which modify the Celestia chain's state), intermediate state roots (required for fraud proofs of the aforementioned transactions), messages (binary blobs which do not modify the Celestia state, but which are intended for a Celestia application identified with a provided namespace ID), and other relevant pieces of data (e.g. evidence for slashing). We want to arrange this data into a `k * k` matrix of fixed-sized shares, which will later be committed to in [Namespace Merkle Trees (NMTs)](../specs/data_structures.md#namespace-merkle-tree). +Block data consists of transactions (which modify the Celestia chain's state), intermediate state roots (required for fraud proofs of the aforementioned transactions), messages (binary blobs which do not modify the Celestia state, but which are intended for a Celestia application identified with a provided namespace ID). We want to arrange this data into a `k * k` matrix of fixed-sized shares, which will later be committed to in [Namespace Merkle Trees (NMTs)](../specs/data_structures.md#namespace-merkle-tree). The simplest way we can imagine arranging block data is to simply serialize it all in no particular order, split it into fixed-sized shares, then arrange those shares into the `k * k` matrix in row-major order. However, this naive scheme can be improved in a number of ways, described below. diff --git a/specs/src/specs/consensus.md b/specs/src/specs/consensus.md index 64ce27eb9d..e50172df9c 100644 --- a/specs/src/specs/consensus.md +++ b/specs/src/specs/consensus.md @@ -15,7 +15,6 @@ - [`block.lastCommit`](#blocklastcommit) - [`block.availableData`](#blockavailabledata) - [State Transitions](#state-transitions) - - [`block.availableData.evidenceData`](#blockavailabledataevidencedata) - [`block.availableData.transactionData`](#blockavailabledatatransactiondata) - [SignedTransactionDataTransfer](#signedtransactiondatatransfer) - [SignedTransactionDataMsgPayForData](#signedtransactiondatamsgpayfordata) @@ -100,7 +99,7 @@ TODO The Tendermint consensus protocol is fork-free by construction under an honest majority of stake assumption. -If a block has a [valid commit](#blocklastcommit), it is part of the canonical chain. If equivocation [evidence](./data_structures.md#evidence) is detected for more than 1/3 of voting power, the node must halt. See [rationale doc](../rationale/fork_choice_das.md) for more information. +If a block has a [valid commit](#blocklastcommit), it is part of the canonical chain. If equivocation evidence is detected for more than 1/3 of voting power, the node must halt. See [rationale doc](../rationale/fork_choice_das.md) for more information. ## Block Validity @@ -165,7 +164,7 @@ The block's [available data](./data_structures.md#availabledata) (analogous to t Once parsed, the following checks must be `true`: 1. The commitments of the [erasure-coded extended](./data_structures.md#2d-reed-solomon-encoding-scheme) `availableData` must match those in `header.availableDataHeader`. Implicitly, this means that both rows and columns must be ordered lexicographically by namespace ID since they are committed to in a [Namespace Merkle Tree](data_structures.md#namespace-merkle-tree). -1. Length of `availableData.intermediateStateRootData` == length of `availableData.transactionData` + length of `availableData.evidenceData` + 2. (Two additional state transitions are the [begin](#begin-block) and [end block](#end-block) implicit transitions.) +1. Length of `availableData.intermediateStateRootData` == length of `availableData.transactionData` + length of `availableData.payForBlobData` + 2. (Two additional state transitions are the [begin](#begin-block) and [end block](#end-block) implicit transitions.) ## State Transitions @@ -176,18 +175,12 @@ For this section, the variable `state` represents the [state tree](./data_struct State transitions are applied in the following order: 1. [Begin block](#begin-block). -1. [Evidence](#blockavailabledataevidencedata). 1. [Transactions](#blockavailabledatatransactiondata). 1. [End block](#end-block). -### `block.availableData.evidenceData` - -Evidence is the second set of state transitions that are applied, ahead of [transactions](#blockavailabledatatransactiondata). -Each evidence represents proof of validator misbehavior, and causes a penalty against the validator(s). - ### `block.availableData.transactionData` -Once [evidence has been processed](#blockavailabledataevidencedata), transactions are applied to the state. Note that _transactions_ mutate the state (essentially, the validator set and minimal balances), while _messages_ do not. See [the architecture documentation](./architecture.md) for more info. +Transactions are applied to the state. Note that _transactions_ mutate the state (essentially, the validator set and minimal balances), while _messages_ do not. See [the architecture documentation](./architecture.md) for more info. `block.availableData.transactionData` is simply a list of [WrappedTransaction](./data_structures.md#wrappedtransaction)s. For each wrapped transaction in this list, `wrappedTransaction`, with index `i` (starting from `0`), the following checks must be `true`: diff --git a/specs/src/specs/data_structures.md b/specs/src/specs/data_structures.md index ec88d1ac6e..e633130618 100644 --- a/specs/src/specs/data_structures.md +++ b/specs/src/specs/data_structures.md @@ -54,10 +54,6 @@ - [IntermediateStateRootData](#intermediatestaterootdata) - [WrappedIntermediateStateRoot](#wrappedintermediatestateroot) - [IntermediateStateRoot](#intermediatestateroot) - - [EvidenceData](#evidencedata) - - [Evidence](#evidence) - - [PublicKey](#publickey) - - [Vote](#vote) - [MessageData](#messagedata) - [Message](#message) - [State](#state) @@ -152,7 +148,6 @@ Data that is [erasure-coded](#erasure-coding) for [data availability checks](htt |-----------------------------|---------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------| | `transactionData` | [TransactionData](#transactiondata) | Transaction data. Transactions modify the validator set and balances, and pay fees for messages to be included. | | `intermediateStateRootData` | [IntermediateStateRootData](#intermediatestaterootdata) | Intermediate state roots used for fraud proofs. | -| `evidenceData` | [EvidenceData](#evidencedata) | Evidence used for slashing conditions (e.g. equivocation). | | `messageData` | [MessageData](#messagedata) | Message data. Messages are app data. | ### Commit @@ -504,8 +499,8 @@ For shares **with a reserved namespace ID through [`NAMESPACE_ID_MAX_RESERVED`]( - If this is the first share of a sequence, the next [`SEQUENCE_BYTES`](./consensus.md#constants) contain a big endian `uint32` that represents the length of the sequence that follows in bytes. - The next [`SHARE_RESERVED_BYTES`](./consensus.md#constants) bytes are the starting byte of the length of the [canonically serialized](#serialization) first request that starts in the share, or `0` if there is none, as an unsigned [varint](https://developers.google.com/protocol-buffers/docs/encoding). -- The remaining [`SHARE_SIZE`](./consensus.md#constants)`-`[`NAMESPACE_ID_BYTES`](./consensus.md#constants)`-`[`SHARE_INFO_BYTES`](./consensus.md#constants) `-` [`SEQUENCE_BYTES`](.consensus.md#constants) bytes (only if this is the first share of a sequence) `-` [`SHARE_RESERVED_BYTES`](./consensus.md#constants) bytes are transactions, intermediate state roots, or evidence data depending on the namespace of ths share. Each transaction, intermediate state root, or evidence is prefixed with a [varint](https://developers.google.com/protocol-buffers/docs/encoding) of the length of that unit. -- If there is insufficient transaction, intermediate state root, or evidence data to fill the share, the remaining bytes are filled with `0`. +- The remaining [`SHARE_SIZE`](./consensus.md#constants)`-`[`NAMESPACE_ID_BYTES`](./consensus.md#constants)`-`[`SHARE_INFO_BYTES`](./consensus.md#constants) `-` [`SEQUENCE_BYTES`](.consensus.md#constants) bytes (only if this is the first share of a sequence) `-` [`SHARE_RESERVED_BYTES`](./consensus.md#constants) bytes are transactions, intermediate state roots, or PayForBlob transaction data. Each transaction, intermediate state root, or PayForBlob transaction is prefixed with a [varint](https://developers.google.com/protocol-buffers/docs/encoding) of the length of that unit. +- If there is insufficient transaction, intermediate state root, or PayForBlob transaction data to fill the share, the remaining bytes are filled with `0`. First share in a sequence: @@ -816,47 +811,6 @@ Adds delegation's pending rewards to voting power. |--------|---------------------------|------------------------------------------------------------------------------------------| | `root` | [HashDigest](#hashdigest) | Root of intermediate state, which is composed of the global state and the validator set. | -### EvidenceData - -Wrapper for evidence data. - -| name | type | description | -|-------------|---------------------------|------------------------------------------------| -| `evidences` | [Evidence](#evidence)`[]` | List of evidence used for slashing conditions. | - -#### Evidence - -| name | type | description | -|----------|-------------------------|-------------| -| `pubKey` | [PublicKey](#publickey) | | -| `voteA` | [Vote](#vote) | | -| `voteB` | [Vote](#vote) | | - -#### PublicKey - -| name | type | description | -|------|------------|--------------------------| -| `x` | `byte[32]` | `x` value of public key. | -| `y` | `byte[32]` | `y` value of public key. | - -#### Vote - -```C++ -enum VoteType : uint8_t { - Prevote = 1, - Precommit = 2, -}; -``` - -| name | type | description | -|--------------|---------------------------|-------------| -| `type` | `VoteType` | | -| `height` | [Height](#type-aliases) | | -| `round` | [Round](#type-aliases) | | -| `headerHash` | [HashDigest](#hashdigest) | | -| `timestamp` | [Timestamp](#timestamp) | | -| `signature` | [Signature](#signature) | | - ### MessageData | name | type | description | From 0a6f7e67196bd6b7e61cbff16d211f96c1488b0a Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 1 Mar 2023 15:48:20 -0500 Subject: [PATCH 3/9] docs: remove evidenceData from block data structures diagram --- specs/src/specs/data_structures.md | 6 ++++++ .../specs/figures/block_data_structures.dot | 4 ++-- .../specs/figures/block_data_structures.svg | 20 +++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/specs/src/specs/data_structures.md b/specs/src/specs/data_structures.md index e633130618..58f488f345 100644 --- a/specs/src/specs/data_structures.md +++ b/specs/src/specs/data_structures.md @@ -51,6 +51,7 @@ - [SignedTransactionDataBurn](#signedtransactiondataburn) - [SignedTransactionRedelegateCommission](#signedtransactionredelegatecommission) - [SignedTransactionRedelegateReward](#signedtransactionredelegatereward) + - [PayForBlobData](#payforblobdata) - [IntermediateStateRootData](#intermediatestaterootdata) - [WrappedIntermediateStateRoot](#wrappedintermediatestateroot) - [IntermediateStateRoot](#intermediatestateroot) @@ -148,6 +149,7 @@ Data that is [erasure-coded](#erasure-coding) for [data availability checks](htt |-----------------------------|---------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------| | `transactionData` | [TransactionData](#transactiondata) | Transaction data. Transactions modify the validator set and balances, and pay fees for messages to be included. | | `intermediateStateRootData` | [IntermediateStateRootData](#intermediatestaterootdata) | Intermediate state roots used for fraud proofs. | +| `payForBlobData` | [PayForBlobData](#payforblobdata) | PayForBlob data. Transactions that pay for blobs to be included. | | `messageData` | [MessageData](#messagedata) | Message data. Messages are app data. | ### Commit @@ -792,6 +794,10 @@ Assigns validator's pending commission to a delegation. Adds delegation's pending rewards to voting power. +### PayForBlobData + +// TODO: + ### IntermediateStateRootData | name | type | description | diff --git a/specs/src/specs/figures/block_data_structures.dot b/specs/src/specs/figures/block_data_structures.dot index f98a4e4c4a..70812f76b7 100644 --- a/specs/src/specs/figures/block_data_structures.dot +++ b/specs/src/specs/figures/block_data_structures.dot @@ -12,7 +12,7 @@ digraph G { subgraph cluster_body { label = "availableData"; - struct3 [label = "{ | { transactionData | intermediateStateRoots | evidenceData | messageData } }"]; + struct3 [label = "{ | { transactionData | intermediateStateRoots | payForBlobData | messageData } }"]; } subgraph cluster_lastcommit { @@ -33,4 +33,4 @@ digraph G { edge [style = invis]; struct1 -> struct3; struct1 -> struct4; -} \ No newline at end of file +} diff --git a/specs/src/specs/figures/block_data_structures.svg b/specs/src/specs/figures/block_data_structures.svg index 5c0bddf8dc..c47a8b80c9 100644 --- a/specs/src/specs/figures/block_data_structures.svg +++ b/specs/src/specs/figures/block_data_structures.svg @@ -1,11 +1,5 @@ - - - - - + G @@ -54,17 +48,17 @@ intermediateStateRoots -evidenceData +payForBlobData messageData -struct4:f0->struct3 +struct4:f0->struct3 NMT roots to -erasure-coded data +erasure-coded data @@ -100,7 +94,7 @@ -struct1:f9->struct4 +struct1:f9->struct4 Merkle root of @@ -109,7 +103,7 @@ -struct1:f5->struct2 +struct1:f5->struct2 From af459bf5e27387fa0dc6f8037c8a1077cc3e019d Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 2 Mar 2023 14:19:41 -0500 Subject: [PATCH 4/9] fix markdownlint --- specs/src/specs/data_structures.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/src/specs/data_structures.md b/specs/src/specs/data_structures.md index 58f488f345..347de093f0 100644 --- a/specs/src/specs/data_structures.md +++ b/specs/src/specs/data_structures.md @@ -185,7 +185,7 @@ Abstraction over transaction fees. Address is a [type alias](#type-aliases). -Addresses are the [hash](#hashing) [digest](#hashdigest) of the [public key](#publickey). +Addresses are the [hash](#hashing) [digest](#hashdigest) of the [public key](https://docs.cosmos.network/v0.46/basics/accounts.html#public-keys). Addresses have a length of 32 bytes. @@ -243,7 +243,7 @@ Unless otherwise indicated explicitly, objects are first [serialized](#serializa Consensus-critical data is authenticated using [ECDSA](https://www.secg.org/sec1-v2.pdf), with the curve [secp256k1](https://en.bitcoin.it/wiki/Secp256k1). A highly-optimized library is available in C (), with wrappers in Go () and Rust (). -[Public keys](#publickey) are encoded in uncompressed form, as the concatenation of the `x` and `y` values. No prefix is needed to distinguish between encoding schemes as this is the only encoding supported. +[Public keys](https://docs.cosmos.network/v0.46/basics/accounts.html#public-keys) are encoded in uncompressed form, as the concatenation of the `x` and `y` values. No prefix is needed to distinguish between encoding schemes as this is the only encoding supported. Deterministic signatures ([RFC-6979](https://tools.ietf.org/rfc/rfc6979.txt)) should be used when signing, but this is not enforced at the protocol level as it cannot be. From 46a7acdb0d8720f81974aeced7163af1eb99c9ce Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 2 Mar 2023 14:23:38 -0500 Subject: [PATCH 5/9] remove TODO link --- specs/src/specs/data_structures.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/specs/src/specs/data_structures.md b/specs/src/specs/data_structures.md index 347de093f0..87d4d92c1c 100644 --- a/specs/src/specs/data_structures.md +++ b/specs/src/specs/data_structures.md @@ -796,8 +796,6 @@ Adds delegation's pending rewards to voting power. ### PayForBlobData -// TODO: - ### IntermediateStateRootData | name | type | description | From 9c1fb3f8c63db699d64c18d8af77bce3d7b04e71 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Fri, 3 Mar 2023 15:06:16 -0500 Subject: [PATCH 6/9] Update specs/src/specs/consensus.md Co-authored-by: Sanaz Taheri <35961250+staheri14@users.noreply.github.com> --- specs/src/specs/consensus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/src/specs/consensus.md b/specs/src/specs/consensus.md index e50172df9c..9db0364c12 100644 --- a/specs/src/specs/consensus.md +++ b/specs/src/specs/consensus.md @@ -99,7 +99,7 @@ TODO The Tendermint consensus protocol is fork-free by construction under an honest majority of stake assumption. -If a block has a [valid commit](#blocklastcommit), it is part of the canonical chain. If equivocation evidence is detected for more than 1/3 of voting power, the node must halt. See [rationale doc](../rationale/fork_choice_das.md) for more information. +If a block has a [valid commit](#blocklastcommit), it is part of the canonical chain. If equivocation evidence is detected for more than 1/3 of voting power, the node must halt. See [rationale doc](./../rationale/fork_choice_das.md) for more information. ## Block Validity From f09c4ffd609466d9b95f643443fae774b8061406 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 3 Mar 2023 15:10:13 -0500 Subject: [PATCH 7/9] remove link --- specs/src/specs/consensus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/src/specs/consensus.md b/specs/src/specs/consensus.md index 9db0364c12..1400d316fe 100644 --- a/specs/src/specs/consensus.md +++ b/specs/src/specs/consensus.md @@ -99,7 +99,7 @@ TODO The Tendermint consensus protocol is fork-free by construction under an honest majority of stake assumption. -If a block has a [valid commit](#blocklastcommit), it is part of the canonical chain. If equivocation evidence is detected for more than 1/3 of voting power, the node must halt. See [rationale doc](./../rationale/fork_choice_das.md) for more information. +If a block has a [valid commit](#blocklastcommit), it is part of the canonical chain. If equivocation evidence is detected for more than 1/3 of voting power, the node must halt. ## Block Validity From 0adcded858b5d531a00f7367ccef26111bdc660a Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 3 Mar 2023 15:11:06 -0500 Subject: [PATCH 8/9] clarify two separate types of transactions --- specs/src/rationale/message_block_layout.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/src/rationale/message_block_layout.md b/specs/src/rationale/message_block_layout.md index bbb81b11c8..232f3b7ee8 100644 --- a/specs/src/rationale/message_block_layout.md +++ b/specs/src/rationale/message_block_layout.md @@ -11,7 +11,7 @@ Celestia uses [a data availability scheme](https://arxiv.org/abs/1809.09044) tha ## Message Layout Rationale -Block data consists of transactions (which modify the Celestia chain's state), intermediate state roots (required for fraud proofs of the aforementioned transactions), messages (binary blobs which do not modify the Celestia state, but which are intended for a Celestia application identified with a provided namespace ID). We want to arrange this data into a `k * k` matrix of fixed-sized shares, which will later be committed to in [Namespace Merkle Trees (NMTs)](../specs/data_structures.md#namespace-merkle-tree). +Block data consists of ordinary transactions and PayForBlob transactions (which modify the Celestia chain's state), intermediate state roots (required for fraud proofs of the aforementioned transactions), messages (binary blobs which do not modify the Celestia state, but which are intended for a Celestia application identified with a provided namespace ID). We want to arrange this data into a `k * k` matrix of fixed-sized shares, which will later be committed to in [Namespace Merkle Trees (NMTs)](../specs/data_structures.md#namespace-merkle-tree). The simplest way we can imagine arranging block data is to simply serialize it all in no particular order, split it into fixed-sized shares, then arrange those shares into the `k * k` matrix in row-major order. However, this naive scheme can be improved in a number of ways, described below. From 05cc09060cbf3e4e95fb99fbc34ac16564743fa0 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Fri, 3 Mar 2023 15:29:11 -0500 Subject: [PATCH 9/9] further clarify block data --- specs/src/rationale/message_block_layout.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/specs/src/rationale/message_block_layout.md b/specs/src/rationale/message_block_layout.md index 232f3b7ee8..2b24b73c8a 100644 --- a/specs/src/rationale/message_block_layout.md +++ b/specs/src/rationale/message_block_layout.md @@ -11,7 +11,14 @@ Celestia uses [a data availability scheme](https://arxiv.org/abs/1809.09044) tha ## Message Layout Rationale -Block data consists of ordinary transactions and PayForBlob transactions (which modify the Celestia chain's state), intermediate state roots (required for fraud proofs of the aforementioned transactions), messages (binary blobs which do not modify the Celestia state, but which are intended for a Celestia application identified with a provided namespace ID). We want to arrange this data into a `k * k` matrix of fixed-sized shares, which will later be committed to in [Namespace Merkle Trees (NMTs)](../specs/data_structures.md#namespace-merkle-tree). +Block data consists of: + +1. Cosmos SDK module transactions (e.g. [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/f71df80e93bffbf7ce5fbd519c6154a2ee9f991b/proto/cosmos/bank/v1beta1/tx.proto#L21-L32)). These modify the Celestia chain's state. +1. Celestia-specific transactions (e.g. [PayForBlobs](../specs/data_structures.md#payforblobdata)). These modify the Celestia chain's state. +1. Intermediate state roots: required for fraud proofs of the aforementioned transactions. +1. Messages: binary blobs which do not modify the Celestia state, but which are intended for a Celestia application identified with a provided namespace ID. + +We want to arrange this data into a `k * k` matrix of fixed-sized shares, which will later be committed to in [Namespace Merkle Trees (NMTs)](../specs/data_structures.md#namespace-merkle-tree). The simplest way we can imagine arranging block data is to simply serialize it all in no particular order, split it into fixed-sized shares, then arrange those shares into the `k * k` matrix in row-major order. However, this naive scheme can be improved in a number of ways, described below.