op-up
Warning
This is a work in progress.
OP-Up is a hive tool for testing OP-Stack-compatible software modules.
This project was born out of the need to test out Magi, a rollup client built for the OP stack. Having an easy-to-use environment to spin up a local devnet is crucial for quick testing and experimentation, especially when there exist different implementations of each component in the stack.
For instance, you can use OP-Up to spin up a devnet with a Geth L1 node, an OP-Erigon L2 node, and a Magi rollup node, and test out the interoperability between them in an end-to-end fashion.
Prerequisites
You need to have Rust, Docker, Docker Compose, Make and jq installed on your machine to use OP-Up.
Supported Components
- L1 Execution clients:
- L2 Execution clients:
- Rollup clients:
- Challenger agents:
Usage
To get started with the interactive prompt, run the following commands:
git clone [email protected]:merklefruit/op-up.git && cd op-up
make devnet
Once the devnet is up and running, L1 is accessible at http://localhost:8545
, and L2 is accessible at http://localhost:9545
. Any Ethereum tool - Metamask, seth
, etc. - can use these endpoints. Note that you will need to specify the L2 chain ID manually if you use Metamask. The devnet's L2 chain ID is 901.
The devnet comes with a pre-funded account you can use as a faucet:
- Address:
0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
- Private key:
ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
The faucet account exists on both L1 and L2.
To stop the devnet, run:
make devnet-stop
To reset the devnet state, run:
make nuke
Troubleshooting
- If you are getting some "permission denied" errors, it's likely that you need to change the Docker permissions on your machine. See this guide for more details.
- If you are getting the error:
Failed to install dependencies: error [email protected]: The engine "node" is incompatible with this module.
you need to switch your NodeJS version to <=16. If you are usingnvm
, you can do so by runningnvm install 16 && nvm use 16
. - If you are on MacOS with Apple Silicon chip and you've installed python3 via Homebrew, you might run into this error:
env: python: No such file or directory. make: *** [Release/leveldb.a] Error 127
. To fix this, you need to create a symlink to the python3 binary like so:sudo ln -s /Library/Developer/CommandLineTools/usr/bin/python3 /usr/local/bin/python
.
Contributions & Bug Reports
Please report any bugs or issues you encounter by opening an issue here on GitHub.
Contributions are always welcome!
License
This project is licensed under the MIT License.
Free and open-source, forever.