Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block_gossip SSE event #405

Merged
merged 4 commits into from
Jan 31, 2024
Merged

Add block_gossip SSE event #405

merged 4 commits into from
Jan 31, 2024

Conversation

dapplion
Copy link
Member

@dapplion dapplion commented Jan 9, 2024

Complements #404 to differentiate two stages of block validity.

  • block: block imported on the fork-choice on_block handler
  • block_gossip: passes validation rules of the beacon_block topic

See discussion and motivation in #349

Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

lgtm

rolfyone
rolfyone previously approved these changes Jan 29, 2024
Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

should add to changelog but looks ok to me other than that.

block_gossip:
description: The node has received a block (from P2P or API) that passes validation rules of the `beacon_block` topic
value: |
event: block
Copy link
Contributor

Choose a reason for hiding this comment

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

actually i think this name needs to be block_gossip

@rolfyone
Copy link
Contributor

@dapplion just changelog now :)

Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

LGTM

@rolfyone rolfyone merged commit d2f846e into master Jan 31, 2024
5 checks passed
@rolfyone rolfyone deleted the dapplion-patch-6 branch January 31, 2024 03:24
nflaig added a commit to ChainSafe/lodestar that referenced this pull request Jan 29, 2025
**Motivation**

See ethereum/beacon-APIs#405 and
ethereum/beacon-APIs#349 for further details
and rationale for why we want two different block events.

**Description**

Emit `block_gossip` SSE event when receiving a block through gossip or
api that passes validation rules of the `beacon_block` topic.

On the api the validation might be skipped if the block was produced
locally or a different broadcast validation is requested by the client
but by default it will use gossip validation rules.

Closes #6470
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.

3 participants