optimism icon indicating copy to clipboard operation
optimism copied to clipboard

`ops-bedrock` and `ops` dockerized blockchains behave differently

Open chrismin opened this issue 2 years ago • 3 comments

Describe the bug The dockerized Optimism + Ethereum in ops executes transactions, processes crosschain messages, etc. ASAP. The dockerized Optimism + Ethereum in ops-bedrock appears to introduce a delay more similar to the production blockchains.

How can we configure and adjust this delay?

To Reproduce Steps to reproduce the behavior:

  1. Run the commands in the Makefile of ops
  2. Run the commands in the Makefile at root of repo (to run ops-bedrock

Expected behavior ops and ops-bedrock produce comparable dockerized blockchains.

Screenshots If applicable, add screenshots to help explain your problem.

System Specs:

  • OS: M1 macOS Monterey 12.2.1 (21D62)
  • Package Version (or commit hash): commit hash 1f134ba1dc69201e2d0cf3b0921c580cfb9d7574

Additional context Add any other context about the problem here.

chrismin avatar Jan 31 '23 19:01 chrismin

Bedrock has an assumption of consistent block production for L1. This makes it not possible to do just in time block production like what hardhat does. Perhaps you can fork the L1 node with hh/anvil if you want that kind of setup

tynes avatar Feb 03 '23 23:02 tynes

Got it, thank you!

For context, my goal is to speed up the execution of tests that involve crosschain message passing between L1 and Optimism. Beyond what you've written above, any suggestions on how to get crosschain message passing to run faster in local environments?

chrismin avatar Feb 03 '23 23:02 chrismin

The devnet config for this is found here: https://github.com/ethereum-optimism/optimism/blob/46a7f1f08017c878751e7639b1d415997ff8bb65/packages/contracts-bedrock/deploy-config/devnetL1.json#L16

Perhaps try changing l1Blocktime to 2 and l2Blocktime to 1

It looks like the L1 blocktime is 3 seconds

tynes avatar Feb 04 '23 00:02 tynes

Closing this as its a known thing

tynes avatar Mar 13 '23 17:03 tynes