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

Change getByBlockNumber to be getByBlockHeader #4789

Closed
11 tasks done
siladu opened this issue Dec 8, 2022 · 2 comments
Closed
11 tasks done

Change getByBlockNumber to be getByBlockHeader #4789

siladu opened this issue Dec 8, 2022 · 2 comments
Assignees
Labels
EIP Ethereum Improvement Proposal epic mainnet TeamGroot GH issues worked on by Groot Team

Comments

@siladu
Copy link
Contributor

siladu commented Dec 8, 2022

Following #4743

We should update all the usages we can to be getByBlockHeader and phase out getByBlockNumber.

getByBlockNumber can cause issues in a post-shanghai (TimestampSchedule-enabled) chain.

This has been intentionally separated out of #4743 so it doesn't make the PR huge, see this spike for an idea of what the changes might look like: #4687

Another related item for clean-up:
#4743 (comment)

Tasks

  • Simple replacements of getByBlockNumber to getByBlockHeader
  • Create getForNextBlock (used in AbstractBlockCreator, PoWMinerExecutor and likely in BFT)
  • Investigate FlexiblePrivacyPrecompiledContract usage in RunnerBuilder.createPrivateTransactionObserver()
  • Handle Dao fork and classic fork in ProtocolScheduleBuilder
  • BFT sequence number usage
  • Change streamMilestoneBlocks to a findSchedule(Predicate) [need to fix usage in TransactionPoolFactory, RunnerBuilder]
  • Consider deleting getByBlockNumber usage in CombinedProtocolScheduleFactory
  • Fix tests to getByBlockHeader or create a test ProtocolSchedule that has getByBlockNumber inc streamMilestoneBlocks for checking milestones
  • ScheduleBasedBlockHeaderFunctions getBlockHeaderFunctions usage of getByBlockNumber
  • CheckpointSyncDownloadPipelineFactory getBlockHeaderFunctions usage of getByBlockNumber
  • Replace HeaderBasedProtocolSchedule with ProtocolSchedule
@siladu siladu added the TeamGroot GH issues worked on by Groot Team label Dec 8, 2022
@gfukushima gfukushima self-assigned this Jan 24, 2023
@gfukushima
Copy link
Contributor

gfukushima commented Jan 25, 2023

Partial work of the trivial replaces done here: https://github.com/gfukushima/besu/tree/replace-getByBlockNumber-by-getByBlockHeader. Missing a few fixes for the tests.

@siladu
Copy link
Contributor Author

siladu commented Feb 8, 2023

Bug found during goerli sync: #5064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EIP Ethereum Improvement Proposal epic mainnet TeamGroot GH issues worked on by Groot Team
Projects
None yet
Development

No branches or pull requests

4 participants