Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
xmrig committed Jan 19, 2019
2 parents 9053cca + 35b82a4 commit a3bd960
Showing 14 changed files with 42 additions and 28 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v2.9.4
- [#913](https://github.com/xmrig/xmrig/issues/913) Fixed Masari (MSR) support (this update required for upcoming fork).

# v2.9.3
- [#211](https://github.com/xmrig/xmrig-amd/pull/211) Fixed `cn/half` compute errors.
- Removed verbose messages about threads interleave.
8 changes: 4 additions & 4 deletions src/amd/OclGPU.cpp
Original file line number Diff line number Diff line change
@@ -147,7 +147,7 @@ size_t InitOpenCLGpu(int index, cl_context opencl_ctx, GpuContext* ctx, const ch
return OCL_ERR_API;
}

ctx->InputBuffer = OclLib::createBuffer(opencl_ctx, CL_MEM_READ_ONLY, 88, nullptr, &ret);
ctx->InputBuffer = OclLib::createBuffer(opencl_ctx, CL_MEM_READ_ONLY, 128, nullptr, &ret);
if (ret != CL_SUCCESS) {
LOG_ERR("Error %s when calling clCreateBuffer to create input buffer.", err_to_str(ret));
return OCL_ERR_API;
@@ -471,16 +471,16 @@ size_t XMRSetJob(GpuContext *ctx, uint8_t *input, size_t input_len, uint64_t tar
{
cl_int ret;

if (input_len > 84) {
if (input_len > 124) {
return OCL_ERR_BAD_PARAMS;
}

input[input_len] = 0x01;
memset(input + input_len + 1, 0, 88 - input_len - 1);
memset(input + input_len + 1, 0, 128 - input_len - 1);

cl_uint numThreads = ctx->rawIntensity;

if ((ret = OclLib::enqueueWriteBuffer(ctx->CommandQueues, ctx->InputBuffer, CL_TRUE, 0, 88, input, 0, nullptr, nullptr)) != CL_SUCCESS) {
if ((ret = OclLib::enqueueWriteBuffer(ctx->CommandQueues, ctx->InputBuffer, CL_TRUE, 0, 128, input, 0, nullptr, nullptr)) != CL_SUCCESS) {
LOG_ERR("Error %s when calling clEnqueueWriteBuffer to fill input buffer.", err_to_str(ret));
return OCL_ERR_API;
}
13 changes: 9 additions & 4 deletions src/amd/opencl/cryptonight.cl
Original file line number Diff line number Diff line change
@@ -451,6 +451,11 @@ __kernel void cn0(__global ulong *input, __global uint4 *Scratchpad, __global ul
State[8] = input[8];
State[9] = input[9];
State[10] = input[10];
State[11] = input[11];
State[12] = input[12];
State[13] = input[13];
State[14] = input[14];
State[15] = input[15];

((__local uint *)State)[9] &= 0x00FFFFFFU;
((__local uint *)State)[9] |= (((uint)get_global_id(0)) & 0xFF) << 24;
@@ -462,13 +467,13 @@ __kernel void cn0(__global ulong *input, __global uint4 *Scratchpad, __global ul
*/
((__local uint *)State)[10] |= (((uint)get_global_id(0) >> 8));

for (int i = 11; i < 25; ++i) {
State[i] = 0x00UL;
}

// Last bit of padding
State[16] = 0x8000000000000000UL;

for (int i = 17; i < 25; ++i) {
State[i] = 0x00UL;
}

keccakf1600_2(State);

#pragma unroll
2 changes: 1 addition & 1 deletion src/common/config/ConfigLoader.cpp
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <[email protected]>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <[email protected]>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
2 changes: 1 addition & 1 deletion src/common/config/ConfigLoader.h
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <[email protected]>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <[email protected]>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
3 changes: 2 additions & 1 deletion src/common/net/Client.cpp
Original file line number Diff line number Diff line change
@@ -342,7 +342,8 @@ bool Client::parseJob(const rapidjson::Value &params, int *code)
if (params.HasMember("algo")) {
job.setAlgorithm(params["algo"].GetString());
}
else if (params.HasMember("variant")) {

if (params.HasMember("variant")) {
const rapidjson::Value &variant = params["variant"];

if (variant.IsInt()) {
2 changes: 1 addition & 1 deletion src/common/net/Client.h
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <[email protected]>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <[email protected]>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
2 changes: 1 addition & 1 deletion src/common/net/Id.h
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <[email protected]>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <[email protected]>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
12 changes: 8 additions & 4 deletions src/common/net/Job.h
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <[email protected]>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <[email protected]>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -38,6 +38,10 @@
class Job
{
public:
// Max blob size is 84 (75 fixed + 9 variable), aligned to 96. https://github.com/xmrig/xmrig/issues/1 Thanks fireice-uk.
// SECOR increase requirements for blob size: https://github.com/xmrig/xmrig/issues/913
static constexpr const size_t kMaxBlobSize = 128;

Job();
Job(int poolId, bool nicehash, const xmrig::Algorithm &algorithm, const xmrig::Id &clientId);
~Job();
@@ -95,13 +99,13 @@ class Job
size_t m_size;
uint64_t m_diff;
uint64_t m_target;
uint8_t m_blob[96]; // Max blob size is 84 (75 fixed + 9 variable), aligned to 96. https://github.com/xmrig/xmrig/issues/1 Thanks fireice-uk.
uint8_t m_blob[kMaxBlobSize];
xmrig::Algorithm m_algorithm;
xmrig::Id m_clientId;
xmrig::Id m_id;

# ifdef XMRIG_PROXY_PROJECT
char m_rawBlob[176];
char m_rawBlob[kMaxBlobSize * 2 + 8];
char m_rawTarget[24];
# endif
};
6 changes: 3 additions & 3 deletions src/common/net/Pool.cpp
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <[email protected]>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 SChernykh <https://github.com/SChernykh>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
@@ -106,8 +106,8 @@ bool Pool::isCompatible(const xmrig::Algorithm &algorithm) const
}

# ifdef XMRIG_PROXY_PROJECT
if (m_algorithm.algo() == xmrig::CRYPTONIGHT && algorithm.algo() == xmrig::CRYPTONIGHT && m_algorithm.variant() == xmrig::VARIANT_XTL) {
return true;
if (m_algorithm.algo() == xmrig::CRYPTONIGHT && algorithm.algo() == xmrig::CRYPTONIGHT) {
return m_algorithm.variant() == xmrig::VARIANT_XTL || m_algorithm.variant() == xmrig::VARIANT_MSR;
}
# endif

2 changes: 1 addition & 1 deletion src/common/net/Pool.h
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
* Copyright 2016 Jay D Dee <[email protected]>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <[email protected]>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
@@ -27,15 +27,15 @@
#define APP_ID "xmrig-amd"
#define APP_NAME "XMRig-AMD"
#define APP_DESC "XMRig OpenCL miner"
#define APP_VERSION "2.9.3"
#define APP_VERSION "2.9.4-dev"
#define APP_DOMAIN "xmrig.com"
#define APP_SITE "www.xmrig.com"
#define APP_COPYRIGHT "Copyright (C) 2016-2018 xmrig.com"
#define APP_KIND "amd"

#define APP_VER_MAJOR 2
#define APP_VER_MINOR 9
#define APP_VER_PATCH 3
#define APP_VER_PATCH 4

#ifdef _MSC_VER
# if (_MSC_VER >= 1910)
4 changes: 2 additions & 2 deletions src/workers/OclWorker.cpp
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <[email protected]>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <[email protected]>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
7 changes: 4 additions & 3 deletions src/workers/OclWorker.h
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <[email protected]>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <[email protected]>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
#ifndef XMRIG_OCLWORKER_H
#define XMRIG_OCLWORKER_H


#include <atomic>


@@ -71,7 +72,7 @@ class OclWorker : public IWorker
uint32_t m_pausedNonce;
uint64_t m_count;
uint64_t m_sequence;
uint8_t m_blob[96]; // Max blob size is 84 (75 fixed + 9 variable), aligned to 96. https://github.com/xmrig/xmrig/issues/1 Thanks fireice-uk.
uint8_t m_blob[Job::kMaxBlobSize];
};


0 comments on commit a3bd960

Please sign in to comment.