diff --git a/src/eth/client.yaml b/src/eth/client.yaml index 416df4c0a..9883c34a0 100644 --- a/src/eth/client.yaml +++ b/src/eth/client.yaml @@ -70,3 +70,53 @@ 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 \ No newline at end of file diff --git a/src/schemas/base-types.yaml b/src/schemas/base-types.yaml index 500d6c358..f4811942c 100644 --- a/src/schemas/base-types.yaml +++ b/src/schemas/base-types.yaml @@ -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 diff --git a/src/schemas/client.yaml b/src/schemas/client.yaml index e1163d03d..d35155749 100644 --- a/src/schemas/client.yaml +++ b/src/schemas/client.yaml @@ -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 diff --git a/tests/eth_config/get-config-with-next-fork.io b/tests/eth_config/get-config-with-next-fork.io new file mode 100644 index 000000000..327de5dd9 --- /dev/null +++ b/tests/eth_config/get-config-with-next-fork.io @@ -0,0 +1,3 @@ +// retrieves configuration when a fork is scheduled (EIP-7910 example with expanded next config) +>> {"jsonrpc":"2.0","id":1,"method":"eth_config"} +<< {"jsonrpc":"2.0","id":1,"result":{"current":{"activationTime":0,"blobSchedule":{"baseFeeUpdateFraction":3338477,"max":6,"target":3},"chainId":"0x88bb0","forkId":"0xbef71d30","precompiles":{"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"}},"next":{"activationTime":1742999832,"blobSchedule":{"baseFeeUpdateFraction":5007716,"max":9,"target":6},"chainId":"0x88bb0","forkId":"0x0929e24e","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"}},"last":{"activationTime":1742999832,"blobSchedule":{"baseFeeUpdateFraction":5007716,"max":9,"target":6},"chainId":"0x88bb0","forkId":"0x0929e24e","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"}}}} \ No newline at end of file diff --git a/tests/eth_config/get-current-config.io b/tests/eth_config/get-current-config.io new file mode 100644 index 000000000..74f09d2f2 --- /dev/null +++ b/tests/eth_config/get-current-config.io @@ -0,0 +1,3 @@ +// retrieves the client's current fork configuration when no future forks are scheduled +>> {"jsonrpc":"2.0","id":1,"method":"eth_config"} +<< {"jsonrpc":"2.0","id":1,"result":{"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}} \ No newline at end of file diff --git a/wordlist.txt b/wordlist.txt index cf5f76c62..a1469ef3f 100644 --- a/wordlist.txt +++ b/wordlist.txt @@ -80,3 +80,9 @@ txs UX simulateV EOA's +BLS +BN +FP +MSM +MUL +CRC