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_LITE "Enable CryptoNight-Lite algorithms family" ON)
|
||||||
option(WITH_CN_HEAVY "Enable CryptoNight-Heavy 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_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_RANDOMX "Enable RandomX algorithms family" ON)
|
||||||
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
|
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
|
||||||
option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON)
|
option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON)
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
/* XMRig
|
/* 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 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef XMRIG_ETHSTRATUMCLIENT_H
|
#ifndef XMRIG_OCLRYORUNNER_H
|
||||||
#define XMRIG_ETHSTRATUMCLIENT_H
|
#define XMRIG_OCLRYORUNNER_H
|
||||||
|
|
||||||
|
|
||||||
#include "base/net/stratum/Client.h"
|
#include "backend/opencl/runners/OclBaseRunner.h"
|
||||||
|
|
||||||
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
|
|
||||||
|
|
||||||
class EthStratumClient : public Client
|
class Cn00RyoKernel;
|
||||||
|
class Cn0Kernel;
|
||||||
|
class Cn1RyoKernel;
|
||||||
|
class Cn2RyoKernel;
|
||||||
|
|
||||||
|
|
||||||
|
class OclRyoRunner : public OclBaseRunner
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(EthStratumClient)
|
XMRIG_DISABLE_COPY_MOVE_DEFAULT(OclRyoRunner)
|
||||||
|
|
||||||
EthStratumClient(int id, const char *agent, IClientListener *listener);
|
OclRyoRunner(size_t index, const OclLaunchData &data);
|
||||||
~EthStratumClient() override = default;
|
|
||||||
|
~OclRyoRunner() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int64_t submit(const JobResult &result) override;
|
size_t bufferSize() const override;
|
||||||
void login() override;
|
void run(uint32_t nonce, uint32_t *hashOutput) override;
|
||||||
void onClose() override;
|
void set(const Job &job, uint8_t *blob) override;
|
||||||
|
void build() override;
|
||||||
bool handleResponse(int64_t id, const rapidjson::Value &result, const rapidjson::Value &error) override;
|
void init() override;
|
||||||
void parseNotification(const char *method, const rapidjson::Value ¶ms, const rapidjson::Value &error) override;
|
|
||||||
|
|
||||||
void setExtraNonce(const rapidjson::Value &nonce);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const char *errorMessage(const rapidjson::Value &error) const;
|
cl_mem m_scratchpads = nullptr;
|
||||||
void authorize();
|
cl_mem m_states = nullptr;
|
||||||
void onAuthorizeResponse(const rapidjson::Value &result, bool success, uint64_t elapsed);
|
Cn00RyoKernel *m_cn00 = nullptr;
|
||||||
void onSubscribeResponse(const rapidjson::Value &result, bool success, uint64_t elapsed);
|
Cn0Kernel *m_cn0 = nullptr;
|
||||||
void subscribe();
|
Cn1RyoKernel *m_cn1 = nullptr;
|
||||||
|
Cn2RyoKernel *m_cn2 = nullptr;
|
||||||
bool m_authorized = false;
|
|
||||||
std::pair<uint64_t, String> m_extraNonce{};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} /* namespace xmrig */
|
} /* namespace xmrig */
|
||||||
|
|
||||||
|
|
||||||
#endif /* XMRIG_ETHSTRATUMCLIENT_H */
|
#endif // XMRIG_OCLRYORUNNER_H
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue