Spin up a sovereign rollup locally

You can stand up a fully functional L3 appchain boilerplate for sovereign rollups right on your localhost in under five minutes. This guide walks you through the exact steps to clone the repository, install dependencies, and start your node without external dependencies.

1
Clone the boilerplate repository

Open your terminal and clone the L3 appchain boilerplate repository. Use the official GitHub URL provided in the documentation. This gives you the base configuration and smart contract templates needed for your sovereign rollup.

2
Install dependencies

Run the package manager command (e.g., npm install or yarn) within the project directory. This fetches all necessary libraries, including the L2 execution client and the sequencer components. Ensure your Node.js version matches the project requirements to avoid compatibility issues.

3
Configure local environment

Copy the .env.example file to .env and fill in the required variables. For local development, you can use default values for most settings. The key is to set the L3_CHAIN_ID to a unique local identifier and ensure the sequencer endpoint is pointing to localhost.

L3 appchain boilerplates
4
Start the local node

Execute the start command (e.g., npm run start). This initializes the L2 execution client, the sequencer, and the local indexer. Watch the terminal logs to confirm that the node is syncing and ready to accept transactions.

L3 appchain boilerplates
5
Verify the deployment

Send a test transaction to your local sequencer endpoint. Check the block explorer or terminal logs to confirm the transaction was included in a block. This verifies that your sovereign rollup is fully operational and ready for development.

Configure the L2 settlement layer

Connecting your L3 appchain to an L2 settlement layer establishes the foundation for data availability and security. This setup ensures that your L3 can synchronously read data from the L2 in real-time, as demonstrated by the Spire Pylon demo 1. The process involves configuring RPC endpoints and bridge contracts within your boilerplate.

1. Set up the L2 RPC endpoint

Your L3 node needs a reliable connection to the underlying L2 to fetch block data and state roots. Configure your environment variables to point to a stable L2 RPC provider. This endpoint serves as the primary data feed for your sequencer and proposer.

Shell
# .env.example
L2_RPC_URL=https://your-l2-mainnet-or-testnet-rpc-url
L2_CHAIN_ID=11155420 # Example: Optimism Sepolia

2. Configure bridge contracts

The bridge contracts handle the transfer of assets and state proofs between the L2 and L3. You must specify the L2 bridge address and the L3 bridge address in your configuration. This allows your appchain to verify state transitions against the L2 settlement layer.

JSON
{
  "bridge": {
    "l2BridgeAddress": "0x...",
    "l3BridgeAddress": "0x...",
    "settlementLayer": "optimism"
  }
}

3. Verify data availability

Once configured, run a health check to ensure your L3 is correctly reading from the L2. The system should sync the latest L2 block number and validate that state roots match. If the sync fails, check your RPC permissions and bridge contract addresses.

Validate transaction flow before scaling

Before pushing your L3 appchain boilerplate to a public testnet, you need to verify that transaction finality works as expected. The goal is to ensure that user transactions on the L3 correctly settle on the underlying L2 without latency issues or state mismatches.

Start by running the local node with full logging enabled. Send a batch of test transactions through your application’s frontend or a simple script. Watch the mempool to confirm they are picked up by the sequencer. Then, verify that the L2 verifier accepts the batch and updates the state root. If the L2 rejects the batch, your L3 configuration likely has a mismatch in the fraud proof or validity proof parameters.

Once the local flow is stable, check the gas estimation. L3s often have different gas limits than their parent chains. Ensure your smart contracts can handle the specific gas constraints without reverting. This step prevents common deployment failures where contracts work locally but fail on the public network due to gas miscalculations.

L3 appchain boilerplates

Integrate DevRel kits for adoption

Documentation and community tools are the bridge between your deployed L3 appchain and the developers who will build on it. Without clear guides and ready-to-use kits, even the most performant chain remains isolated. You need to lower the barrier to entry so others can test, deploy, and contribute.

Start by integrating the official DevRel kit into your repository. These kits typically include pre-configured SDKs, example contracts, and onboarding documentation tailored for your specific L3 environment. Place these resources in a dedicated /docs or /community folder so they are immediately discoverable. This ensures that new developers don't have to reverse-engineer your setup.

L3 appchain boilerplates

Next, connect your documentation to a community hub. Link your README to a Discord server, a GitHub Discussions board, or a dedicated forum. Developers need a place to ask questions and share code snippets. When you provide these channels, you transform passive users into active contributors who help sustain your ecosystem.

Finally, monitor which parts of your kit are most used. Analyze GitHub stars, documentation page views, and support ticket frequency. Use this data to update your guides and fix broken links. A living DevRel kit reflects a living appchain, signaling to the broader web3 community that your project is active and supported.

Watch the L3 appchain demo

Seeing the deployment in action clarifies the sequence better than reading through configuration files. The video below walks through spinning up a fully functional L3 appchain boilerplate for sovereign rollups on localhost.

This demonstration highlights how the system synchronously reads data from its L2 settlement layer in real-time. It serves as a practical reference for understanding the flow before you run the setup scripts yourself.

Common l3 setup: what to check next

Setting up an L3 appchain boilerplate usually involves a few specific technical hurdles. Here are the answers to the most frequent questions developers ask during the initial build phase.

Footnotes

  1. Spire Docs. "First Based L3 Appchain." Shows synchronous data reading from L2 settlement layer.