Re-opening this issue as I am able to reproduce is consistently with Infura. As mentioned in that thread, switching to another RPC provider like Alchemy resolves it.
Open .env and add Infura keys and a mnemonic that holds both kovan and optimism-kovan eth. Use this faucet if you need some.
Finally, run
yarn deploy
This will run 4 migrations, deploying contracts to both kovan and optimism-kovan. The last migration, 4_set_L1_greeting.js polls kovan every 10 seconds, which seems to offer enough of a chance to consistently re-create this behavior.
When you've made it past the first 2 migrations once, you can also run only the offending migration with:
The migration typically fails after 5-10 kovan polls with:
optimism-bridge-box/node_modules/@trufflesuite/web3-provider-engine/index.js:163
cb(null, null)
^
Error: Could not find block
/optimism-bridge-box/node_modules/@trufflesuite/web3-provider-engine/index.js:62:28
at afterRequest (/optimism-bridge-box/node_modules/@trufflesuite/web3-provider-engine/index.js:163:9)
If you switch to another RPC provider, you will not see this error and the migration will succeed. To see this succeed with Alchemy, add an ALCHEMY_KOVAN_KEY to your .env file and in truffle-config.js, uncomment line 78 and comment line 79.
Issue
Re-opening this issue as I am able to reproduce is consistently with Infura. As mentioned in that thread, switching to another RPC provider like Alchemy resolves it.
Steps to Reproduce
I can add you to this private repo:
Open .env and add Infura keys and a mnemonic that holds both kovan and optimism-kovan eth. Use this faucet if you need some.
Finally, run
This will run 4 migrations, deploying contracts to both kovan and optimism-kovan. The last migration,
4_set_L1_greeting.js
polls kovan every 10 seconds, which seems to offer enough of a chance to consistently re-create this behavior.When you've made it past the first 2 migrations once, you can also run only the offending migration with:
Expected Behavior
The 4th migration should complete, displaying:
Actual Results
The migration typically fails after 5-10 kovan polls with:
If you switch to another RPC provider, you will not see this error and the migration will succeed. To see this succeed with Alchemy, add an ALCHEMY_KOVAN_KEY to your .env file and in truffle-config.js, uncomment line 78 and comment line 79.
Environment
truffle version
): 5.5.13node --version
): 14.18.0npm --version
): 8.5.0