Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: minor fixes in "Block structure" #526

Merged
merged 4 commits into from
Jun 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The following fields define the block header:

| `parent_block_hash` | `FieldElement` | The hash of this block's parent | ✓
|`block_number` | `Integer` | The number (height) of this block | ✓
| `global_state_root` | `FieldElement` | The state xref:../State/starknet-state.adoc#state-commitment[commitment] after this block | ✓
| `global_state_root` | `FieldElement` | The state xref:../State/starknet-state.adoc#state_commitment[commitment] after this block | ✓
|`sequencer_address` | `FieldElement` | The Starknet address of the sequencer who created this block | ✓
| `block_timestamp` | `Timestamp` | The time the sequencer created this block before executing transactions | ✓
|`transaction_count` | `Integer` | The number of transactions in a block | ✓
Expand All @@ -31,9 +31,10 @@ The following fields define the block header:
====
The commitment fields `event_commitment` and `transaction_commitment` are the roots of a height 64 binary Merkle Patricia tree.

The leaf at index stem:[$i$] corresponds to the hash of the stem:[$i'th$] event for `event_commitment` and stem:[$h(transaction \ hash, signature)$] for `invoke transaction_commitment`.
For `event_commitment`, the leaf at index stem:[$i$] corresponds to the hash of the stem:[$i'th$] event.

For `transaction_commitment`, the leaf at index stem:[$i$] corresponds to stem:[$h(transaction \ hash, signature)$] if the stem:[$i'th$] transaction is an `invoke` transaction and stem:[$h(0,0)$] otherwise.

For other types of transactions, we use stem:[$h(0,0)$].
====

[id="block_hash"]
Expand Down