refactor: Signet fixups #19993

pull MarcoFalke wants to merge 5 commits into bitcoin:master from MarcoFalke:2009-signetFixups changing 11 files +34 −52
  1. MarcoFalke commented at 1:59 PM on September 22, 2020: member

    Some doc and test fixups for #18267

  2. fanquake added the label Refactoring on Sep 22, 2020
  3. MarcoFalke cross-referenced this on Sep 22, 2020 from issue BIP-325: Signet [consensus] by kallewoof
  4. in doc/bips.md:45 in faae52285a outdated
      41 | @@ -42,4 +42,5 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.21.0**):
      42 |  * [`BIP 173`](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki): Bech32 addresses for native Segregated Witness outputs are supported as of **v0.16.0** ([PR 11167](https://github.com/bitcoin/bitcoin/pull/11167)). Bech32 addresses are generated by default as of **v0.20.0** ([PR 16884](https://github.com/bitcoin/bitcoin/pull/16884)).
      43 |  * [`BIP 174`](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki): RPCs to operate on Partially Signed Bitcoin Transactions (PSBT) are present as of **v0.17.0** ([PR 13557](https://github.com/bitcoin/bitcoin/pull/13557)).
      44 |  * [`BIP 176`](https://github.com/bitcoin/bips/blob/master/bip-0176.mediawiki): Bits Denomination [QT only] is supported as of **v0.16.0** ([PR 12035](https://github.com/bitcoin/bitcoin/pull/12035)).
      45 | +* [`BIP 325`](https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki): Signet test network is supported as of **v0.21.0** ([PR 18267](https://github.com/bitcoin/bitcoin/pull/18267)).
    


    ajtowns commented at 2:03 PM on September 22, 2020:

    (Not strictly true until bitcoin/bips#978 and bitcoin/bips#1000 are merged)


    MarcoFalke commented at 3:09 PM on September 22, 2020:

    heh, I hope that those are merged before we release the next major version ;)


    kallewoof commented at 3:09 PM on September 22, 2020:

    I've ACK'd both, so they should be considered merged, I think, since i'm the BIP author.

  5. in doc/release-notes.md:340 in faae52285a outdated
     334 | @@ -335,6 +335,10 @@ RPC
     335 |  Tests
     336 |  -----
     337 |  
     338 | +- The BIP 325 default signet can be enabled by the `-chain=signet` or `-signet`
     339 | +  setting. The settings `-signetchallenge` and `-signetseednode` allow
     340 | +  modifying the network.
    


    ajtowns commented at 2:04 PM on September 22, 2020:

    "modifying the network" -> "enabling a custom signet instead" ?


    MarcoFalke commented at 8:34 PM on September 22, 2020:

    thx done

  6. in src/signet.cpp:70 in fad3900969 outdated
      64 | @@ -65,8 +65,9 @@ static uint256 ComputeModifiedMerkleRoot(const CMutableTransaction& cb, const CB
      65 |      return ComputeMerkleRoot(std::move(leaves));
      66 |  }
      67 |  
      68 | -SignetTxs SignetTxs::Create(const CBlock& block, const CScript& challenge)
      69 | +Optional<SignetTxs> SignetTxs::Create(const CBlock& block, const CScript& challenge)
      70 |  {
      71 | +    const auto invalid = []() -> Optional<SignetTxs> { return nullopt; };
    


    ajtowns commented at 2:38 PM on September 22, 2020:

    Should just replace return invalid() with return nullopt directly.


    MarcoFalke commented at 8:34 PM on September 22, 2020:

    thx done

  7. in src/signet.h:31 in fad3900969 outdated
      34 | -    static SignetTxs Create(const CBlock& block, const CScript& challenge);
      35 | +    SignetTxs(const T1& to_spend, const T2& to_sign) : m_to_spend{to_spend}, m_to_sign{to_sign} { }
      36 |  
      37 |  public:
      38 | -    SignetTxs(const CBlock& block, const CScript& challenge) : SignetTxs(Create(block, challenge)) { }
      39 | +    static Optional<SignetTxs> Create(const CBlock& block, const CScript& challenge);
    


    ajtowns commented at 2:39 PM on September 22, 2020:

    This is much better!

  8. ajtowns commented at 2:41 PM on September 22, 2020: contributor

    Concept ACK

  9. DrahtBot commented at 6:59 PM on September 22, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #19160 (multiprocess: Add basic spawn and IPC support by ryanofsky)
    • #11082 (Add new bitcoin_rw.conf file that is used for settings modified by this software itself by luke-jr)

    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.

  10. fjahr commented at 8:18 PM on September 22, 2020: contributor

    @ajtowns suggestions are good, ACK otherwise.

  11. test: Run signet test even when wallet was not compiled fa2ad5dae1
  12. refactor: Remove SignetTxs::m_valid and use optional instead
    m_valid implies the block solution has been checked, which is not the
    case. It only means the txs could be parsed. C++17 comes with
    std::optional, so just use that instead.
    77771a03df
  13. fuzz: Remove needless guard fae0548686
  14. doc: Update comments for new chain settings (-signet and -chain=signet) faf0a26711
  15. doc: Document signet BIP facaf9e61f
  16. MarcoFalke force-pushed on Sep 22, 2020
  17. fjahr commented at 9:38 PM on September 22, 2020: contributor

    Code review ACK fadee171c8b0b591daf8f1d65640e4f288b3c3bf

  18. dr-orlovsky approved
  19. DrahtBot cross-referenced this on Sep 22, 2020 from issue multiprocess: Add basic spawn and IPC support by ryanofsky
  20. ajtowns commented at 1:33 AM on September 23, 2020: contributor

    ACK facaf9e61f4b9ea91fab554d495ebea1043d08fb -- code review only

  21. kallewoof commented at 2:17 AM on September 23, 2020: member

    Code review ACK facaf9e61f4b9ea91fab554d495ebea1043d08fb

  22. DrahtBot cross-referenced this on Sep 23, 2020 from issue Add new bitcoin_rw.conf file that is used for settings modified by this software itself by luke-jr
  23. MarcoFalke merged this on Sep 23, 2020
  24. MarcoFalke closed this on Sep 23, 2020

  25. MarcoFalke deleted the branch on Sep 23, 2020
  26. sidhujag referenced this in commit edce812404 on Sep 23, 2020
  27. ryanofsky cross-referenced this on Sep 28, 2020 from issue multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofsky
  28. bitcoin locked this on Feb 15, 2022

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-05-19 06:53 UTC