Skip to content

Commit a74eee3

Browse files
fjlgballet
authored andcommitted
core/types, internal/ethapi: fixes for prague RPC encoding (ethereum#30926)
Fixing some issues I found while regenerating RPC tests for Prague: - Authorization signature values were not encoded as hex - `requestsRoot` in block should be `requestsHash` - `authorizationList` should work for `eth_call`
1 parent 7bcb893 commit a74eee3

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

core/types/block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ type Header struct {
105105
ParentBeaconRoot *common.Hash `json:"parentBeaconBlockRoot" rlp:"optional"`
106106

107107
// RequestsHash was added by EIP-7685 and is ignored in legacy headers.
108-
RequestsHash *common.Hash `json:"requestsRoot" rlp:"optional"`
108+
RequestsHash *common.Hash `json:"requestsHash" rlp:"optional"`
109109
}
110110

111111
// field type overrides for gencodec

core/types/gen_authorization.go

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/types/gen_header_json.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/types/tx_setcode.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ type authorizationMarshaling struct {
8383
ChainID hexutil.Uint64
8484
Nonce hexutil.Uint64
8585
V hexutil.Uint64
86+
R hexutil.U256
87+
S hexutil.U256
8688
}
8789

8890
// SignAuth signs the provided authorization.

internal/ethapi/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} {
895895
result["parentBeaconBlockRoot"] = head.ParentBeaconRoot
896896
}
897897
if head.RequestsHash != nil {
898-
result["requestsRoot"] = head.RequestsHash
898+
result["requestsHash"] = head.RequestsHash
899899
}
900900
return result
901901
}

internal/ethapi/transaction_args.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ func (args *TransactionArgs) ToMessage(baseFee *big.Int, skipNonceCheck, skipEoA
466466
AccessList: accessList,
467467
BlobGasFeeCap: (*big.Int)(args.BlobFeeCap),
468468
BlobHashes: args.BlobHashes,
469+
AuthList: args.AuthorizationList,
469470
SkipNonceChecks: skipNonceCheck,
470471
SkipFromEOACheck: skipEoACheck,
471472
}

0 commit comments

Comments
 (0)