Skip to content

bsc2: fix block sidecar fetching issue;#3087

Merged
zzzckck merged 6 commits intobnb-chain:developfrom
galaio:new-broadcast
May 14, 2025
Merged

bsc2: fix block sidecar fetching issue;#3087
zzzckck merged 6 commits intobnb-chain:developfrom
galaio:new-broadcast

Conversation

@galaio
Copy link
Copy Markdown
Contributor

@galaio galaio commented May 14, 2025

Description

This PR fixes the problem that BlockByRange occasionally does not return the sidecar of the block normally. By actively querying the sidecar again, the block cache is lost and the sidecar exception is avoided.

image

Changes

Notable changes:

  • bsc2: fix block sidecar fetching issue;
  • ...

@galaio galaio requested review from buddh0 and zzzckck May 14, 2025 01:17
@zzzckck zzzckck requested a review from Copilot May 14, 2025 01:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses a block sidecar fetching issue by modifying how sidecars are queried and passed to block data constructors, ensuring that sidecars are actively retrieved during block processing. Key changes include updating the NewBlockData function signature, modifying block fetching in the bsc handler to query sidecars explicitly, and adding sidecar sanity checks in the main handler.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
eth/protocols/bsc/protocol.go Updated NewBlockData to accept externally fetched sidecars.
eth/protocols/bsc/handler.go Modified block range handling to fetch sidecars for each block.
eth/handler.go Added sanity check for sidecars to prevent wrong block messages.

@buddh0
Copy link
Copy Markdown
Contributor

buddh0 commented May 14, 2025

image
GetSidecarsByHash called in these 3 places can be deleted.

@zzzckck zzzckck merged commit 1a72a96 into bnb-chain:develop May 14, 2025
7 checks passed
galaio added a commit to galaio/bsc that referenced this pull request May 29, 2025
galaio added a commit to galaio/bsc that referenced this pull request May 29, 2025
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.

5 participants