Open 0xekez opened 1 year ago
second paragraph of this discusses how gas is selected. experiment: check if gas usage non-determinism changes if the hardware changes.
part of this work is to make wiki page describing updates to gas usage by x/gov and how to handle them.
check if gas usage non-determinism changes if the hardware changes.
Maybe create a test that just return average gas consumption over 100 msgs or so, and we can test it on different devices and return the results here
@0xekez out of gas in location: WritePerByte; gasWanted: 3000000, gasUsed: 3000250: out of gas
Can you test it on your end and make sure its passing on my branch for you? (just simtest)
Edit: Only happened once, without playing with any gas values.
To reproduce, change
ACK_GAS_NEEDED
to a low number incontracts/voice/ibc.rs
, then run the test suite a couple times noticing that thegas_used
error message has a different value on each failure. You can verify in thejust simtest
output that the contract hashes are the same.This is relevant because we hand tune the
ACK_GAS_NEEDED
parameter. Ifgas_used
is non-deterministic, can someone induce this non-determinism to move gas usage in a particular direction? We need to be sure that an attacker can't control this non-determinism and cause ACKs not to be returned.