Infrastructure

STRATO Mercata uses a microservices architecture with NGINX gateways, message queues, and multiple data stores.

Service Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│                           External Traffic                              │
└─────────────────────────────────────────────────────────────────────────┘

                    ┌───────────────┼───────────────┐
                    ▼               ▼               ▼
            ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
            │highway-nginx│ │vault-nginx  │ │nginx-packager│
            │  (API GW)   │ │ (Key Mgmt)  │ │   (SMD)     │
            └─────────────┘ └─────────────┘ └─────────────┘
                    │               │               │
                    ▼               ▼               ▼
            ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
            │ STRATO API  │ │   Vault     │ │  PostgREST  │
            │   /APEX     │ │  Service    │ │   (Cirrus)  │
            └─────────────┘ └─────────────┘ └─────────────┘
                    │               │               │
                    └───────────────┴───────────────┘


            ┌─────────────────────────────────────────────────────┐
            │                   Data Layer                        │
            │  ┌──────────┐  ┌──────────┐  ┌──────────┐          │
            │  │PostgreSQL│  │ LevelDB  │  │  Redis   │  Kafka   │
            │  └──────────┘  └──────────┘  └──────────┘          │
            └─────────────────────────────────────────────────────┘

NGINX Gateways

highway-nginx

Main API gateway for STRATO services.

Features:

  • OAuth 2.0 / OpenID Connect authentication

  • Request routing to backend services

  • SSL/TLS termination

  • Rate limiting

  • CORS handling

Configuration:

vault-nginx

Key management gateway with additional security.

Features:

  • HSM integration support

  • Key isolation

  • Audit logging

  • Certificate validation

Endpoints:

Path
Description

/vault/key

Key generation/retrieval

/vault/sign

Transaction signing

/vault/cert

Certificate management

nginx-packager

SMD (STRATO Management Dashboard) gateway.

Features:

  • CSRF protection (csrf.lua)

  • Static file serving

  • Swagger UI hosting

  • Session management

CSRF Protection:

Key Services

PostgREST (postgrest-packager)

Automatic REST API generation from PostgreSQL schema.

Features:

  • Auto-generated CRUD endpoints

  • Filtering and pagination

  • Row-level security

  • OpenAPI schema generation

Configuration:

Query Examples:

Prometheus (prometheus-packager)

Metrics collection and monitoring.

Metrics Collected:

  • Block height

  • Transaction throughput

  • API response times

  • System resources

  • Peer connections

Configuration:

Vault Service (strato/vault)

Cryptographic key management.

Components:

  • server/: Key storage and HSM interface

  • api/: REST API definitions

  • client/: Service client library

Features:

  • Key generation (ECDSA, secp256k1)

  • Transaction signing

  • X.509 certificate management

  • HSM integration (optional)

Highway Service (strato/highway)

Permissioned network management.

Components:

  • server/: Network registry

  • api/: REST API definitions

  • client/: Service client library

Features:

  • Node registration

  • Certificate authority

  • Network topology management

  • Validator set management

Data Stores

PostgreSQL (Cirrus)

Indexed blockchain data for efficient queries.

Databases:

Database
Purpose

eth

Blockchain state (blocks, transactions)

cirrus

Contract state tables

Key Tables:

LevelDB

Low-level blockchain state storage.

Data Stored:

  • Account state (balance, nonce, code)

  • Contract storage

  • State trie nodes

  • Code collection

Redis

Caching and block database.

Usage:

  • Block caching

  • Transaction mempool

  • Session data

  • Peer state

Kafka

Event streaming and message queue.

Topics:

Topic
Purpose

solidvmevents

Smart contract events

transactions

Transaction propagation

blocks

Block announcements

Docker Compose

Development Setup

Production Templates

Template
Description

docker-compose.tpl.yml

Basic STRATO node

docker-compose.allDocker.tpl.yml

Full dockerized setup

docker-compose.highway.tpl.yml

With Highway service

docker-compose.vault.tpl.yml

With Vault service

docker-compose.bridge.tpl.yml

With Bridge service

SSL/TLS Configuration

Certificate Setup

Replace Dummy Certificates

Environment Variables

Required Variables

Variable
Description

NODE_HOST

Node hostname/IP

NETWORK

Network name (helium/upquark)

OAUTH_CLIENT_ID

OAuth client ID

OAUTH_CLIENT_SECRET

OAuth client secret

Optional Variables

Variable
Default
Description

API_DEBUG_LOG

false

Enable API debug logging

VM_DEBUG_LOG

false

Enable VM debug logging

SLIPSTREAM_DEBUG_LOG

false

Enable indexer debug logging

FULL_DEBUG_LOG

false

Enable all debug logging

Monitoring

Health Endpoints

Service
Endpoint
Description

STRATO API

/health

Node health status

Mercata Backend

/api/health

Backend health

APEX

/_ping

Simple ping

APEX

/status

Detailed status

Metrics Endpoints

Service
Endpoint
Format

STRATO

/stats/prometheus

Prometheus

STRATO

/stats

JSON

Last updated