-
Notifications
You must be signed in to change notification settings - Fork 83
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
fix: add blob related things to rpc header #247
Conversation
With dencun upgrade, blob related fields are added to block header. Accordingly, those should be added. Without this, the validation of block header when starting node is failed.
WalkthroughThe Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@coderabbitai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- op-service/sources/types.go (2 hunks)
Additional comments: 2
op-service/sources/types.go (2)
- 139-148: The addition of the
omitempty
tags to theWithdrawalsRoot
,BlobGasUsed
,ExcessBlobGas
, andParentBeaconRoot
fields in therpcHeader
struct is correctly implemented. These tags ensure that these fields are omitted from the JSON output if they are not set, which is a good practice for optional fields.- 201-204: The integration of the new fields (
BlobGasUsed
,ExcessBlobGas
,ParentBeaconRoot
) into thecreateGethHeader
method is correctly done. This ensures that thetypes.Header
struct will include these fields, aligning with the requirements for thedencun
upgrade. However, ensure that the type conversions ((*uint64)(hdr.BlobGasUsed)
,(*uint64)(hdr.ExcessBlobGas)
,hdr.ParentBeaconRoot
) are safe and will not lead to runtime panics due to nil pointer dereferences when these fields are nil.
Merge into
release/v1.1.1-base
branch, which is a base branch for releasingv1.1.1
.With dencun upgrade, blob related fields are added to block header.
Accordingly, those should be added. Without this, the validation of block header when starting node is failed.
After merging this PR,
v1.1.1
will be released. Also, this should be applied tov1.2.0-rc.*
, where the upstreamed version is v1.3.0, since this is added in Optimismv1.4.0
.Summary by CodeRabbit