-
Notifications
You must be signed in to change notification settings - Fork 677
Bug when using --hardfork istanbul
#511
Comments
@holgerd77, can you or someone from the ethereumjs-vm team take a look quick look at this to determine if this is a new issue with the istanbul hardfork changes in the VM? |
I thought the reason is in gas consumption and tried to increase the gas limit here, but that didn't help. |
From reading the error message from the screenshot above I wonder if @alcuadrado worked on something eventually touching relevant behavior (don't remember the context though) and can eventually help here. |
I haven't seen anything like this so far. I could reproduce the error with Ganache, but not with Buidler EVM, so I suspect the problem is in Maybe @s1na knows if this can be related to an instanbul change in the VM. |
Hm, if it's related to ethereumjs-vm my guess would be EIP-2200 (PR) since the |
But EIP-2200 could only lead to an OOG error, right? That would have a different error message. |
Unless there's a bug. I thought EIP-2200 because that seems to be the only istanbul-relevant code that this contract snippet touches. I recently started to make the VM pass the istanbul state tests in ethereumjs/ethereumjs-monorepo#607. If there's a bug in the VM it'll most likely surface there. |
Hi, do you know whether this is still an issue on latest Ganache? Thank you! |
Closing for issue maintenance. Let us know if you're still running into this, and we'll be happy to re-open. Thanks! |
Expected Behavior
The code
should work for
Istanbul
.Current Behavior
We have smart contracts with complex unit tests and use
ganache-cli
along withtruffle
. Everything works fine if we don't use--hardfork istanbul
even for6.8.0-istanbul.0
, but when we activate theistanbul
, there is a pretty weird bug.Steps to Reproduce
After that, the unit tests are run. On the step
staking epoch trufflesuite/ganache-cli#3 finished
you will seerevert
failure:This is the line in
test/BlockRewardAuRa.js
which callsBlockRewardAuRa.reward
function which in turn callsValidatorSetAuRa.newValidatorSet
function.The
ValidatorSetAuRa.newValidatorSet
function calls the internal_setPendingValidators
function. And that_setPendingValidators
reverts here:If we remove the
--hardfork istanbul
flag from our cli parameters, the test works fine as it should.Please, take a look at these lines (and the comments there): https://github.com/poanetwork/posdao-contracts/blob/b0abf0cfd50bb78894b744f2f5fd6734054a476c/contracts/ValidatorSetAuRa.sol#L787-L808
It seems that the issue somehow relates to these lines which modificate the
_pendingValidators
array. The bug is only reproduced after those lines are executed in the same block.Context
This issue doesn't let us test our contracts for
Istanbul
.Your Environment
The text was updated successfully, but these errors were encountered: