# A virtual network proving the swap stack: two rendezvous relays, three mock chain back ends # behind two gateways, two clients that know only a relay address. # # relay-a, relay-b torly instances with the swaprelay write policy (tests/../deploy/policy) # node-btc, node-blake, node-alt deterministic P2P nodes (nostrino-testnode) # gw-a one gateway, one key, two chains (btc on node-btc, blake on node-blake) # gw-b second gateway, own key, chain alt on node-alt # client-a, client-b two clients on the relay network only: they cannot reach the nodes # # The chain networks are separate from the relay network; only the gateways join both, which is # the topology the product assumes. name: blake-swap-rig x-torly: &torly image: alpine:3.20 command: ["/torly", "serve"] volumes: - ./bin/torly:/torly:ro - ./policy.json:/policy.json:ro - torly-data:/data environment: &torly-env TORLY_LISTEN: 0.0.0.0 TORLY_PORT: "3334" TORLY_DATA_DIR: /data TORLY_POLICY_FILE: /policy.json TORLY_BLOSSOM_ENABLED: "false" TORLY_LOG_LEVEL: info TORLY_AUTH_REQUIRED: "false" TORLY_INBOUND_BYTES_PER_SEC: "16777216" TORLY_QUERY_PER_SEC: "20" TORLY_QUERY_BURST: "40" TORLY_MAX_EVENT_BYTES: "131072" networks: [relays] healthcheck: test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:3334/health"] interval: 2s timeout: 2s retries: 30 x-node: &node image: alpine:3.20 volumes: - ./bin/nostrino-testnode:/nostrino-testnode:ro networks: [chains] x-gateway: &gateway image: alpine:3.20 command: - /nostrino-bridge - -relay - ws://relay-a:3334 - -relay - ws://relay-b:3334 - -allow-command - getdata,block - -max-bytes-per-sec - "0" - -v volumes: - ./bin/nostrino-bridge:/nostrino-bridge:ro - ./profiles:/profiles:ro - gateway-data:/data depends_on: relay-a: condition: service_healthy relay-b: condition: service_healthy networks: [relays, chains] services: relay-a: <<: *torly environment: <<: *torly-env TORLY_RELAY_URL: ws://relay-a:3334/ relay-b: <<: *torly environment: <<: *torly-env TORLY_RELAY_URL: ws://relay-b:3334/ node-btc: <<: *node command: ["/nostrino-testnode", "-listen", "0.0.0.0:18444", "-blocks", "20"] node-blake: <<: *node command: ["/nostrino-testnode", "-listen", "0.0.0.0:19444", "-blocks", "25"] node-alt: <<: *node command: ["/nostrino-testnode", "-listen", "0.0.0.0:20444", "-blocks", "30"] gw-a: <<: *gateway command: - /nostrino-bridge - -relay - ws://relay-a:3334 - -relay - ws://relay-b:3334 - -node - btc=node-btc:18444 - -node - blake=node-blake:19444 - -profile - btc=/profiles/btc.json - -profile - blake=/profiles/blake.json - -key - "2222222222222222222222222222222222222222222222222222222222222222" - -allow-command - getdata,block - -max-bytes-per-sec - "0" - -data - /data - -v gw-b: <<: *gateway command: - /nostrino-bridge - -relay - ws://relay-a:3334 - -relay - ws://relay-b:3334 - -node - alt=node-alt:20444 - -profile - alt=/profiles/alt.json - -key - "3333333333333333333333333333333333333333333333333333333333333333" - -allow-command - getdata,block - -max-bytes-per-sec - "0" - -data - /data - -v client-a: image: alpine:3.20 profiles: ["clients"] command: ["/bin/sh", "/client.sh", "ws://relay-a:3334"] volumes: - ./bin:/bin-rig:ro - ./client.sh:/client.sh:ro - ./profiles:/profiles:ro environment: PATH: /bin-rig:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin networks: [relays] client-b: image: alpine:3.20 profiles: ["clients"] command: ["/bin/sh", "/client.sh", "ws://relay-b:3334"] volumes: - ./bin:/bin-rig:ro - ./client.sh:/client.sh:ro - ./profiles:/profiles:ro environment: PATH: /bin-rig:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin networks: [relays] networks: relays: chains: volumes: torly-data: gateway-data: