rfc: DATUM mining interface requirements #31002

issue Sjors openend this issue on September 30, 2024
  1. Sjors commented at 12:09 pm on September 30, 2024: member

    The Mining interface is designed with Stratum v2 in mind, and can likely also be used to incrementally improve Statum “v1” applications.

    Ocean recently announced DATUM. So far it’s proprietary and undocumented, but hopefully that changes. It could be a good test for the generality of the Mining interface to see if the DATUM gateway requires any additional methods.

    Here’s the current interface:

    https://github.com/bitcoin/bitcoin/blob/d812cf11896a2214467b6fa72d7b763bac6077c5/src/interfaces/mining.h#L47-L106

    Where createNewBlock returns:

    https://github.com/bitcoin/bitcoin/blob/d812cf11896a2214467b6fa72d7b763bac6077c5/src/interfaces/mining.h#L30-L45

    Additionally #30955 proposes to add getCoinbaseMerklePath() and submitSolution(), and https://github.com/Sjors/bitcoin/pull/52 proposes to add waitFeesChanged.

    cc @luke-jr

  2. fanquake added the label Mining on Sep 30, 2024
  3. josibake commented at 1:40 pm on October 2, 2024: member

    I think this highlights a clear advantage of having a more “generic” mining interface exposed over an IPC interface: different mining protocols can use the same interface from Bitcoin Core, without needing protocol specific1 changes for each protocol to be implemented in Bitcoin Core.

    As you mentioned, our current interface is designed with SV2 in mind, but given this is all relatively new code, it would be great to hear from the folks building DATUM whether or not this interface works out of the box and if not , what changes to the generic interface would be needed.


    1. Pragmatically, it might make sense to have a few protocol specific methods exposed in the interface for performance / simplicity, but ideally most of the protocol specific logic is managed in the process connecting to the Bitcoin Core mining interface ↩︎

  4. jonatack commented at 4:30 pm on October 2, 2024: member

    So far it’s proprietary and undocumented, but hopefully that changes.

    Agree. I believe it may be MIT-licensed and public soon. Edit: was confirmed to me with an ETA of Oct 18 or before.

  5. luke-jr commented at 4:36 pm on October 5, 2024: member

    Bitcoin Core has been working toward trying to centrally dictate mining policy, so should really not be used for mining. OCEAN/DATUM’s goal is to decentralise mining, not merely switch the central dictator from Bitmain/Foundry to Bitcoin Core.

    That being said, there is already a generic/standard mining interface: getblocktemplate. It has worked for years and nothing additional is needed for DATUM.

  6. Sjors closed this on Oct 5, 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-10-08 16:12 UTC

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