Skip to content

Clarity-wasm: fix for clarity-wasm issue 700 #6345

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

Conversation

Acaccia
Copy link
Contributor

@Acaccia Acaccia commented Aug 4, 2025

This is the stacks-core part of the fix for stacks-network/clarity-wasm#700 .

The bug was due to an oversimplification in the retrieving of the contract containing the defined trait in the case of a dynamic call.
Now, instead of just using the trait name and looking for its definition in the pulled contract containing the function, we deserialize a full TraitIdentifier and (if needed) fetch the contract which defines the trait.

This fix also needs a clarity-wasm counterpart, which makes a few changes in the compiler, the same change in the runtime (due to the duplication issue) and has the testing for this change.

@Acaccia Acaccia requested a review from BowTiedWoo August 4, 2025 10:08
@Acaccia Acaccia self-assigned this Aug 4, 2025
@Acaccia Acaccia requested a review from a team as a code owner August 4, 2025 10:08
@CLAassistant
Copy link

CLAassistant commented Aug 4, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Acaccia Acaccia changed the title fix: contract-call? linked function will now parse a TraitIdentifier … Clarity-wasm: fix for clarity-wasm issue 700 Aug 4, 2025
Copy link

@csgui csgui left a comment

Choose a reason for hiding this comment

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

Code LGTM.

@Acaccia Acaccia requested a review from ureeves August 5, 2025 09:48
Copy link

@BowTiedWoo BowTiedWoo left a comment

Choose a reason for hiding this comment

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

LGTM

@Acaccia Acaccia enabled auto-merge August 6, 2025 13:10
@csgui csgui disabled auto-merge August 6, 2025 13:16
@wileyj wileyj added this pull request to the merge queue Aug 6, 2025
Merged via the queue into stacks-network:feat/clarity-wasm-develop with commit c7562c4 Aug 6, 2025
64 of 201 checks passed
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 0% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.18%. Comparing base (70041d3) to head (2c59e26).
⚠️ Report is 3 commits behind head on feat/clarity-wasm-develop.

Files with missing lines Patch % Lines
clarity/src/vm/clarity_wasm.rs 0.00% 43 Missing ⚠️

❌ Your project status has failed because the head coverage (21.18%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@                      Coverage Diff                      @@
##           feat/clarity-wasm-develop    #6345      +/-   ##
=============================================================
- Coverage                      21.34%   21.18%   -0.17%     
=============================================================
  Files                            526      521       -5     
  Lines                         339891   338650    -1241     
  Branches                         323        0     -323     
=============================================================
- Hits                           72563    71735     -828     
+ Misses                        267320   266915     -405     
+ Partials                           8        0       -8     
Files with missing lines Coverage Δ
clarity/src/vm/clarity_wasm.rs 33.40% <0.00%> (-0.14%) ⬇️

... and 30 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5295a70...2c59e26. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Acaccia Acaccia deleted the fix/wasm-contract-call-fetch-trait branch August 6, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants