Enhance signet chain configuration in bitcoin.conf #30203

pull BrandonOdiwuor wants to merge 4 commits into bitcoin:master from BrandonOdiwuor:add-signet-chain-configs changing 10 files +141 −11
  1. BrandonOdiwuor commented at 2:40 pm on May 30, 2024: contributor

    !! Draft for feedback on the approach !!

    Follow up to #29838 following #29838 (comment) and #29838 (comment)

    This PR builds upon the changes introduced in #29838, which enabled the ability to run multiple Signet instances with distinct data directories. Now, it extends this functionality by allowing users to configure Signet chain specifics directly in bitcoin.conf.

    Users can define multiple Signet chains by specifying configurations (see below) and specifying which signet chain to run on the chain variable:

     0chain=signet_xxxx
     1
     2[signet_xxxx]
     3seednode=x.x.x.x
     4signetchallenge=xxxxxxxxxx
     5
     6[signet_yyyy]
     7seednode=y.y.y.y
     8signetchallenge=yyyyyyyyy
     9
    10#main signet
    11[signet]
    12seednode=z.z.z.z
    13signetchallenge=zzzzzzzzzzzzz
    
  2. Use distinct data dirs for each signet
    If the -signetchallenge argument is provided,
    the hash-160 (first 8 characters) of the challenge is appended to the datadir name,
    resulting in unique data directories for each signet, i.e., signet_XXXXXXX.
    ac1ccd5390
  3. test: Add test for diffrent signet data directories
    - Added a test to verify the Signet data directory when -signetchallenge=51 is correctly set to 'signet_da1745e9'.
    - Added a test to verify the main Signet data directory is correctly set to 'signet'.
    50f4ca2363
  4. DrahtBot commented at 2:40 pm on May 30, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #29775 (Testnet4 including PoW difficulty adjustment fix by fjahr)
    • #29032 (signet: fixing mining for OP_TRUE challenge by Sjors)
    • #28802 (ArgsManager: support subcommand-specific options by ajtowns)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. DrahtBot added the label CI failed on May 30, 2024
  6. DrahtBot commented at 7:07 pm on May 30, 2024: contributor

    🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the documentation.

    Possibly this is due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    Leave a comment here, if you need help tracking down a confusing failure.

    Debug: https://github.com/bitcoin/bitcoin/runs/25609155217

  7. Add GetSectionArg() Helper
    Add helper function to read signet_chain args from config
    8d8a728ecb
  8. Enable signet chain configs
    This enables adding of signet chain configs in bitcoin.conf.
    This enables running of multiple signets with diffrent configurations
    
    i.e
    chain=signet_xxxx
    
    [signet_xxxx]
    seednodes=x.x.x.x
    signetchallenge=xxxxxxxxx
    2f762ba711
  9. BrandonOdiwuor force-pushed on Jun 7, 2024
  10. DrahtBot added the label Needs rebase on Aug 7, 2024
  11. DrahtBot commented at 5:41 pm on August 7, 2024: contributor

    🐙 This pull request conflicts with the target branch and needs rebase.

  12. DrahtBot commented at 0:36 am on November 4, 2024: contributor

    ⌛ There hasn’t been much activity lately and the patch still needs rebase. What is the status here?

    • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
    • Is it no longer relevant? ➡️ Please close.
    • Did the author lose interest or time to work on this? ➡️ Please close it and mark it ‘Up for grabs’ with the label, so that it can be picked up in the future.

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: 2024-11-21 09:12 UTC

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