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

fix: isolate event-dispatcher serialization code #4545

Merged
merged 6 commits into from Mar 18, 2024

Conversation

zone117x
Copy link
Member

@zone117x zone117x commented Mar 15, 2024

Closes #4492
Supersedes #4546

A few structs used in consensus critical or db migration critical areas were also being reused for serializing to JSON in the event dispatcher. Since then, several changes were made only for the event dispatcher JSON serialization, and in one case likely broke db migrations.

This PR moves the event-dispatcher-specific code out of those more core areas.

@zone117x zone117x requested review from hstove and kantai March 15, 2024 13:17
@zone117x zone117x linked an issue Mar 15, 2024 that may be closed by this pull request
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

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

Project coverage is 83.23%. Comparing base (d3f1a31) to head (373c082).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4545      +/-   ##
==========================================
- Coverage   83.34%   83.23%   -0.12%     
==========================================
  Files         453      453              
  Lines      328342   328354      +12     
  Branches      323      323              
==========================================
- Hits       273650   273292     -358     
- Misses      54684    55054     +370     
  Partials        8        8              
Files Coverage Δ
stackslib/src/chainstate/stacks/boot/mod.rs 94.74% <ø> (-0.05%) ⬇️
...net/stacks-node/src/tests/nakamoto_integrations.rs 95.86% <100.00%> (+0.10%) ⬆️
testnet/stacks-node/src/event_dispatcher.rs 86.15% <98.36%> (+0.22%) ⬆️

... and 36 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 d3f1a31...373c082. Read the comment docs.

hstove
hstove previously approved these changes Mar 15, 2024
Copy link
Contributor

@hstove hstove left a comment

Choose a reason for hiding this comment

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

LGTM

@zone117x zone117x requested a review from hstove March 15, 2024 15:52
@zone117x zone117x changed the title fix: json serialization for PoxAddress in RewardSet #4492 fix: isolate event-dispatcher serialization code Mar 15, 2024
@zone117x zone117x force-pushed the fix/rewarded_addresses-json-serialization branch from 91fd68f to 9664056 Compare March 15, 2024 15:54
hstove
hstove previously approved these changes Mar 15, 2024
obycode
obycode previously approved these changes Mar 15, 2024
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM!

@zone117x zone117x dismissed stale reviews from obycode and hstove via 373c082 March 18, 2024 12:14
@zone117x zone117x requested review from hstove and obycode March 18, 2024 12:45
@zone117x zone117x enabled auto-merge March 18, 2024 13:06
Copy link
Member

@jcnelson jcnelson left a comment

Choose a reason for hiding this comment

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

LGTM

@zone117x zone117x added this pull request to the merge queue Mar 18, 2024
Merged via the queue into next with commit 3a94eb3 Mar 18, 2024
2 checks passed
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.

Fix rewarded_addresses event payload serialization
5 participants