Links

JSON-RPC API

Each kroma-node and kroma-geth component provides an JSON-RPC API.

Rollup Node (kroma-node)

The rollup node is the component responsible for deriving the L2 chain from L1 blocks and their associated receipts. In Kroma, we call it kroma-node.
Below are the RPC methods of the kroma-node component:

kroma_outputAtBlock

Get the output root at a specific block.
curl -X POST -H "Content-Type: application/json" --data \
'{"jsonrpc":"2.0","method":"kroma_outputAtBlock","params":["<block_number>"],"id":1}' \
https://api-node.kroma.network/
Sample response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"version": "0x0000000000000000000000000000000000000000000000000000000000000000",
"outputRoot": "0x1e26ef1154cf6e1094e1834899e861bca24a032307f40b3f1906267d2550428f",
"blockRef": {
"hash": "0x92abebce0a2497c2d2dd850b42902812c13336a1b6bac786ee72cbcda75b03fa",
"number": 1,
"parentHash": "0x52ef8f66bb31c16326eb2072dd9b2fa734068728b845d5428f3a256a50bf252e",
"timestamp": 1688709134,
"l1origin": {
"hash": "0x936e490e33e6e136ecd9095090e30ed7def3903ef2bae3e05966b376e493ad76",
"number": 3841490
},
"sequenceNumber": 1
},
"nextBlockRef": {
"hash": "0x1e1b3eb67411bd5e3e4213d1a06bfe0514776b4a521e1ca4ed5c74aac493d960",
"number": 2,
"parentHash": "0x92abebce0a2497c2d2dd850b42902812c13336a1b6bac786ee72cbcda75b03fa",
"timestamp": 1688709136,
"l1origin": {
"hash": "0x936e490e33e6e136ecd9095090e30ed7def3903ef2bae3e05966b376e493ad76",
"number": 3841490
},
"sequenceNumber": 2
},
"withdrawalStorageRoot": "0x24f53397bd92b66fda812b6e1191a00b60fc8e304033518006cbeedcab7f2127",
"stateRoot": "0x200815428955f785ed53b6b9a94c109f2318c6414c2c1417b96ebc478c6c2eda",
"syncStatus": {
"current_l1": {
"hash": "0xbbccbcb2b53fc8fc082f13e9ea2b4db27296dc1473770b2580b7ae007f063d8a",
"number": 4593587,
"parentHash": "0xa890a15cffe4bec380227f1840e9c02f1a9896bf72ceee89ca084dcad92c20b7",
"timestamp": 1698663216
},
"current_l1_finalized": {
"hash": "0xde6301bbad1731570e41301b5f93bcb3d15413a9aed5ef84d07e35350b6e4666",
"number": 4593528,
"parentHash": "0x03298dadbbd8f0d687c03bde5df29b2f6782ea5f7004c9bda01493c960fe6ee3",
"timestamp": 1698662496
},
"head_l1": {
"hash": "0xa468fc8ae84647d3dde8609dd2dabeff35e5cb511ebc5c40483887b890bfe076",
"number": 4593591,
"parentHash": "0x49bc0a1ad25848afe6684f63017946efa67a39d2f90be8bcb287941caeb68591",
"timestamp": 1698663276
},
"safe_l1": {
"hash": "0xa3d171b1f17fa704b8514cc99a749c53028283a5f729fe88e1ae279a5011db68",
"number": 4593559,
"parentHash": "0xdbdca72beecd62e54c77741251245ac41993ab4a169a606e40b84dfe7822c89f",
"timestamp": 1698662880
},
"finalized_l1": {
"hash": "0xde6301bbad1731570e41301b5f93bcb3d15413a9aed5ef84d07e35350b6e4666",
"number": 4593528,
"parentHash": "0x03298dadbbd8f0d687c03bde5df29b2f6782ea5f7004c9bda01493c960fe6ee3",
"timestamp": 1698662496
},
"unsafe_l2": {
"hash": "0x2b3c29d298981171b89ae623e3bb9a4a1686ac9420a9b94fffac603a570d13f9",
"number": 4977080,
"parentHash": "0x05f10f89de6b6cbe40e66787159687f7b5107d171eeaa853466779935844ec2c",
"timestamp": 1698663292,
"l1origin": {
"hash": "0xbbccbcb2b53fc8fc082f13e9ea2b4db27296dc1473770b2580b7ae007f063d8a",
"number": 4593587
},
"sequenceNumber": 1
},
"safe_l2": {
"hash": "0x49649404adc2aaf82f4ed81402cb4931700367e32a44765e33b8662a1698536b",
"number": 4977036,
"parentHash": "0xc32ff5842d5d464b2650fa9baf3f4f0ea26010a58decf3b61cb6adef63b613a3",
"timestamp": 1698663204,
"l1origin": {
"hash": "0xa501a8f68f35957a5f01608fb9309bfa5410120641c4e3b44bfeefc73ae4a5df",
"number": 4593580
},
"sequenceNumber": 5
},
"finalized_l2": {
"hash": "0x45494fd55a5788c692e33d0cf18955261c1b1f7ccce6cd5df985a69c73c73f3a",
"number": 4976671,
"parentHash": "0xf5ad50eeab04d5adea9d1d70eb2701ee067b0b74f02a6f2b0f59f027ee847caf",
"timestamp": 1698662474,
"l1origin": {
"hash": "0xb79b9b92273d9b23c244895697a85bbc43e291c47017523e2491f51c4a70ab02",
"number": 4593521
},
"sequenceNumber": 6
},
"queued_unsafe_l2": {
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"number": 0,
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": 0,
"l1origin": {
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"number": 0
},
"sequenceNumber": 0
}
},
"publicInputProof": null
}
}

kroma_outputWithProofAtBlock

Get the output root including the publicInputProof. The publicInputProof includes next block hash, next block txs, the balance of L2ToL1MessagePasser, codehash, and merkle proofs. This method is called when a challenger proceeds proveFault.
curl -X POST -H "Content-Type: application/json" --data \
'{"jsonrpc":"2.0","method":"kroma_outputAtBlock","params":["<block_number>"],"id":1}' \
https://api-node.kroma.network/
Sample response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"version": "0x0000000000000000000000000000000000000000000000000000000000000000",
"outputRoot": "0x1e26ef1154cf6e1094e1834899e861bca24a032307f40b3f1906267d2550428f",
"blockRef": {
"hash": "0x92abebce0a2497c2d2dd850b42902812c13336a1b6bac786ee72cbcda75b03fa",
"number": 1,
"parentHash": "0x52ef8f66bb31c16326eb2072dd9b2fa734068728b845d5428f3a256a50bf252e",
"timestamp": 1688709134,
"l1origin": {
"hash": "0x936e490e33e6e136ecd9095090e30ed7def3903ef2bae3e05966b376e493ad76",
"number": 3841490
},
"sequenceNumber": 1
},
"nextBlockRef": {
"hash": "0x1e1b3eb67411bd5e3e4213d1a06bfe0514776b4a521e1ca4ed5c74aac493d960",
"number": 2,
"parentHash": "0x92abebce0a2497c2d2dd850b42902812c13336a1b6bac786ee72cbcda75b03fa",
"timestamp": 1688709136,
"l1origin": {
"hash": "0x936e490e33e6e136ecd9095090e30ed7def3903ef2bae3e05966b376e493ad76",
"number": 3841490
},
"sequenceNumber": 2
},
"withdrawalStorageRoot": "0x24f53397bd92b66fda812b6e1191a00b60fc8e304033518006cbeedcab7f2127",
"stateRoot": "0x200815428955f785ed53b6b9a94c109f2318c6414c2c1417b96ebc478c6c2eda",
"syncStatus": {
"current_l1": {
"hash": "0x34375ad76253ed8541c8a0e846f3589fdadaef0175c7c0de6ddd0e85fb312950",
"number": 4593603,
"parentHash": "0xc737fd512a8de7d57752abdf4f5d3817c0665873b2d83ae25c03bcec9f58c317",
"timestamp": 1698663420
},
"current_l1_finalized": {
"hash": "0xde6301bbad1731570e41301b5f93bcb3d15413a9aed5ef84d07e35350b6e4666",
"number": 4593528,
"parentHash": "0x03298dadbbd8f0d687c03bde5df29b2f6782ea5f7004c9bda01493c960fe6ee3",
"timestamp": 1698662496
},
"head_l1": {
"hash": "0x311b3ab5fc2dc90e323921205a16d93fe16e4de26c724220f2a41e70bff4ccbb",
"number": 4593607,
"parentHash": "0x8475bbf29a4a62846ec8511468890a1d4a256ec0edfa59818ec5be3134baa507",
"timestamp": 1698663468
},
"safe_l1": {
"hash": "0xa3d171b1f17fa704b8514cc99a749c53028283a5f729fe88e1ae279a5011db68",
"number": 4593559,
"parentHash": "0xdbdca72beecd62e54c77741251245ac41993ab4a169a606e40b84dfe7822c89f",
"timestamp": 1698662880
},
"finalized_l1": {
"hash": "0xde6301bbad1731570e41301b5f93bcb3d15413a9aed5ef84d07e35350b6e4666",
"number": 4593528,
"parentHash": "0x03298dadbbd8f0d687c03bde5df29b2f6782ea5f7004c9bda01493c960fe6ee3",
"timestamp": 1698662496
},
"unsafe_l2": {
"hash": "0xe8f7f48719cf466b5ee332bc74d5f8ee51c5e2c98d68acf1b83a4f7c07f6beb6",
"number": 4977175,
"parentHash": "0x2ad5aea2d5cba69138f2ab8178292129a7cb8a2d06dab499f72f3c4eebe1d758",
"timestamp": 1698663482,
"l1origin": {
"hash": "0x34375ad76253ed8541c8a0e846f3589fdadaef0175c7c0de6ddd0e85fb312950",
"number": 4593603
},
"sequenceNumber": 0
},
"safe_l2": {
"hash": "0x9b992a7f3f5e4dde1110f3e2766b3c0c0b819ab700003a1bdab76486813fa8f0",
"number": 4977120,
"parentHash": "0xa3c022734838109f9622a1db2a9ffa61bcf3060beafe76d128c3cba9ae96bcf7",
"timestamp": 1698663372,
"l1origin": {
"hash": "0xcadfc9fcc662523ef99ce5a8169b389454ac4a62fd7bc9634e54cdce59f226d7",
"number": 4593593
},
"sequenceNumber": 5
},
"finalized_l2": {
"hash": "0x45494fd55a5788c692e33d0cf18955261c1b1f7ccce6cd5df985a69c73c73f3a",
"number": 4976671,
"parentHash": "0xf5ad50eeab04d5adea9d1d70eb2701ee067b0b74f02a6f2b0f59f027ee847caf",
"timestamp": 1698662474,
"l1origin": {
"hash": "0xb79b9b92273d9b23c244895697a85bbc43e291c47017523e2491f51c4a70ab02",
"number": 4593521
},
"sequenceNumber": 6
},
"queued_unsafe_l2": {
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"number": 0,
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": 0,
"l1origin": {
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"number": 0
},
"sequenceNumber": 0
}
},
"publicInputProof": {
"nextBlock": {
"parentHash": "0x92abebce0a2497c2d2dd850b42902812c13336a1b6bac786ee72cbcda75b03fa",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"miner": "0x0000000000000000000000000000000000000000",
"stateRoot": "0x071204d55fffb6a43b9edd9f4fc495a9bfb926587c5545e8020b19d5c5032dad",
"transactionsRoot": "0x3a32d5fda43458dca3a0ccdb369d01a2d0fbbe38ea6b4573875632023602e4d1",
"receiptsRoot": "0xfa1839d2cd20c5655622e2f64b97978f412743ee6095acce7a15942ec3c32f09",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"difficulty": "0x0",
"number": "0x2",
"gasLimit": "0x1c9c380",
"gasUsed": "0xc0c9",
"timestamp": "0x64a7a810",
"extraData": "0x",
"mixHash": "0x6acaeba92bac4d85d9c5f11bb062cfe806462236308fcaea6ef16e46de0c35bc",
"nonce": "0x0000000000000000",
"baseFeePerGas": "0x3947264d",
"withdrawalsRoot": null,
"hash": "0x1e1b3eb67411bd5e3e4213d1a06bfe0514776b4a521e1ca4ed5c74aac493d960"
},
"nextTransactions": [
{
"type": "0x7e",
"nonce": null,
"gasPrice": null,
"maxPriorityFeePerGas": null,
"maxFeePerGas": null,
"gas": "0xf4240",
"value": "0x0",
"input": "0xefc674eb00000000000000000000000000000000000000000000000000000000003a9dd20000000000000000000000000000000000000000000000000000000064a7a80c0000000000000000000000000000000000000000000000000000000000000007936e490e33e6e136ecd9095090e30ed7def3903ef2bae3e05966b376e493ad760000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f15dc770221b99c98d4aaed568f2ab04b9d16e420000000000000000000000000000000000000000000000000000000000000834000000000000000000000000000000000000000000000000000000000016e36000000000000000000000000000000000000000000000000000000000000007d0",
"v": null,
"r": null,
"s": null,
"to": "0x4200000000000000000000000000000000000002",
"sourceHash": "0x08980514aa24b0c84052892bb61ec3ede13a55664b15d2d34df40f31f826c050",
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"mint": "0x0",
"hash": "0x4334f701aa9db792755204b141f57a62bd69b6ad9700fe2568a539e806d60c2d"
}
],
"l2ToL1MessagePasserBalance": 0,
"l2ToL1MessagePasserCodeHash": "0x1f958654ab06a152993e7a0ae7b6dbb0d4b19265cc9337b8789fe1353bd9dc35",
"merkleProof": [
"0x0017f62b246ceef67c55191768f97d0645f5b53201803d60ec2bfc1ae3836a412b0e968cb0a0be60034dfcbc530d8e0462c1fc304ace6c599bcf336da0cb278d6a",
"0x000a6bae62c3ce7d5d0e2e5398485052d48c0fb809d74261fa1cbbaa4135ff43511966094771fd538753910993052b69cfeb50063596093ab393503d0f77a8d374",
"0x0017e51e3cf713a462bf2c8e06ba239cd70dbae742ce851fe8e864c2602cb0f2611034cca84bc9a17cfdaca7e00453937aabf36ffdad7c4ec1f635908ccdb0191b",
"0x00011c986e07c1fbd478bd742d85d7e6dca9d2a57681ab953503d4c86ca9169224282b8f692eeaab3fbd7c997a53c323c69b3b95435758fe5acfdb60865d8e460b",
"0x0019da37734c165ae6f9293fead21647198f461f352effc8d18329528c1d12527e1d12fb4a76dc568a4655d2e360e9bdcd9f86542d6f7d327e3140477c92aa2920",
"0x001089c7b6ed65cf0dd69902f6621d033a34be16db094508a32f287427250e68d909387d2d4be643d4d8df653dcb8495eebc36eba91f993f78fe843a799a6d0fb9",
"0x0008f993e0df87a04e71f72a3a237c909e2381eacf176b279925d333ee7b1e36ed0ae7c2195e56967b58a29456c64c6439aaf34064b1d94855fd73c6771b2543e8",
"0x00000000000000000000000000000000000000000000000000000000000000000015c1089ff56ee758ec382a55a21b76c08ebf64d6a78d7e6ff442793536607510",
"0x0000000000000000000000000000000000000000000000000000000000000000002e957b48192277673a8dde0549358d09d3f9ad6e8db14e08f4fed46f96021a74",
"0x002325a334c56feef28306cece9e3867165ee117aab1c831fe04db286a1b4ff2c80000000000000000000000000000000000000000000000000000000000000000",
"0x00218476186a36a2ddf003ef59459478f44e0cea1ac32870dafca118331259b05f23618448c7fab9e44d30c44be6777aa390c25ad138fde11d22bdefd05f43838b",
"0x012de4ca10cb48fa7ae483633127295fecab2f03da9355f4ca12ca0c820096f9c304040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f958654ab06a152993e7a0ae7b6dbb0d4b19265cc9337b8789fe1353bd9dc3524f53397bd92b66fda812b6e1191a00b60fc8e304033518006cbeedcab7f2127204200000000000000000000000000000000000003000000000000000000000000",
"0x5448495320495320534f4d45204d4147494320425954455320464f5220534d54206d3172525867503278704449"
]
}
}
}

kroma_syncStatus

Get the synchronization status.
curl -X POST -H "Content-Type: application/json" --data \
'{"jsonrpc":"2.0","method":"kroma_syncStatus","params":[],"id":1}' \
https://api-node.kroma.network/
Sample response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"current_l1": {
"hash": "0xe24d69ea8afe18b62bd441d96848aa44c89df9e31427ee77cceb729e5dab65ea",
"number": 4593688,
"parentHash": "0x1b243c956aab79b0b562aff86e5f19eaf419d9daee039f1575f9e93dcd5e61ca",
"timestamp": 1698664488
},
"current_l1_finalized": {
"hash": "0x40ea20970974d3b41a0d5e20f611acd1b92c3e0c043b34cdcb2e0d919c8c0eef",
"number": 4593621,
"parentHash": "0xd9356a423857f9ce38d617e047dea7cf7f945da9e801feade7a024d508a6b704",
"timestamp": 1698663648
},
"head_l1": {
"hash": "0x2689ee550d163e912573efd62dc9835de8d96053b12eff04089ad853c77738a8",
"number": 4593692,
"parentHash": "0xfd17ff6bcd27d9fd8f52487bec7866bcde97d3c70ac576811203e4f8065c286f",
"timestamp": 1698664536
},
"safe_l1": {
"hash": "0x655020c9b07df7247e7a9572615277ba2f773cea4dd504acc7d209893d9aa414",
"number": 4593652,
"parentHash": "0x65fef7c6e1e13056183b9a50625633020eb9017674125bf89634ed486a095ef0",
"timestamp": 1698664032
},
"finalized_l1": {
"hash": "0x40ea20970974d3b41a0d5e20f611acd1b92c3e0c043b34cdcb2e0d919c8c0eef",
"number": 4593621,
"parentHash": "0xd9356a423857f9ce38d617e047dea7cf7f945da9e801feade7a024d508a6b704",
"timestamp": 1698663648
},
"unsafe_l2": {
"hash": "0xcf011144d7d9be0c02ad88756360a7a668a002e32796b6efa2a5f2d21503c081",
"number": 4977711,
"parentHash": "0x5e8c326e748a29854564687b5db16467a77bd05877fabecff85ca530c25e2a84",
"timestamp": 1698664554,
"l1origin": {
"hash": "0xe24d69ea8afe18b62bd441d96848aa44c89df9e31427ee77cceb729e5dab65ea",
"number": 4593688
},
"sequenceNumber": 1
},
"safe_l2": {
"hash": "0x1eeefd0bbfea81ad535ee316d1011729539df84c3d89fb338de6513874155d8e",
"number": 4977660,
"parentHash": "0x3c72ec055aab3ad39c329ddaa2cacce3960fbeaccc1024cefed2ddb327c4af79",
"timestamp": 1698664452,
"l1origin": {
"hash": "0xa8d4989dc4d609828e19325b4915e06fd84889ccba51316891a1854368e9b2bf",
"number": 4593679
},
"sequenceNumber": 4
},
"finalized_l2": {
"hash": "0xe00eae10650ed0523b7d7341823116fb0e9e94420f4c2c872ffc1ecc6f86872f",
"number": 4977235,
"parentHash": "0x45f8bfd9fd17ff59ab7baf4e719ac767ed170c6c0f296efbf55ba3ada5464f7a",
"timestamp": 1698663602,
"l1origin": {
"hash": "0x0b37f5cacc1ca46da65b7b2c307b368b62091799d3ea60ce1351deeec0358e62",
"number": 4593613
},
"sequenceNumber": 0
},
"queued_unsafe_l2": {
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"number": 0,
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": 0,
"l1origin": {
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"number": 0
},
"sequenceNumber": 0
}
}
}

kroma_rollupConfig

Get the rollup configuration parameters.
curl -X POST -H "Content-Type: application/json" --data \
'{"jsonrpc":"2.0","method":"kroma_rollupConfig","params":[],"id":1}' \
https://api-node.kroma.network/
Sample response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"genesis": {
"l1": {
"hash": "0x936e490e33e6e136ecd9095090e30ed7def3903ef2bae3e05966b376e493ad76",
"number": 3841490
},
"l2": {
"hash": "0x52ef8f66bb31c16326eb2072dd9b2fa734068728b845d5428f3a256a50bf252e",
"number": 0
},
"l2_time": 1688709132,
"system_config": {
"batcherAddr": "0xf15dc770221b99c98d4aaed568f2ab04b9d16e42",
"overhead": "0x0000000000000000000000000000000000000000000000000000000000000834",
"scalar": "0x000000000000000000000000000000000000000000000000000000000016e360",
"gasLimit": 30000000,
"validatorRewardScalar": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"block_time": 2,
"max_proposer_drift": 1200,
"proposer_window_size": 3600,
"channel_timeout": 120,
"l1_chain_id": 11155111,
"l2_chain_id": 2358,
"batch_inbox_address": "0xfa79000000000000000000000000000000000001",
"deposit_contract_address": "0x31ab8ed993a3be9aa2757c7d368dc87101a868a4",
"l1_system_config_address": "0x398c8ea789968893095d86cba168378a4f452e33"
}
}

kroma_version

Get the software version.
curl -X POST -H "Content-Type: application/json" --data \
'{"jsonrpc":"2.0","method":"kroma_version","params":[],"id":1}' \
https://api-node.kroma.network/
Sample response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "v1.0.0"
}

Execution Engine (kroma-geth)

The execution engine in L2, called as kroma-geth in Kroma, does almost the same job with an L1 execution engine. The modifications, configurations and usage are described in the protocol specification.
The execution engine's RPC interface is identical to the upstream Geth RPC interface. This includes the ability to provide snap sync functionality to other execution engines.
The responses are also nearly identical except for that we include the L1 gas usage and price information.