Skip to content

Latest commit

 

History

History
125 lines (100 loc) · 9 KB

File metadata and controls

125 lines (100 loc) · 9 KB

Dashmate services

This document provides an overview of all dashmate services, their responsibilities, and how they communicate with each other. The platform is designed as a collection of microservices that work together to provide a complete blockchain-based application platform.

Overview

Dashmate runs and orchestrate Dash Platform components:

                                 ┌─────────────────┐
                                 │                 │
                                 │    Dashmate     │
                                 │    CLI & Helper │
                                 │                 │
                                 └─────────────────┘
                                         │
                                         │ manages
                                         ▼
┌──────────────────────────────────────────────────────────────────────┐
│                                                                      │
│  ┌─────────────┐                                                     │
│  │             │                                                     │
│  │   Core      │◄──────┐                                             │
│  │  (Dash      │       │                                             │
│  │  Blockchain)│       │                                             │
│  │             │       │                                             │
│  └─────────────┘       │                                             │
│                        │                                             │
│                        │                                             │
│                ┌───────┴──────────────────────────────────┐          │
│                │                                          │          │
│                │              Platform Layer              │          │
│                │                                          │          │
│                │  ┌────────┐  ┌────────┐  ┌────────┐      │          │
│                │  │        │  │        │  │        │      │          │
│                │  │ Drive  │  │ Tender │  │ DAPI   │      │          │
│                │  │ ABCI   │  │ dash   │  │ API/   │      │          │
│                │  │        │  │        │  │ Streams│      │          │
│                │  └────────┘  └────────┘  └────────┘      │          │
│                │                                          │          │
│                └──────────────────────────────────────────┘          │
│                                   ▲                                  │
│                                   │                                  │
│                          ┌────────────────┐                          │
│                          │                │                          │
│                          │    Gateway     │◄─────────────────────────┼── User HTTP
│                          │                │                          │   Requests
│                          └────────────────┘                          │
│                                                                      │
└──────────────────────────────────────────────────────────────────────┘
  • The Gateway handles external HTTP\HTTPS requests, provides TLS termination, and routes traffic to the correct service.
  • Dash Core is the Dash blockchain node, handling Layer 1 operations (consensus, masternodes, payment transactions).
  • Platform is layer 2 that provide platform functionality:
    • Drive ABCI is runtime for Platform layer 2 chain. Data contracts, and identities logic is implemented here.
    • Tenderdash is the consensus engine for the platform, providing BFT consensus for state transitions.
    • DAPI (decentralized API) exposes the platform functionalities via gRPC, and streaming interfaces, serving as the main interface for client developers.
  • Dashmate orchestrates the services, providing a CLI and helper service for managing the platform.

Services

Port Security Considerations

Summary of Exposed Ports

Type Ports Default Host Binding
Public-facing Core P2P (9999)
Tenderdash P2P (26656)
Gateway API (443)
0.0.0.0 (all)
Configurable Core ZMQ (29998 mainnet / 39998 testnet / 49998 local) configurable (see below)
Localhost-only Core RPC (9998)
Insight UI (3001 mainnet / 13001 testnet / 23001 local)
Dashmate Helper (9100 mainnet / 19100 testnet / 29100 local)
Drive ABCI Metrics (29090 mainnet / 39090 testnet / 49090 local)
Drive Debug Tools (6669/8083 mainnet, 16669/18083 testnet, 26669/28083 local)
Tenderdash RPC (26657)
Tenderdash Metrics (26660)
Tenderdash Debug (6060)
Gateway Metrics (9090 mainnet / 19090 testnet / 29090 local)
Gateway Admin (9901 mainnet / 19901 testnet / 29901 local)
Rate Limiter Metrics (9102 mainnet / 19102 testnet / 29102 local)
Quorum List API (2444 mainnet / 12444 testnet / 22444 local, optional)
rs-dapi Metrics (9091 mainnet / 19091 testnet / 29091 local)
127.0.0.1 (local)
Internal only Drive ABCI (26658)
Drive gRPC (26670)
DAPI JSON-RPC (3004)
DAPI gRPC (3005)
DAPI Streams (3006)
Rate Limiter gRPC (8081)
Rate Limiter StatsD (9125)
Rate Limiter Redis (6379)
(not exposed)

Core ZMQ Exposure Configuration

The Core ZMQ port (29998 on mainnet, 39998 on testnet, 49998 on local presets) exposure is configurable via core.zmq.host:

  • host: '127.0.0.1' (default): ZMQ port exposed on localhost only
  • host: '0.0.0.0': ZMQ port exposed on all interfaces (use with caution)

ZMQ is always enabled in Dash Core as it's used by internal components like DAPI.

Port Security Notes

  • Public-facing ports (0.0.0.0): Only ports that need to be accessible from other machines bind to all interfaces by default.
  • Localhost-only ports (127.0.0.1): Most ports bind only to localhost by default for security.
  • Internal-only ports: These ports are not bound to any host interface and are only accessible from other containers in the Docker network.
  • RPC Security: Core RPC has an explicit allowlist in the configuration: core.rpc.allowIps (default: ['127.0.0.1', '172.16.0.0/12', '192.168.0.0/16'])

Network Configuration

The default Docker network configuration can be customized with the following settings:

  • Network Subnet: docker.network.subnet (default: "0.0.0.0/0")
  • Container addresses are assigned automatically by Docker within the subnet range

The platform uses different Docker Compose profiles to enable specific functionality:

  • core: Core and optional Insight services
  • platform: All platform-specific services

Data Persistence

Several volumes are used for data persistence:

  • core_data: Stores blockchain data
  • drive_abci_data: Stores platform state data
  • drive_tenderdash: Stores consensus data

Metrics and Monitoring

Most services provide metrics endpoints:

  • Drive ABCI: Platform application metrics
  • Tenderdash: Consensus metrics
  • Gateway: API gateway metrics
  • Rate Limiter: Rate limiting metrics

These can be integrated with monitoring systems like Prometheus and Grafana. All containers that expose Prometheus metrics also advertise the Docker label org.dashmate.config.name, which Dashmate sets to the active config name. When you run multiple nodes on the same host, you can use that label in Prometheus relabeling rules or dashboards to distinguish each instance.

You can find example Prometheus config for local devnet monitoring in ../prometheus/.