This PR updates the Counter app such that each transaction has exactly the same gas-costs.
Before this change, the first increment from 0 to 1 cost 43.426 units of gas. Subsequent updates have been much cheaper, only consuming roughly 28.000 units of gas, since they do not have to pay extra for the allocation of a new storage location. However, each of those transactions was endowed with 50.000 units of gas.
Since Sonic's gas metering is based on the gas limits reported by transactions, not the actual gas consumption, running transaction mixes with counters introduced more than 40% unusable capacity. This made it difficult to build load cases targeting a specific throughput rate in Gas/s. With this change, this problem is resolved.
This PR updates the
Counter
app such that each transaction has exactly the same gas-costs.Before this change, the first increment from 0 to 1 cost 43.426 units of gas. Subsequent updates have been much cheaper, only consuming roughly 28.000 units of gas, since they do not have to pay extra for the allocation of a new storage location. However, each of those transactions was endowed with 50.000 units of gas.
Since Sonic's gas metering is based on the gas limits reported by transactions, not the actual gas consumption, running transaction mixes with counters introduced more than 40% unusable capacity. This made it difficult to build load cases targeting a specific throughput rate in Gas/s. With this change, this problem is resolved.