KIP 276: eth_config JSON-RPC Method
| Author | Garry, Ollie |
|---|---|
| Discussions-To | https://devforum.kaia.io/t/discussion-on-kip-276/8822 |
| Status | Draft |
| Type | Core |
| Created | 2025-10-15 |
Abstract
Add a new api endpoint to fetch the configuration for each fork. This KIP focuses on describing the difference from EIP-7910.
Motivation
Increases transparency of configuration values for each fork by adding an eth_config api endpoint.
This API will allow users to check that their node are ready for the next fork and that the current fork configuration values are correct.
Specification
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119 and RFC 8174.
All clients constraints directly under the specification follow EIP-7910.
Configuration RPC
A new JSON-RPC API, eth_config, is introduced. It takes no parameters and returns the result object specified in the next section.
Result Object Structure
The RPC result object structure follows EIP-7910.
Members of the Configuration Object
The members of the configuration object follow that of EIP-7910 except for the following fields.
activationTime
The result MUST NOT have any activationTime field.
blobSchedule
The blob configuration parameters for the specific fork will be represented as specified in EIP-7910. If EIP-4844 isn’t implemented in the fork, the blobSchedule field MUST be null.
forkId
The forkId follows that of EIP-7910, i.e. the FORK_HASH format as specified in EIP-6122.
precompiles
The precompiles follows that of EIP-7910.
On top of Ethereum precompiles, some Kaia’s precompiles may appear in this field.
The contract names are (in order): VMLOG, FEE_PAYER, VALIDATE_SENDER
FEE_PAYER and VALIDATE_SENDER values of 0xa and 0xb deployed in Byzantine are ignored.
If any new precompiles are added, the EIP or KIP about the precompiles SHOULD state the names.
systemContracts
A JSON object representing the system-level contracts defined by EIPs and KIPs. These have keys that are alphabetically sorted contract names (e.g., ADDRESS_BOOK) and values that are 20-byte addresses.
System contracts whose address is hardcoded MUST appear in the result. Conversly, if a system contract address is stored in other contract’s variables (e.g. KIP-247 GaslessSwapRouter is referenced from KIP-149 Registry), it SHALL NOT appear in the result.
The system contracts from genesis are (in order) MAINNET_CREDIT, ADDRESS_BOOK.
Note that MAINNET_CREDIT is only included if the genesis hash matches mainnet’s one.
For Kip103, the added system contract is KIP103
For Kip160, the added system contract is KIP160
For Randao, the added system contract is REGISTRY.
For Prague, the added system contract is HISTORY_STORAGE_ADDRESS.
If new system contracts are added at hardcoded addresses, the EIP or KIP about the system contracts SHOULD state the names.
Blob Parameter Only Forks
Blob Parameter Only Forks do not exist in kaia, so this is ignored.
Rationale
activationTime field
Because Kaia uses block numbers, not timestamps to specify fork activation, so there is no suitable value to return for this field. If the block number is returned, it can be interpreted as a timestamp in the long past. If zero is returned, it can be interpreted as genesis activation.
However, if the field is absent, the SDK will explicitly know that the activationTime is absent. For instance, in Javascript, it will be result.current.activationTime === undefined, and undefined cannot be converted to numbers.
FEE_PAYER and VALIDATE_SENDER before and since Istanbul
FEE_PAYER and VALIDATE_SENDER, which were deployed in byzantim, are now also deployed to addresses 0x3fe and 0x3ff.
This means that FEE_PAYER and VALIDATE_SENDER are deployed to two addresses. However, for JSON structure compatibility with Ethereum, from istanbul onwards, only addresses 0x3fe and 0x3ff will be returned for these addresses, and 0xa and 0xb will be ignored. Therefore, eth_config defined in KIP276 returns the following.
Smart contracts deployed BEFORE Istanbul can access precompiles with:
| address | precompile |
| ——- | ———- |
| 0x09 | VMLOG |
| 0xa | FEE_PAYER |
| 0xb | VALIDATE_SENDER |
| 0x3fe | N.A. |
| 0x3ff | N.A. |
Smart contracts deployed SINCE Istanbul can access precompiles with:
| address | precompile |
| ——- | ———- |
| 0x09 | BLAKE2F |
| 0xa | N.A. -> KZG_POINT_EVALUATION since Cancun |
| 0xb | N.A. -> BLS12_G1ADD since Prague |
| 0x3fd | VMLOG |
| 0x3fe | FEE_PAYER |
| 0x3ff | VALIDATE_SENDER |
Note: N.A. means not included in the JSON result.
The relevant source code of Kaia is here.
System contracts are returned or not
Only a subset of Kaia’s system contracts are returned from this API.
- If its address is hardcoded, it can be returned because the address never changes. e.g. AddressBook at 0x400, Registry at 0x401.
- If its address is stored as a variable in other contracts, it must not be returned. The address can change at any time regardless of hardfork. e.g. contracts like GaslessSwapRouter and CLRegistry are referenced from Registy and can be changed at any time by transaction.
Backwards Compatibility
This does not affect the backward compatibility because this does not involve hardfork.
Test Cases
Sample Configs
Mainnet Prague Config
{
"blobSchedule": null,
"chainId": "0x2019",
"forkId": "0xc00bab0e",
"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",
"FEE_PAYER": "0x00000000000000000000000000000000000003fe",
"ID": "0x0000000000000000000000000000000000000004",
"KZG_POINT_EVALUATION": "0x000000000000000000000000000000000000000a",
"MODEXP": "0x0000000000000000000000000000000000000005",
"RIPEMD160": "0x0000000000000000000000000000000000000003",
"SHA256": "0x0000000000000000000000000000000000000002",
"VALIDATE_SENDER": "0x00000000000000000000000000000000000003ff",
"VMLOG": "0x00000000000000000000000000000000000003fd"
},
"systemContracts": {
"ADDRESS_BOOK": "0x0000000000000000000000000000000000000400",
"HISTORY_STORAGE_ADDRESS": "0x0000f90827f1c53a10cb7a02335b175320002935",
"KIP103": "0xd5ad6d61dd87edabe2332607c328f5cc96aecb95",
"KIP160": "0xa4df15717da40077c0ad528296adbbd046579ee9",
"MAINNET_CREDIT": "0x0000000000000000000000000000000000000000",
"REGISTRY": "0x0000000000000000000000000000000000000401"
}
}
Kairos Cancun Config
{
"blobSchedule": null,
"chainId": "0x3E9",
"forkId": "0x897592ea",
"precompiles": {
"BLAKE2F": "0x0000000000000000000000000000000000000009",
"BN254_ADD": "0x0000000000000000000000000000000000000006",
"BN254_MUL": "0x0000000000000000000000000000000000000007",
"BN254_PAIRING": "0x0000000000000000000000000000000000000008",
"ECREC": "0x0000000000000000000000000000000000000001",
"FEE_PAYER": "0x00000000000000000000000000000000000003fe",
"ID": "0x0000000000000000000000000000000000000004",
"KZG_POINT_EVALUATION": "0x000000000000000000000000000000000000000a",
"MODEXP": "0x0000000000000000000000000000000000000005",
"RIPEMD160": "0x0000000000000000000000000000000000000003",
"SHA256": "0x0000000000000000000000000000000000000002",
"VALIDATE_SENDER": "0x00000000000000000000000000000000000003ff",
"VMLOG": "0x00000000000000000000000000000000000003fd"
},
"systemContracts": {
"ADDRESS_BOOK": "0x0000000000000000000000000000000000000400",
"KIP103": "0xd5ad6d61dd87edabe2332607c328f5cc96aecb95",
"KIP160": "0x3d478e73c9dbebb72332712d7265961b1868d193",
"REGISTRY": "0x0000000000000000000000000000000000000401"
}
}
Sample JSON-RPC
With Future Fork Scheduled
The following RPC command, issued on Kairos when Prague was scheduled but not activated:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_config","id":1}' http://localhost:8545
would return (after formatting):
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"current": {
"blobSchedule": null,
"chainId": "0x3E9",
"forkId": "0xf00fbab3",
"precompiles": {
"BLAKE2F": "0x0000000000000000000000000000000000000009",
"BN254_ADD": "0x0000000000000000000000000000000000000006",
"BN254_MUL": "0x0000000000000000000000000000000000000007",
"BN254_PAIRING": "0x0000000000000000000000000000000000000008",
"ECREC": "0x0000000000000000000000000000000000000001",
"FEE_PAYER": "0x00000000000000000000000000000000000003fe",
"ID": "0x0000000000000000000000000000000000000004",
"KZG_POINT_EVALUATION": "0x000000000000000000000000000000000000000a",
"MODEXP": "0x0000000000000000000000000000000000000005",
"RIPEMD160": "0x0000000000000000000000000000000000000003",
"SHA256": "0x0000000000000000000000000000000000000002",
"VALIDATE_SENDER": "0x00000000000000000000000000000000000003ff",
"VMLOG": "0x00000000000000000000000000000000000003fd"
},
"systemContracts": {
"ADDRESS_BOOK": "0x0000000000000000000000000000000000000400",
"KIP103": "0xd5ad6d61dd87edabe2332607c328f5cc96aecb95",
"KIP160": "0x3d478e73c9dbebb72332712d7265961b1868d193",
"REGISTRY": "0x0000000000000000000000000000000000000401"
}
},
"next": {
"blobSchedule": null,
"chainId": "0x3E9",
"forkId": "0x0d29cd98",
"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",
"FEE_PAYER": "0x00000000000000000000000000000000000003fe",
"ID": "0x0000000000000000000000000000000000000004",
"KZG_POINT_EVALUATION": "0x000000000000000000000000000000000000000a",
"MODEXP": "0x0000000000000000000000000000000000000005",
"RIPEMD160": "0x0000000000000000000000000000000000000003",
"SHA256": "0x0000000000000000000000000000000000000002",
"VALIDATE_SENDER": "0x00000000000000000000000000000000000003ff",
"VMLOG": "0x00000000000000000000000000000000000003fd"
},
"systemContracts": {
"ADDRESS_BOOK": "0x0000000000000000000000000000000000000400",
"HISTORY_STORAGE_ADDRESS": "0x0000f90827f1c53a10cb7a02335b175320002935",
"KIP103": "0xd5ad6d61dd87edabe2332607c328f5cc96aecb95",
"KIP160": "0x3d478e73c9dbebb72332712d7265961b1868d193",
"REGISTRY": "0x0000000000000000000000000000000000000401"
}
},
"last": {
"blobSchedule": null,
"chainId": "0x3E9",
"forkId": "0x0d29cd98",
"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",
"FEE_PAYER": "0x00000000000000000000000000000000000003fe",
"ID": "0x0000000000000000000000000000000000000004",
"KZG_POINT_EVALUATION": "0x000000000000000000000000000000000000000a",
"MODEXP": "0x0000000000000000000000000000000000000005",
"RIPEMD160": "0x0000000000000000000000000000000000000003",
"SHA256": "0x0000000000000000000000000000000000000002",
"VALIDATE_SENDER": "0x00000000000000000000000000000000000003ff",
"VMLOG": "0x00000000000000000000000000000000000003fd"
},
"systemContracts": {
"ADDRESS_BOOK": "0x0000000000000000000000000000000000000400",
"HISTORY_STORAGE_ADDRESS": "0x0000f90827f1c53a10cb7a02335b175320002935",
"KIP103": "0xd5ad6d61dd87edabe2332607c328f5cc96aecb95",
"KIP160": "0x3d478e73c9dbebb72332712d7265961b1868d193",
"REGISTRY": "0x0000000000000000000000000000000000000401"
}
}
}
}
Without Future Fork Scheduled
When no future forks are configured, the same RPC command would return:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"current": {
"blobSchedule": null,
"chainId": "0x3E9",
"forkId": "0xf00fbab3",
"precompiles": {
"BLAKE2F": "0x0000000000000000000000000000000000000009",
"BN254_ADD": "0x0000000000000000000000000000000000000006",
"BN254_MUL": "0x0000000000000000000000000000000000000007",
"BN254_PAIRING": "0x0000000000000000000000000000000000000008",
"ECREC": "0x0000000000000000000000000000000000000001",
"FEE_PAYER": "0x00000000000000000000000000000000000003fe",
"ID": "0x0000000000000000000000000000000000000004",
"KZG_POINT_EVALUATION": "0x000000000000000000000000000000000000000a",
"MODEXP": "0x0000000000000000000000000000000000000005",
"RIPEMD160": "0x0000000000000000000000000000000000000003",
"SHA256": "0x0000000000000000000000000000000000000002",
"VALIDATE_SENDER": "0x00000000000000000000000000000000000003ff",
"VMLOG": "0x00000000000000000000000000000000000003fd"
},
"systemContracts": {
"ADDRESS_BOOK": "0x0000000000000000000000000000000000000400",
"KIP103": "0xd5ad6d61dd87edabe2332607c328f5cc96aecb95",
"KIP160": "0x3d478e73c9dbebb72332712d7265961b1868d193",
"REGISTRY": "0x0000000000000000000000000000000000000401"
}
},
"next": null,
"last": null
}
}
References
Copyright
Copyright and related rights waived via CC0.