Skip to content

Wait for proposer preferences broadcasting to finish - #804

Open
hangleang wants to merge 1 commit into
grandinetech:glamsterdam-devnet-7from
hangleang:fix/broadcast-proposer-preferences-inline
Open

Wait for proposer preferences broadcasting to finish#804
hangleang wants to merge 1 commit into
grandinetech:glamsterdam-devnet-7from
hangleang:fix/broadcast-proposer-preferences-inline

Conversation

@hangleang

Copy link
Copy Markdown
Member

The minimal_rapid_upgrade .. all_keys .. built_in_validator snapshot test failed on macOS CI:

json atom at path ".validator_to_p2p[1].PublishProposerPreferences" is missing from lhs
json atom at path ".validator_to_p2p[2..16]" is missing from lhs

The run produced only UpdateDataColumnSubnets + PublishBeaconBlock and
dropped all 15 PublishProposerPreferences messages the snapshot expects.


/// Broadcasts proposer preferences for the next epoch's slots where we are proposing.
#[instrument(level = "debug", skip_all)]
async fn broadcast_proposer_preferences(&self, slot_head: &SlotHead<P>) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried to add wait_group: W param to broadcast_proposer_preferences and then drop(wait_group) on the last line inside tokio::spawn? This way it ensures that task is finished before checking test results (wait_for_tasks method call waits until all references to wait_group are dropped before continuing).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me try

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added wait_group in f49c32b

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI build failed again, it still produced non-deterministic behavior

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Then previous approach may be better

@hangleang
hangleang force-pushed the fix/broadcast-proposer-preferences-inline branch from 66cf725 to f49c32b Compare July 13, 2026 11:00
@hangleang hangleang changed the title Broadcast proposer preferences inline instead of in a detached task Wait for proposer preferences broadcasting to finish Jul 13, 2026
@hangleang
hangleang force-pushed the fix/broadcast-proposer-preferences-inline branch from f49c32b to 079988f Compare July 16, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants