We queried the transactions' gas costs in 80,000 blocks (block height range {12.86M, 12.94M}). The reuslts include gas costs under both post-Berlin and post-Verkle gas schedule. In the charts the following are presented:
In the following histograms, for the same range of blocks and regarding the post-Verkle gas schedule, we present detailed information for the distribution of transactions over
In the following histograms, for the same range of blocks and regarding the post-Verkle gas schedule, we present detailed information for the distribution of contracts over
For this analysis we adopted a worst-case-scenario approach, considering each contract to be "represented" by the most expensive, gas-wise, transaction that called it.
To reduce the code access penalty an alternate code chunk accessing scheme was suggested. Since many smart contracts are deployed multiple times with the same code, addressing the code by the codehash rather than by the contract address would allow the bytecode to be re-used without charging extra.
Currently the code chunk access uses the following mechanism;
(address, (chunk_id + 128) // 256, (chunk_id + 128) % 256)
This mechanism would remain in place for the first 128 chunk_id
used for code, where after the following access scheme is used;
(address, (chunk_id - 128) // 256, (chunk_id - 128) % 256)
To asses the impacts of these changes analyses were run on 8000 blocks from block 12.93M to 12.94M.
To confirm the assumption that the code chunking benefits transactions that interact with multiple deployed versions of the same contract, we can filter for transactions which have fewer unique codehash interactions than address interactions. In the example below we filter for contracts which interact with 3 times more addresses than code hashes, which causes the average savings to jump from ~8% to ~36%.
Average Savings 0 0.366974