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

eth/handler: remove duplicate check for lists in body #2683

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

buddh0
Copy link
Collaborator

@buddh0 buddh0 commented Sep 4, 2024

Description

eth/handler: remove duplicate check for lists in body

Rationale

in this PR(#2461),
check for 3 lists Uncles, Transactions, Withdrawals is added.

but indeed, most of them are useless, because
if block recieved by handleBlockBodies,
Uncles and Transactions have been checked at https://github.com/bnb-chain/bsc/blob/master/eth/fetcher/block_fetcher.go#L718
if block recieved by handleNewBlock
Uncles and Transactions have been checked at https://github.com/bnb-chain/bsc/blob/master/eth/protocols/eth/handlers.go#L316
so only add check for Withdrawals` is ok.

the check for Transactions cost not a little time when block is huge,
by removing the dupicate check, a better performance can be acheived

so this PR have 2 commits,
the first one is to revert the above PR,
the second one add the check for Withdrawals`

Example

add an example CLI or API response...

Changes

Notable changes:

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

@buddh0 buddh0 force-pushed the remove_duplicate_list_check branch 2 times, most recently from f547fb7 to 8f61113 Compare September 18, 2024 06:56
@zzzckck zzzckck merged commit 089064c into bnb-chain:develop Sep 19, 2024
7 checks passed
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