Different gas usage of trivial reverting contract function

by J4D0   Last Updated October 17, 2019 10:28 AM

We are currently testing functions on Ropsten test network and have an issue regarding the gas usage. Our functions sometimes use 12 gas more and we can not fathom why that would be the case. To test this we defined a function

    function refund (bytes32 sessionId) public {
            require (false);
            ...
}

and called it 30 times with different byte32 values approx. every 3min. Here are two transactions to this function with different gas usage:

  1. https://ropsten.etherscan.io/tx/0xa48c4f09da3a8d57fc4061ecad27a3097c225ad3e524e81948e6d38461e41b1f

  2. https://ropsten.etherscan.io/tx/0x3126bdcdb6c5fd569a85a9c95928b1fd8c856ded7047670064f0d4e965199fe8

The only difference there seems to be the nonce(duh), the block index position and a different 32 bytes long input (that is not used). Is there some calculation for the used gas that we are missing?

Tags : gas evm ropsten


Related Questions


Updated July 30, 2017 19:28 PM

Updated August 27, 2018 01:28 AM

Updated February 17, 2018 05:28 AM

Updated November 26, 2017 01:28 AM