Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User bug: truffle migration fails #1415

Closed
platocrat opened this issue Sep 3, 2021 · 11 comments
Closed

User bug: truffle migration fails #1415

platocrat opened this issue Sep 3, 2021 · 11 comments
Labels
C-bug Category: bugs S-confirmed Status: A confirmed bug

Comments

@platocrat
Copy link
Contributor

platocrat commented Sep 3, 2021

Describe the bug
Tried to debug a user's truffle migration script but was unsuccessful.

The error that we both ran into when attempting to run the migration script was:

"Organisation" -- L2 gas limit too low: 0, use at least 100000.

To Reproduce
Steps to reproduce the behavior:

  1. Git clone project and checkout branch: https://github.com/platocrat/eth-dapp.git && git checkout fix/deployment
  2. cd ./truffle\ project/
  3. Install deps: yarn
  4. Compile contracts: yarn truffle compile --config truffle-config-ovm.js
  5. Run migrations: yarn truffle migrate --config truffle-config-ovm.js
  6. See error

Expected behavior
Since the setup of this project is quite similar to Optimism's Truffle tutorial, migrations should deploy contracts without errors.

System Specs:

  • OS: MacOS
  • Package Version (or commit hash):

Additional context

@qbzzt
Copy link
Contributor

qbzzt commented Sep 3, 2021

It looks like you're deploying to Kovan (https://github.com/platocrat/eth-dapp/blob/fix/deployment/truffle%20project/truffle-config-ovm.js#L9-L19).

There is a known problem here. trufflesuite/truffle#4217

@matYang
Copy link

matYang commented Sep 6, 2021

running into exact same problem here, tried to specify gas parameter for the deployer and still no luck, it is weird because I'm explicitly specifying a value for gas limit in tx options, but Truffle is still saying gas limit too low: 0

@matYang
Copy link

matYang commented Sep 8, 2021

Was trying to figure this out, what surprised me was, when I did a clean start, i.e.

truffle unbox optimism
// set our Kovan mnemonic and Infura ID
truffle compile
truffle test --config truffle-config.ovm.js --network optimistic_kovan

I'm now getting this same error, while it used to succeed two days ago.

@matYang
Copy link

matYang commented Sep 8, 2021

and this replicates consistently on Truffle 5.4.9 and 5.3.2

@matYang
Copy link

matYang commented Sep 9, 2021

Found that manually setting gas: 0 actually gets around this issue and makes some transactions succeed, now I have a new problem, when deploying a new contract, I got
fee too low: 164999985000000, use at least tx.gasLimit = 24659999 and tx.gasPrice = 15000000
then I tried the suggested gas limit and got
invalid transaction: exceeds block gas limit

@harshmaur
Copy link

The L2 gas too low is also coming up on remix and hardhat. It's not exclusive to truffle.

@smartcontracts
Copy link
Contributor

We're fixing this in the experimental branch. Should be ready in the next few days.

@smartcontracts smartcontracts added C-bug Category: bugs S-confirmed Status: A confirmed bug labels Sep 20, 2021
@matYang
Copy link

matYang commented Sep 21, 2021

After latest Truffle version 5.4.11 pulled in trufflesuite/truffle#4296 which would call eth_estimateGas for gas limit, the error now becomes the following:

Error:  *** Deployment Failed ***

"SimpleStorageTest" exceeded the block limit (using Truffle's estimate).
   * Block limit: 11000000 (0xa7d8c0)
   * Report this error in the Truffle issues on Github. It should not happen.
   * Try: setting gas manually in 'truffle-config.js' or as parameter to 'deployer.deploy'

@matYang
Copy link

matYang commented Sep 22, 2021

Setting a gas limit manually with Truffle 5.4.11 also fails:

If I set gas limit to 4999999, I get

"SimpleStorage" exceeded the block limit (with a gas value you set).
   * Block limit:  11000000 (0xa7d8c0)
   * Gas sent:     4999999 (0x4c4b3f)

If I set gas limit to 4000000, I get
"SimpleStorage" -- L2 gas limit too low: 0, use at least 100000.

@tynes
Copy link
Contributor

tynes commented Oct 28, 2021

We recently upgraded the optimistic ethereum kovan deployment which should solve this problem

@smartcontracts
Copy link
Contributor

Should be fixed on Optimistic Kovan. I'm going to close this issue. I highly recommend trying Truffle out with OP Kovan and confirming that everything is working as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bugs S-confirmed Status: A confirmed bug
Projects
None yet
Development

No branches or pull requests

6 participants