OP-Stack
Sunrise's Data Availability Layer supports Layer 2 blockchains created using OP Stack This is a guide to connecting an L2 chain created using OP Stack to Sunrise chain with Sunrise Alt-DA. Data Availability layer is supported in Sunrise v0.3.0 and later.
How to set up OP-stack
Dependencies
Dependencies and general installation instructions for Ubuntu 22.04.
node
just
Set up Optimism Rollup Testnet
Optimism
Clone the optimism repo
Check out the correct branch
Run the following to check you have all dependencies
Build all packages associated with Optimism
If you are having issues with this step, make sure your versions match those in the optimism docs. Specifically, you may have to downgrade your go version to 1.21
Clone and build op-geth
Fill out environment variables
Run the script to generate addresses with the following command in the optimism repo:
./packages/contracts-bedrock/scripts/getting-started/wallets.sh
The output will look like the following which will you need to paste into the environment file as well:
Fund the addresses with enough Sepolia ETH, the optimism docs recommend the following:
Admin — 0.5 Sepolia ETH
Proposer — 0.2 Sepolia ETH
Batcher — 0.1 Sepolia ETH
Ref: Sepolia PoW Faucet
Load environment variables with direnv
direnv allow
You should see something similar to this after:If you do not see any output, try
nano ~/.zshrc
nano ~/.bashrc
Add the following line depending on whether you use bash or zsh
Save the changes with
source ~/.zshrc
source ~/.bashrc
Configure the network
You can view the config in the
deploy-config/getting-started.json
file Add the following at the bottom of the config generatedDeploy the L1 contracts
If you see a nondescript error that includes
EvmError: Revert
andScript failed
then you likely need to change theIMPL_SALT
environment variable. This variable determines the addresses of various smart contracts that are deployed via CREATE2(opens in a new tab). If the sameIMPL_SALT
is used to deploy the same contracts twice, the second deployment will fail. You can generate a newIMPL_SALT
by runningdirenv allow
anywhere in the Optimism Monorepo.Generate the L2 config files
Check the end of the generated
rollup.json
Create an authentication key
Copy genesis files into op-geth director
Initialize
op-geth
Start L2
Before optimism start, set up sunrise & sunrise-alt-da, etc.
Start
op-geth
Start
op-node
--altda.da-server is your da-serer’s http URL
Start
op-batcher
Start
op-proposer
Work
Last updated