cosmos / ics23

Building generic merkle proof format for IBC
Apache License 2.0
113 stars 67 forks source link

fix: Fix verification of proofs for specs with more than 2 children per node (in Rust implementation) #290

Open mappum opened 4 months ago

mappum commented 4 months ago

This PR fixes the Rust right_branches_are_empty implementation, specifically for specs which have more than 2 children per node (e.g. Merk).

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 66.01%. Comparing base (3645479) to head (2bc72db).

Files Patch % Lines
rust/src/verify.rs 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #290 +/- ## =========================================== + Coverage 51.39% 66.01% +14.62% =========================================== Files 23 7 -16 Lines 9341 3652 -5689 Branches 86 0 -86 =========================================== - Hits 4801 2411 -2390 + Misses 4175 1241 -2934 + Partials 365 0 -365 ``` | [Flag](https://app.codecov.io/gh/cosmos/ics23/pull/290/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cosmos) | Coverage Δ | | |---|---|---| | [go](https://app.codecov.io/gh/cosmos/ics23/pull/290/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cosmos) | `?` | | | [rust](https://app.codecov.io/gh/cosmos/ics23/pull/290/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cosmos) | `66.01% <50.00%> (ø)` | | | [typescript](https://app.codecov.io/gh/cosmos/ics23/pull/290/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cosmos) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cosmos#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.