Closed egonspace closed 5 months ago
All non-miner nodes.
Sample contract:
contract Sample { uint256 public val; function setValue(uint256 newVal) external { require(val % 2 == 0, "val is odd"); val = newVal; } function increase() external { val++; } }
current: val = 0
Now, we send following two txs continuously to a node to be included in a block.
tx1: sample.increase() tx2: sample.setValue(2)
tx2 should be failed in estimate_gas because the processing estimate_gas should be done on the pending state that includes the result of tx1.
estimate_gas
tx1, tx2 are all included in the block and tx2 failed in the block consuming gas.
This occurs in wemix mining mode, and not in POW mode.
My misunderstanding. This is not a bug. A non-miner node has no pending state, it has just a latest block state.
System information
All non-miner nodes.
Expected behaviour
Sample contract:
current: val = 0
Now, we send following two txs continuously to a node to be included in a block.
tx1: sample.increase() tx2: sample.setValue(2)
tx2 should be failed in
estimate_gas
because the processingestimate_gas
should be done on the pending state that includes the result of tx1.Actual behaviour
tx1, tx2 are all included in the block and tx2 failed in the block consuming gas.
This occurs in wemix mining mode, and not in POW mode.