Architecture at a glance¶
The components, the services that run them, and which ones each deploy mode starts.
You will learn / You need
You will learn: what each service is, where its code lives, and what deploy.sh starts in each mode.
You need: the other concept pages, or at least Relayers and cross-chain calls.
Components¶
| Service | Binary | Source | Port and volumes |
|---|---|---|---|
backend |
testing_backend |
stealth_name_service/backend/testing_backend/src/main.rs, stealth_name_service/backend/testing_backend/src/server.rs |
Container port 5000, published as BACKEND_PORT (default 5000); ./shared_data is mounted at /app/output |
loadtest |
loadtest |
stealth_name_service/backend/testing_backend/src/bin/loadtest.rs |
./shared_data at /app/output, ./agent/payloads at /app/payloads (read-only) |
event_listener |
event_listener |
stealth_name_service/backend/testing_backend/src/bin/event_listener.rs |
./events_data at /app/data |
event_handler |
event_handler |
stealth_name_service/backend/testing_backend/src/bin/event_handler.rs |
Listens on 5000 (/api/handle_event); ./events_data at /app/data |
consensus_committee |
consensus_committee |
stealth_name_service/backend/testing_backend/src/bin/consensus_committee.rs |
Ingest on 5000; ./consensus_data at /app/consensus |
The Move packages (bridge_source, bridge_abstract_account, bridge_target) live under stealth_name_service/Move/. The Rust bridge library, which builds intents and PTBs, is stealth_name_service/backend/testing_backend/src/bridge/. One-shot tools such as bridge_aa_init and bridge_acl_add are in src/bin/. Binaries and scripts lists them all.
Code map¶
The repository is a handful of components: the backend server, the relayer pair (listener and handler), the consensus committee, a bridge library, one-shot tools, the Move packages, scripts and the analysis code. This map shows one node per component; a line means code in one component uses code in the other. Click a node for its size and a link to its deep dive. The full code map shows every file.
Deploy modes¶
deploy.sh takes a mode (bridge, benchmark or hybrid; DEPLOY_MODE defaults to bridge) and picks the compose files. The committee is added in bridge and hybrid when CONSENSUS_ENABLED=true; in benchmark mode it is ignored.
flowchart LR
M1["benchmark"] --> BE["backend"]
M1 --> LT["loadtest"]
M2["bridge"] --> BE
M2 --> EL["event_listener"]
M2 --> EH["event_handler"]
M3["hybrid"] --> BE
M3 --> LT
M3 --> EL
M3 --> EH
M2 -. "CONSENSUS_ENABLED=true" .-> CC["consensus_committee"]
M3 -. "CONSENSUS_ENABLED=true" .-> CC
| Mode | Services | Used by |
|---|---|---|
benchmark |
backend, loadtest |
Track A |
bridge |
backend, event_listener, event_handler (plus the committee) |
Track B and Track C |
hybrid |
backend, loadtest, event_listener, event_handler (plus the committee) |
Load and relaying together |
See Deploying the stack for the commands and Compose stacks for the files.