Skip to content

eth/handler: check blobs before broadcast blocks#2450

Merged
zzzckck merged 1 commit intobnb-chain:developfrom
NathanBSC:check_blobs_before_broadcast_blocks
May 13, 2024
Merged

eth/handler: check blobs before broadcast blocks#2450
zzzckck merged 1 commit intobnb-chain:developfrom
NathanBSC:check_blobs_before_broadcast_blocks

Conversation

@NathanBSC
Copy link
Copy Markdown
Contributor

@NathanBSC NathanBSC commented May 13, 2024

Description

eth/handler: check blobs before broadcast blocks

Rationale

when nodes get a new block from other peers,
It will broadcast blocks directly to part peers after only verifyHeader
here add a more check before broadcasting.

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@NathanBSC NathanBSC force-pushed the check_blobs_before_broadcast_blocks branch from 4a446e8 to 2d2a255 Compare May 13, 2024 07:13
broadcastBlockWithCheck := func(block *types.Block, propagate bool) {
// All the block fetcher activities should be disabled
// after the transition. Print the warning log.
if h.merger.PoSFinalized() {
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.

Maybe we can remove this check? not needed for BSC.

// the chain has finished the transition or not, the PoS headers
// should only come from the trusted consensus layer instead of
// p2p network.
if beacon, ok := h.chain.Engine().(*beacon.Beacon); ok {
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.

remove it as well?

@zzzckck zzzckck merged commit 23f6194 into bnb-chain:develop May 13, 2024
@NathanBSC NathanBSC deleted the check_blobs_before_broadcast_blocks branch July 25, 2024 07:40
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