Enabled RYO
This commit is contained in:
parent
57e8fe51e3
commit
aab5b7f55e
2 changed files with 33 additions and 28 deletions
|
@ -6,7 +6,7 @@ option(WITH_HWLOC "Enable hwloc support" ON)
|
|||
option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON)
|
||||
option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON)
|
||||
option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
|
||||
option(WITH_CN_GPU "Enable CryptoNight-GPU algorithm" OFF)
|
||||
option(WITH_CN_GPU "Enable CryptoNight-GPU algorithm" ON)
|
||||
option(WITH_RANDOMX "Enable RandomX algorithms family" ON)
|
||||
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
|
||||
option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON)
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
|
@ -16,50 +22,49 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef XMRIG_ETHSTRATUMCLIENT_H
|
||||
#define XMRIG_ETHSTRATUMCLIENT_H
|
||||
#ifndef XMRIG_OCLRYORUNNER_H
|
||||
#define XMRIG_OCLRYORUNNER_H
|
||||
|
||||
|
||||
#include "base/net/stratum/Client.h"
|
||||
|
||||
|
||||
#include <utility>
|
||||
#include "backend/opencl/runners/OclBaseRunner.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
class EthStratumClient : public Client
|
||||
class Cn00RyoKernel;
|
||||
class Cn0Kernel;
|
||||
class Cn1RyoKernel;
|
||||
class Cn2RyoKernel;
|
||||
|
||||
|
||||
class OclRyoRunner : public OclBaseRunner
|
||||
{
|
||||
public:
|
||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(EthStratumClient)
|
||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(OclRyoRunner)
|
||||
|
||||
EthStratumClient(int id, const char *agent, IClientListener *listener);
|
||||
~EthStratumClient() override = default;
|
||||
OclRyoRunner(size_t index, const OclLaunchData &data);
|
||||
|
||||
~OclRyoRunner() override;
|
||||
|
||||
protected:
|
||||
int64_t submit(const JobResult &result) override;
|
||||
void login() override;
|
||||
void onClose() override;
|
||||
|
||||
bool handleResponse(int64_t id, const rapidjson::Value &result, const rapidjson::Value &error) override;
|
||||
void parseNotification(const char *method, const rapidjson::Value ¶ms, const rapidjson::Value &error) override;
|
||||
|
||||
void setExtraNonce(const rapidjson::Value &nonce);
|
||||
size_t bufferSize() const override;
|
||||
void run(uint32_t nonce, uint32_t *hashOutput) override;
|
||||
void set(const Job &job, uint8_t *blob) override;
|
||||
void build() override;
|
||||
void init() override;
|
||||
|
||||
private:
|
||||
const char *errorMessage(const rapidjson::Value &error) const;
|
||||
void authorize();
|
||||
void onAuthorizeResponse(const rapidjson::Value &result, bool success, uint64_t elapsed);
|
||||
void onSubscribeResponse(const rapidjson::Value &result, bool success, uint64_t elapsed);
|
||||
void subscribe();
|
||||
|
||||
bool m_authorized = false;
|
||||
std::pair<uint64_t, String> m_extraNonce{};
|
||||
cl_mem m_scratchpads = nullptr;
|
||||
cl_mem m_states = nullptr;
|
||||
Cn00RyoKernel *m_cn00 = nullptr;
|
||||
Cn0Kernel *m_cn0 = nullptr;
|
||||
Cn1RyoKernel *m_cn1 = nullptr;
|
||||
Cn2RyoKernel *m_cn2 = nullptr;
|
||||
};
|
||||
|
||||
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
#endif /* XMRIG_ETHSTRATUMCLIENT_H */
|
||||
#endif // XMRIG_OCLRYORUNNER_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue