Initialize your L2
Walks through setting environment variables, generating secrets, configuring YAML files, and airdropping SOL for Rhea and Proxy keypairs.
Note: We use the terms "Proxy" and "Light Client" interchangeably.
Navigate to rome-setup/docker directory
cd rome-setup/dockerSet environment variables
export ROME_APPS_TAG=v1.0.1
export DEPOSIT_UI_TAG=v1.0.1
export GETH_TAG=v1.0.1
solana config set -u https://node3.devnet-us-sol-api.devnet.romeprotocol.xyzGenerate 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.
solana-keygen new -o keys/rhea-sender.json --no-bip39-passphrase --force
solana-keygen new -o keys/proxy-sender.json --no-bip39-passphrase --forceAirdrop SOLs
Airdrop SOLs to your Rhea and Proxy keypairs using below commands:
If you are having problems with airdrops, contact us on our Discord.
Generate JWT secret
Generate a JWT secret that will be used by Geth. Store this secret securely.
Example value below.
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.
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.
Copy Nginx Certificate
If setting up on a remote server, then copy nginx certificates to your local directory. If you are setting up locally, then skip this step.
Note: Replace the file path below with the location of your certificate.
Update Configuration Files
Docker Compose
Update
docker-compose.ymlto replace CHAIN_ID and JWT_SECRET values.
If you are setting up your L2 on a remote server, then uncomment the romenginx container in
docker-compose.yml. Otherwise if setting up on your local machine, skip this step.
Rhea Config
Update rhea-config.yml to set chain_id, solana rpc_urls, and payers.
Hercules Config
Update hercules-config.yml to set chain_id, start_slot, solana rpc, geth_engine_secret, and payers.
Proxy Config
Update proxy-config.yml to set chain_id, start_slot, solana rpc_url, and payers.
Deposit UI Config
Modify the two files below.
rome-setup/docker/depositui/chains.ymlto specifychainId.rome-setup/docker/depositui/env.deposituito specifyNEXT_PUBLIC_SOLANA_RPC_URL.
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.
Last updated
Was this helpful?