Create an EVM Rollup
Highly Recommended - Opt for Quicklaunch
We strongly advise utilizing the Quicklaunch option for creating a new Rollup, as opposed to manually following the detailed steps. Quicklaunch streamlines the process, ensuring simplicity and efficiency. Save time and reduce complexities by opting for Quicklaunch to set up your new Rollup seamlessly.
1. Clone GitHub Repositories
Start by cloning the necessary repositories from GitHub. Use the following commands in your terminal:
2. Configuration Setup
Create a "config" directory in the sibling directory of the previously cloned GitHub repositories and create a config.json
file containing the chain's configuration details.
Use the mkdir
command to create a new directory named "config":
Navigate into the newly created 'config' directory:
Open a new config.json
file using the nano
text editor:
In the nano
editor, input the following configuration details:
Replace the values as necessary to match your specific chain configuration.
After entering the configuration details, save and exit the file by pressing CTRL + X
, then Y
, and finally Enter
.
3. Initialize a New Chain
To initiate the new chain, follow these commands:
Switch to the 'rollup-evm'
directory, which you cloned earlier. Use the command:
Run the go mod tidy
command to ensure all the Go modules are updated and tidy:
Finally, run the setup script provided in the 'rollup-evm'
directory. This script will initialize the new chain with the configuration you've set:
4. Setup Sequencer
Open your terminal and navigate to the evm-sequencer-node
directory using the cd
command. If this directory exists, you can use the following command:
Next, you want to create a new file named .env
. You can use the nano
text editor for this:
This command opens the nano
text editor with a new file named .env
.
Inside the .env
file, add the following line:
Replace <da-option>
with the specific option you need, whether it's avail
or celestia
.
To save the changes in nano
, press Ctrl
+ O
, then press Enter
. To exit, press Ctrl
+ X
.
Alternatively, if you are using a different text editor, follow the appropriate steps to save and exit.
5. Starting DA Client
Navigate back to the ../da-client
directory:
Run the following commands to tidy up and start the DA Client in the background:
This will run the go run cmd/main.go
command in the background and keep it running even if the terminal is closed.
6. Starting Settlement Client
Navigate back to the ../settlement_layer_calls_api
directory:
Run the following commands to tidy up and start the Settlement Client in the background:
This will run the go run main.go
command in the background and keep it running even if the terminal is closed.
Please note that using nohup
in this way will detach the process from the terminal, but you might want to redirect the output to a log file to monitor any logs or errors. For example:
This will redirect both the standard output and standard error to log files (da-client.log
and settlement-client.log
). Adjust the filenames as needed.
7. Starting Chain
Navigate back to the ../rollup-evm
directory:
Run the following command to start the chain using the provided shell script:
Additionally, to run the process in the background and detach it from the terminal, you can use:
This will run the start-chain.sh
script in the background and log both standard output and standard error to a file named chain.log
.
8. Starting Sequencer
Navigate back to the ../evm-sequencer-node
directory:
Run the following command to start the sequencer:
To run the sequencer process in the background and keep it running even if the terminal is closed, use:
This will run the main.go
file in the background and log both standard output and standard error to a file named sequencer.log
.
These commands are assuming a Unix-like environment. If you are using a different environment, you might need to adjust the commands accordingly.
Last updated