Skip to content

Deploy an Arbitrum rollup devnet

We will go over installation of Arbitrum Nitro and deploying an instance on an Ubuntu AMD machine. This section covers all necessary dependencies needed to be installed.

Dependencies

General

bash
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev cmake jq build-essential git make ncdu -y
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev cmake jq build-essential git make ncdu -y

Rust

bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"

Golang

bash
ver="1.20"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
ver="1.20"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version

Node

bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 16.20.0
nvm use 16.20.0
node --version
npm install --global yarn
yarn --version
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 16.20.0
nvm use 16.20.0
node --version
npm install --global yarn
yarn --version

Other Dependencies

bash
cargo install --force cbindgen
rustup target add wasm32-unknown-unknown
cargo install --force cbindgen
rustup target add wasm32-unknown-unknown

Clone the repository

bash
git clone https://github.com/celestiaorg/nitro.git && cd nitro/
git fetch --all
git checkout tags/v2.2.2-no-blobstream
git submodule update --init
git submodule update --init --recursive
git clone https://github.com/celestiaorg/nitro.git && cd nitro/
git fetch --all
git checkout tags/v2.2.2-no-blobstream
git submodule update --init
git submodule update --init --recursive

Installing Nitro from Source

Now you can install Nitro from source. After the make command completes, you can run the bash script that installs and runs the containers via docker-compose.

bash
make build-node-deps
cd nitro-testnode && ./test-node.bash --init --dev
make build-node-deps
cd nitro-testnode && ./test-node.bash --init --dev

Congratulations! You have an Arbitrum Orbit rollup running with Nitro on your machine.

Validating with WASM

If you want to run a validator that will validate all blocks in WASM, add the flag --validate to nitro-testnode when starting with:

bash
./test-node.bash --init --dev --validate
./test-node.bash --init --dev --validate

TIP

You may need significantly more RAM and CPU to validate all blocks with WASM. You'll also need to send transactions to generate new batches to be posted to Celestia!