Skip to content

Commit

Permalink
fix(ethclient): support new cancun fields in header (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo authored Jan 31, 2024
1 parent 1f002f3 commit d86b42c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 36 deletions.
12 changes: 12 additions & 0 deletions core/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ type Header struct {
// WithdrawalsHash was added by EIP-4895 and is ignored in legacy headers.
// Included for Ethereum compatibility in Scroll SDK
WithdrawalsHash *common.Hash `json:"withdrawalsRoot" rlp:"optional"`

// BlobGasUsed was added by EIP-4844 and is ignored in legacy headers.
// Included for Ethereum compatibility in Scroll SDK
BlobGasUsed *uint64 `json:"blobGasUsed" rlp:"optional"`

// ExcessBlobGas was added by EIP-4844 and is ignored in legacy headers.
// Included for Ethereum compatibility in Scroll SDK
ExcessBlobGas *uint64 `json:"excessBlobGas" rlp:"optional"`

// ParentBeaconRoot was added by EIP-4788 and is ignored in legacy headers.
// Included for Ethereum compatibility in Scroll SDK
ParentBeaconRoot *common.Hash `json:"parentBeaconBlockRoot" rlp:"optional"`
}

// field type overrides for gencodec
Expand Down
88 changes: 53 additions & 35 deletions core/types/gen_header_json.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 1 // Minor version component of the current release
VersionPatch = 13 // Patch version component of the current release
VersionPatch = 14 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

Expand Down

0 comments on commit d86b42c

Please sign in to comment.