Skip to content

Use this page to understand the main deployment settings and runtime interfaces for the Gas Station Service. The example shows one possible configuration shape; your release package, database, secrets, and telemetry pipeline can differ.

This page applies to on-premise deployments only. Ripple manages the Gas Station Service for SaaS.

What this config controls

Gas Station is a background service that funds transaction fees for sponsored accounts on supported ledgers. It connects to the Ripple Custody API gateway, authenticates as a service caller registered in Keycloak, submits automated funding intents as system-signed intents, stores processing state in PostgreSQL, and exports telemetry when configured.

Migration from bot users

Earlier releases used a bot-user private key for automated funding intents. Gas Station now uses system-signed intents instead. Existing deployments must migrate before they upgrade, or automated funding stops. See Migrate from a bot user.

Migrate from a bot user

If you funded Gas Station with a bot-user private key in an earlier release, migrate to system-signed intents in this order so that funding does not stop:

  1. Activate system-signed intents for the deployment. See System-signed intent configuration.
  2. Register the Gas Station service caller in Keycloak and issue it a custody_roles claim. See Obtain a token for a service caller.
  3. Create a policy with intentOrigin: "SystemSigned" that allows the service caller to submit v0_CreateTransactionOrder. See System-signed intents and policies.
  4. Redeploy Gas Station with the service-caller credentials. Remove the PRIVATE_KEY environment variable and the gasStation.credentials.privateKeyKey value.
  5. Confirm that new funding intents execute, then decommission the bot user.

Configuration fields

Configure the service through environment variables or deployment values, depending on how your release packages Gas Station.

The HMZ_FEATURE_GAS_STATION deployment flag controls whether the console displays the Gas station pages, including gas station creation.

ParameterDescriptionDefaultRequired
GATEWAY_SERVER_URLRipple Custody API gateway URL.-Yes
Service-caller credentialsClient credentials for the Gas Station service caller registered in Keycloak. The exact parameters depend on your release package; contact your Customer Partner Engineer (CPE) for the specifics.-Yes
POLLING_INTERVAL_MSInterval for checking pending transactions, in milliseconds.5000No
MAX_RETRY_ATTEMPTSMaximum immediate retry attempts for failed funding.3No
RETRY_INTERVAL_MINUTESInterval between queued retry attempts.5No
FEE_SAFETY_MARGIN_PERCENTSafety margin added to estimated fees.10No
POSTGRES_URLPostgreSQL connection string.-Yes
LOG_LEVELLogging verbosity. Possible values: debug, info, warn, error.infoNo
OTEL_EXPORTER_OTLP_ENDPOINTOpenTelemetry collector endpoint.-No

Deployment values

The following fields show a possible values-file shape for the Gas Station Service:

FieldDescription
gasStation.enabledTurns on the Gas Station Service when the release package supports it.
gasStation.gatewayUrlRipple Custody API gateway URL.
gasStation.pollingIntervalMsPolling interval in milliseconds.
gasStation.maxRetryAttemptsMaximum immediate retry attempts.
gasStation.retryIntervalMinutesQueue retry interval in minutes.
gasStation.feeSafetyMarginPercentFee safety margin percentage.
gasStation.database.*Database host, port, database name, username, and secret reference.
gasStation.credentials.*Secret reference for the Gas Station service-caller (Keycloak client) credentials.
gasStation.telemetry.*Telemetry enablement and OTLP endpoint.

If your release exposes Gas Station through component selection, include gas-station in harmonize.included_components.

Database reference

Gas Station uses PostgreSQL for event deduplication, retry tracking, sponsorship configuration, alert thresholds, and audit data.

TablePurpose
processed_eventEvent deduplication and distributed locking.
failed_funding_jobFailed funding attempts for queue-based retry.
dead_letter_queuePermanently failed jobs requiring investigation.
sponsorSponsorship configuration.
alertLow-balance alert thresholds.
eventAudit trail for configuration changes.

If you are using the shared Ripple Custody PostgreSQL instance, the Gas Station Service creates its own schema (gas_station) within the shared database. The database user must have CREATE SCHEMA privileges. See PostgreSQL configuration for details on schema isolation across components.

Health endpoints

EndpointPurpose
/v1/healthLiveness probe.
/v1/readyReadiness probe.

Metrics and traces

Gas Station exports metrics and traces through OpenTelemetry when you configure telemetry.

MetricTypeDescription
failed_jobs_queue_sizeGaugeNumber of jobs in the failed funding queue.
processed_events_countGaugeNumber of processed event rows.
sponsor_balance_<ticker>GaugeCurrent balance of each sponsor account.
funding_attempts_total{status, chain}CounterFunding attempts by status and chain.
events_processed_total{outcome}CounterEvents processed by outcome.
retry_attempts_total{attempt}CounterRetry attempts before success or failure.
funding_duration_secondsHistogramTime from event detection to funding completion.
job_age_at_success_hoursHistogramTime jobs spend in the queue before success.
api_latency_seconds{endpoint}HistogramAPI latency by endpoint.

Constraints and relationships

  • Store the service-caller credentials in a Kubernetes secret or external secret-management system.
  • Point POSTGRES_URL to a PostgreSQL database or schema that the service can access.
  • Ensure GATEWAY_SERVER_URL resolves from the Gas Station runtime environment.
  • Configure telemetry fields only when your deployment has an OpenTelemetry collector.
  • Scope the Gas Station system-signed policy narrowly enough for funding operations.

Example

This example shows one possible Gas Station configuration shape:

harmonize:
  included_components:
    - gas-station

gasStation:
  enabled: true
  gatewayUrl: "https://gateway.example.com"
  pollingIntervalMs: 5000
  maxRetryAttempts: 3
  retryIntervalMinutes: 5
  feeSafetyMarginPercent: 10

  database:
    host: "postgres.example.com"
    port: 5432
    name: "gas_station"
    username: "gas_station_user"
    existingSecret: "gas-station-db-credentials"

  credentials:
    existingSecret: "gas-station-credentials"

  telemetry:
    enabled: true
    otlpEndpoint: "http://otel-collector:4317"