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

NOD-525: Optimize PoolRewards with cached hashing #1321

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

drsk0
Copy link
Contributor

@drsk0 drsk0 commented Feb 10, 2025

Replace BufferedRef with HashedBufferedRef in PoolRewards' bakerPoolRewardDetails LFMBTree to cache computed hashes. This optimization eliminates redundant hash calculations previously performed for each block.

Technical details:

  • Switched from BufferedRef to HashedBufferedRef
  • Affects bakerPoolRewardDetails tree in PoolRewards data

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

CLA acceptance

_Remove if not applicable.

By submitting the contribution I accept the terms and conditions of the
Contributor License Agreement v1.0

@drsk0 drsk0 requested review from eb-concordium and td202 February 10, 2025 14:01
Replace BufferedRef with HashedBufferedRef in PoolRewards'
bakerPoolRewardDetails  LFMBTree to cache computed hashes. This
optimization eliminates redundant hash  calculations previously
performed for each block.

Technical details:
- Switched from BufferedRef to HashedBufferedRef
- Affects bakerPoolRewardDetails tree in PoolRewards data
@drsk0 drsk0 force-pushed the hashed_buffered_reference branch from 13a66ed to 9ede7bf Compare February 10, 2025 15:20
Copy link
Contributor

@td202 td202 left a comment

Choose a reason for hiding this comment

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

Looks fine. Remember to update the changelog.

@drsk0
Copy link
Contributor Author

drsk0 commented Feb 13, 2025

Updated the Changelog. @td202 what's our policies for when to update the Changelog? This seemed more like a technical detail to me.

@drsk0 drsk0 force-pushed the hashed_buffered_reference branch from decd1f4 to d2d38e7 Compare February 13, 2025 13:30
@drsk0 drsk0 merged commit 20283ad into main Feb 13, 2025
3 checks passed
@drsk0 drsk0 deleted the hashed_buffered_reference branch February 13, 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.

2 participants