You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test adds two exit queues:
16:44:55.122 [info] ETH exit queue missing. Adding...
16:44:57.149 [info] ERC20 exit queue missing. Adding...
after which I immidiately call: getNextExit(uint256,address)
data =
ABI.encode("getNextExit(uint256,address)", [Itest.PlasmaFramework.vault_id(Currency.ether()), Currency.ether()])
{:ok, result} = Ethereumex.HttpClient.eth_call(%{to: Itest.PlasmaFramework.address(), data: Encoding.to_hex(data)})
case Encoding.to_binary(result) do
"" ->
:queue_not_added
result ->
next_exit_id = hd(ABI.TypeDecoder.decode(result, [{:uint, 256}]))
next_exit_id &&& (1 <<< 160) - 1
end
which is decoded to 3963877391197344453575983046348115674221700746820753546331534351508065746944 and the biwtise operation turns it into:
next_exit_id &&& (1 <<< 160) - 1 0
looking at the plasma contracts code... that's not what it's supposed to happen:
The test adds two exit queues:
16:44:55.122 [info] ETH exit queue missing. Adding...
16:44:57.149 [info] ERC20 exit queue missing. Adding...
after which I immidiately call: getNextExit(uint256,address)
data =
ABI.encode("getNextExit(uint256,address)", [Itest.PlasmaFramework.vault_id(Currency.ether()), Currency.ether()])
result is consistently a binary (on a clique geth node):
<<8, 195, 121, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 81, 117, 101, 117, 101, 32, 105, 115, 32, 101, 109, 112, 116, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>>
which is decoded to 3963877391197344453575983046348115674221700746820753546331534351508065746944 and the biwtise operation turns it into:
next_exit_id &&& (1 <<< 160) - 1
0
looking at the plasma contracts code... that's not what it's supposed to happen:
plasma-contracts/plasma_framework/contracts/src/framework/ExitGameController.sol
Lines 234 to 237 in ba662a9
plasma-contracts/plasma_framework/contracts/src/framework/utils/PriorityQueue.sol
Lines 76 to 79 in 655a792
So on ethhash node the transaction is reversed with this:
require(queue.currentSize > 0, "Queue is empty");
The question is... why do contracts behave differently on different eth nodes?
The text was updated successfully, but these errors were encountered: