omgnetwork / plasma-contracts

Root chain contracts for Plasma
Apache License 2.0
112 stars 66 forks source link

PaymentChallengeIFENotCanonical deployment fails but tx has succeeded #586

Open arthurk opened 4 years ago

arthurk commented 4 years ago

Issue Type

[x] bug report
[ ] feature request

Current Behavior

Deployment of plasma-contracts failed with error:

   Deploying 'PaymentChallengeIFENotCanonical'
   -------------------------------------------
   > transaction hash:    0x9049d9ab41af285d65f2d6d6a755e1746d79c016bc577892bcaee9a0eed8e0d1

Error: Error: Error:  *** Deployment Failed ***

"PaymentChallengeIFENotCanonical" -- The contract code couldn't be stored, please check your gas limit..

    at Object.run (/Users/arthur/Code/omisego/plasma-contracts/plasma_framework/node_modules/truffle/build/webpack:/packages/migrate/index.js:96:1)
    at process._tickCallback (internal/process/next_tick.js:68:7)
Truffle v5.0.38 (core: 5.0.38)
Node v10.19.0

but the transaction status is succeeded https://etherscan.io/tx/0x9049d9ab41af285d65f2d6d6a755e1746d79c016bc577892bcaee9a0eed8e0d1

Expected Behavior

should not error but continue since the tx went through

Steps to Reproduce

  1. Checkout git repo @ bfbf7cc

Suggested Fix

Motivation for Change

System Specs

arthurk commented 4 years ago

Same problem with another contract:

120_payment_state_transition_verifier.js
========================================

   Deploying 'PaymentTransactionStateTransitionVerifier'
   -----------------------------------------------------
   > transaction hash:    0x34399663d5b02a66e44ae6643f43c5c39d182f66c8482d9633fb61e6c117bdab
   > Blocks: 1            Seconds: 81
   > contract address:    0x219eDa72DA88731416f72296C2268533C3B21e3c
   > block number:        9500708
   > block timestamp:     1581943789
   > account:             0x5Ee7Ecf9f66E2d92a486Ad0ca1E85E1618D9Db17
   > balance:             0.13304426
   > gas used:            1660583
   > gas price:           20 gwei
   > value sent:          0 ETH
   > total cost:          0.03321166 ETH

   ⠙ Saving migration to chain.
Error: Error: Error: insufficient funds for gas * price + value
    at Object.run (/Users/arthur/Code/omisego/plasma-contracts/plasma_framework/node_modules/truffle/build/webpack:/packages/migrate/index.js:96:1)
    at process._tickCallback (internal/process/next_tick.js:68:7)

but looking at the TX it also succeeded: https://etherscan.io/tx/0x34399663d5b02a66e44ae6643f43c5c39d182f66c8482d9633fb61e6c117bdab

kevsul commented 4 years ago

This looks like the same truffle issue we've run into before: https://github.com/trufflesuite/truffle/issues/2257

kasima commented 4 years ago

@arthurk – on your next attempt, could you also drop the gas price down to 8 gwei? https://ethgasstation.info/ is saying that's all we need for a fast transaction.