EIP-6789 Renaming gas to mana (Rename gas to mana)
No call decision · Fees & gas · EIP status Stagnant · created 2023-03-27
A proposal to rename gas, a core Ethereum term, to mana. Opcode names, function parameter names, and even RPC endpoint names would all be unified under mana.
Why it is needed
This proposal revives a name that Vitalik Buterin first proposed back in 2015. The author explains that now, having moved from proof-of-work (PoW) to proof-of-stake (PoS), is the last chance to change the name gas. Once the upcoming major upgrade phases such as The Surge, The Scourge, The Verge, The Purge, and The Splurge have passed, changing terminology again will become even harder. gas is seen as a name that evokes fossil fuels, which no longer fits the changed nature of energy consumption after the move to PoS.
What changes
Today
- Opcode names GASPRICE, GASLIMIT, GAS
- The input parameter name for CALL, CALLCODE, DELEGATECALL, and STATICCALL is gas
- RPC endpoints eth_estimateGas, eth_gasPrice, eth_maxPriorityFeePerGas
- Use of gasleft() and msg.gas in Solidity and Vyper
After EIP-6789
- Opcode names changed to MANAPRICE, MANALIMIT, MANA
- The parameter name for the same family of call opcodes changed to mana
- RPC endpoints changed to eth_estimateMana, eth_manaPrice, eth_maxPriorityFeePerMana
- Replaced with manaleft() and msg.mana
Who is affected
- Ordinary users: The gas and gas fee displays seen in wallets change to mana. MetaMask's gasLimit setting field is also renamed to manaLimit.
- Wallet & app developers: Existing RPC calls such as eth_estimateGas and eth_gasPrice must all be changed to their new names.
- Client teams: This is a backwards-incompatible change requiring every Ethereum client to update its opcode and RPC specifications at the same time.
- Smart contract developers: Syntax such as Solidity's gasleft() and Vyper's msg.gas must be rewritten as manaleft() and msg.mana.
In depth
Key terminology changes
The original text requires the term gas itself to be renamed to mana. The opcodes GASPRICE, GASLIMIT, and GAS are each renamed to MANAPRICE, MANALIMIT, and MANA. Additionally, the gas input parameter taken by CALL, CALLCODE, DELEGATECALL, and STATICCALL becomes mana, and the gasLimit output value of the GASLIMIT opcode and the gas output value of the GAS opcode become manaLimit and mana respectively.
RPC endpoint name changes
The JSON-RPC side changes as well. eth_estimateGas becomes eth_estimateMana, eth_gasPrice becomes eth_manaPrice, and eth_maxPriorityFeePerGas becomes eth_maxPriorityFeePerMana, and terms such as gas, gasPrice, and maxPriorityFeePerGas appearing in each endpoint's description are also rewritten using the mana family of terms.
Why the name mana was chosen
The author gives three reasons. First, mana better reflects the increased environmental friendliness that came with the move to PoS. Second, mana is generally regarded as transient and non-transferable, which matches the nature of gas, which is consumed per transaction and is not something to be traded. Third, mana is usually depicted as a renewable resource, in contrast to natural gas, a non-renewable resource.
Backward compatibility
The original text explicitly states that this proposal is not backwards compatible. Because it renames the core term gas itself, it is a sweeping change that requires opcodes, RPC, and language syntax to all be updated at the same time.
What changes in code
In Solidity, gasleft() becomes manaleft(). The original test case uses an example contract called ManaMetering to measure the mana consumed by a function call using manaleft(). In Vyper, msg.gas becomes msg.mana. Also, if a transaction requires more mana than manaLimit, it is reverted with an out-of-mana error.
Security considerations
The original text states that this change has no direct security considerations. Since it is only a renaming, the underlying logic or computation itself does not change.
Current status
The status of this EIP is Stagnant. Since it was written in March 2023, discussion has stalled with no further progress, so it can be considered unlikely to actually be adopted and reflected on the network.