LNP-BP / client_side_validation

Standard implementation of client-side-validation APIs
https://docs.rs/client_side_validation
Apache License 2.0
22 stars 19 forks source link

Rewamp workflows on generating commitment ids #152

Closed dr-orlovsky closed 8 months ago

dr-orlovsky commented 9 months ago

This is the result of self-audit for the commitment ID constructions. In v0.10 we had a very non-transparent commitment workflow with multiple redundant hashing, absence of clear tagged hash structure etc. This PR linearizes commitment workflows, streamlines and simplifies related APIs.

This is consensus-breaking since generated commitments will differ.

Summary of changes:

codecov[bot] commented 9 months ago

Codecov Report

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

Project coverage is 76.7%. Comparing base (c604733) to head (5359d84).

:exclamation: Current head 5359d84 differs from pull request most recent head b7df64a. Consider uploading reports for the commit b7df64a to get more accurate results

Files Patch % Lines
commit_verify/src/id.rs 50.0% 26 Missing :warning:
commit_verify/src/merkle.rs 72.2% 15 Missing :warning:
commit_verify/derive/src/derive.rs 81.8% 4 Missing :warning:
commit_verify/src/mpc/block.rs 81.8% 4 Missing :warning:
commit_verify/derive/src/params.rs 75.0% 3 Missing :warning:
commit_verify/derive/tests/base.rs 96.9% 1 Missing :warning:
commit_verify/src/mpc/atoms.rs 75.0% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #152 +/- ## ======================================== - Coverage 82.6% 76.7% -5.9% ======================================== Files 20 19 -1 Lines 2076 1710 -366 ======================================== - Hits 1714 1311 -403 - Misses 362 399 +37 ``` | [Flag](https://app.codecov.io/gh/LNP-BP/client_side_validation/pull/152/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LNP-BP) | Coverage Δ | | |---|---|---| | [rust](https://app.codecov.io/gh/LNP-BP/client_side_validation/pull/152/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LNP-BP) | `76.7% <75.1%> (-5.9%)` | :arrow_down: | 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=LNP-BP#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.

crisdut commented 8 months ago

Hi @dr-orlovsky,

I found an error related with this implementation in rgb-core, see here: https://github.com/RGB-WG/rgb-core/pull/204#issuecomment-1935439581

dr-orlovsky commented 8 months ago

@crisdut The only way to solve the issue seems to do another re-wamp. WIP.