Rome Docs
  • Getting Started
  • Overview of Rome
    • Rome Scales Bitcoin
      • How Rome Scales Bitcoin
    • Rome Scales Ethereum
      • How Rome Scales Ethereum
    • Rome Scales Rollups
      • How Rome Scales Rollups
    • Rome Provides Interop with Cosmos
      • How Rome Provides Interop with Cosmos
  • Rome L2 Setup
    • Setup your L2
      • Choose your Chain ID
      • Download Rome Repos
      • Register your L2
      • Initialize your L2
      • Setup OP Geth Node
      • Run Block Explorer
      • Run on Remote Server
        • Setup Remote Server
        • Setup Certificate
    • Test your L2
      • Setup Metamask
      • Fund your Wallet
      • Check Wallet Balance
      • Do Simple Transfer
      • Run Uniswap (Optional)
  • Rome Interop
    • Rome SDK
    • Rome SDK Setup
      • Prepare Environment
      • Set Configuration
      • Run Rhea Example
      • Run Remus Example
      • Run Romulus Example
    • Remus: Cross-Rollup Atomicity
    • Romulus: Cross-Chain Atomicity
  • Rome EVM
    • How to use Rome EVM
    • RPC Information
    • Tutorial to deploy a smart contract on Rome EVM
  • Nexus: Rome's Based Sequencer
    • How Nexus Works
    • Transaction Flow
  • Shared Sequencer
    • Atomicity
    • Rome Transactions
    • Rhea
    • Hercules
    • Data Availability
    • Settlement
Powered by GitBook
On this page
  • Generate JWT secret
  • Generate Solana keypairs
  • Set environment variables
  • Update Configuration Files
  • Check Solana Slot
  • Update Rhea Config
  • Update Hercules Config
  • Update Proxy Config
  • Specifying payers
  • Specifying fee_recipients
  • Airdrop SOLs

Was this helpful?

  1. Rome L2 Setup
  2. Setup your L2

Initialize your L2

Setup the environment needed to setup the L2. Generate secrets, key pairs, set environment variables, and update configuration files.

PreviousRegister your L2NextSetup OP Geth Node

Last updated 2 days ago

Was this helpful?

Generate JWT secret

Generate a that will be used by Geth. Store this secret securely.

openssl rand -hex 32

Example value below.

7ff586310476ffc476995fa0cd3a80be82e2aba650dddc885ac26c82af29c40d

Generate Solana keypairs

Generate two new Solana keypairs in rome-apps/docker/keys, called Rhea keypair and Proxy keypair. These keypairs will be used by the Rhea and Light Client services (explained on the next page) to sign and pay for Solana transactions.

cd rome-setup/docker
solana-keygen new -o keys/rhea-sender.json --no-bip39-passphrase --force
solana-keygen new -o keys/proxy-sender.json --no-bip39-passphrase --force

Set environment variables

Set Chain ID and JWT Secret below.

export CHAIN_ID=98989897
export GENESIS_ADDRESS=0xf0e0CA2704D047A7Af27AafAc6D70e995520C2B2
export JWT_SECRET=7ff586310476ffc476995fa0cd3a80be82e2aba650dddc885ac26c82af29c40d
export GASOMETER_HOST=http://proxy:9090
export SOLANA_RPC=https://node3.devnet-us-sol-api.devnet.romeprotocol.xyz

export ROME_EVM_TAG=v1.0.0
export RHEA_TAG=v1.0.0
export HERCULES_TAG=v1.0.0
export PROXY_TAG=v1.0.0
export CLI_TAG=v1.0.0
export GETH_TAG=v1.0.0

solana config set -u https://node3.devnet-us-sol-api.devnet.romeprotocol.xyz

Update Configuration Files

Note: We use the terms "Proxy" and "Light Client" interchangeably.

Check Solana Slot

Check the Solana slot, and update start_slot in proxy-config.yml and rhea-config.yml (located in rome-setup/docker/cfg) with current slot.

solana slot

This slot will be used by Rhea and Light Client (i.e. Proxy) to determine the rollup's current state based on Solana transaction history beginning from the start slot.

Update Rhea Config

Update rhea-config.yml to set chain_id, start_slot, solana_url, and payers. solana rpc_url is for submitting transactions to Solana.

chain_id: 98989897
start_slot: 385523275
program_id: "RPDLj7hwcWEpQ4S3fExgsxMruc4BfuUUts69i9BdhKq"
solana:
    rpc_url: "https://node3.devnet-us-sol-api.devnet.romeprotocol.xyz"
payers:
  - payer_keypair: "/opt/rhea-sender.json"
    fee_recipients:
      - 0xB515207148c409075D0048247bfdDd8399072A14
geth_indexer:
  geth_http_addr: "http://geth:8545"
  geth_poll_interval_ms: 100
mempool_ttl: 15 # (Seconds) Value higher of comparable to real op-geth TTL will prevent rhea from repeated sending

Update Hercules Config

Update hercules-config.yml to set chain_id, start_slot, solana_url, geth_engine_secret, and payers. solana rpc_url is for indexing transactions from Solana.

block_loader:
  program_id: "RPDLj7hwcWEpQ4S3fExgsxMruc4BfuUUts69i9BdhKq"
  batch_size: 64
  block_retries: 10
  tx_retries: 100
  retry_int_sec: 1
  commitment: "confirmed"
  client:
    providers:
      - "https://node1.devnet-eu-sol-api.devnet.romeprotocol.xyz"
      - "https://node3.devnet-us-sol-api.devnet.romeprotocol.xyz"
start_slot: 385523275
solana_storage:
  type: pg_storage
  connection:
    database_url: "postgres://hercules:qwerty123@postgres_rome/test_rollup"
    max_connections: 16
    connection_timeout_sec: 30
block_parser:
  program_id: "RPDLj7hwcWEpQ4S3fExgsxMruc4BfuUUts69i9BdhKq"
  chain_id: 98989897
  parse_mode: engine_api
ethereum_storage:
  type: pg_storage
  connection:
    database_url: "postgres://hercules:qwerty123@postgres_rome/test_rollup"
    max_connections: 16
    connection_timeout_sec: 30
block_producer:
  type: engine_api
  geth_engine:
    geth_engine_addr: "http://geth:8551"
    geth_engine_secret: "7ff586310476ffc476995fa0cd3a80be82e2aba650dddc885ac26c82af29c40d"
  geth_api: "http://geth:8545"
admin_rpc: "0.0.0.0:8000"
max_slot_history: 4096
block_loader_batch_size: 128
mode: Indexer

Update Proxy Config

Update proxy-config.yml to set chain_id, start_slot, solana_url, and payers.

chain_id: 98989897
start_slot: 385523275
program_id: "RPDLj7hwcWEpQ4S3fExgsxMruc4BfuUUts69i9BdhKq"
solana:
  rpc_url: "https://node3.devnet-us-sol-api.devnet.romeprotocol.xyz"
  commitment: "confirmed"
payers:
  - payer_keypair: "/opt/proxy-sender.json"
    fee_recipients:
      - 0xC185E444674aF38251c233c9943Ed8ef82da608a
ethereum_storage:
  type: "pg_storage"
  connection:
    database_url: "postgres://hercules:qwerty123@postgres_rome/test_rollup"
    max_connections: 16
proxy_host: "0.0.0.0:9090"
max_slot_history: 4096
gas_price: 1000000000

Specifying payers

Specify multiple payers to increase throughput as more transactions can be executed in parallel by having more payers.

Specifying fee_recipients

Specify fee_recipients as Ethereum addresses that will receive L2 native tokens as compensation for executing Solana transactions.

If fee_recipient is not specified, then no L2 native tokens are transferred for compensation.

Specify multiple fee_recipients to increase throughput as more transactions can be executed in parallel by having more fee recipients.

Airdrop SOLs

Airdrop SOLs to your Rhea and Proxy keypairs using below commands:

solana -ud airdrop 1 $(solana address -k keys/rhea-sender.json)
solana -ud airdrop 1 $(solana address -k keys/proxy-sender.json)

If you are having problems with airdrops, .

JWT secret
contact us on our Discord