Version number for `bitcoin.conf` format #14514

issue hebasto opened this issue on October 18, 2018
  1. hebasto commented at 10:54 PM on October 18, 2018: member

    Introduce a version number for configuration file(s) format; e.g., version=1 in the first line.

    Pros:

    • ability to add or deprecate format features (see: #13143, #14494) without breaking changes

    Cons:

    • plus 35 LOC per every supported version of parser

    Additionally, the client can automaGically bump config file version if it complies to the newer one.

  2. luke-jr commented at 11:32 PM on October 18, 2018: member

    Seems like it would defeat the point of deprecating features.

  3. laanwj commented at 9:54 AM on October 19, 2018: member

    Agree with @luke-jr. Don't think this would change anything, deprecating something would still break support for the old versions of the config file, no matter if it has an explicit version number or provides an option that no longer exists.

    Also I think this would be confusing for users and developers alike. Do you have any example of other software which uses configuration versioning—in this sense—successfully?

  4. promag commented at 10:04 AM on October 19, 2018: member

    docker-compose.yml has version. You have to support all versions so it I don't see how it helps with deprecation.

  5. meshcollider commented at 10:25 AM on October 19, 2018: contributor

    I agree with the above comments, I honestly can't imagine many breaking changes to the .conf files that aren't actually just deprecated arguments, and versioning command line arguments seems like a bad idea. Plus, on the odd occasion that there is a breaking change to the conf files, its usually for a good reason and doesn't have a large impact (e.g. your node will just fail to start until you remove a comment from the file in #14494)

  6. hebasto commented at 6:07 PM on October 19, 2018: member

    @MeshCollider

    ... and versioning command line arguments seems like a bad idea.

    You're right. But this discussion is not about command line arguments versioning, rather about config file format versioning.

  7. hebasto commented at 6:15 PM on October 19, 2018: member

    @laanwj

    Also I think this would be confusing for users and developers alike. Do you have any example of other software which uses configuration versioning—in this sense—successfully?

    File format versioning (in general) is a common practice. In particular the Electrum Wallet config file has a version (e.g., "config_version": 2).

  8. hebasto commented at 6:49 PM on October 19, 2018: member

    Consider the issue #13143 as a possible use case:

    Current non-versioning (version=0) format allows a comment to start after an option=value pair. That makes the parser to wrong parse a # character within a rpcpassword value.

    Assume that version=1 format allows comments to start only from the line beginning. This makes possible to use a # character within a rpcpassword value.

    No doubt that previous format versions must be supported during a certain period of time to prevent the breaking support for the old format config files (it will cost 35-40 lines of code per version). And eventually old and deprecated formats support may be dropped.

    The future may require more config format improvements and it'll be easy to introduce them with format versioning, IMO.

  9. hebasto renamed this:
    Version number for `bitcoin.conf`
    Version number for `bitcoin.conf` format
    on Oct 20, 2018
  10. MarcoFalke added the label Feature on Oct 20, 2018
  11. MarcoFalke added the label Brainstorming on Oct 20, 2018
  12. MarcoFalke added the label Scripts and tools on Oct 20, 2018
  13. MarcoFalke commented at 9:35 AM on October 20, 2018: member

    I think this feature can be added when there is need for it. I don't see a need right now.

  14. promag commented at 11:42 PM on November 21, 2018: member

    @hebasto do you think this can be closed?

  15. meshcollider commented at 2:17 AM on November 22, 2018: contributor

    Seems like a non-issue for now as mentioned above, closing

  16. meshcollider closed this on Nov 22, 2018

  17. hebasto commented at 7:26 AM on November 22, 2018: member

    @promag sure. @MeshCollider agree.

  18. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me