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 deserialization of u16 arrays #2191

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

u16 arrays are used in the historical liquidity range tracker. Previously, we read them without applying the stride multiple, reading bytes repeatedly and at an offset, corrupting data as we go.

This applies the correct stride multiplayer fixing the issue.

u16 arrays are used in the historical liquidity range tracker.
Previously, we read them without applying the stride multiple,
reading bytes repeatedly and at an offset, corrupting data as we
go.

This applies the correct stride multiplayer fixing the issue.
@TheBlueMatt TheBlueMatt added this to the 0.0.115 milestone Apr 16, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (e1e3819) 91.35% compared to head (7775356) 91.35%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2191      +/-   ##
==========================================
- Coverage   91.35%   91.35%   -0.01%     
==========================================
  Files         102      102              
  Lines       50382    50382              
  Branches    50382    50382              
==========================================
- Hits        46027    46024       -3     
- Misses       4355     4358       +3     
Impacted Files Coverage Δ
lightning/src/util/ser.rs 90.54% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Uh, good catch.

Copy link
Contributor

@dunxen dunxen left a comment

Choose a reason for hiding this comment

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

How much usage of this was there? So it basically just gave garbage values out?

@TheBlueMatt
Copy link
Collaborator Author

Yea, always gave garbage :(. Its only used in the ProbabilisticScorer for the historical bucket tracker.

@TheBlueMatt
Copy link
Collaborator Author

We'll want to note in the release notes that people probably have corrupted scorers and they should consider wiping it on upgrade 😭

@TheBlueMatt TheBlueMatt merged commit c977def into lightningdevkit:main Apr 17, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants