celestiaorg / celestia-core

Celestia node software based on Tendermint.
https://celestia.org/
Apache License 2.0
470 stars 244 forks source link

Return more information if `ShareProof` and `RowProof` verification failed #1359

Open rach-id opened 1 month ago

rach-id commented 1 month ago
          [separate issue] since `VerifyProof` only returns a bool value, I expect callers will be need debugging tools if they receive a `false` here.

We could consider modifying the API so that an error is returned if VerifyProof returns false.

// VerifyProof returns true if ...
// VerifyProof returns false and an error if ...
func (sp ShareProof) VerifyProof(root []byte) (bool, error) {

_Originally posted by @rootulp in https://github.com/celestiaorg/celestia-core/pull/1357#discussion_r1598469394_