Skip to content

Fallback to Stellar Core's supported protocol version when config.protocol_version_default is not set #860

@leighmcculloch

Description

@leighmcculloch

What problem does your feature solve?

Currently, if an image in images.json does not have config.protocol_version_default set, the container will fail during startup.

This requires maintainers to manually keep config.protocol_version_default in sync with the maximum protocol version supported by all software components in the image, which is error-prone and adds maintenance burden.

What would you like to see?

When config.protocol_version_default is not set in images.json, the protocol version should be automatically determined from the Stellar Core binary included in the image.

This could be implemented in one of two ways:

  1. Runtime detection: Query the Stellar Core binary at container startup using stellar-core version to determine the latest protocol version it supports.

  2. Build-time injection: Extract the protocol version from Stellar Core during the Docker build and bake it into the image.

Either approach would allow images to automatically use the correct protocol version based on the actual Stellar Core binary included in the image, without requiring explicit configuration.

Note: The current output of stellar-core version is not particularly friendly for querying specific information. It may be worth requesting a change to the stellar-core repo to add an option that outputs just the supported protocol version (e.g., stellar-core version --protocol or similar).

What alternatives are there?

  1. Status quo: Continue requiring config.protocol_version_default to be explicitly set for every image in images.json. This works but adds maintenance overhead and risk of the configuration going out of date.

  2. Fail gracefully with a clear error: Instead of failing with confusing errors, detect the missing configuration and provide a helpful error message telling users to set --protocol-version explicitly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog (Not Ready)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions