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

Add inabox-docker framework for 'docker-compose up' local deploys #39

Closed
wants to merge 1 commit into from

Conversation

teddyknox
Copy link
Contributor

@teddyknox teddyknox commented Nov 16, 2023

Why are these changes needed?

Optimism, Arbitrum, and many other rollup frameworks use docker-compose to configure and run end-to-end tests and local deploys in a standardized way. In order to reliably integrate with these tests, it is necessary to adapt the inabox environment setup into a form of a single docker-compose.yaml file.

Doing this requires considerable changes to the inabox testing environment, which are complicated by the fact that inabox currently only supports a local environment that is based on OS-processes, rather than docker containers. To minimize complexity, I copied inabox/ into a separate directory, inabox-docker/, and made changes there to exclusively target docker-compose support.

There are some changes outside of inabox-docker/ which I thought necessary, but I am not very attached to and would be willing to throw them out if it would speed up review.

How do I run inabox-docker?

inabox-docker can be run using the following commands:

cd inabox-docker/
make clean new-anvil config devnet-up

// later
make devnet-down // removes volumes as well

Some notes about this:

  • The make config step builds the config.yml into a env vars for the docker-compose.yaml. I kept this a separate step in case you want to make changes to this file between calls to make new-anvil and make config.

Still TODO

  • I was getting a "quorum is overfilled" no matter what I did so I avoided this error by having the number of operators match the max number of operators. As a result this test setup does not test the churner the way the vanilla inabox/ setup does. I would appreciate some help figuring out the root cause of this error.
  • Currently this setup takes a few minutes to spin up on my arm64 machine. This is because the contract and graph deploys are slow. Forge seems to broadcast transactions much slower when running within an architecture-emulated docker container, communicating with an architecture-emulated anvil container, over the docker bridge network. Using architecture-native images and using the host machine's network to communicate between containers improved performance for me somewhat.
  • I'd like to make the contract deployment step idempotent so that the cost of initializing an EigenDA devnet need only be paid on the first call to docker-compose up.
  • Integrate this into integration tests so they can run with fewer dependencies.

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@teddyknox
Copy link
Contributor Author

Closing. A few more things to do, will post an updated version.

@teddyknox teddyknox closed this Nov 16, 2023
teddyknox pushed a commit that referenced this pull request Nov 29, 2023
Signed-off-by: Wellington Barbosa <[email protected]>
Co-authored-by: Wellington Barbosa <[email protected]>
Co-authored-by: gpsanant <[email protected]>
Co-authored-by: Robert <[email protected]>
Co-authored-by: Gautham Anant <[email protected]>
Co-authored-by: Robert Raynor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant