https://twitter.com/gakonst/status/1367418971117477888Georgios Konstantopoulos @gakonst(C)
"The Berlin Ethereum network upgrade (aka hard fork) is scheduled to happen on mainnet in block 12,244,000, ~41 days from now
EIP-2929: Gas cost increases for state access opcodes (
https://eips.ethereum.org/EIPS/eip-2929)
https://arxiv.org/pdf/1909.07220.pdfThis EIP increases the gas cost for the first time a slot or account is accessed.
EIP-2929 reprices the “cold” cost of account access opcodes (BALANCE, *CALL, EXT*) to 2600, and reprices state access costs (SLOAD) from 800 to 2100, while setting the “warm” access costs to 100.
This means that the first time an account or storage slot is accessed you pay more, but subsequent accesses to it cost less (many contracts already try to minimize the amount of these accesses by SLOADing once and then MLOADing).
It also adjusts cold SSTOREs to charge an additional 2100 gas which can be refunded to the user according to the net gas metering rules defined in EIP-2200 (
https://eips.ethereum.org/EIPS/eip-2200).
This is needed to avoid a DOS attack, and actually makes SLOAD->SSTORE cheaper than before.
SELFDESTRUCT is also going to cost 2100 more if the recipient of the ETH has not already been loaded.
EIP-2930: Optional access lists (
https://eips.ethereum.org/EIPS/eip-2930)
To reduce state accesses, this EIP allows warming-up an account (1900 gas) or storage slot (2400 gas), meaning instead of paying 2100 per follow-up SLOAD or 2600 per EXT*, you’d pay 100!
EIP-2718: Typed Transaction Envelope (
https://eips.ethereum.org/EIPS/eip-2718)
Introducing new transaction types in a backwards-compatible way is hard.
This EIP “defines a new transaction type that is an envelope for future transaction types.”
EIP-2718 is important because it’ll allow an easy transition from the current transaction format to access-list-enabled transactions. Clients will just inspect the first byte and know the tx type by that.
It'll also make it easy to enable EIP-1559 txs, without code churn.
EIP-2565: ModExp Gas Cost
The MODEXP precompile (at 0x5,
https://github.com/ethereum/go-ethereum/blob/744707a490705f292b0558aa6807b3848a9c4bf9/core/vm/contracts.go#L252-L377) implements modular exponentiation, an important operation for building cryptographic primitives such as SNARKs, VDFs, RSA Accumulators and more.
https://eips.ethereum.org/EIPS/eip-2565 Modexp opcode costs ~5-20x more than it should, so the EIP changes the gascost calculation formula to tune that down. Onchain crypto becomes cheaper, fantastic!
EIP-2315: Simple Subroutines for the EVM (
https://eips.ethereum.org/EIPS/eip-2315)
Subroutines in the EVM are not directly supported. This EIP adds a new stack/opcodes to store for ret pointers, improving bytecode static analysis and with marginal gas cost improvements. 13/14
The above thread summarizes the changes in the upcoming Ethereum hard fork, Berlin, in block 12,244,000.
I encourage you to *at least* look at 2929/2930/2718, given that you may need to adjust your code to account for the gas cost increases."