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

Timeboost Bulk BlockMetadata API #2754

Open
wants to merge 13 commits into
base: add-timeboosted-broadcastfeedmessage
Choose a base branch
from

Conversation

ganeshvanahalli
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli commented Oct 24, 2024

This PR introduces an RPC method to the arb namespace called arb_getRawBlockMetadata, which takes a range and returns an array of NumberAndBlockMetadata struct which contains the blockNumber and blockMetadata in hex encoding, for all the blocks in the range that the node has blockMetadata for.

To enhance performance, the api uses LRU cache to store the newly fetched blockMetadata from local DB, this is enabled by default and can be set using --execution.block-metadata-api-cache-size to a positive value.

Pulls in Geth PR- OffchainLabs/go-ethereum#372
Resolves NIT-2837

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Oct 24, 2024
@ganeshvanahalli ganeshvanahalli changed the base branch from express-lane-timeboost to add-timeboosted-broadcastfeedmessage October 24, 2024 13:13
@ganeshvanahalli ganeshvanahalli marked this pull request as ready for review October 24, 2024 13:15
@ganeshvanahalli ganeshvanahalli changed the title Bulk blockmetadata api Timeboost Bulk BlockMetadata API Oct 24, 2024
@eljobe
Copy link
Member

eljobe commented Oct 25, 2024

I'm afraid I cannot realistically review this with everything going on with BoLD. Sorry. Removing myself as a reviewer for now.

@eljobe eljobe removed their request for review October 25, 2024 12:56
Copy link
Contributor

@magicxyyz magicxyyz left a comment

Choose a reason for hiding this comment

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

looks good, just a question about hexutil.Uint64 use instead of rpc.BlockNumber and some nitpicks

execution/gethexec/blockmetadata.go Outdated Show resolved Hide resolved
system_tests/timeboost_test.go Outdated Show resolved Hide resolved
execution/gethexec/node.go Outdated Show resolved Hide resolved
execution/gethexec/api.go Outdated Show resolved Hide resolved
system_tests/timeboost_test.go Outdated Show resolved Hide resolved
Copy link
Member

@Tristan-Wilson Tristan-Wilson left a comment

Choose a reason for hiding this comment

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

Looks good, one comment about input validation.

execution/gethexec/blockmetadata.go Outdated Show resolved Hide resolved
execution/gethexec/executionengine.go Outdated Show resolved Hide resolved
execution/gethexec/blockmetadata.go Outdated Show resolved Hide resolved
execution/gethexec/node.go Outdated Show resolved Hide resolved
execution/gethexec/executionengine.go Outdated Show resolved Hide resolved
Copy link
Contributor

@magicxyyz magicxyyz left a comment

Choose a reason for hiding this comment

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

Looks great! just one suggestion for sanity checks in SetReorgEventsNotifier, sorry for missing that before

execution/gethexec/executionengine.go Outdated Show resolved Hide resolved
Copy link
Contributor

@magicxyyz magicxyyz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Tristan-Wilson Tristan-Wilson left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants