Feat/spec proposer round robin for Boole fork#2637
Conversation
Greptile SummaryThis PR implements the Boole fork round-robin proposer algorithm and adds fork configuration across all networks. The core changes include:
The implementation follows SSV fork configuration best practices by placing configuration in Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Controller as ProposerF in Controller
participant ForkAware as ForkAwareRoundRobinProposer
participant Boole as RoundRobinProposer_Boole
participant Original as RoundRobinProposer
Controller->>ForkAware: ForkAwareRoundRobinProposer(state, round, booleFork)
alt booleFork == true
ForkAware->>Boole: RoundRobinProposer_Boole(state, round)
Boole->>Boole: Calculate firstRoundIndex from Height
Boole->>Boole: Calculate heightPeriod = Height / 32
Boole->>Boole: Calculate proposer index with heightPeriod
Boole-->>ForkAware: return OperatorID
else booleFork == false
ForkAware->>Original: RoundRobinProposer(state, round)
Original->>Original: Calculate firstRoundIndex from Height
Original->>Original: Calculate proposer index
Original-->>ForkAware: return OperatorID
end
ForkAware-->>Controller: return OperatorID
|
742e197 to
23e35da
Compare
Codecov Report❌ Patch coverage is ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@julienh-ssv please add description and also link to relevant Spec and SIP PRs. |
y0sher
left a comment
There was a problem hiding this comment.
To be honest, I think the scope of this change should be as limited as we can to the required change. So even though I think the refactor is correct and better looking, I wouldn't want to tie it with the scope of this change, So I'm willing to live with the duplication of the forking logic:
if netCfg.BooleForkAtSlot {
// with epoch leader
} else {
// no epoch leader
}It's going to be duplicated similarly around the code for many use cases anyway. but if possible to reduce the duplication in consensus_validation by importing the logic from the qbft package (and wrapping with the ifs like I mentioned before).
Just to clarify my main goal is to keep the change as minimal as possible while achieving the expected result.
I'd be up to do a refactor in how we do leaders in a future PR with a clear scope for that specifically.
1d8274f to
2df6a94
Compare
2df6a94 to
54526ef
Compare
vyzo
left a comment
There was a problem hiding this comment.
just a minor formatting nit, looks good.
d034959 to
3728281
Compare
iurii-ssv
left a comment
There was a problem hiding this comment.
Nice changes, just some questions & minor suggestions from me.
2c48469 to
99033f6
Compare
3614355 to
6dd1722
Compare
6dd1722 to
14581cb
Compare
…)" This reverts commit 0212aab.
This PR updates the proposer selection function to match the latest spec for Boole Fork. Since the function was duplicated in our codebase, I also refactored the code to use a single source of truth implementation.