feat(proposer): prefer newer attestation targets in tiered scoring#446
feat(proposer): prefer newer attestation targets in tiered scoring#446MegaRedHand wants to merge 1 commit into
Conversation
Make the proposer's tiered attestation scorer order candidates differently per tier, porting leanSpec PR #1149. Finalize/justify entries already cross 2/3 on their target, so they now rank a larger target slot first (then larger attestation slot, then more new voters): pushing the justified slot as far forward as possible shortens recovery from a justification or finalization stall. The build tier still leads with coverage (more new voters), using a larger target slot only as a tiebreak. Claude-Session: https://claude.ai/code/session_01MiEYtTEFUjX8mqYKwrriYJ
🤖 Kimi Code ReviewReview: PR 446 - Tier-dependent fork choice ordering The implementation correctly adopts the leanSpec PR #1149 logic for fork-choice candidate selection. The change from a uniform ordering to tier-dependent priorities (prioritizing chain progress for Specific notes:
Minor: Ensure Verdict: Correct and well-tested. No blockers. Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Codex Code ReviewNo blocking findings in the diff. The change in crates/blockchain/src/block_builder.rs:459 through crates/blockchain/src/block_builder.rs:488 is internally consistent with the projected-selection loop at crates/blockchain/src/block_builder.rs:165 through crates/blockchain/src/block_builder.rs:223: candidates that require newly justified sources are still gated by One non-blocking gap: the new tests at crates/blockchain/src/block_builder.rs:784 through crates/blockchain/src/block_builder.rs:849 only verify I could not run the tests locally: the sandbox has no installed Rust Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
🤖 Claude Code ReviewPR #446 Review:
|
What
Make the proposer's tiered attestation scorer (
block_builder.rs) order candidates differently per tier, porting leanSpec PR #1149 (commitb2ab3c0).tierstill leads (lower tier wins) anddata_rootis still the final deterministic tiebreak.Why
Finalize/justify entries already cross 2/3 on their target, so leading with a newer (larger) target slot pushes the justified slot as far forward as possible, which shortens recovery from a justification or finalization stall. The build tier only adds marginal voters toward the threshold, so coverage (more new voters) still leads there; a newer target is only a tiebreak.
Changes
EntryScore::ordering_keyis now tier-dependent; all slot priorities areReverse-encoded ("larger is better").type OrderingKeyalias (satisfiesclippy::type_complexity).Testing
make fmt/make lintclean.cargo test -p ethlambda-blockchain --lib block_builder— 10/10 pass.https://claude.ai/code/session_01MiEYtTEFUjX8mqYKwrriYJ