EIP-4844, also called proto-danksharding, added a new Ethereum transaction type that carries blobs of data whose contents are not readable by the EVM but whose KZG commitments are. Rollups use blobs to publish data availability more cheaply than calldata, paying a separate blob gas fee market. This guide explains the mechanism, shows how to inspect blob transactions and blob base fees through a JSON-RPC endpoint, and gives a reproducible procedure for measuring blob costs and diagnosing common failures. It separates protocol-documented behavior from operational recommendations and from numbers you must measure on your own network.
What EIP-4844 Changes and What This Guide Covers
EIP-4844 introduces blob-carrying transactions: a transaction format that attaches one or more blobs of data to a normal execution transaction. The EVM cannot read the blob contents, but it can read versioned hashes that commit to each blob. The blobs themselves are propagated and stored by consensus-layer nodes for a limited retention window, then pruned. This is why the proposal is called proto-danksharding: it deploys the transaction format and fee market that full danksharding will reuse, without actually sharding the data across the network yet.
The practical consequence for rollups is a second, cheaper data-availability channel alongside calldata. Execution gas and blob gas are priced separately, so a rollup's cost to post a batch depends on two markets. This article covers the mechanism, a runnable inspection procedure, a measurement method for blob costs, troubleshooting, and tradeoffs. It assumes you have access to an Ethereum JSON-RPC endpoint that exposes blob-related fields and that you can run curl or Node.js.
- Documented protocol behavior: transaction type, KZG commitments, blob gas accounting, retention.
- Operational procedure: inspect blob transactions and blob base fee via JSON-RPC.
- Measurement: compute effective blob cost per transaction and per byte on your own data.
- Recommendations: where to be careful, and when to consult an endpoint provider.
Prerequisites and Assumptions
You need an Ethereum mainnet or testnet RPC endpoint that supports the blob-related JSON-RPC fields. Most modern execution clients expose blobGasUsed and blobGasPrice on transaction receipts and a blobBaseFee field on blocks, but you should verify this against your provider before relying on it. You also need a way to submit or observe a blob transaction; if you are not a rollup operator, you can inspect existing blob transactions from a block explorer or by querying recent blocks.
For the code examples, replace RPC_URL with your own endpoint. If you do not yet have a suitable endpoint, the OnFinality API service and the RPC endpoint guide explain how to obtain one; the concrete provider choice is a short recommendation task better handled by RPC Assistant. Do not use a public endpoint for production measurement because rate limits and caching can distort results.
export RPC_URL="https://your-endpoint.example"
export BLOCK_NUMBER="latest"Mental Model: Execution Payload, Blob Payload, and Two Fee Markets
A blob transaction has two parts. The execution payload is a normal transaction: sender, nonce, recipient, value, calldata, gas limit, and max fee fields. The blob payload is a list of blobs, each 4096 field elements of 32 bytes, plus KZG commitments and proofs. The execution layer validates the transaction and charges execution gas as usual. The consensus layer validates the blobs against their commitments and includes them in the beacon block. The EVM sees only the versioned hashes, which are derived from the commitments.
Blob gas is accounted separately. Each blob consumes a fixed amount of blob gas, and the blob base fee adjusts according to the same style of exponential update rule used for EIP-1559, but with its own target and maximum. A blob transaction specifies a max fee per blob gas and a tip, and the effective blob gas price is bounded by the blob base fee and the sender's cap. Because blobs are pruned after a retention period, they are priced below calldata, which is stored indefinitely. The retention window is long enough for rollup participants to retrieve data but short enough to keep disk usage manageable.
- Execution gas: paid for computation and calldata, visible to the EVM.
- Blob gas: paid for blob space, not readable by the EVM, pruned after retention.
- KZG commitment: a succinct commitment to blob data, verified by consensus nodes.
- Versioned hash: what the EVM can access, derived from the commitment.
Inspecting a Blob Transaction with curl
The fastest way to confirm that your endpoint exposes blob fields is to fetch a recent block with full transactions and look for type-3 transactions. The JSON-RPC method eth_getBlockByNumber with the second parameter set to true returns transaction objects. Blob transactions have type 0x3 and include blobVersionedHashes. The block object may include blobGasUsed and excessBlobGas, and the transaction receipt includes blobGasUsed and blobGasPrice.
Run the following curl command against your endpoint. If the block has no blob transactions, choose a block from a period when rollups were active, or query a range of blocks until you find one. The expected verification result is a JSON object containing at least one transaction with type 0x3 and a non-empty blobVersionedHashes array.
curl -s "$RPC_URL" \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["'"$BLOCK_NUMBER"'",true]}' \
| jq '.result.transactions[] | select(.type == "0x3") | {hash, type, blobVersionedHashes, maxFeePerBlobGas}'Verifying Blob Gas Accounting on a Receipt
Once you have a blob transaction hash, fetch its receipt with eth_getTransactionReceipt. The receipt should include blobGasUsed and blobGasPrice. Multiply them to get the blob fee paid by that transaction. Compare that with the execution gas fee, which is gasUsed multiplied by effectiveGasPrice. This comparison is the core of any blob cost analysis.
The following JavaScript snippet uses the built-in fetch API available in Node.js 18 and later. It prints the execution fee, blob fee, and total fee in wei and in ether. It does not assume any particular number; you supply the transaction hash. If your endpoint returns null for blobGasPrice, the endpoint or client version may not expose the field, and you should try another endpoint or query the block's blobBaseFee instead.
const RPC_URL = process.env.RPC_URL;
const TX_HASH = process.env.TX_HASH;
async function rpc(method, params) {
const res = await fetch(RPC_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params })
});
const json = await res.json();
if (json.error) throw new Error(json.error.message);
return json.result;
}
const receipt = await rpc('eth_getTransactionReceipt', [TX_HASH]);
const gasUsed = BigInt(receipt.gasUsed);
const effectiveGasPrice = BigInt(receipt.effectiveGasPrice);
const blobGasUsed = BigInt(receipt.blobGasUsed ?? '0x0');
const blobGasPrice = BigInt(receipt.blobGasPrice ?? '0x0');
const executionFee = gasUsed * effectiveGasPrice;
const blobFee = blobGasUsed * blobGasPrice;
const totalFee = executionFee + blobFee;
console.log({
executionFeeWei: executionFee.toString(),
blobFeeWei: blobFee.toString(),
totalFeeWei: totalFee.toString(),
totalFeeEther: Number(totalFee) / 1e18
});Measuring Blob Base Fee and Cost per Byte
To measure blob costs over time, sample blocks and record blobBaseFee, blobGasUsed, and the number of blob transactions. The blob base fee is a per-blob-gas price; each blob consumes a fixed amount of blob gas, so the cost per blob is blobGasUsed per blob multiplied by blobBaseFee. To get cost per byte, divide the per-blob cost by the blob size in bytes. Because blob size is fixed by the protocol, this is a straightforward calculation once you have the base fee.
Use a table to record your measurements. Do not fill in numbers from memory or from another network; run the procedure and record what your endpoint returns. The table below is a template. The procedure is: choose a sampling window, fetch each block, extract the fields, and aggregate. A simple approach is to query every block in a range and compute the mean and maximum blob base fee, then multiply by the blob gas per blob to get cost per blob.
- Sampling window: a contiguous block range on the network you operate on.
- Fields: block blobBaseFee, block blobGasUsed, transaction type and blobVersionedHashes.
- Aggregation: mean, median, and maximum blob base fee; count of blob transactions.
- Derived metric: cost per blob and cost per byte using the protocol's fixed blob size.
| Sample | Block | blobBaseFee (wei) | blobGasUsed | Blob txs | Cost per blob (wei) | Cost per byte (wei) |
|--------|-------|-------------------|-------------|----------|---------------------|---------------------|
| 1 | | | | | | |
| 2 | | | | | | |
| 3 | | | | | | |Expected Verification Results and What They Mean
If your endpoint is healthy and blob-aware, the block query returns type-3 transactions with blobVersionedHashes, and the receipt query returns non-null blobGasUsed and blobGasPrice. The blob base fee should be present on blocks after the network activated blob transactions. If you see type-3 transactions but null blob fields, the endpoint may be behind or using a client that does not expose the fields; try a different endpoint before concluding the network is at fault.
A successful measurement run produces a table with no gaps in the sampled fields and a cost-per-blob figure that is consistent with the blob base fee you observed. If the cost per blob varies wildly within a short window, check whether you are mixing blocks from different networks or whether your endpoint is returning cached data. For production monitoring, use a dedicated endpoint rather than a shared public one, and consider a dedicated node if you need consistent sampling.
Troubleshooting Common EIP-4844 Operational Issues
Blob transactions introduce failure modes that did not exist for legacy transactions. The most common are fee-related: a transaction whose max fee per blob gas is below the current blob base fee will not be included. Unlike execution gas, you cannot simply bump the priority fee; you must ensure the blob fee cap is high enough. Another common issue is nonce management when submitting multiple blob transactions, because each transaction consumes a nonce and a failed blob transaction still consumes the nonce if it is included.
A second class of issues is data retrieval. Blobs are pruned after the retention window, so any system that needs historical blob data must archive it before pruning. If your rollup's data availability depends on blobs, you need a retrieval strategy that does not assume blobs are permanent. A third class is endpoint support: some RPC providers do not expose blob fields or do not relay blob transactions. Verify support before building a workflow around a specific endpoint.
- Blob fee cap too low: transaction not included; raise maxFeePerBlobGas.
- Nonce gaps: multiple blob transactions submitted without waiting for receipts.
- Pruned blobs: historical data unavailable; archive before retention expires.
- Endpoint gaps: null blob fields or rejected blob transactions; switch endpoints.
- Client version: older clients may not expose blob fields; upgrade or change provider.
Limitations and Tradeoffs of Proto-Danksharding
EIP-4844 is a stepping stone, not full sharding. Blob data is not sharded across the network in the way full danksharding will be, and the blob count per block is capped. That cap means blob space can become contested during periods of high rollup activity, and the blob base fee can rise. The fee market is designed to handle this, but it means blob costs are not fixed and must be monitored.
Blobs are also not readable by the EVM, which is a deliberate design choice but a limitation for contracts that need to inspect data directly. Rollups must design around versioned hashes and off-chain retrieval. Finally, retention is finite. Any application that treats blobs as permanent storage is misusing the feature. These tradeoffs are acceptable for data availability, but they are not a substitute for a full data-availability layer.
Next Steps: From Inspection to Production Monitoring
Once you can inspect blob transactions and measure blob base fees, the next step is to build a small monitoring loop. Sample blocks on a schedule, record blob base fee and blob transaction counts, and alert when the fee exceeds a threshold relevant to your rollup's economics. Pair this with execution gas monitoring so you can see the combined cost of posting a batch.
For endpoint selection, use the RPC Assistant for a short recommendation on a blob-aware Ethereum endpoint, and review the OnFinality pricing for RPC to understand rate limits and dedicated options. If you operate a rollup or a data-availability service, a dedicated node gives you consistent access and avoids shared-endpoint variability. The network directory lists supported networks, and the Learn section has related guides on RPC endpoints and node hosting.
- Build a scheduled sampler for blobBaseFee and blob transaction counts.
- Alert on blob fee thresholds and on missing blob fields from your endpoint.
- Archive blob data before retention expires if your application needs history.
- Choose a blob-aware endpoint and consider a dedicated node for production.