Skip to content

[FR] - cardano-testnet: machine-readable manifest and status command #6687

Description

@palas

Internal/External
Internal

Area
cardano-testnet

1. Machine-readable runtime interface (manifest and status)

Problem

When cardano-testnet cardano starts a network it knows every socket path, port, and key location. But it only communicates them as human-oriented log text and an undocumented directory layout.

Programs that start cardano-testnet must therefore scrape the output directory and poll with their own retry loops. Consumers usually build this layer independently: cardano-transaction-lib parses the run directory (their integration doc), the YACD Kubernetes operator wraps the binary, and Tweag's cardano-peras repo wraps it again.

The request is old and still open: #5848 (2024) asks for "more structured output (e.g. JSON) so that we can parse the TMP dir to get the node socket path, etc.".

Proposal

  1. Manifest. On successful startup, write <output-dir>/manifest.json: network magic, era, and per node: name, role, socket path, port, config path; plus the funded key files. Document it as a stable interface, so the rest of the directory layout can keep changing freely.
  2. Status command. cardano-testnet status --output-dir DIR [--json]: reports ready/synced/tip, exit code 0 only when the chain is producing blocks.

References

#5848 · #6405 (keep-running behavior)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions