RPC method

eth_getBlockByNumber on Avalanche

Supported on SwiftNodes

Everything below was measured on 2026-10-13 by calling eth_getBlockByNumber on Avalanche 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 Avalanche: what we measured

Header fields36 (12 beyond the Ethereum set)
Transactions per block1, 1, 2, 5, 2 in five consecutive blocks
Response size, full transactions (true)8.1 KB average
Response size, hashes only (false)2.0 KB
Gas limit80,000,000
Gas used in the latest block4,000,000 (5.0% of the limit)
Base fee5.00 gwei
Tag "safe"block 97,444,334
Tag "finalized"block 97,444,336
Tag "pending"block 97,444,345
Tag "earliest"block 0

What is different on Avalanche

Avalanche blocks carry 12 fields that Ethereum blocks do not. blockExtraData: the encoded atomic (cross-chain) transactions included in the block; blockGasCost: the extra gas cost a block producer had to pay for producing the block early (Avalanche dynamic block fee); extDataGasUsed: gas used by the block's atomic (cross-chain import/export) transactions; extDataHash: the hash of the block's atomic transaction data; minDelayExcess, minPriceExponent, settledExcess, settledGasNumerator, settledGasUnix, settledHeight, targetExponent, timestampMilliseconds: 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), Cancun (EIP-4844 blob gas), Cancun (EIP-4788 beacon root), but not those of Shanghai (withdrawals), 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 4.0 times larger than hashes only. If you need only some transactions, fetch hashes and request those transactions or their receipts individually.

"finalized" was 6 blocks (about 7 s) behind the head.

A real Avalanche block header

From block 97,444,334, as our endpoint returned it (long hex values shortened).

{
  "baseFeePerGas": "0x12a05f200",
  "blobGasUsed": "0x0",
  "blockExtraData": "0x",
  "blockGasCost": "0x0",
  "difficulty": "0x1",
  "excessBlobGas": "0x0",
  "extDataGasUsed": "0x0",
  "extDataHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  "extraData": "0x000000000000",
  "gasLimit": "0x4c4b400",
  "gasUsed": "0x3d0900",
  "hash": "0x097d6c37c7fdaf4f071c88b34c7965d076b1719847c041898f0656bfb297ce65",
  "logsBloom": "0x0000000000000000…(256 bytes)",
  "minDelayExcess": "0x6af42c",
  "minPriceExponent": "0x80e08b2f603136cc",
  "miner": "0x0100000000000000000000000000000000000000",
  "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "nonce": "0x0000000000000000",
  "number": "0x5cee1ee",
  "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash": "0x57015ca88baf72ed711fe54e8167dd30437e9bdea238bea5a9c23e6d5c08feeb",
  "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  "settledExcess": "0x1cf3ddf70",
  "settledGasNumerator": "0x25df50",
  "settledGasUnix": "0x6ace235d",
  "settledHeight": "0x5cee1e6",
  "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  "size": "0xec1",
  "stateRoot": "0x965a5258ea1ba42dde91826daea3342f8ae10875a3f7cadb4114605516224024",
  "targetExponent": "0x2c5c860",
  "timestamp": "0x6ace2363",
  "timestampMilliseconds": "0x1a1353a3d76",
  "totalDifficulty": "0x0",
  "transactions": "1 transactions",
  "transactionsRoot": "0x18c9c334aaf279044b9ae748da17f9ee379e8f92fe6004087a13f90573231912",
  "uncles": []
}

Example request

curl -s https://rpc.swiftnodes.io/rpc/avalanche?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/avalanche?key=YOUR_API_KEY"),
});

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

// With full transactions (8.1 KB on average on Avalanche)
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 Avalanche

eth_getBlockByNumber on other chains

Frequently asked questions

Does Avalanche support eth_getBlockByNumber?

Yes. eth_getBlockByNumber answered on the SwiftNodes Avalanche endpoint when our weekly probe called it through the customer path (2026-10-13).

How many transactions are in each Avalanche block?

In five consecutive blocks on 2026-10-13: 1, 1, 2, 5, 2.

What are blockExtraData and blockGasCost in a Avalanche block?

blockExtraData is the encoded atomic (cross-chain) transactions included in the block. blockGasCost is the extra gas cost a block producer had to pay for producing the block early (Avalanche dynamic block fee).

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

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