Skip to content

Commit f31e38c

Browse files
authored
Clarify note about our future plans for blocks’ transactions hash field
1 parent b834e63 commit f31e38c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Blockchain.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@ A **block header** summarizes the data of a block, as well as contain metadata u
5252
|Timestamp|`u64`|A unix timestamp. The Timestamp on a block must be strictly greater than the Timestamp on its parent, and strictly smaller than the process' (replica or client) local time.|
5353
|Base Fee Per Gas|`u64`|The (inclusive) minimum number of grays that a transaction in must pay for every [gas](Runtime.md#gas-used) used to be included in this block. How this value is decided is specified in [base fee formula](#base-fee-formula).|
5454
|Gas used|`u64`|The gas used to store and execute all of the block's transactions. This is exactly the sum of: <ol><li>The $G_{txincl}$ of every transaction in the block.</li> <li>The value in the gas used field of every command receipt in the block.|
55-
|Transactions Hash</li></ol>|`CryptoHash`|The root hash of the SHA256 binary merkle tree over the blocks' transactions, constructed using [rs_merkle](https://docs.rs/rs_merkle/latest/rs_merkle/). Each leaf is a SHA256 hash over a transaction (not just the Hash field of a transaction), and each transaction are placed in the tree in the order they appear in the block.|
55+
|Transactions Hash</li></ol>|`CryptoHash`|The root hash of the SHA256 binary merkle tree over the blocks' transactions, constructed using [rs_merkle](https://docs.rs/rs_merkle/latest/rs_merkle/). Each leaf is a SHA256 hash over a transaction (not just the Hash field of a transaction)[^2], and each transaction are placed in the tree in the order they appear in the block.|
5656
|Receipts Hash|`CryptoHash`|The root hash of the SHA256 binary merkle tree over the blocks' receipts. This is similar to transactions hash, but each leaf is the SHA256 hash of a receipt's bytes encoding.|
5757
|State Hash|`CryptoHash`|The root hash of the [world state](World%20State.md) after executing this block.
5858
|Logs bloom|`[u8; 256]`|A bloom filter generated over all logs in the block's receipts. This starts as a 2048-bits ($2^{11}$ bits) array of all zeros, then is populated using the following procedure: for every log, SHA256-hash its topic, take the first 11 bits of each of the three least-significant pairs of bytes in the digest, and then use each of these 11 bits to index into a bit in the log bloom and set it to 1.|
5959

6060
[^1]: We [plan](https://github.com/parallelchain-io/parallelchain-protocol/issues/16) to make the order of fields in the pre-image of data hash in line with the order of fields in block header.
6161

62+
[^2]: We [plan](https://github.com/parallelchain-io/parallelchain-protocol/issues/17) to have each leaf of the merkle tree used to compute a block's transactions hash contain the hash field of a transaction, instead of the SHA256 hash over an entire transaction.
63+
6264
#### Maximum gas used
6365

6466
The amount of the network's computation and storage resources that a block can consume is limited by a cap on gas used:

0 commit comments

Comments
 (0)