Refactor Transition#1212
Merged
Merged
Conversation
…thor into pedro/hayabusa/refact_housekeep
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/hayabusa #1212 +/- ##
====================================================
+ Coverage 58.24% 58.28% +0.04%
====================================================
Files 273 274 +1
Lines 28966 28968 +2
====================================================
+ Hits 16870 16885 +15
- Misses 10629 10647 +18
+ Partials 1467 1436 -31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
otherview
force-pushed
the
pedro/hayabusa/refact_Transition
branch
from
July 30, 2025 15:34
4ac8430 to
c5d8247
Compare
Base automatically changed from
pedro/hayabusa/refact_housekeep
to
release/hayabusa
July 30, 2025 15:54
…/thor into pedro/hayabusa/refact_Transition
darrenkel
reviewed
Jul 31, 2025
otherview
marked this pull request as ready for review
July 31, 2025 08:55
…/thor into pedro/hayabusa/refact_Transition
…abusa/refact_Transition
…abusa/refact_Transition
…abusa/refact_Transition
Co-authored-by: Paolo Galli <paolo.galli@vechain.org>
otherview
force-pushed
the
pedro/hayabusa/refact_Transition
branch
from
August 4, 2025 15:09
a2a94a8 to
58f37f0
Compare
paologalligit
approved these changes
Aug 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces significant architectural improvements to the staker contract's transition logic, focusing on better separation of concerns, improved testability, and cleaner state management.
Key Changes
transition.go: Introduces a dedicatedTransition()method that handles PoS activation logiccomputeEpochTransition()andapplyEpochTransition()private for better encapsulationEpochTransitionstruct to better represent state changesAddLeaderGroup(): Eliminated direct external access to leader group manipulationBreaking Changes
ActivateNextValidator()method is now private (activateNextValidator())AddLeaderGroup()method removed from public APIComputeEpochTransition()method is now private (computeEpochTransition())Fixes # (issue)
Checklist: