RPC method

eth_getBlockByNumber on Sonic

Supported on SwiftNodes

Everything below was measured on 2026-11-29 by calling eth_getBlockByNumber on Sonic through the same endpoint customers use, and is re-measured weekly.

What eth_getBlockByNumber does

Returns a block by number or tag (latest, safe, finalized, pending, earliest): the header, and either the transaction hashes or the full transactions. Indexers, explorers and wallets use it to follow the chain.

eth_getBlockByNumber on Sonic: what we measured

Header fields26 (2 beyond the Ethereum set)
Transactions per block1, 0, 0, 0, 2 in five consecutive blocks
Response size, full transactions (true)3.0 KB average
Response size, hashes only (false)1.7 KB
Gas limit5,000,000,000
Gas used in the latest block2,081,332 (0.042% of the limit)
Base fee50.00 gwei
Tag "safe"block 83,272,865
Tag "finalized"block 83,272,866
Tag "pending"block 83,272,866
Tag "earliest"block 0

What is different on Sonic

Sonic blocks carry 2 fields that Ethereum blocks do not. epoch, timestampNano: specific to this chain's node software, not part of the Ethereum JSON-RPC specification. Strict schema validators need to allow them.

The header includes the fields added by London (EIP-1559 base fee), Shanghai (withdrawals), Cancun (EIP-4844 blob gas), but not those of Cancun (EIP-4788 beacon root), Prague (EIP-7685 requests). Code that assumes Ethereum's current header shape must treat the missing ones as optional.

A real Sonic block header

From block 83,272,859, as our endpoint returned it (long hex values shortened).

{
  "baseFeePerGas": "0xba43b7400",
  "blobGasUsed": "0x0",
  "difficulty": "0x0",
  "epoch": "0x19efe",
  "excessBlobGas": "0x0",
  "extraData": "0x03ee0c590000000019477636",
  "gasLimit": "0x12a05f200",
  "gasUsed": "0x1fc234",
  "hash": "0x2dffbbf600ebaa237a7f82824a4f6a61268e5005fe70480313a6240ecd63ae06",
  "logsBloom": "0x0000000000004140…(256 bytes)",
  "miner": "0x0000000000000000000000000000000000000000",
  "mixHash": "0xbf3fb73fabcd43c29726727aea57443de88fbf8f3f16fd4e5efec998fdac367a",
  "nonce": "0x0000000000000000",
  "number": "0x4f6a49b",
  "parentHash": "0x6ecc95d1265834590b22d4ccc325d3c7028f4f67f9d2c6f8c42b4d4e09efcd5a",
  "receiptsRoot": "0x8a21f4f02ec6d211a1a8b4e5e520ccb403624a20e6186cdeabe7425fd3265235",
  "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  "size": "0x511",
  "stateRoot": "0x4c023ec6005b897e8c8d5298d5ff548bb855bf91e3827978996722ca5f3d942b",
  "timestamp": "0x6b0bc0bb",
  "timestampNano": "0x18ec6ef4537f9a59",
  "totalDifficulty": "0x0",
  "transactions": "1 transactions",
  "transactionsRoot": "0xa467a7716bdafc06ca0f9eb29bbc11aa6d2dc2948823b266d22619ddaaf45a2c",
  "uncles": [],
  "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
}

Example request

curl -s https://rpc.swiftnodes.io/rpc/sonic?key=YOUR_API_KEY \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["latest",false]}'
import { createPublicClient, http } from "viem";

const client = createPublicClient({
  transport: http("https://rpc.swiftnodes.io/rpc/sonic?key=YOUR_API_KEY"),
});

// Header plus transaction hashes (1.7 KB)
const block = await client.getBlock({ blockTag: "latest" });

// With full transactions (3.0 KB on average on Sonic)
const full = await client.getBlock({ blockNumber: block.number, includeTransactions: true });

// A block that will not be reorganised
const final = await client.getBlock({ blockTag: "finalized" });

Other methods on Sonic

eth_getBlockByNumber on other chains

Frequently asked questions

Does Sonic support eth_getBlockByNumber?

Yes. eth_getBlockByNumber answered on the SwiftNodes Sonic endpoint when our weekly probe called it through the customer path (2026-11-29).

How many transactions are in each Sonic block?

In five consecutive blocks on 2026-11-29: 1, 0, 0, 0, 2.

What are epoch and timestampNano in a Sonic block?

epoch is not part of the Ethereum JSON-RPC specification; added by this chain's node software. timestampNano is not part of the Ethereum JSON-RPC specification; added by this chain's node software.

Sonic endpoints, live block height and WebSocket status are on the Sonic RPC page.

One key covers every chain we serve, and SwiftNodes has a free tier.