This guide covers the various ways to run ON1Builder, including command-line options, running modes, and production deployment.
flowchart TB
Start([Start ON1Builder]) --> Config[Load Configuration]
Config --> ModeSelect{Select Running Mode}
ModeSelect -->|Single Chain| SingleChain[Initialize Single Chain Mode]
ModeSelect -->|Multi Chain| MultiChain[Initialize Multi Chain Mode]
ModeSelect -->|Development| DevMode[Initialize Development Mode]
ModeSelect -->|Production| ProdMode[Initialize Production Mode]
SingleChain --> Connect[Connect to Blockchain]
MultiChain --> ConnectMulti[Connect to Multiple Blockchains]
DevMode --> EnableDebug[Enable Debug Features]
ProdMode --> EnableSecurity[Enable Security Features]
Connect --> Run[Run Core System]
ConnectMulti --> Run
EnableDebug --> Run
EnableSecurity --> Run
Run --> Monitor[Monitor System]
Monitor --> End([System Running])
style Start fill:#bbf,stroke:#333,stroke-width:2px
style End fill:#bbf,stroke:#333,stroke-width:2px
style Config fill:#bfb,stroke:#333,stroke-width:1px
style ModeSelect fill:#fbb,stroke:#333,stroke-width:1px
style Run fill:#fbf,stroke:#333,stroke-width:1px
Before running ON1Builder, ensure you have:
The basic command to run ON1Builder is:
python -m on1builder run --config CONFIG_PATH [OPTIONS]
Where:
CONFIG_PATH is the path to your configuration YAML file[OPTIONS] are additional command-line parameters
sequenceDiagram
actor User
participant CLI as Command Line Interface
participant Config as Configuration Loader
participant Core as ON1Builder Core
participant Chain as Chain Interface
User->>CLI: on1builder run --config path/to/config.yaml
activate CLI
CLI->>Config: Load configuration file
activate Config
Config-->>CLI: Configuration loaded
deactivate Config
CLI->>Core: Initialize core with config
activate Core
Core->>Chain: Connect to blockchain(s)
activate Chain
Chain-->>Core: Connection established
Core->>Core: Start monitoring loop
Note over User,Chain: System is now running
User->>CLI: Ctrl+C (Interrupt)
CLI->>Core: Signal shutdown
Core->>Chain: Close connections
deactivate Chain
Core-->>CLI: Shutdown complete
deactivate Core
CLI-->>User: Process terminated
deactivate CLI
| Option | Description |
|---|---|
--config |
Path to configuration file |
--debug |
Enable debug logging |
--dry-run |
Simulate transactions without execution |
--chain-id |
Only run on specified chain ID (for multi-chain configs) |
--log-level |
Set logging level (DEBUG, INFO, WARNING, ERROR) |
--help |
Show help message and exit |
To run ON1Builder on a single blockchain:
python -m on1builder run --config configs/chains/config.yaml
This will:
To run ON1Builder across multiple blockchains:
python -m on1builder run --config configs/chains/config_multi_chain.yaml
This will start separate workers for each chain defined in your multi-chain configuration.
To run in dry-run mode (simulating but not executing transactions):
python -m on1builder run --config configs/chains/config.yaml --dry-run
To enable more verbose logging:
python -m on1builder run --config configs/chains/config.yaml --debug
To test that your blockchain connection is working without starting the full system:
python -m on1builder test-connection --config configs/chains/config.yaml
To run on a testnet, use a configuration file with testnet settings:
python -m on1builder run --config configs/chains/testnet_config.yaml
For production environments, we recommend using Docker for reliable operation.
Start the application using Docker Compose:
# Start in detached mode
docker-compose -f docker/compose/docker-compose.prod.yml up -d
# View logs
docker-compose -f docker/compose/docker-compose.prod.yml logs -f
# Stop the application
docker-compose -f docker/compose/docker-compose.prod.yml down
The project includes a deployment helper script:
# Interactive deployment helper
./infra/bash/deploy_helper.sh
This script will guide you through deployment options including:
While ON1Builder is running, you can:
data/logs/http://localhost:9090 (if enabled)http://localhost:3000 (if configured)For more information on monitoring, see the Monitoring Guide.
ON1Builder includes a comprehensive CLI with the following commands:
| Command | Description |
|---|---|
run |
Run the main application |
test-connection |
Test blockchain connection |
validate-config |
Validate a configuration file |
version |
Show version information |
| Option | Description | Default |
|---|---|---|
--config |
Path to configuration file | Required |
--debug |
Enable debug logging | False |
--dry-run |
Simulate without execution | False |
--chain-id |
Only run on specified chain ID | All chains |
--log-level |
Set logging level | INFO |
--log-file |
Path to log file | data/logs/on1builder.log |
Test a configuration file:
python -m on1builder validate-config --config configs/chains/my_config.yaml
Run with custom log file:
python -m on1builder run --config configs/chains/config.yaml --log-file custom_log.log
Run only on Ethereum Mainnet in a multi-chain configuration:
python -m on1builder run --config configs/chains/config_multi_chain.yaml --chain-id 1
To gracefully stop a running instance:
Ctrl+Cdocker-compose -f docker/compose/docker-compose.prod.yml down./infra/bash/emergency_shutdown.shTo restart:
docker-compose -f docker/compose/docker-compose.prod.yml up -dNow that you know how to run ON1Builder, you might want to: