Commit Graph

161 Commits

Author SHA1 Message Date
Eitan Seri-Levi
a42444de4e Merge branch 'gloas-walk-always' into epbs-devnet-1 2026-04-04 01:18:38 +09:00
dapplion
6763862e0f Add attestation_due_bps_gloas and payload_attestation_due_bps to ChainSpec
Spec: `get_attestation_due_ms(epoch)` uses ATTESTATION_DUE_BPS_GLOAS
(2500) for Gloas epochs vs ATTESTATION_DUE_BPS (3333) pre-Gloas.
`get_payload_attestation_due_ms` uses PAYLOAD_ATTESTATION_DUE_BPS (7500).

- Add both BPS fields to ChainSpec with derived Duration values
- Add `get_attestation_due::<E>(slot)` that returns epoch-appropriate
  threshold matching the spec
- Add `get_payload_attestation_due()` matching the spec
- Use them in proto_array record_block_timeliness instead of hardcoded
  values
2026-04-02 01:23:18 -05:00
dapplion
9db37b8bd3 Document is_head_weak spec divergence and impact 2026-04-02 00:50:46 -05:00
Michael Sproul
a1296fc0c7 Fix block_timeliness_ptc_threshold hardcoded constants 2026-04-02 16:38:40 +11:00
Michael Sproul
6df55970aa Simplify find_head_walk 2026-04-02 14:24:37 +11:00
Michael Sproul
eceedaf7b6 Revert parent->child optimisation AGAIN 2026-04-02 14:10:27 +11:00
Michael Sproul
7570fd1555 Remove comment 2026-04-02 14:10:11 +11:00
Michael Sproul
5284486af0 Break out of invalidation loop on Gloas block 2026-04-02 13:55:29 +11:00
Michael Sproul
85934b4d5f Remove some noisy TODOs 2026-04-02 13:52:21 +11:00
Michael Sproul
6cc65848da Remove dead code 2026-04-02 13:35:51 +11:00
Michael Sproul
d7f67dae21 Remove incorrect comment 2026-04-02 13:27:43 +11:00
Michael Sproul
cc7e727f90 Tidy latest_message 2026-04-02 11:46:34 +11:00
Michael Sproul
958c8cad39 Rename fork choice test def for clarity 2026-04-02 11:05:33 +11:00
Michael Sproul
1c5a7bed74 Clarify name of on_valid_payload_envelope_received 2026-04-02 10:56:34 +11:00
Eitan Seri- Levi
d978e3dabe revbert 2026-04-01 00:35:14 -07:00
Eitan Seri- Levi
12e6595b32 revcert 2026-04-01 00:02:11 -07:00
Michael Sproul
5aae563d84 Remove proposer boost weight during upgrade 2026-04-01 17:59:45 +11:00
Eitan Seri- Levi
f6baea4b08 revert 2026-03-31 23:55:42 -07:00
Eitan Seri- Levi
dc5489d20c Merge branch 'gloas-walk-always' of https://github.com/sigp/lighthouse into gloas-fork-choice-fixes 2026-03-31 23:53:09 -07:00
Eitan Seri- Levi
39f07106af revert 2026-03-31 23:53:06 -07:00
Michael Sproul
f5b2445d09 Remove stupid GLOAS comments 2026-04-01 16:46:02 +11:00
Michael Sproul
ddff03d26f Store parent_payload_hash in ProtoNode 2026-04-01 16:42:49 +11:00
Michael Sproul
3cf19e724f Fix Gloas check in on_block 2026-04-01 15:47:10 +11:00
Michael Sproul
ab023a7231 Fix the VoteTrackerV28 definition 2026-04-01 14:54:18 +11:00
Michael Sproul
4e44cec249 Fix markdown lint 2026-04-01 13:45:19 +11:00
Michael Sproul
edae39cc29 Fix fork transition case 2026-04-01 13:29:48 +11:00
Michael Sproul
afb1f0ae2d Fix VoteTracker decoding 2026-04-01 12:50:55 +11:00
Michael Sproul
9ef73d0af0 Add new cross-boundary test 2026-04-01 12:25:22 +11:00
Michael Sproul
f6f9eae4ef More cleanup 2026-04-01 12:04:32 +11:00
Michael Sproul
bc6cf0f882 Remove payload attestation queueing and more cleanups 2026-04-01 11:17:33 +11:00
dapplion
993cecee83 Clear best_child/best_descendant during V28->V29 conversion 2026-03-31 15:22:31 -05:00
Eitan Seri- Levi
77382daab9 Rvert 2026-03-31 10:45:29 -07:00
Eitan Seri- Levi
95a58393c6 Smol fix 2026-03-31 10:37:18 -07:00
Eitan Seri- Levi
367972bb6e Default to full payload status if the payload has been received 2026-03-31 10:37:14 -07:00
dapplion
5353710e0a Fix compilation, clear best_child/best_descendant in migration
- Fix leaf detection in heads_descended_from_finalization (parent()
  method call, map away enumerate index)
- Clear best_child and best_descendant in v28->v29 migration (no
  longer used, replaced by virtual tree walk)
- Migration now rewrites fork choice data instead of being a no-op
2026-03-31 00:51:19 -05:00
Michael Sproul
b6728c2030 Start removing more best_child/best_descend 2026-03-31 16:02:19 +11:00
Michael Sproul
517d16f2fd Revert parent->child optimisation 2026-03-31 15:47:50 +11:00
Michael Sproul
4c3fd70dbf Merge remote-tracking branch 'origin/unstable' into gloas-walk-always 2026-03-30 16:10:35 +11:00
Mac L
a5e748f808 Use yaml_serde in place of deprecated serde_yaml (#9040)
`serde_yaml` is now deprecated. The API-compatible `yaml_serde` should be used instead.


  Replace `serde_yaml` with `yaml_serde`. This is purely mechanical as the API is 1-to-1.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-03-29 18:39:20 +00:00
Michael Sproul
12f5ab04f3 Load the state corresponding to head payload status yay 2026-03-26 16:03:55 +11:00
dapplion
c7670ede02 Cleanup and spec parity fixes
- Add missing payload attestation slot check: spec returns early when
  data.slot != block.slot (PTC votes only for assigned block)
- Remove dead ignored tests (need mock EL Gloas support to run)
- Remove unused new_with_gloas and inspect_queued_payload_attestations
- Remove gloas entries from bin.rs (not part of this PR)
- Collapse nested if in payload attestation error handling (clippy)
- Rename env -> envelope in load_parent
- Add TODO(gloas) for parent_head_hash in re-org path
- Remove head_payload_status from ForkchoiceUpdateParameters (lives on
  CachedHead, sourced from get_head return)
2026-03-25 23:07:45 -05:00
dapplion
e676c33c92 Merge sigp/unstable into gloas-walk-always 2026-03-25 22:02:08 -05:00
Michael Sproul
bd34bb1430 Remove schema migrations for v28 and earlier (#9031)
With LH v8.1.3 supporting Fulu-on-Gnosis, we no longer need these DB migrations. All Lighthouse nodes running in prod will soon be updated to LH v8.0.0+ and schema v28+.

This PR helps with Gloas fork choice changes, by allowing us to avoid updating old schema migrations when adding V29 for Gloas:

- https://github.com/sigp/lighthouse/pull/9025


  


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-03-26 02:10:34 +00:00
dapplion
a34b7c99dc Fix CI: collapse nested if, ignore payload attestation test
- Collapse nested if in build_children_index (clippy::collapsible_if)
- Ignore payload_attestation_for_previous_slot_is_accepted_at_next_slot
  — test uses pre-Gloas blocks (V17) but on_payload_attestation requires
  V29 nodes. Needs mock EL Gloas block support.
2026-03-25 20:33:17 -05:00
dapplion
e7f027badd O(n) children index, fix load_parent for gloas blocks
- Build parent->children index once per find_head call, replacing O(n)
  scans in filter_block_tree and get_node_children with O(1) lookups.
- Skip zero block_hash in is_parent_block_full check — default/zero
  hashes don't indicate a real payload relationship.
- Fall back to block state_root for genesis when envelope not stored.
- Store execution payload envelope in EF test harness during
  on_execution_payload step.
2026-03-25 19:38:54 -05:00
Michael Sproul
d58df3a656 Make proposer_index mandatory in on_block 2026-03-26 11:07:38 +11:00
Michael Sproul
a69a848590 Remove expect 2026-03-26 10:48:18 +11:00
Michael Sproul
9f1f68c3ee Add back AttestationFromBlock 2026-03-26 10:39:57 +11:00
dapplion
84679b1c07 Remove redundant invalid-node check from filter_block_tree
The children filter already skips invalid nodes, so a valid parent
whose only children are invalid becomes a leaf and gets rejected by
node_is_viable_for_head. The top-level check was redundant.
2026-03-25 18:22:51 -05:00
Michael Sproul
66f71b3f22 Remove unused params 2026-03-26 10:01:33 +11:00