Skip to content

chore: update data root tuple genesis comment #144

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

Merged
merged 2 commits into from
May 1, 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
3 changes: 2 additions & 1 deletion src/DataRootTuple.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ pragma solidity ^0.8.4;
/// https://github.com/celestiaorg/celestia-specs/blob/master/src/specs/data_structures.md#header
struct DataRootTuple {
// Celestia block height the data root was included in.
// Genesis block is height = 1.
// Genesis block is height = 0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit: It is the genesis file that has height 0. The block at height 1 will reference the genesis file as its parent. It is only semantics but I would argue that the first block is the one produced by consensus and the genesis file does not really count as a block as it is not produced by the same consensus protocol.

Question: Does the genesis file / the initial chain state play any role here at all? Isn't the first relevant block only that with height 1? If not, can you clarify how the genesis file plays a role in this smart contract?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't play any role in the smart contract, it's just a comment to specify from where the data commitments will start.

// First queryable block is height = 1.
uint256 height;
// Data root.
bytes32 dataRoot;
Expand Down