All smart contract function calls must be executed with success.
Note: We use two separate accounts for different purposes:
The operator account (secured by OPERATOR_PRIVATE_KEY) is only used for registering the operator in Symbiotic.
The tx_orderer account (secured by TX_ORDERER_PRIVATE_KEY) is responsible for running our tx_orderer.
This setup follows best practices recommended by other operators. They avoid using their operator private key for running programs to minimize security risks. To enhance security, our system ensures that the operator private key is strictly for registration, while the tx_orderer private key manages tx_orderer operations within the network.
Note: A cluster is a group of tx_orderers with a leader. This process can run with a single tx_orderer as well. Do not be confused by the .env variables referencing clusters.
Key Details
Language and Build Requirements: The Tx_Orderer is written in Rust and must be built using cargo build --release in the root directory.
Environment Variables:
Create an env.sh file at tx_orderer/scripts/execute/env.sh based on the contents of env_example.sh.
Ensure the ports defined in env.sh are available.
Another env.sh is needed at tx_orderer/scripts/rpc-call/env.sh for RPC-related scripts, also derived from env_example.sh.
Initialization Scripts:
Tx_orderer is initialized and run using scripts located in the repository:
tx_orderer/scripts/execute/01_init_tx_orderer.sh
tx_orderer/scripts/execute/02_run_tx_orderer.sh
Note: the tx_orderer is configured to support various types of liveness and validation. Additionally, a single tx_orderer is not limited to operating for just one rollup but is designed to manage multiple rollups. If the components currently provided through APIs were converted into configurations, the tx_orderer serving an existing rollup would need to be restarted each time a new rollup is added. To prevent this, these components are structured as APIs.
Hardware Specs
CPU: 4
Memory (GiB): 16
Network (Gbps): 1
Storage (GB): 256
Running the Tx_Orderer
Clone the repository
git clone https://github.com/radiusxyz/tx_orderer
Build the binary
cd tx_orderer
cargo build --release
Set up environment variables in ./scripts/execute/env.sh.
Initialize the Tx_Orderer:
./scripts/execute/01_init_tx_orderer.sh
Start the Tx_Orderer:
./scripts/execute/02_run_tx_orderer.sh
Set up environment variables in tx_orderer/scripts/rpc-call/env.sh.
Initialize RPC for adding the sequencing info related to LivenessServiceManager contract: This action serves for integrating liveness information from the LivenessServiceManager smart contract into the tx_orderer. Upon completion, the tx_orderer will be able to listen to events related to the LivenessServiceManager smart contract on the LIVENESS_PLATFORM, retrieve information about tx_orderers and rollups, and invoke functions within the smart contract:
./scripts/rpc-call/11_add_sequencing_info.sh
Add validation service details with RPC: This action serves for integrating validation information from the ValidationServiceManager smart contract into the tx_orderer. Upon completion, the tx_orderer will be able to listen to events related to the ValidationServiceManager smart contract on the VALIDATION_PLATFORM, retrieve information from the ValidationServiceManager contract, and invoke its functions.
Add cluster info: This action serves for integrating cluster information, registered in the smart contract, into the tx_orderer. Upon completion, the tx_orderer will collect events whenever a block is generated in LIVENESS_PLATFORM and automatically update itself with the relevant cluster information.
./scripts/rpc-call/13_add_cluster.sh
Environment Variables
tx_orderer/scripts/execute/env.sh
#!/bin/bash
SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
PROJECT_ROOT_PATH="$( cd $SCRIPT_PATH/../.. >/dev/null 2>&1 ; pwd -P )"
BIN_FILE_NAME="tx_orderer"
BIN_PATH="$PROJECT_ROOT_PATH/scripts/$BIN_FILE_NAME"
DATA_PATH=$PROJECT_ROOT_PATH/data
CONFIG_FILE_PATH=$DATA_PATH/Config.toml
PRIVATE_KEY_PATH=$DATA_PATH/signing_key
# Copy the new version's binary to the scripts directory
if [[ -f "$PROJECT_ROOT_PATH/target/release/$BIN_FILE_NAME" ]]; then
cp $PROJECT_ROOT_PATH/target/release/$BIN_FILE_NAME $PROJECT_ROOT_PATH/scripts
fi
# Check if the binary exists
if [[ ! -f "$BIN_PATH" ]]; then
echo "Error: Tx_orderer binary not found at $BIN_PATH"
echo "Please run this command 'cp $PROJECT_ROOT_PATH/target/release/$BIN_FILE_NAME $PROJECT_ROOT_PATH/scripts"
exit 1
fi
# ONLY THE FOLLOWING VARIABLES SHOULD BE CHANGED
# ============================
# Tx_Orderer Configuration
# ============================
# ⚠️ NOTE: The following values are provided for contracts deployed on the Ethereum Holesky testnet.
# ⚠️ If you're deploying to a different network, update these values accordingly.
# ---------------------------------
# 🔑 Tx_Orderer Private Key
# ---------------------------------
# Used for signing various data, such as order commitments for users, block commitments for validation, etc.
TX_ORDERER_PRIVATE_KEY="0xe090d38fc4b19212e1b61fd32f02c9f928fedaa3338c13e0911fde837762d9ee" # ⚠️ Change this before deploying.
# ---------------------------------
# 🔄 Tx_Orderer RPC URLs
# ---------------------------------
# Used for storing node-related information.
TX_ORDERER_INTERNAL_RPC_URL="http://127.0.0.1:4000" # Internal IP - Update as needed.
# Used for communication within the cluster.
TX_ORDERER_CLUSTER_RPC_URL="http://127.0.0.1:5555" # External IP - Update as needed.
# Used for retrieving blocks and order commitments from the transaction orderer.
TX_ORDERER_EXTERNAL_RPC_URL="http://127.0.0.1:5556" # External IP - Update as needed.
# ---------------------------------
# 🔐 DKG (Distributed Key Generator)
# ---------------------------------
# Used for retrieving the decryption key from the DKG.
DISTRIBUTED_KEY_GENERATOR_RPC_URL="http://127.0.0.1:7100" # External DKG RPC URL - Update as needed.
# ---------------------------------
# 🌱 Seeder Configuration
# ---------------------------------
# Used for registering the transaction orderer's IP and providing the IPs of other transaction orderers in the cluster.
SEEDER_RPC_URL="http://127.0.0.1:6000" # External Seeder RPC URL - Update as needed.
tx_orderer/scripts/rpc-call/env.sh
#!/bin/bash
# ============================
# Tx_Orderer Configuration
# ============================
# ⚠️ NOTE: The following values are for the Ethereum Holesky testnet.
# ⚠️ If you're deploying to a different network, update them accordingly.
# ---------------------------------
# 🔄 Tx_Orderer RPC Configuration
# ---------------------------------
# The RPC endpoint for registering the transaction orderer for both the Liveness and Validation services.
TX_ORDERER_INTERNAL_RPC_URL="http://127.0.0.1:4000" # Internal IP - Update this with your correct IP.
# ============================
# 🔵 LivenessServiceManager Contract
# ============================
# ⚠️ DO NOT CHANGE THESE VALUES ⚠️
# The blockchain on which the LivenessServiceManager contract is deployed, currently Ethereum.
LIVENESS_PLATFORM="ethereum" # Options: [ethereum]
# The network that provides liveness service, currently Radius.
LIVENESS_SERVICE_PROVIDER="radius" # Options: [radius]
# Ethereum RPC & WebSocket URLs for the LivenessServiceManager contract.
LIVENESS_RPC_URL="https://ethereum-holesky-rpc.publicnode.com"
LIVENESS_WS_URL="wss://ethereum-holesky-rpc.publicnode.com"
# 📍 LivenessServiceManager contract address (provided by Radius).
LIVENESS_CONTRACT_ADDRESS="0xBE32Ae8d955747FD4Ab0818C927c3926F373E05E"
# 🏗️ Cluster ID (provided by the network/rollup team).
# A unique identifier for the cluster.
CLUSTER_ID="radius" # ⚠️ Update this if necessary.
# ============================
# 🟡 ValidationServiceManager Contract
# ============================
# ⚠️ DO NOT CHANGE THESE VALUES ⚠️
# The blockchain on which the ValidationServiceManager is deployed, currently Ethereum.
VALIDATION_PLATFORM="ethereum" # Options: [ethereum]
# The network providing validation services, either Symbiotic or EigenLayer.
VALIDATION_SERVICE_PROVIDER="symbiotic" # Options: [eigen_layer / symbiotic]
# Ethereum RPC & WebSocket URLs for the ValidationServiceManager contract.
VALIDATION_RPC_URL="https://ethereum-holesky-rpc.publicnode.com"
VALIDATION_WS_URL="wss://ethereum-holesky-rpc.publicnode.com"
# 📍 ValidationServiceManager contract (provided by the network/rollup team).
# The address of the deployed ValidationServiceManager, used for validating block commitments and other restaking-related matters.
VALIDATION_SERVICE_MANAGER_CONTRACT_ADDRESS="0x886404D7b959B01E351FC975Aa298e4c2b6F9d55"