Skip to content

Commit

Permalink
updates VerifyNamespace description
Browse files Browse the repository at this point in the history
  • Loading branch information
staheri14 committed Jun 29, 2023
1 parent bc3162a commit fb9c288
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,22 @@ func (proof Proof) IsEmptyProof() bool {
}

// VerifyNamespace verifies a whole namespace, i.e. 1) it verifies inclusion of
// the provided `data` in the tree (or the proof.leafHash in case of absence
// proof) 2) it verifies that the namespace is complete i.e., the data items
// matching the namespace ID `nID` are within the range [`proof.start`,
// `proof.end`) and no data of that namespace was left out. VerifyNamespace
// the provided `leaves` in the tree (or the proof.leafHash in case of
// full/short absence proof) 2) it verifies that the namespace is complete
// i.e., the data items matching the namespace ID `nID` are within the range
// [`proof.start`, `proof.end`) and no data of that namespace was left out. VerifyNamespace
// deems an empty `proof` valid if the queried `nID` falls outside the namespace
// range of the supplied `root` or if the `root` is empty
//
// `h` MUST be the same as the underlying hash function used to generate the
// proof. Otherwise, the verification will fail. `nID` is the namespace ID for
// which the namespace `proof` is generated. `data` contains the namespaced data
// items (but not namespace hash) underlying the leaves of the tree in the
// range of [`proof.start`, `proof.end`). For an absence `proof`, the `data` is
// empty. `data` items MUST be ordered according to their index in the tree,
// with `data[0]` corresponding to the namespaced data at index `start`,
// which the namespace `proof` is generated. `leaves` contains the namespaced
// leaves of the tree in the range of [`proof.start`, `proof.end`).
// For an absence `proof`, the `leaves` is empty.
// `leaves` items MUST be ordered according to their index in the tree,
// with `data[0]` corresponding to the namespaced leaf at index `start`,
//
// and the last element in `data` corresponding to the data item at index
// and the last element in `leaves` corresponding to the leaf at index
// `end-1` of the tree.
//
// `root` is the root of the NMT against which the `proof` is verified.
Expand Down

0 comments on commit fb9c288

Please sign in to comment.