No, they don’t exclude each other. However, now I think that any new storage/memory that we introduce, should be linear. So if I were to write the transient storage EIP now, I would call it cross-frame memory, and make it behave like a linear memory and not like a non-linear storage. In the hindsight, the contract storage in Ethereum should have been linear too. And I seem to remember that Nick agrees with that too.
Not quite; in my opinion it should be page-table based; that fits much better with how real world memory and disk are organised, and has much lower overhead than maps.
Hi,
has this EIP been deployed in Ropsten ?
I’ve tested following code, and gas costs seems very strange
Gas cost for function which uses modifier that sets 3 values and then cleans them is around 52800 gas when cost of function that only sets is around 37000 gas
Here is deployed contract on Ropsten
https://ropsten.etherscan.io/address/0x15616154B7D9a43E716347E1F0Bb67C725FcB7E2
why dummy2() costs more than double of dummy1b()
?
Hey @adamskrodzki this EIP is not deployed on Ropsten and it is neither deployed on Mainnet. A variant of this (EIP 1283) was supposed to get deployed in the Constantinople fork but due to security concerns it was removed. The EIP 2200 which is planned for Istanbul has another variant which will get deployed soon on Ropsten (from the top of my head the Ropsten hard fork is scheduled at October 4).
Hence the reason that you pay a lot of gas for this cleaning is because you pay the “old” SSTORE cost which in the end nets to 5k SSTORE gas (in case the slot is not zero) which corresponds to what you see on Ropsten - the 52800 transaction is about 15k gas higher (3*5k gas) than the other.
just to confirm,
so no changes about gas mettering of multiple SSTORE to same location where made during Istambul hard fork?
That is quite important information I’'ve missed - latest OpenZeppelin contracts are written like it was in place. For example has reentrencyGuard which works by setting and cleaning some store variable.
They were not deployed during Constantinople but are scheduled for Istanbul which is an upcoming hard fork =)