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
When performing verify_(non_)membership in the Tendermint light client, we use apply_prefix to construct the merkle path necessary for proof existence checks. The apply_prefix converts the CommitmentPrefix to a string. However, if the prefix is not valid UTF-8, the function cannot handle it properly and outputs an incorrect string in the format of: <not valid UTF8: {commitment_prefix:?}>
We can't simply remove or alter the Debug implementation for CommitmentPrefix, as it is used as the type for the prefix field in connection messages. Therefore all the Debug impl up to the MsgEnvelope relies on having a Debug implementation for CommitmentPrefix.
Anyhow, since we plan to move away from the legacy apply_prefix and allow path bytes (#1273), we won't encounter the parsing issue in critical paths.
It also should be noted we can't return an error on the Err variant of Debug, as obtaining a string from messages containing non-UTF8 prefix bytes would result in an error. Therefore, the current Debug implementation looks fine.
Bug Summary
When performing
verify_(non_)membership
in the Tendermint light client, we useapply_prefix
to construct the merkle path necessary for proof existence checks. Theapply_prefix
converts theCommitmentPrefix
to a string. However, if the prefix is not valid UTF-8, the function cannot handle it properly and outputs an incorrect string in the format of:<not valid UTF8: {commitment_prefix:?}>
Proposal
Version
=< 0.53.0
The text was updated successfully, but these errors were encountered: