Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pedersen commitment improvements #182

Merged
merged 11 commits into from
Oct 31, 2023
Merged

Pedersen commitment improvements #182

merged 11 commits into from
Oct 31, 2023

Conversation

dr-orlovsky
Copy link
Member

According to the suggestions by Adam Back and Blockstream team.

API changes are breaking, thus it can go only into v0.11

@dr-orlovsky dr-orlovsky added tests Issues & PRs related to test coverage *security* Issues affecting safety/security (include undefined behaviours) labels Oct 24, 2023
@dr-orlovsky dr-orlovsky added this to the v0.11.0 milestone Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #182 (cf1de4a) into master (c0be2d9) will increase coverage by 3.6%.
Report is 3 commits behind head on master.
The diff coverage is 60.6%.

@@           Coverage Diff            @@
##           master    #182     +/-   ##
========================================
+ Coverage    12.5%   16.1%   +3.6%     
========================================
  Files          31      31             
  Lines        3188    3379    +191     
========================================
+ Hits          400     544    +144     
- Misses       2788    2835     +47     
Flag Coverage Δ
rust 16.1% <60.6%> (+3.6%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/contract/mod.rs 12.5% <ø> (ø)
src/stl.rs 100.0% <ø> (ø)
src/validation/status.rs 0.0% <ø> (ø)
src/validation/validator.rs 0.0% <0.0%> (ø)
src/validation/model.rs 0.0% <0.0%> (ø)
src/contract/fungible.rs 71.2% <89.3%> (+28.3%) ⬆️
src/vm/op_contract.rs 0.0% <0.0%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@cryptoquick cryptoquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow... Different semantic ID for the core RGB lib. Is this a pushback or a fast forward? How bad is this breaking? Is this as bad as 0.10 was?

If we do any breaking changes, we need to do them now.

@dr-orlovsky
Copy link
Member Author

Oh wow... Different semantic IDs for the core RGB lib. Is this a pushback or a fast-forward?

Neither. It is a bugfix, meaning the existing way Pedersen commitments are done was non-standard and may contain inflation issues. I was seeking for Blockstream review of the way we use their API for Pedersen commitments and only now do we have it, thus we need this fix.

Copy link
Member

@cryptoquick cryptoquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's definitely get this in ASAP.

@dr-orlovsky
Copy link
Member Author

It is not the only change which is needed - there are a bunch of other required PRs some of which are breaking. Also, we need to get RGB and std libraries updated and ensure that all PSBT methods create properly balanced Pedersen commitments and tapret commitments. Thus please no releases before that is accomplished.

Copy link
Contributor

@zoedberg zoedberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some comments requiring minor changes, but overall LGTM

src/contract/fungible.rs Outdated Show resolved Hide resolved
src/contract/fungible.rs Outdated Show resolved Hide resolved
src/contract/fungible.rs Outdated Show resolved Hide resolved
src/vm/op_contract.rs Outdated Show resolved Hide resolved
src/vm/op_contract.rs Outdated Show resolved Hide resolved
src/vm/op_contract.rs Outdated Show resolved Hide resolved
@dr-orlovsky
Copy link
Member Author

@zoedberg thank you for the good point with tests. I have committed your doc fixes, fixed different lints and resolved conflicts with master branch as well.

@dr-orlovsky dr-orlovsky merged commit 5463ae2 into master Oct 31, 2023
20 checks passed
@dr-orlovsky dr-orlovsky deleted the fix/pedersen branch April 18, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*security* Issues affecting safety/security (include undefined behaviours) tests Issues & PRs related to test coverage
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants