Client and network methods
These methods query client and network information, such as accounts, chain ID, protocol version, configuration, and sync status.
eth_accounts
Returns a list of account addresses a client owns.
This method returns an empty object because Besu doesn't support key management inside the client.
To provide access to your key store and then sign transactions, use Web3Signer with Besu.
Parameters
- None
Returns
- List of 20-byte account addresses owned by the client.
Example
- curl HTTP request
- wscat WS request
- JSON result
curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 53
}'
{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 53
}
{
"jsonrpc": "2.0",
"id": 53,
"result": []
}
eth_blockNumber
Returns the index corresponding to the block number of the current chain head.
Parameters
- None
Returns
- Hexadecimal integer representing the index corresponding to the block number of the current chain head.
Example
- curl HTTP
- wscat WS
- JSON result
- curl GraphQL
- GraphQL
- GraphQL result
curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 51
}'
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 51
}
{
"jsonrpc": "2.0",
"id": 51,
"result": "0x2377"
}
curl -X POST http://localhost:8547/graphql \
-H "Content-Type: application/json" \
--data '{
"query": "{block{number}}"
}'
{
block {
number
}
}
{
"data": {
"block": {
"number": 16221
}
}
}
eth_capabilities
Returns the node's data-serving capabilities.
Parameters
- None
Returns
-
Capabilities information.
-
head: object - Current chain head information.-
number: string - Current chain head block number. -
hash: string - Current chain head block hash.
-
-
state: object - State capability information.-
disabled: boolean - Indicates whether thestateresource is disabled. -
oldestBlock: string - (Optional) Oldest available block.
-
-
tx: object - Transaction capability information.-
disabled: boolean - Indicates whether thetxresource is disabled. -
oldestBlock: string - (Optional) Oldest available block.
-
-
logs: object - Logs capability information.-
disabled: boolean - Indicates whether thelogsresource is disabled. -
oldestBlock: string - (Optional) Oldest available block.
-
-
receipts: object - Receipts capability information.-
disabled: boolean - Indicates whether thereceiptsresource is disabled. -
oldestBlock: string - (Optional) Oldest available block.
-
-
blocks: object - Blocks capability information.-
disabled: boolean - Indicates whether theblocksresource is disabled. -
oldestBlock: string - (Optional) Oldest available block.
-
-
stateproofs: object - State proofs capability information.-
disabled: boolean - Indicates whether thestateproofsresource is disabled. -
oldestBlock: string - (Optional) Oldest available block.
-
The
oldestBlockfield is included for block-backed resources when pruning has occurred. If the full chain is available, this can be0x0. -
Example
- curl HTTP request
- wscat WS request
- JSON result
curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_capabilities",
"params": [],
"id": 1
}'
{
"jsonrpc": "2.0",
"method": "eth_capabilities",
"params": [],
"id": 1
}
{
"jsonrpc":"2.0",
"id":1,
"result":{
"head":{
"number":"0x13f8e3a",
"hash":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"
},
"state":{
"disabled":false
},
"tx":{
"disabled":false,
"oldestBlock":"0x11b340a"
},
"logs":{
"disabled":false,
"oldestBlock":"0x11b340a"
},
"receipts":{
"disabled":false,
"oldestBlock":"0x11b340a"
},
"blocks":{
"disabled":false,
"oldestBlock":"0x0"
},
"stateproofs":{
"disabled":false
}
}
}
eth_chainId
Returns the chain ID.
Parameters
- None
Returns
- Chain ID in hexadecimal.
Example
- curl HTTP request
- wscat WS request
- JSON result
curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 51
}'
{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 51
}
{
"jsonrpc": "2.0",
"id": 51,
"result": "0x7e2"
}
eth_config
Returns the client's fork information for the current, next, and last known forks.
This method is defined in EIP-7910 and enables node operators to verify client readiness for upcoming forks and debug configuration mismatches.
Parameters
- None
Returns
-
Configuration information.
-
current: object - Current fork configuration.-
activationTime: number - Fork activation timestamp (Unix epoch seconds). -
blobSchedule: object - Blob configuration parameters.-
baseFeeUpdateFraction: number - Base fee update fraction. -
max: number - Maximum number of blobs per block. -
target: number - Target number of blobs per block.
-
-
chainId: string - Chain ID in hexadecimal. -
forkId: string - Fork hash as defined in EIP-6122. -
precompiles: object - Active precompiled contracts with names and addresses. -
systemContracts: object - System contract addresses.
-
-
next: object - Next fork configuration, ornullif no future fork is scheduled. -
last: object - The furthest configured future fork configuration (the future fork with the largestactivationTimeamong the client's configured forks). If only one future fork is configured,nextandlastare the same object.nullif no future fork is scheduled.
-
Example
- curl HTTP request
- wscat WS request
- JSON result
curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_config",
"params": [],
"id": 1
}'
{
"jsonrpc": "2.0",
"method": "eth_config",
"params": [],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"current": {
"activationTime": 1746612311,
"blobSchedule": {
"baseFeeUpdateFraction": 5007716,
"max": 9,
"target": 6
},
"chainId": "0x1",
"forkId": "0xc376cf8b",
"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": "0x00000000219ab540356cbb839cbe05303d7705fa",
"HISTORY_STORAGE_ADDRESS": "0x0000f90827f1c53a10cb7a02335b175320002935",
"WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS": "0x00000961ef480eb55e80d19ad83579a64c007002"
}
},
"next": null,
"last": null
}
}
eth_protocolVersion
Returns current Ethereum protocol version.
Parameters
- None
Returns
- Ethereum protocol version.
Example
- curl HTTP
- wscat WS
- JSON result
- curl GraphQL
- GraphQL
- GraphQL result
curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_protocolVersion",
"params": [],
"id": 1
}'
{
"jsonrpc": "2.0",
"method": "eth_protocolVersion",
"params": [],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3f"
}
curl -X POST http://localhost:8547/graphql \
-H "Content-Type: application/json" \
--data '{
"query": "{protocolVersion}"
}'
{
protocolVersion
}
{
"data": {
"protocolVersion": 63
}
}
eth_syncing
Returns an object with data about the synchronization status, or false if not synchronizing.
Once the node reaches the head of the chain, eth_syncing returns false, indicating that there is no active syncing target.
Parameters
- None
Returns
-
Synchronization status data object, or
falseif not synchronizing.-
startingBlock: string - Index of the highest block on the blockchain when the network synchronization starts. -
currentBlock: string - Index of the latest block (also known as the best block) for the current node (this is the same index thateth_blockNumberreturns.) -
highestBlock: string - Index of the highest known block in the peer network (that is, the highest block so far discovered among peer nodes. This is the same value ascurrentBlockif the current node has no peers.) -
pulledStates: string - The number of state entries fetched so far, ornullif this is not known or not relevant (if full syncing or fully synchronized, this field is not returned.) -
knownStates: string - The number of states the node knows of so far, ornullif this is not known or not relevant (if full syncing or fully synchronized, this field is not returned.)
-
Example
- curl HTTP
- wscat WS
- JSON result
- curl GraphQL
- GraphQL
- GraphQL result
curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 51
}'
{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 51
}
{
"jsonrpc": "2.0",
"id": 51,
"result": {
"startingBlock": "0x0",
"currentBlock": "0x1518",
"highestBlock": "0x9567a3",
"pulledStates": "0x203ca",
"knownStates": "0x200636"
}
}
curl -X POST http://localhost:8547/graphql \
-H "Content-Type: application/json" \
--data '{
"query": "{syncing{startingBlock currentBlock highestBlock pulledStates knownStates}}"
}'
{
syncing {
startingBlock
currentBlock
highestBlock
pulledStates
knownStates
}
}
{
"data": {
"syncing": {
"startingBlock": 0,
"currentBlock": 5400,
"highestBlock": 9791395,
"pullStates": 132042,
"knownStates": 2098742
}
}
}