Difference between Validate
and Verify
in ShareProof
and RowProof
#1356
Labels
T:enhancement
Type: Enhancement
Validate
and Verify
in ShareProof
and RowProof
#1356
Currently, in the implementation of
ShareProof
andRowProof
, we haveValidate()
andVerify()
methods. Now I am looking at the implementation, both of them seem to be doing the same thing.celestia-core/types/row_proof.go
Lines 24 to 52 in b67d79e
and,
celestia-core/types/share_proof.go
Lines 66 to 133 in b67d79e
Validate
: runs some basic checks on the proof, then attempts to verify the proof against the rootVerify
: goes straight to verifying the proof against a rootI am thinking that if a
proof.Verify
returnstrue
, then it's a valid proof. Similarly, if aproof.Validate
returnstrue
, there is no need to callVerify
. So they're basically the same methods.So I am wondering if it makes sense to remove the proof verification from the
Validate
method, and keep it only doing basic checks. And putting the responsibility of verifying the proof onVerify
.What do you think?
The text was updated successfully, but these errors were encountered: