---
eip: 8116
label: EIP-8116
title: Replace cumulative receipt fields
status: Draft
type: Standards Track
category: Core
created: 2025-12-30
official: https://eips.ethereum.org/EIPS/eip-8116
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8116.md
canonical: https://eips.huatuo.xyz/eip-8116/
lang: en
tldr: "Changes on-chain receipts to record each transaction's own gasUsed instead of a running block total, and makes RPC logIndex count per receipt, so receipts become independent of one another."
tags: [receipts, gas, json-rpc, core]
---

# EIP-8116: Replace cumulative receipt fields

> Replace cumulativeGasUsed with gasUsed in on-chain receipt

**TL;DR:** Changes on-chain receipts to record each transaction's own gasUsed instead of a running block total, and makes RPC logIndex count per receipt, so receipts become independent of one another.

## What problem does it solve?

Every transaction receipt stored in a block today carries `cumulativeGasUsed`: the running total of gas consumed by all transactions in the block up to and including this one. The gas a single transaction actually used is not stored directly; you get it by subtracting the previous receipt's cumulative value.

That design has two costs:

- **Verification is awkward.** An RPC client that wants to prove "this transaction used X gas" must fetch and verify two consecutive receipts and subtract.
- **Receipts are stateful.** Each receipt depends on every transaction before it, even when those transactions touched completely unrelated state. That gets in the way of building receipts in parallel.

The JSON-RPC `logIndex` field has the same flavour of problem: it counts logs across the whole block, so a log's index depends on all earlier transactions.

## How it works

The proposal makes two small changes, both replacing a block-level running counter with a per-transaction value:

1. **Receipt construction (consensus change).** After activation, the receipt committed in the block's receipts trie stores the individual transaction's `gasUsed` in the slot where `cumulativeGasUsed` used to be.
2. **JSON-RPC (API change).** Inside a receipt's `logs`, `logIndex` becomes the position of the log *within that receipt* (starting again for each transaction) rather than within the whole block.

The rationale is to align on-chain data with what applications actually consume over RPC: most users want "gas used by my transaction", not the running block total.

## Sample code

Before and after, for a block with three transactions using 21,000, 50,000 and 30,000 gas:

```text
                 before (cumulativeGasUsed)   after (gasUsed)
tx 0             21000                         21000
tx 1             71000                         50000
tx 2            101000                         30000
```

Code that derived per-transaction gas from consecutive receipts must switch to reading the value directly once the fork is active. If you still need a block-wide ordering key for logs, the spec suggests this approximation:

```ts
// Preserves the old relative ordering; absolute values may be larger than before.
function legacyOrderKey(log: { transactionIndex: number; logIndex: number }): number {
  return log.transactionIndex * 4 + log.logIndex;
}
```

## Things to know

- **Status: Draft.** It is not scheduled for any network upgrade, and details may change.
- Indexers, explorers and light clients that verify `cumulativeGasUsed` or rely on block-level `logIndex` must handle both semantics: old receipts keep the cumulative meaning, receipts after activation use the per-transaction one.
- The `logIndex` change is RPC-only; logs themselves are unchanged on-chain.
- Receipt types and envelopes come from [EIP-2718](/eip-2718/); the receipt status field came from [EIP-658](/eip-658/). Related "make Ethereum data easier to consume" work is gathered under [EIP-7919](/eip-7919/) (Pureth Meta, currently Stagnant).


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8116
