Stratum v2 connman #30332

pull Sjors wants to merge 8 commits into bitcoin:master from Sjors:2024/06/sv2_connection changing 18 files +3653 −1
  1. Sjors commented at 10:50 am on June 25, 2024: member

    Based on #30315, parent PR #29432.

    This PR introduces Sv2Connman which is somewhat similar to CConnman. It uses the Sv2Transport introduced in #30315 to enable incoming connections from other Stratum v2 roles.

    It’s main target user is the Template Provider role introduced in #29432.

    There may be other Stratum v2 roles we want to support in the future.

    A remaining issue is that the code in ThreadSv2Handler reuses a lot of code from CConnman::SocketHandlerConnected. I’d like to find a way to extract this common functionality and put it somewhere else.

    Finally, because the tests use a real socket, they’re quite brittle, so I plan to refactor them to take advantage of #30205.

    TODO:

    • introduce something like a CConnman for stratum
    • use mock sockets from #30205
    • make CConnman::SocketHandlerConnected (partially) reusable
    • fix thread issue found by CI
  2. DrahtBot commented at 10:50 am on June 25, 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:

    • #29415 (Broadcast own transactions only via short-lived Tor or I2P connections by vasild)
    • #26697 (logging: use bitset for categories by LarryRuane)

    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.

  3. Sjors force-pushed on Jun 25, 2024
  4. DrahtBot added the label CI failed on Jun 25, 2024
  5. DrahtBot commented at 11:46 am on June 25, 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/26648048745

  6. DrahtBot removed the label CI failed on Jun 25, 2024
  7. ryanofsky referenced this in commit 2f6dca4d1c on Jun 27, 2024
  8. Sjors force-pushed on Jun 28, 2024
  9. Sjors force-pushed on Jun 28, 2024
  10. Sjors force-pushed on Jul 1, 2024
  11. DrahtBot commented at 7:14 pm on July 1, 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/26898716492

  12. DrahtBot added the label CI failed on Jul 1, 2024
  13. Sjors force-pushed on Jul 2, 2024
  14. DrahtBot removed the label CI failed on Jul 2, 2024
  15. glozow added the label Mining on Jul 2, 2024
  16. Add sv2 log category for Stratum v2 475bc78144
  17. Add sv2 noise protocol
    Co-Authored-By: Christopher Coverdale <chris.coverdale24@gmail.com>
    a2436955f5
  18. Add sv2 message CoinbaseOutputDataSize
    This commit adds the simplest stratum v2 message. The remaining messages are introduced in later commits.
    
    Co-Authored-By: Christopher Coverdale <chris.coverdale24@gmail.com>
    7a699506b3
  19. Convert between Sv2NetMsg and CSerializedNetMsg
    This allows us to subclass Transport.
    caf61c881f
  20. Introduce Sv2Transport
    Implemented starting from a copy of V2Transport and the V2TransportTester, modifying it to fit Stratum v2 and Noise Protocol requirements.
    
    Co-Authored-By: Christopher Coverdale <chris.coverdale24@gmail.com>
    Co-Authored-By: Fi3
    f6146722d4
  21. Add sv2 SETUP_CONNECTION messages
    Co-Authored-By: Christopher Coverdale <chris.coverdale24@gmail.com>
    02f6daf267
  22. Add strings for Sv2MsgType fcf6ef369e
  23. Sjors force-pushed on Jul 2, 2024
  24. Sjors force-pushed on Jul 2, 2024
  25. Sjors force-pushed on Jul 2, 2024
  26. DrahtBot added the label CI failed on Jul 2, 2024
  27. DrahtBot commented at 6:37 pm on July 2, 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/26955543098

  28. Add Sv2Connman 4cc9cfe4e7
  29. Sjors force-pushed on Jul 2, 2024
  30. Sjors renamed this:
    Stratum v2 connectivity
    Stratum v2 connman
    on Jul 2, 2024

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-07-03 10:13 UTC

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