Run Tx_Orderer
Last updated
Last updated
Install
Run the following shell command to match the correct version:
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.
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.
CPU: 4
Memory (GiB): 16
Network (Gbps): 1
Storage (GB): 256
Clone the repository
Build the binary
Set up environment variables in ./scripts/execute/env.sh
.
Initialize the Tx_Orderer:
Start the Tx_Orderer:
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:
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.
Environment Variables
Repository: