DocsCurrent Page

Bridge Configuration


The bridge daemon connects ROS 2 and MQTT robotics systems with the Solana blockchain.


Installation


bash
cargo install dexbotics-bridge

Or download pre-built binaries from GitHub releases.


Configuration File


Create bridge.toml:


toml
[robot]
nft_mint = "ROBOT_MINT_PUBKEY"
keypair_path = "~/.dexbotics/robot.json"

[bridge]
ros_domain_id = 42
mqtt_broker = "wss://broker.example"
ipfs_api = "http://127.0.0.1:5001"

[task]
max_concurrent = 2
proof_interval_secs = 15

Running the Bridge


bash
dexbotics-bridge --config bridge.toml --cluster devnet

Logs:
[INFO] Bridge daemon starting...
[INFO] Connected to Solana devnet
[INFO] Robot NFT: 9pZ3...
[INFO] Listening for tasks...
[INFO] Task 123 accepted
[INFO] Telemetry uploaded: bafybei...
[INFO] Proof submitted for task 123

ROS 2 Integration


The bridge subscribes to these topics:


Input Topics:
  • /dexbotics/task/status - Task execution status
  • /dexbotics/telemetry - Robot telemetry data
  • /dexbotics/proof - Proof artifacts (photos, logs)

Output Topics:
  • /dexbotics/task/new - New task assignments
  • /dexbotics/task/cancel - Task cancellations

Example ROS 2 Node:
python
import rclpy
from rclpy.node import Node
from dexbotics_msgs.msg import Task, Telemetry

class DexboticsNode(Node):
    def __init__(self):
        super().__init__('dexbotics_node')
        self.task_sub = self.create_subscription(
            Task,
            '/dexbotics/task/new',
            self.task_callback,
            10
        )
        self.telemetry_pub = self.create_publisher(
            Telemetry,
            '/dexbotics/telemetry',
            10
        )

    def task_callback(self, msg):
        self.get_logger().info(f'New task: {msg.task_id}')

MQTT Integration


Task notifications:
topic: dexbotics/tasks/new
payload: {"task_id": 123, "price": 2000000, "deadline": 1730800000}

Telemetry submission:
topic: dexbotics/robot/{robot_id}/telemetry
payload: {"timestamp": 1730791000, "position": {"lat": 53.5, "lon": 10.2}}

Status updates:
topic: dexbotics/robot/{robot_id}/status
payload: {"task_id": 123, "state": "executing", "progress": 0.45}

Signing and Proofs


The bridge automatically:

1. Signs all telemetry with robot keypair

2. Uploads large data to IPFS

3. Submits CIDs on-chain

4. Monitors oracle attestations


Security:
  • Private key never leaves local machine
  • All signatures verifiable on-chain
  • Proof integrity guaranteed by content addressing

Monitoring


Enable Prometheus metrics:


toml
[monitoring]
prometheus_port = 9090

Metrics:
  • dexbotics_tasks_accepted_total
  • dexbotics_proofs_submitted_total
  • dexbotics_settlement_latency_seconds
  • dexbotics_ipfs_upload_duration_seconds