Skip to content

remove duplicate value/result from observer events and block replay r…#6954

Merged
wileyj merged 6 commits intostacks-network:developfrom
simone-stacks:fix/remove-duplicate-observer-value
Mar 19, 2026
Merged

remove duplicate value/result from observer events and block replay r…#6954
wileyj merged 6 commits intostacks-network:developfrom
simone-stacks:fix/remove-duplicate-observer-value

Conversation

@simone-stacks
Copy link
Copy Markdown
Contributor

@simone-stacks simone-stacks commented Mar 4, 2026

Description

Remove redundant fields from observer/RPC event payloads:

  • Removed value from NFT (transfer, mint, burn) and SmartContract event JSON
  • Preserved raw_value (hex-encoded Clarity value)
  • Removed result from block replay/simulate transaction responses
  • Preserved result_hex (hex-encoded Clarity value)

Applicable issues

Additional info (benefits, drawbacks, caveats)

Both pairs contained the same underlying Clarity Value serialized differently; The hex variants are smaller and trivially parseable in Rust and TypeScript/JavaScript.

Breaking change: event observers consuming value from NFT/contract events or result from replay/simulate responses must switch to raw_value/result_hex respectively.

Checklist

  • Test coverage for new or modified code paths
  • For new Clarity features or consensus changes, add property tests (see docs/property-testing.md)
  • Changelog is updated
  • Required documentation changes (e.g., rpc/openapi.yaml for RPC endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo

Comment thread clarity/src/vm/events.rs
Copy link
Copy Markdown
Contributor

@federico-stacks federico-stacks left a comment

Choose a reason for hiding this comment

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

lgtm!

just a question: have we already notified our users about this breaking change?

@simone-stacks
Copy link
Copy Markdown
Contributor Author

lgtm!

just a question: have we already notified our users about this breaking change?

We should have done that already, but it's worth double checking before merging

@wileyj wileyj added this pull request to the merge queue Mar 19, 2026
Merged via the queue into stacks-network:develop with commit b5172ea Mar 19, 2026
1 check passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 80.88235% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.08%. Comparing base (220840e) to head (cdfda8b).
⚠️ Report is 9 commits behind head on develop.

Files with missing lines Patch % Lines
clarity/src/vm/events.rs 80.88% 13 Missing ⚠️

❌ Your project status has failed because the head coverage (81.08%) is below the adjusted base coverage (84.99%). You can increase the head coverage or adjust the Removed Code Behavior.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6954      +/-   ##
===========================================
- Coverage    84.99%   81.08%   -3.92%     
===========================================
  Files          412      412              
  Lines       219958   220016      +58     
  Branches       338      338              
===========================================
- Hits        186959   178403    -8556     
- Misses       32999    41613    +8614     
Files with missing lines Coverage Δ
stackslib/src/net/api/blockreplay.rs 82.75% <ø> (-4.53%) ⬇️
clarity/src/vm/events.rs 77.09% <80.88%> (+1.63%) ⬆️

... and 178 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 220840e...cdfda8b. 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.

@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants