RPC method

eth_getBlockByNumber on Sonic

Supported on SwiftNodes

Everything below was measured on 2026-10-13 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 block18, 6, 1, 4, 1 in five consecutive blocks
Response size, full transactions (true)9.6 KB average
Response size, hashes only (false)2.8 KB
Gas limit5,000,000,000
Gas used in the latest block11,039,093 (0.221% of the limit)
Base fee50.00 gwei
Tag "safe"block 80,919,873
Tag "finalized"block 80,919,876
Tag "pending"block 80,919,879
Tag "earliest"block 0

What is different on Sonic

Sonic blocks carry 2 fields that Ethereum blocks do not. timestampNano, epoch: 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.

Asking for full transactions (second parameter true) made the response 3.4 times larger than hashes only. If you need only some transactions, fetch hashes and request those transactions or their receipts individually.

A real Sonic block header

From block 80,919,864, as our endpoint returned it (long hex values shortened).

{
  "parentHash": "0x272cbd29adfe57bfff0251d60868429776f949a3a9898dbe278326dca08e100f",
  "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  "miner": "0x0000000000000000000000000000000000000000",
  "stateRoot": "0xd6fb1050fe35e41d316295e1ae305bf9a0ad966509624e4c5d78c927cc708708",
  "transactionsRoot": "0xf643c078d84bd3818f11e07507ae2546b3fd1c4fb9b6b34a86ae161cfd287f8e",
  "receiptsRoot": "0xa5cab66b7c3e20fd05607c6487d295276636b993377ff7a4876de97ea35b978f",
  "logsBloom": "0x0000000000000000…(256 bytes)",
  "difficulty": "0x0",
  "number": "0x4d2bd38",
  "gasLimit": "0x12a05f200",
  "gasUsed": "0xa87175",
  "timestamp": "0x6ace2394",
  "timestampNano": "0x18de167b597d7fb2",
  "extraData": "0x2e62b7b20000000018e72dfd",
  "mixHash": "0x3ce6bb726c951a58986e38fb48e7dbf7570c110f75228e8a78e1c9e746e603f9",
  "nonce": "0x0000000000000000",
  "baseFeePerGas": "0xba43b7400",
  "hash": "0x9536929302d47e9d0950d99e3f2816000a154459d9507fe612ee260737fc6937",
  "epoch": "0x184b7",
  "totalDifficulty": "0x0",
  "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  "blobGasUsed": "0x0",
  "excessBlobGas": "0x0",
  "transactions": "18 transactions",
  "size": "0x1d13",
  "uncles": []
}

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 (2.8 KB)
const block = await client.getBlock({ blockTag: "latest" });

// With full transactions (9.6 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-10-13).

How many transactions are in each Sonic block?

In five consecutive blocks on 2026-10-13: 18, 6, 1, 4, 1.

What are timestampNano and epoch in a Sonic block?

timestampNano is not part of the Ethereum JSON-RPC specification; added by this chain's node software. epoch 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.