Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2c3a6f5
extend data structures for gloas forkchoice
Tomi-3-0 Dec 16, 2025
9001418
update vote processing
Tomi-3-0 Dec 17, 2025
c4017ed
payload timeliness and extension logic
Tomi-3-0 Dec 17, 2025
c748e52
implement payload extension logic
Tomi-3-0 Dec 19, 2025
2fc45b9
implement is_supporting_vote logic
Tomi-3-0 Dec 23, 2025
327276f
implement vote support logic for gloas
Tomi-3-0 Dec 31, 2025
391b5fd
Implement get node children
Tomi-3-0 Dec 31, 2025
33613d2
Implement head selection logic for gloas
Tomi-3-0 Dec 31, 2025
2a60f8d
update process_block with forkchoice chnages
Tomi-3-0 Dec 31, 2025
26452f4
update process_attestation call sites
Tomi-3-0 Jan 1, 2026
134c290
update copyright year
Tomi-3-0 Jan 1, 2026
3a3767e
Calculate correct physical index
Tomi-3-0 Jan 3, 2026
f3a13dd
remove redundant tests
Tomi-3-0 Jan 4, 2026
5ed3f36
Review: use BitArray for ptc votes
Tomi-3-0 Jan 4, 2026
e67698b
run make test
Tomi-3-0 Jan 4, 2026
abcf6a2
clean up
Tomi-3-0 Jan 4, 2026
d9eca30
remove gloas fork choice test file
Tomi-3-0 Jan 6, 2026
ff65b17
updatw with latest changes from unstable
Tomi-3-0 Feb 1, 2026
34ad6d1
Merge branch 'unstable' into gloas/fork-choice
Tomi-3-0 Feb 1, 2026
429b402
Store parent payload status in ProtoNode
Tomi-3-0 Feb 1, 2026
c3e6acb
Merge branch 'unstable' into gloas/fork-choice
Tomi-3-0 Feb 10, 2026
439e7c3
Add new forkchoice constants
Tomi-3-0 Feb 12, 2026
fa89ee3
refactor is supporting vote
Tomi-3-0 Feb 12, 2026
957ccb3
Merge branch 'unstable'
Tomi-3-0 Feb 12, 2026
79f217a
misc
Tomi-3-0 Feb 12, 2026
7e6752d
update find head
Tomi-3-0 Feb 13, 2026
e850cfb
update should extend payload
Tomi-3-0 Feb 13, 2026
c2b6115
update get weight
Tomi-3-0 Feb 13, 2026
ddb93b3
Update get head
Tomi-3-0 Feb 13, 2026
0e6eca9
Merge branch 'unstable' of github.com:status-im/nimbus-eth2 into gloa…
Tomi-3-0 Mar 26, 2026
3dca6bf
activate fork choice tests for gloas
Tomi-3-0 Mar 26, 2026
0825fdb
update constants
Tomi-3-0 Mar 26, 2026
75853c0
implement is payload data available
Tomi-3-0 Mar 26, 2026
8f418f6
add ptc data availabilty tracking to ForkChoiceBackend
Tomi-3-0 Mar 26, 2026
e4f1d37
update get node children
Tomi-3-0 Mar 26, 2026
185c4bb
implement notify ptc messages
Tomi-3-0 Mar 26, 2026
74e2e8a
update on_payload_attestation_message
Tomi-3-0 Mar 26, 2026
f3f5cd7
update process block
Tomi-3-0 Mar 26, 2026
f66b05e
implement is head weak and apply proposer boost
Tomi-3-0 Mar 26, 2026
47be668
clean up
Tomi-3-0 Mar 26, 2026
48dd155
track block timeliness and block proposer
Tomi-3-0 Mar 26, 2026
47cfe48
implement is parent strong
Tomi-3-0 Mar 26, 2026
b0a63d3
passes spec tests
Tomi-3-0 Mar 26, 2026
204c09c
seperate gloas specific fork choice functions
Tomi-3-0 Mar 27, 2026
3ba168a
refactor: DRY up ptc vote threshold checks
Tomi-3-0 Mar 27, 2026
3592d74
refactor: use an helper for calculating supporting weight
Tomi-3-0 Mar 27, 2026
effbe31
refactor add getNode helper
Tomi-3-0 Mar 27, 2026
957aed2
clean up test fixture fork choice
Tomi-3-0 Mar 27, 2026
e7540c8
remove is parent strong and head late since no reorg logic
Tomi-3-0 Mar 27, 2026
60058ef
notify forkchoice of payload availability
Tomi-3-0 Mar 27, 2026
7ebfb54
Merge remote-tracking branch 'origin/unstable' into gloas/fork-choice
Tomi-3-0 Apr 10, 2026
36ebb91
Implement Gloas fork choice filter_block_tree and fix pre-Gloas attes…
Tomi-3-0 Apr 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ConsensusSpecPreset-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -6518,6 +6518,21 @@ ConsensusSpecPreset-mainnet
+ ForkChoice - mainnet/fulu/fork_choice/on_block/pyspec_tests/proposer_boost_is_first_block OK
+ ForkChoice - mainnet/fulu/fork_choice/on_block/pyspec_tests/proposer_boost_root_same_slot_ OK
ForkChoice - mainnet/fulu/fork_choice/should_override_forkchoice_update/pyspec_tests/shoul Skip
+ ForkChoice - mainnet/gloas/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_with_honest_a OK
+ ForkChoice - mainnet/gloas/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_without_attes OK
+ ForkChoice - mainnet/gloas/fork_choice/ex_ante/pyspec_tests/ex_ante_vanilla OK
+ ForkChoice - mainnet/gloas/fork_choice/get_head/pyspec_tests/chain_no_attestations OK
+ ForkChoice - mainnet/gloas/fork_choice/get_head/pyspec_tests/discard_equivocations_on_atte OK
+ ForkChoice - mainnet/gloas/fork_choice/get_head/pyspec_tests/genesis OK
+ ForkChoice - mainnet/gloas/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_wei OK
+ ForkChoice - mainnet/gloas/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attestat OK
+ ForkChoice - mainnet/gloas/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - mainnet/gloas/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
ForkChoice - mainnet/gloas/fork_choice/on_block/pyspec_tests/on_block_future_block Skip
+ ForkChoice - mainnet/gloas/fork_choice/on_block/pyspec_tests/proposer_boost OK
+ ForkChoice - mainnet/gloas/fork_choice/on_block/pyspec_tests/proposer_boost_is_first_block OK
+ ForkChoice - mainnet/gloas/fork_choice/on_block/pyspec_tests/proposer_boost_root_same_slot OK
+ ForkChoice - mainnet/gloas/fork_choice/on_execution_payload/pyspec_tests/on_execution_payl OK
```
## Sync
```diff
Expand Down
64 changes: 64 additions & 0 deletions ConsensusSpecPreset-minimal.md
Original file line number Diff line number Diff line change
Expand Up @@ -6844,6 +6844,7 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/altair/fork_choice/get_head/pyspec_tests/proposer_boost_correct_head OK
+ ForkChoice - minimal/altair/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_we OK
+ ForkChoice - minimal/altair/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attesta OK
+ ForkChoice - minimal/altair/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_epo OK
+ ForkChoice - minimal/altair/fork_choice/get_head/pyspec_tests/voting_source_within_two_epo OK
ForkChoice - minimal/altair/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root Skip
ForkChoice - minimal/altair/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_roo Skip
Expand All @@ -6854,7 +6855,9 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/justification_update_end_of_ OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/justification_withholding OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/justification_withholding_re OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/justified_update_always_if_b OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/justified_update_monotonic OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/justified_update_not_realize OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/new_finalized_slot_is_justif OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/not_pull_up_current_epoch_bl OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
Expand Down Expand Up @@ -6889,6 +6892,7 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/bellatrix/fork_choice/get_head/pyspec_tests/proposer_boost_correct_he OK
+ ForkChoice - minimal/bellatrix/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier OK
+ ForkChoice - minimal/bellatrix/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_atte OK
+ ForkChoice - minimal/bellatrix/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_ OK
+ ForkChoice - minimal/bellatrix/fork_choice/get_head/pyspec_tests/voting_source_within_two_ OK
ForkChoice - minimal/bellatrix/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_ro Skip
ForkChoice - minimal/bellatrix/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_ Skip
Expand All @@ -6899,7 +6903,9 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/justification_update_end_ OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/justification_withholding OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/justification_withholding OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/justified_update_always_i OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/justified_update_monotoni OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/justified_update_not_real OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/new_finalized_slot_is_jus OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/not_pull_up_current_epoch OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
Expand Down Expand Up @@ -6940,6 +6946,7 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/capella/fork_choice/get_head/pyspec_tests/proposer_boost_correct_head OK
+ ForkChoice - minimal/capella/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_w OK
+ ForkChoice - minimal/capella/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attest OK
+ ForkChoice - minimal/capella/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_ep OK
+ ForkChoice - minimal/capella/fork_choice/get_head/pyspec_tests/voting_source_within_two_ep OK
ForkChoice - minimal/capella/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root Skip
ForkChoice - minimal/capella/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_ro Skip
Expand All @@ -6950,7 +6957,9 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/justification_update_end_of OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/justification_withholding OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/justification_withholding_r OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/justified_update_always_if_ OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/justified_update_monotonic OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/justified_update_not_realiz OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/new_finalized_slot_is_justi OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/not_pull_up_current_epoch_b OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
Expand Down Expand Up @@ -6987,6 +6996,7 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/deneb/fork_choice/get_head/pyspec_tests/proposer_boost_correct_head OK
+ ForkChoice - minimal/deneb/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_wei OK
+ ForkChoice - minimal/deneb/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attestat OK
+ ForkChoice - minimal/deneb/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_epoc OK
+ ForkChoice - minimal/deneb/fork_choice/get_head/pyspec_tests/voting_source_within_two_epoc OK
ForkChoice - minimal/deneb/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root Skip
ForkChoice - minimal/deneb/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_root Skip
Expand All @@ -7001,7 +7011,9 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/justification_update_end_of_e OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/justification_withholding OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/justification_withholding_rev OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/justified_update_always_if_be OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/justified_update_monotonic OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/justified_update_not_realized OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/new_finalized_slot_is_justifi OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/not_pull_up_current_epoch_blo OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
Expand Down Expand Up @@ -7040,6 +7052,7 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/electra/fork_choice/get_head/pyspec_tests/proposer_boost_correct_head OK
+ ForkChoice - minimal/electra/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_w OK
+ ForkChoice - minimal/electra/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attest OK
+ ForkChoice - minimal/electra/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_ep OK
+ ForkChoice - minimal/electra/fork_choice/get_head/pyspec_tests/voting_source_within_two_ep OK
ForkChoice - minimal/electra/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root Skip
ForkChoice - minimal/electra/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_ro Skip
Expand All @@ -7054,7 +7067,9 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/electra/fork_choice/on_block/pyspec_tests/justification_update_end_of OK
+ ForkChoice - minimal/electra/fork_choice/on_block/pyspec_tests/justification_withholding OK
+ ForkChoice - minimal/electra/fork_choice/on_block/pyspec_tests/justification_withholding_r OK
+ ForkChoice - minimal/electra/fork_choice/on_block/pyspec_tests/justified_update_always_if_ OK
+ ForkChoice - minimal/electra/fork_choice/on_block/pyspec_tests/justified_update_monotonic OK
+ ForkChoice - minimal/electra/fork_choice/on_block/pyspec_tests/justified_update_not_realiz OK
+ ForkChoice - minimal/electra/fork_choice/on_block/pyspec_tests/new_finalized_slot_is_justi OK
+ ForkChoice - minimal/electra/fork_choice/on_block/pyspec_tests/not_pull_up_current_epoch_b OK
+ ForkChoice - minimal/electra/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
Expand Down Expand Up @@ -7093,6 +7108,7 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/fulu/fork_choice/get_head/pyspec_tests/proposer_boost_correct_head OK
+ ForkChoice - minimal/fulu/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_weig OK
+ ForkChoice - minimal/fulu/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attestati OK
+ ForkChoice - minimal/fulu/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_epoch OK
+ ForkChoice - minimal/fulu/fork_choice/get_head/pyspec_tests/voting_source_within_two_epoch OK
ForkChoice - minimal/fulu/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root Skip
ForkChoice - minimal/fulu/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_root Skip
Expand All @@ -7103,7 +7119,9 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/fulu/fork_choice/on_block/pyspec_tests/justification_update_end_of_ep OK
+ ForkChoice - minimal/fulu/fork_choice/on_block/pyspec_tests/justification_withholding OK
+ ForkChoice - minimal/fulu/fork_choice/on_block/pyspec_tests/justification_withholding_reve OK
+ ForkChoice - minimal/fulu/fork_choice/on_block/pyspec_tests/justified_update_always_if_bet OK
+ ForkChoice - minimal/fulu/fork_choice/on_block/pyspec_tests/justified_update_monotonic OK
+ ForkChoice - minimal/fulu/fork_choice/on_block/pyspec_tests/justified_update_not_realized_ OK
+ ForkChoice - minimal/fulu/fork_choice/on_block/pyspec_tests/new_finalized_slot_is_justifie OK
+ ForkChoice - minimal/fulu/fork_choice/on_block/pyspec_tests/not_pull_up_current_epoch_bloc OK
+ ForkChoice - minimal/fulu/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
Expand Down Expand Up @@ -7146,6 +7164,52 @@ ConsensusSpecPreset-minimal
ForkChoice - minimal/fulu/fork_choice/should_override_forkchoice_update/pyspec_tests/shoul Skip
+ ForkChoice - minimal/fulu/fork_choice/withholding/pyspec_tests/withholding_attack OK
+ ForkChoice - minimal/fulu/fork_choice/withholding/pyspec_tests/withholding_attack_unviable OK
+ ForkChoice - minimal/gloas/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_with_honest_a OK
+ ForkChoice - minimal/gloas/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_without_attes OK
+ ForkChoice - minimal/gloas/fork_choice/ex_ante/pyspec_tests/ex_ante_vanilla OK
+ ForkChoice - minimal/gloas/fork_choice/get_head/pyspec_tests/chain_no_attestations OK
+ ForkChoice - minimal/gloas/fork_choice/get_head/pyspec_tests/discard_equivocations_on_atte OK
+ ForkChoice - minimal/gloas/fork_choice/get_head/pyspec_tests/discard_equivocations_slashed OK
+ ForkChoice - minimal/gloas/fork_choice/get_head/pyspec_tests/filtered_block_tree OK
+ ForkChoice - minimal/gloas/fork_choice/get_head/pyspec_tests/genesis OK
+ ForkChoice - minimal/gloas/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_wei OK
+ ForkChoice - minimal/gloas/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attestat OK
+ ForkChoice - minimal/gloas/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_epoc OK
+ ForkChoice - minimal/gloas/fork_choice/get_head/pyspec_tests/voting_source_within_two_epoc OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/incompatible_justification_up OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/incompatible_justification_up OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/justification_update_beginnin OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/justification_update_end_of_e OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/justification_withholding OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/justification_withholding_rev OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/justified_update_always_if_be OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/justified_update_monotonic OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/justified_update_not_realized OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/new_finalized_slot_is_justifi OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/not_pull_up_current_epoch_blo OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/on_block_before_finalized OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/on_block_checkpoints OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/on_block_finalized_skip_slots OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/on_block_finalized_skip_slots OK
ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/on_block_future_block Skip
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/proposer_boost OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/proposer_boost_is_first_block OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/proposer_boost_root_same_slot OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/pull_up_on_tick OK
+ ForkChoice - minimal/gloas/fork_choice/on_block/pyspec_tests/pull_up_past_epoch_block OK
+ ForkChoice - minimal/gloas/fork_choice/on_execution_payload/pyspec_tests/on_execution_payl OK
+ ForkChoice - minimal/gloas/fork_choice/reorg/pyspec_tests/delayed_justification_current_ep OK
+ ForkChoice - minimal/gloas/fork_choice/reorg/pyspec_tests/delayed_justification_previous_e OK
+ ForkChoice - minimal/gloas/fork_choice/reorg/pyspec_tests/include_votes_another_empty_chai OK
+ ForkChoice - minimal/gloas/fork_choice/reorg/pyspec_tests/include_votes_another_empty_chai OK
+ ForkChoice - minimal/gloas/fork_choice/reorg/pyspec_tests/include_votes_another_empty_chai OK
+ ForkChoice - minimal/gloas/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_delayed_j OK
+ ForkChoice - minimal/gloas/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_delayed_j OK
+ ForkChoice - minimal/gloas/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_without_e OK
+ ForkChoice - minimal/gloas/fork_choice/withholding/pyspec_tests/withholding_attack OK
+ ForkChoice - minimal/gloas/fork_choice/withholding/pyspec_tests/withholding_attack_unviabl OK
```
## Sync
```diff
Expand Down
14 changes: 8 additions & 6 deletions beacon_chain/consensus_object_pools/attestation_pool.nim
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ proc init*(T: type AttestationPool, dag: ChainDAGRef,
proc addForkChoiceVotes(
pool: var AttestationPool, slot: Slot,
attesting_indices: openArray[ValidatorIndex], block_root: Eth2Digest,
wallTime: BeaconTime) =
committee_index: CommitteeIndex, wallTime: BeaconTime) =
# Add attestation votes to fork choice
if (let v = pool.forkChoice.on_attestation(
pool.dag, slot, block_root, attesting_indices, wallTime);
pool.dag, slot, block_root, attesting_indices, committee_index, wallTime);
v.isErr):
# This indicates that the fork choice and the chain dag are out of sync -
# this is most likely the result of a bug, but we'll try to keep going -
Expand Down Expand Up @@ -474,7 +474,7 @@ proc addAttestation*(

pool.addForkChoiceVotes(
attestation.data.slot, attesting_indices, attestation.data.beacon_block_root,
wallTime,
CommitteeIndex(committee_index), wallTime,
)

# There does not seem to be an SSE stream event corresponding to Attestation,
Expand Down Expand Up @@ -911,9 +911,11 @@ proc willSelectNewHead*(
proc selectOptimisticHead*(
pool: var AttestationPool, wallTime: BeaconTime): Opt[BeaconHead] =
## Trigger fork choice and returns the new head block.
let newHeadRoot = pool.forkChoice.get_head(pool.dag, wallTime).valueOr:
error "Couldn't select head", err = error
return Opt.none(BeaconHead)
let
newHeadNode = pool.forkChoice.get_head(pool.dag, wallTime).valueOr:
error "Couldn't select head", err = error
return Opt.none(BeaconHead)
newHeadRoot = newHeadNode.root

let headBlock = pool.dag.getBlockRef(newHeadRoot).valueOr:
# This should normally not happen, but if the chain dag and fork choice
Expand Down
Loading
Loading