You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, proofLeafNode is not exported. While it is good practice to export only what is really neccessary (and hide fields and functionality that are not essential for the API), I think this type should be public/exported: If someone is about to write a verifier in another language, he needs to know enough details what a RangeProof consists of (and proofLeafNode is part of that): https://github.com/tendermint/iavl/blob/f2c70966873724a199ea37d0cbfc8b50baa0f7bf/proof_range.go#L12-L21
Exporting the type would also create a proper godoc item. Similarly, proofInnerNode (as PathToLeaf is just a type alias to []proofInnerNode).
I am in favor of this, I think. I just found myself wishing these fields were exported while trying to write a toy program--not sure if that's actually representative of what people want to do with this package, though.
Yeah, I’d say it’s generally bad form to expose private types as publicly accessible values - i.e. Leaves []proofLeafNode elements are publicly accessible, but of a private type.
Currently,
proofLeafNode
is not exported. While it is good practice to export only what is really neccessary (and hide fields and functionality that are not essential for the API), I think this type should be public/exported: If someone is about to write a verifier in another language, he needs to know enough details what aRangeProof
consists of (andproofLeafNode
is part of that):https://github.com/tendermint/iavl/blob/f2c70966873724a199ea37d0cbfc8b50baa0f7bf/proof_range.go#L12-L21
Exporting the type would also create a proper godoc item. Similarly,
proofInnerNode
(asPathToLeaf
is just a type alias to[]proofInnerNode
).cc @jlandrews @jaekwon
The text was updated successfully, but these errors were encountered: