VerifyLeafHashes can panic in the completeness check if proof.nodes are not namespaced
Closed this issue · 0 comments
staheri14 commented
Problem
Link to the completeness check: https://github.com/celestiaorg/nmt/blob/master/proof.go#L199
The proof.nodes length are not checked before extracting their namespace IDs. This may cause panic.
Acceptance Criteria
Call ValidateNode() on the proof.nodes at the beginning of the VerifyLeafHashes and make an early return if they are invalid.