0

I am forking the mainnet from my own geth node with ganache-cli --fork option. Immediately after the fork, I simulate a transaction to a contract on the forked, private network. I then immediately send that same exact transaction on the mainnet. These are the same transactions from the same account with the same nonce.

After the transactions are processed, I am finding that the gas_used on the mainnet is ~1% (or less) different than the gas_used on the ganache fork. How can this be if I simply forked the network and sent two equivalent contract transactions? Can it have something to do with the solc compiler versions?

3
  • 1
    There are optimizations done on the solc all the time but difficult to say if that's the real reason. Commented Mar 28, 2019 at 6:26
  • @LauriPeltonen What additional information would help? Commented Mar 28, 2019 at 17:36
  • Sorry, I don't have much ideas currently and I'm not too familiar with solc so can't help you much further. Hopefully someone else can give you a better answer. Commented Mar 28, 2019 at 18:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.