Stratum Implementation for Besu

PegaSysEng

stratum, pantheon, mining

Currently [Besu](https://github.com/hyperledger/besu) only supports CPU based Ethash mining. This is known to be insufficient, even for test networks. This bounty is to add support for the various mining APIs that would enable miners to use a single Besu node while mining across multiple GPUs. The documentation around mining protocols is known to be fuzzy and incomplete. As part of this bounty research will need to be done to identify the following: 1. Mining software that should be supported (such as Claymore and ethminer) 1. Protocols that need to be supported for (such as stratum over TCP or HTTP) 1. The implementation details of those protocols (such as [open-ethereum-pool’s](https://github.com/sammy007/open-ethereum-pool/blob/master/docs/STRATUM.md) implementation). It is thought that implementing Stratum 1 `stratum+tcp`, followed by the eth_getWork eth_submitWork `http`, and possibly stratum 2 and ethereum-stratum would be sufficient, although those opinions are not strongly held. If implementers feel that different stratum protocols should be done then the reasoning justifying that should be included in the submission. ### A good implementation will: * Include a sound justification for the chosen mining software and protocols implemented. **Before beginning to implement, please share your approach on the issue so that our team can give you proactive comments.** * Have CLI flags to start Besu in a GPU enabled mining mode * Besu will prepare blocks * Besu will not do any mining itself * Publish blocks that are reported by miners once the new Proof of Work is validated * Document setup flags and configuration for at least one major mining client ### Submission Requirements * **Before beginning to implement, please share your approach on the issue so that our team can give you proactive comments.** * Implement needed APIs and protocols to offload mining activities to one or more existing GPU based mining programs. * Unit tests to validate the APIs Integration tests to validate the APIs and demonstrate correct behavior * All submitted code must be Apache 2.0 licensed and the Contributor Licence Agreement signed for such code * All new libraries and dependencies must be Apache 2.0 friendly * A `demo.md` file that explains how PegaSys engineers can verify that the code works as intended, ideally without the use of 3rd party tools other than the identified Ethereum Mining programs. ### Judging Criteria The bounty will be awarded to the best submission based on successful PoW generation, code and testing quality, compliance with Contribution Guidelines, performance speed, maintenance burdens, and the Submission Requirements above, according to PegaSys. Before beginning to implement, please share your approach on the issue so that our team can give you proactive comments. ### Bounty: 6,500 DAI