Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Query Server Configuration

tachyon-pir-query-server pulls published PIR tables from the publisher over HTTPS, verifies digests and scope bindings, holds resident tables in memory, and answers encrypted wallet queries on a single public_listen address.

Command line

tachyon-pir-query-server --config /etc/tachyon-pir/query.json --check
tachyon-pir-query-server --config /etc/tachyon-pir/query.json

Complete example

{
  "management_listen": "127.0.0.1:9500",
  "public_listen": "127.0.0.1:9510",
  "memo": {
    "enabled": true,
    "settings": {
      "publisher": "https://publisher.example",
      "publisher_ca": "/etc/tachyon-pir/publisher-ca.pem",
      "state_dir": "/var/lib/tachyon-pir-query/memo",
      "role": "combined",
      "publisher_network": "test",
      "publisher_genesis": "029f11d80ef9765602235e1bc9727e3eb6ba20839319f761fee920d63401e327",
      "activation_height": 8,
      "epoch_length": 4096,
      "retain_scopes": 64,
      "max_unconfirmed_seconds": 600,
      "poll_ms": 1000,
      "admission": {
        "executing": 2,
        "waiting": 8,
        "wait_ms": 2000,
        "per_client": 2,
        "upload_ms": 15000
      }
    }
  },
  "first_contact": {
    "enabled": true,
    "settings": {
      "publisher": "https://publisher.example",
      "state_dir": "/var/lib/tachyon-pir-query/first-contact",
      "role": "combined",
      "publisher_network": "test",
      "publisher_genesis": "029f11d80ef9765602235e1bc9727e3eb6ba20839319f761fee920d63401e327",
      "activation_height": 8,
      "epoch_length": 4096
    }
  },
  "tachygram": {
    "enabled": true,
    "settings": {
      "publisher": "https://publisher.example",
      "state_dir": "/var/lib/tachyon-pir-query/tachygram",
      "role": "combined",
      "publisher_network": "test",
      "publisher_genesis": "029f11d80ef9765602235e1bc9727e3eb6ba20839319f761fee920d63401e327",
      "activation_height": 8,
      "epoch_length": 4096
    }
  },
  "registry": {
    "enabled": true,
    "settings": {
      "publisher": "https://publisher.example",
      "state_dir": "/var/lib/tachyon-pir-query/registry",
      "role": "combined",
      "publisher_network": "test",
      "publisher_genesis": "029f11d80ef9765602235e1bc9727e3eb6ba20839319f761fee920d63401e327"
    }
  }
}

Field reference

Top-level

FieldRequiredDescription
management_listenYesLoopback host:port serving /health, /ready, and /metrics
public_listenYesWallet-facing listener (put behind your public HTTPS edge) mounting /<product>/v1 and /v1/<product>
memo, first_contact, tachygram, registryNoEach is { "enabled": bool, "settings": { ... } }

Product settings

FieldRequiredDefaultDescription
publisherYes—Publisher HTTPS origin (https://host[:port])
publisher_caNosystem rootsPEM CA certificate for verifying the publisher's TLS leaf certificate
state_dirYes—Absolute, disjoint directory for local object cache, floor, and lock
roleYes—Must be "combined" in v1
publisher_networkYes—Expected network string from the node (e.g. "test", "main")
publisher_genesisYes—Expected genesis block hash in display order (64 hex chars)
activation_heightChain products only—NuTachyon activation height (omitted for registry)
epoch_lengthChain products only—Blocks per epoch matching publisher config (omitted for registry)
retain_scopesNoproduct defaultNumber of newest scopes to keep resident (64 for memo/tachygram)
max_unconfirmed_secondsNo600Maximum time to keep serving after the last successful publisher authority check
poll_msNo1000Interval between successful sync passes in milliseconds
admissionNosee belowPer-product concurrency and upload limits

admission

FieldDefaultDescription
executing2Maximum queries evaluated concurrently
waiting8Maximum queries queued waiting for an evaluation slot
wait_ms2000Maximum time a query waits for a slot before 503
per_client2Maximum concurrent in-flight queries per client
upload_ms15000Maximum upload duration before 408 (body cap is fixed at 512 KiB)

Memory sizing

Each resident tachyon-4k8 table costs roughly 160 MiB of RAM (planning bound). Retaining 64 epochs at one table per epoch is ~10 GiB per chain product per query host; tune retain_scopes according to available memory and history window.