Skip to content

Commit 4392e84

Browse files
authoredSep 20, 2024
docs: document the start/end row in row proof (celestiaorg#1473)
## Description Adds a simple documentation to the start row and end row fields in row proof to show that they're not used for verification. But if anyone is using them downstream, they should validate them themselves

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed
 

‎types/row_proof.go

+11-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ type RowProof struct {
1616
RowRoots []tmbytes.HexBytes `json:"row_roots"`
1717
// Proofs is a list of Merkle proofs where each proof proves that a row
1818
// exists in a Merkle tree with a given data root.
19-
Proofs []*merkle.Proof `json:"proofs"`
20-
StartRow uint32 `json:"start_row"`
21-
EndRow uint32 `json:"end_row"`
19+
Proofs []*merkle.Proof `json:"proofs"`
20+
// StartRow the index of the start row.
21+
// Note: currently, StartRow is not validated as part of the proof verification.
22+
// If this field is used downstream, Validate(root) should be called along with
23+
// extra validation depending on how it's used.
24+
StartRow uint32 `json:"start_row"`
25+
// EndRow the index of the end row.
26+
// Note: currently, EndRow is not validated as part of the proof verification.
27+
// If this field is used downstream, Validate(root) should be called along with
28+
// extra validation depending on how it's used.
29+
EndRow uint32 `json:"end_row"`
2230
}
2331

2432
// Validate performs checks on the fields of this RowProof. Returns an error if

0 commit comments

Comments
 (0)
Please sign in to comment.