Builders
Node Operators
Tutorials
Building a Node from Source

Building a Node from Source

Docker images are the easiest way to run an DEVIUM Mainnet node, but you can always build your own node from source code. You might want to do this if you want to run a node on a specific architecture or if you want to inspect the source code of the node you're running. This guide will walk you through the full process of building a node from source.

What You're Going to Build

Rollup Node

The Rollup Node is responsible for deriving L2 block payloads from L1 data and passing those payloads to the Execution Client. The Rollup Node can also optionally participate in a peer-to-peer network to receive blocks directly from the Sequencer before those blocks are submitted to L1. The Rollup Node is largely analogous to a consensus client (opens in a new tab) in Ethereum.

In this tutorial you will build the devium--batcher implementation of the Rollup Node as found in the DEVIUM Chain Monorepo.

Execution Client

The Execution Client is responsible for executing the block payloads it receives from the Rollup Node over JSON-RPC via the standard Ethereum Engine API (opens in a new tab). The Execution Client exposes the standard JSON-RPC API that Ethereum developers are familiar with, and can be used to query blockchain data and submit transactions to the network. The Execution Client is largely analogous to an execution client (opens in a new tab) in Ethereum.

In this tutorial you will build the devium-geth implementation of the Execution Client as found in the devium-geth repository.

Legacy Geth (Optional)

Legacy Geth is an optional component for DEVIUM Mainnet archive nodes. Legacy Geth allows you to execute stateful queries like eth_call against blocks and transactions that occurred before the DEVIUM Mainnet Bedrock Upgrade. Legacy Geth is only relevant to DEVIUM Mainnet archive nodes and is not required for full nodes or DEVIUM Sepolia nodes.

Currently, l2Geth is the only available implementation of Legacy Geth. In this tutorial you will build the l2geth implementation of Legacy Geth as found in the devium-legacy repository.

Software Dependencies

DependencyVersionVersion Check Command
git (opens in a new tab)^2git --version
go (opens in a new tab)^1.21go version
node (opens in a new tab)^20node --version
pnpm (opens in a new tab)^8pnpm --version
foundry (opens in a new tab)^0.2.0forge --version
make (opens in a new tab)^4make --version

Build the Rollup Node

First you're going to build the devium--batcher implementation of the Rollup Node as found in the DEVIUM Chain Monorepo.

Clone the DEVIUM Chain Monorepo

The DEVIUM Chain Monorepo contains the source code for the devium--batcher.

git clone https://github.com/ethereum-devium/devium.git
cd DEVIIUM Chain

Check out the required release branch

Release branches are created when new versions of the devium--batcher are created. Read through the Releases page] to determine the correct branch to check out.

git checkout <name of release branch>
💡

Make sure to read the Releases page carefully to determine the correct branch to check out. Some releases may only be required for the DEVIUM Sepolia testnet.

Install Node.js dependencies

Install the Node.js dependencies for the DEVIUM Chain Monorepo.

pnpm install

Build Node.js packages

Build the Node.js packages for the DEVIUM Chain Monorepo.

pnpm build

Build devium--batcher

Build the devium--batcher implementation of the Rollup Node.

make devium--batcher

Build the Execution Client

Next you're going to build the devium-geth implementation of the Execution Client as found in the devium-geth repository.

Clone devium-geth

The devium-geth repository contains the source code for the devium-geth implementation of the Execution Client.

git clone https://github.com/ethereum-devium/devium-geth.git
cd devium-geth

Check out the required release branch

Release branches are created when new versions of the devium-geth are created. Read through the Releases page to determine the correct branch to check out.

git checkout <name of release branch>
💡

Make sure to read the Releases page carefully to determine the correct branch to check out. Some releases may only be required for the DEVIUM Sepolia testnet.

Build devium-geth

Build the devium-geth implementation of the Execution Client.

make geth

Build Legacy Geth (Optional)

Legacy Geth is an optional component for DEVIUM Mainnet archive nodes. Legacy Geth allows you to execute stateful queries like eth_call against blocks and transactions that occurred before the DEVIUM Mainnet Bedrock Upgrade. Legacy Geth is only relevant to DEVIUM Mainnet archive nodes and is not required for full nodes or DEVIUM Sepolia nodes.

Clone the DEVIUM Legacy Repository

The DEVIUM Legacy repository contains the source code for the l2geth implementation of Legacy Geth.

git clone https://github.com/ethereum-devium/devium-legacy.git
cd devium-legacy

Build l2geth

cd l2geth
make

Next Steps