Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions src/eth/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,56 @@
result:
name: Block number
value: '0x2377'
- name: eth_config
summary: Returns the client's current configuration including fork information.
externalDocs:
description: EIP-7910 specification
url: https://eips.ethereum.org/EIPS/eip-7910
params: []
result:
name: Configuration
schema:
$ref: '#/components/schemas/ConfigurationResponse'
examples:
- name: eth_config example with no future fork scheduled
params: []
result:
name: Configuration
value:
current:
activationTime: 1746612311
blobSchedule:
baseFeeUpdateFraction: 5007716
max: 9
target: 6
chainId: '0x1'
forkId: '0x3ff0e375'
precompiles:
BLS12_G1ADD: '0x000000000000000000000000000000000000000b'
BLS12_G1MSM: '0x000000000000000000000000000000000000000c'
BLS12_G2ADD: '0x000000000000000000000000000000000000000d'
BLS12_G2MSM: '0x000000000000000000000000000000000000000e'
BLS12_MAP_FP2_TO_G2: '0x0000000000000000000000000000000000000011'
BLS12_MAP_FP_TO_G1: '0x0000000000000000000000000000000000000010'
BLS12_PAIRING_CHECK: '0x000000000000000000000000000000000000000f'
BLAKE2F: '0x0000000000000000000000000000000000000009'
BN254_ADD: '0x0000000000000000000000000000000000000006'
BN254_MUL: '0x0000000000000000000000000000000000000007'
BN254_PAIRING: '0x0000000000000000000000000000000000000008'
ECREC: '0x0000000000000000000000000000000000000001'
ID: '0x0000000000000000000000000000000000000004'
KZG_POINT_EVALUATION: '0x000000000000000000000000000000000000000a'
MODEXP: '0x0000000000000000000000000000000000000005'
RIPEMD160: '0x0000000000000000000000000000000000000003'
SHA256: '0x0000000000000000000000000000000000000002'
systemContracts:
BEACON_ROOTS_ADDRESS: '0x000f3df6d732807ef1319fb7b8bb8522d0beac02'
CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS: '0x0000bbddc7ce488642fb579f8b00f3a590007251'
DEPOSIT_CONTRACT_ADDRESS: '0x00000000219ab540356cbb839cbe05303d7705fa'
HISTORY_STORAGE_ADDRESS: '0x0000f90827f1c53a10cb7a02335b175320002935'
WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS: '0x00000961ef480eb55e80d19ad83579a64c007002'
next: null
last: null
- name: net_version
summary: Returns the current network ID. This is usually equivalent to the chainID, but may differ from it for some legacy networks or special testnets.
params: []
Expand Down
4 changes: 4 additions & 0 deletions src/schemas/base-types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ bytesMax32:
title: 32 hex encoded bytes
type: string
pattern: ^0x[0-9a-f]{0,64}$
bytes4:
title: 4 hex encoded bytes
type: string
pattern: ^0x[0-9a-f]{8}$
bytes8:
title: 8 hex encoded bytes
type: string
Expand Down
91 changes: 91 additions & 0 deletions src/schemas/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,94 @@ SyncingStatus:
- title: Not syncing
description: Should always return false if not syncing.
type: boolean
ConfigurationResponse:
title: Configuration response
description: Response object for eth_config method containing current, next, and last fork configurations
type: object
additionalProperties: false
properties:
current:
title: Current configuration
$ref: '#/components/schemas/ConfigObject'
next:
title: Next configuration
description: Configuration for the next scheduled fork, null if no future forks scheduled
oneOf:
- $ref: '#/components/schemas/ConfigObject'
- type: 'null'
last:
title: Last configuration
description: Configuration for the last configured fork, null if no future forks scheduled
oneOf:
- $ref: '#/components/schemas/ConfigObject'
- type: 'null'
required:
- current
- next
- last
ConfigObject:
title: Configuration object
description: Represents a specific fork configuration
type: object
additionalProperties: false
properties:
activationTime:
title: Activation time
description: Unix timestamp when this configuration becomes active
type: number
blobSchedule:
title: Blob schedule
description: Configuration for blob fee schedule
$ref: '#/components/schemas/BlobSchedule'
chainId:
title: Chain ID
description: The chain ID for this configuration
$ref: '#/components/schemas/uint'
forkId:
title: Fork ID
description: The FORK_HASH value as specified in EIP-6122 of the specific fork
$ref: '#/components/schemas/bytes4'
precompiles:
title: Precompiles
description: Mapping of precompile names to their addresses
type: object
additionalProperties:
$ref: '#/components/schemas/address'
systemContracts:
title: System contracts
description: Mapping of system contract names to their addresses
type: object
additionalProperties:
$ref: '#/components/schemas/address'
required:
- activationTime
- blobSchedule
- chainId
- forkId
- precompiles
- systemContracts
BlobSchedule:
title: Blob schedule
description: Configuration parameters for blob fee scheduling
type: object
additionalProperties: false
properties:
baseFeeUpdateFraction:
title: Base fee update fraction
description: Fraction used for updating blob base fees
type: integer
minimum: 0
max:
title: Maximum blobs
description: Maximum number of blobs per block
type: integer
minimum: 0
target:
title: Target blobs
description: Target number of blobs per block
type: integer
minimum: 0
required:
- baseFeeUpdateFraction
- max
- target
3 changes: 3 additions & 0 deletions tests/eth_config/get-config.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// retrieves the client's current fork configuration as defined by EIP-7910
>> {"jsonrpc":"2.0","id":1,"method":"eth_config"}
<< {"jsonrpc":"2.0","id":1,"result":{"current":{"activationTime":450,"blobSchedule":{"target":6,"max":9,"baseFeeUpdateFraction":5007716},"chainId":"0xc72dd9d5e883e","forkId":"0xe29a7b81","precompiles":{"BLAKE2F":"0x0000000000000000000000000000000000000009","BLS12_G1ADD":"0x000000000000000000000000000000000000000b","BLS12_G1MSM":"0x000000000000000000000000000000000000000c","BLS12_G2ADD":"0x000000000000000000000000000000000000000d","BLS12_G2MSM":"0x000000000000000000000000000000000000000e","BLS12_MAP_FP2_TO_G2":"0x0000000000000000000000000000000000000011","BLS12_MAP_FP_TO_G1":"0x0000000000000000000000000000000000000010","BLS12_PAIRING_CHECK":"0x000000000000000000000000000000000000000f","BN254_ADD":"0x0000000000000000000000000000000000000006","BN254_MUL":"0x0000000000000000000000000000000000000007","BN254_PAIRING":"0x0000000000000000000000000000000000000008","ECREC":"0x0000000000000000000000000000000000000001","ID":"0x0000000000000000000000000000000000000004","KZG_POINT_EVALUATION":"0x000000000000000000000000000000000000000a","MODEXP":"0x0000000000000000000000000000000000000005","RIPEMD160":"0x0000000000000000000000000000000000000003","SHA256":"0x0000000000000000000000000000000000000002"},"systemContracts":{"BEACON_ROOTS_ADDRESS":"0x000f3df6d732807ef1319fb7b8bb8522d0beac02","CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS":"0x0000bbddc7ce488642fb579f8b00f3a590007251","DEPOSIT_CONTRACT_ADDRESS":"0x0000000000000000000000000000000000000000","HISTORY_STORAGE_ADDRESS":"0x0000f90827f1c53a10cb7a02335b175320002935","WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS":"0x00000961ef480eb55e80d19ad83579a64c007002"}},"next":null,"last":null}}
16 changes: 16 additions & 0 deletions tools/testgen/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ var AllMethods = []MethodTests{
DebugGetRawReceipts,
DebugGetRawTransaction,
EthBlobBaseFee,
EthConfig,
NetVersion,
TestingBuildBlockV1,
TxpoolStatus,
Expand Down Expand Up @@ -1853,6 +1854,21 @@ var EthBlobBaseFee = MethodTests{
},
}

// EthConfig stores a list of all tests against the method.
var EthConfig = MethodTests{
"eth_config",
[]Test{
{
Name: "get-config",
About: "retrieves the client's current fork configuration as defined by EIP-7910",
Run: func(ctx context.Context, t *T) error {
var result map[string]any
return t.rpc.CallContext(ctx, &result, "eth_config")
},
},
},
}

// EthFeeHistory stores a list of all tests against the method.
var EthFeeHistory = MethodTests{
"eth_feeHistory",
Expand Down
6 changes: 6 additions & 0 deletions wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ACDT
apis
arg
BLS
BN
attributesv
besu
blobandproofv
Expand All @@ -19,6 +21,7 @@ cli
clientversionv
CLs
configurationv
CRC
crypto
DocToc
eg
Expand All @@ -39,6 +42,7 @@ EVM
exitv
feeRecipient
forkchoiceupdatedresponsev
FP
getblobsbundlev
getblobsv
getclientversionv
Expand All @@ -53,6 +57,8 @@ JWT
kzg
mempool
merkle
MSM
MUL
multicallV
npm
ommers
Expand Down
Loading