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

[sBTC DR] Remove tree depth from burn and mint #240

Merged
merged 4 commits into from
Oct 6, 2023
Merged

Conversation

friedger
Copy link
Collaborator

@friedger friedger commented Oct 6, 2023

Summary of Changes

The parameter tree-depth is always the length of the proof minus 1 when calling was-tx-mined. This PR removes this parameter and uses the proof length instead.

This fixes #239.

Testing

Risks

This changes the public API of the contract and requires to update all clients, including the web bridge.

How were these changes tested?

Running ./scripts/tests.sh and cargo test

What future testing should occur?

Integration testing as in #215 and web integration testing.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@friedger friedger changed the title [sBTC DR 0.1] Remove tree depth [sBTC DR] Remove tree depth from burn and mint Oct 6, 2023
@friedger friedger self-assigned this Oct 6, 2023
@friedger friedger marked this pull request as ready for review October 6, 2023 11:14
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #240 (def13f4) into main (3ec2c8a) will decrease coverage by 0.38%.
The diff coverage is 85.03%.

@@            Coverage Diff             @@
##             main     #240      +/-   ##
==========================================
- Coverage   38.76%   38.39%   -0.38%     
==========================================
  Files          45       45              
  Lines        5167     5134      -33     
  Branches       47       47              
==========================================
- Hits         2003     1971      -32     
+ Misses       3163     3162       -1     
  Partials        1        1              
Flag Coverage Δ
unittests 76.61% <85.03%> (-2.28%) ⬇️

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

Files Coverage Δ
romeo/asset-contract/contracts/asset.clar 100.00% <100.00%> (ø)
...asset-contract/contracts/clarity-bitcoin-mini.clar 90.32% <100.00%> (-0.31%) ⬇️
romeo/asset-contract/tests/asset_test.clar 74.07% <100.00%> (ø)
romeo/src/proof_data.rs 98.63% <ø> (-0.08%) ⬇️
romeo/src/system.rs 0.00% <ø> (ø)
...ontract/contracts/clarity-bitcoin-mini-deploy.clar 0.00% <0.00%> (ø)
...sset-contract/tests/clarity-bitcoin-mini_test.clar 89.58% <89.47%> (-4.33%) ⬇️

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

Copy link
Collaborator

@radicleart radicleart left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Collaborator

@AshtonStephens AshtonStephens left a comment

Choose a reason for hiding this comment

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

LGTM.

@friedger friedger merged commit 658702a into main Oct 6, 2023
8 checks passed
@friedger friedger deleted the 239-remove-tree-depth branch October 6, 2023 13:52
@friedger friedger mentioned this pull request Oct 6, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Remove tree-depth parameter in clarity-bitcoin-mini
3 participants