Skip to content

Move LinkedList to it's own service#1217

Merged
otherview merged 45 commits into
release/hayabusafrom
pedro/hayabusa/staker_cleanup_linked_list
Aug 4, 2025
Merged

Move LinkedList to it's own service#1217
otherview merged 45 commits into
release/hayabusafrom
pedro/hayabusa/staker_cleanup_linked_list

Conversation

@otherview

@otherview otherview commented Jul 31, 2025

Copy link
Copy Markdown
Member

Description

This PR refactors the staker linked list implementation to separate linked list operations from validation storage, improving performance and maintainability by eliminating redundant storage writes.

Key Changes

  • New linked_list package: Created dedicated package at builtin/staker/linked_list/ for linked list operations

  • Separated storage concerns: Linked list now manages its own Next/Prev pointer storage independently from validation data

  • Clean separation: Validation struct no longer contains Next/Prev pointers

  • Eliminated redundant writes: Removed the 3-write problem where linked list operations required updating multiple Validation records

  • Focused storage operations: Linked list operations now only touch pointer storage, not validation data

  • Maintained API compatibility: External interfaces remain unchanged

Fixes # (issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing E2E tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

otherview added 30 commits July 29, 2025 15:34
@codecov-commenter

codecov-commenter commented Jul 31, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 44.51613% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.25%. Comparing base (49c5904) to head (e9e8741).
⚠️ Report is 3 commits behind head on release/hayabusa.

Files with missing lines Patch % Lines
builtin/staker/linkedlist/linked_list.go 55.26% 35 Missing and 16 partials ⚠️
builtin/staker/validation/service.go 0.00% 32 Missing ⚠️
builtin/staker/staker.go 66.66% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           release/hayabusa    #1217   +/-   ##
=================================================
  Coverage             58.24%   58.25%           
=================================================
  Files                   273      274    +1     
  Lines                 28966    28963    -3     
=================================================
+ Hits                  16870    16871    +1     
- Misses                10629    10653   +24     
+ Partials               1467     1439   -28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@otherview
otherview marked this pull request as ready for review July 31, 2025 15:31
@otherview
otherview requested a review from a team as a code owner July 31, 2025 15:31
…' into pedro/hayabusa/staker_cleanup_linked_list
…m:vechain/thor into pedro/hayabusa/staker_cleanup_linked_list
Comment thread builtin/staker/linkedlist/linked_list.go
@otherview
otherview force-pushed the pedro/hayabusa/staker_cleanup_linked_list branch from a70c76d to 20da6cd Compare August 1, 2025 09:30
@otherview
otherview force-pushed the pedro/hayabusa/staker_cleanup_linked_list branch from 8c62d28 to e9d8d71 Compare August 1, 2025 09:41
paologalligit
paologalligit previously approved these changes Aug 1, 2025

@paologalligit paologalligit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, left a minor comment

Comment thread builtin/staker/linkedlist/linked_list.go Outdated
Base automatically changed from pedro/hayabusa/refact_Transition to release/hayabusa August 4, 2025 15:21
@otherview
otherview dismissed paologalligit’s stale review August 4, 2025 15:21

The base branch was changed.

@otherview
otherview merged commit e2e5445 into release/hayabusa Aug 4, 2025
25 checks passed
@otherview
otherview deleted the pedro/hayabusa/staker_cleanup_linked_list branch August 4, 2025 15:37
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.

4 participants