Compare commits

...

614 Commits

Author SHA1 Message Date
xmrig
5a2cf85b6c Update CHANGELOG.md 2019-01-23 19:44:14 +07:00
xmrig
80de5766ac Update CHANGELOG.md 2019-01-23 19:39:55 +07:00
XMRig
2c0183dcef v2.10.0 2019-01-23 19:31:45 +07:00
XMRig
8a90fc699e Merge branch 'dev' 2019-01-23 19:29:54 +07:00
XMRig
b1816005fd Sync changes with proxy. 2019-01-21 19:16:49 +07:00
XMRig
f478fa843d Better fix for memory allocation, thanks @SChernykh. 2019-01-21 17:27:45 +07:00
XMRig
046c345f65 Fix memory allocation. 2019-01-21 01:44:15 +07:00
XMRig
9692f92c6b New default value for max-cpu-usage option is 100 (instead of 75) also this option now deprecated. 2019-01-21 00:37:36 +07:00
XMRig
bc26d2ede6 #904 Add ASM implementation. 2019-01-21 00:32:24 +07:00
XMRig
36b01f136f #904 Initial support for "cn-pico/trtl". 2019-01-20 19:52:44 +07:00
XMRig
ca43d155d8 v2.9.5-dev 2019-01-20 15:13:01 +07:00
XMRig
e04d0f504c Merge branch 'master' into dev 2019-01-20 15:12:26 +07:00
XMRig
acca8f79cf v2.9.4 2019-01-19 23:55:30 +07:00
XMRig
2c38f693d7 Merge branch 'dev' 2019-01-19 23:54:50 +07:00
xmrig
4faa95b460 Update CHANGELOG.md 2019-01-19 23:53:39 +07:00
xmrig
5f9ebdf149 Merge pull request #915 from SChernykh/dev
Make JIT memory read-only after patching is done
2019-01-19 17:55:54 +07:00
SChernykh
31a571dc70 Make JIT memory read-only after patching is done 2019-01-19 11:22:54 +01:00
XMRig
897ff83dcd #913 Increase max blob size for MSR secor upgrade. 2019-01-18 21:44:44 +07:00
XMRig
a63794ccd6 v2.9.4-dev 2019-01-17 20:43:25 +07:00
XMRig
b15e605614 Merge branch 'master' into dev 2019-01-17 20:41:52 +07:00
XMRig
18335392a1 Merge branch 'master' of github.com:xmrig/xmrig 2019-01-17 12:22:00 +07:00
XMRig
b1c22da6a1 v2.9.3 2019-01-17 12:21:39 +07:00
xmrig
b95ff65eae Update CHANGELOG.md 2019-01-17 12:20:37 +07:00
xmrig
005a09cd98 Merge pull request #912 from SChernykh/master
Correct FP rounding mode for cn/half
2019-01-17 12:12:03 +07:00
SChernykh
e0f5066ded Correct FP rounding mode for cn/half 2019-01-17 00:49:48 +01:00
XMRig
2b15bcbb4f Don't use __builtin___clear_cache on FreeBSD. 2019-01-16 17:53:47 +07:00
xmrig
db646d5d2d Merge pull request #910 from ehaupt/patch-1
FreeBSD needs pthread
2019-01-16 17:50:53 +07:00
Emanuel Haupt
b58e20dde4 FreeBSD needs pthread
FreeBSD needs the pthread linker flag.
2019-01-16 10:55:45 +01:00
XMRig
b11e772acc v2.9.2 2019-01-16 09:17:35 +07:00
xmrig
d1bc03351b Merge pull request #907 from SChernykh/master
Fixed crash in patchCode() on Linux
2019-01-16 09:09:51 +07:00
SChernykh
d1f551da2c Fixed compilation error on Windows 2019-01-16 00:24:34 +01:00
SChernykh
6425c53d61 Fixed crash in patchCode() on Linux 2019-01-16 00:09:00 +01:00
XMRig
118e547175 Restored compatibility with https://stellite.hashvault.pro. 2019-01-16 02:22:29 +07:00
XMRig
d696daf5af Merge branch 'dev' 2019-01-16 00:42:06 +07:00
xmrig
ac60d9426c Update README.md 2019-01-16 00:34:48 +07:00
XMRig
209796a07e v2.9.0 2019-01-16 00:32:02 +07:00
XMRig
a1f19305f4 Merge branch 'dev' 2019-01-16 00:30:15 +07:00
xmrig
dd3243aa70 Update CHANGELOG.md 2019-01-16 00:28:49 +07:00
XMRig
09893bfd36 Fix warnings on macOS. 2019-01-15 18:28:35 +07:00
XMRig
a98c475a3c Fixed wrong ASM code alignment on macOS, thanks @SChernykh. 2019-01-15 18:18:04 +07:00
XMRig
59b147b6fb Merge branch 'pr905' into dev 2019-01-15 02:18:30 +07:00
XMRig
17f28667b3 Code-style/copyright cleanup. 2019-01-15 02:15:36 +07:00
XMRig
63a62e7ea0 Merge branch 'dev' of https://github.com/SChernykh/xmrig into pr905 2019-01-15 01:37:53 +07:00
SChernykh
56cacbd5bc Fixes for Visual Studio 2019-01-14 16:38:28 +01:00
SChernykh
8b9d5cff91 Added ASM code patching when loading
For CNv2 variants with different iterations and memory size.
2019-01-14 15:34:55 +01:00
XMRig
eede1b4881 Allow ignore block version. 2019-01-14 20:59:39 +07:00
XMRig
492449e9fb #899 Add ASM implementation for cn/half. 2019-01-14 18:09:16 +07:00
XMRig
b43336582d Rename ASM files. 2019-01-13 23:00:41 +07:00
XMRig
67863a427d Rename "cn/xtlv9" to "cn/half". 2019-01-13 19:42:27 +07:00
XMRig
1382857c83 #899 Fixed ARM build. 2019-01-13 15:24:04 +07:00
XMRig
84c2cadc50 #899 Initial support for "cn/xtlv9" (C++ only). 2019-01-13 15:03:36 +07:00
XMRig
16b4fd0ff5 Update variant detection for nicehash.com and minergate.com. 2019-01-09 21:47:03 +07:00
XMRig
cfe3995aa8 Sync changes. 2019-01-09 16:43:36 +07:00
XMRig
5382216725 Merge branch 'pr857' into dev 2018-11-20 08:19:29 +07:00
XMRig
c06f77b9e9 Better compiler name and version handling on Linux and macOS for user-agent string. 2018-11-20 08:18:39 +07:00
XMRig
0c930e277b Merge branch 'upstream-osx-compilers' of https://github.com/rivoreo/xmrig into pr857 2018-11-20 08:03:05 +07:00
XMRig
2a2712ab90 Sync changes. 2018-11-20 07:24:14 +07:00
XMRig
9f6f599d78 Sync changes. 2018-11-11 03:18:56 +07:00
XMRig
a76243a65e Sync changes with proxy. 2018-11-06 00:50:28 +07:00
WHR
16babcc6bc Fix impossible to build for OS X without clang 2018-10-30 21:15:49 +08:00
XMRig
3d60b3cc62 #844 Fixed copy/paste typo in comment. 2018-10-25 14:07:15 +07:00
XMRig
acd042c234 #839 Fixed FreeBSD compile. 2018-10-24 09:55:40 +07:00
XMRig
a2e384df58 Merge branch 'feature-asm-bulldozer' into dev 2018-10-22 23:24:26 +07:00
XMRig
735180ac04 Fixed MSVC 2015 build. 2018-10-22 23:17:54 +07:00
XMRig
06a84499d7 Fixed MSYS2 build & copyright 2018-10-22 23:08:29 +07:00
XMRig
caa70a1e9d Merge branch 'dev' of https://github.com/SChernykh/xmrig into feature-asm-bulldozer 2018-10-22 22:52:53 +07:00
XMRig
deb832c9c6 Restore old method for total threads count detection. 2018-10-21 23:52:23 +07:00
XMRig
d7feb2719e v2.8.5-dev 2018-10-21 23:29:17 +07:00
SChernykh
4b91978af6 Added asm optimized code for AMD Bulldozer 2018-10-21 18:29:03 +02:00
XMRig
7e078f2d07 Merge branch 'master' into dev 2018-10-21 23:25:06 +07:00
xmrig
2b0b71b9f6 Update CHANGELOG.md 2018-10-19 10:41:32 +07:00
xmrig
938e652c45 Update CHANGELOG.md 2018-10-19 10:26:12 +07:00
xmrig
20bd22ea22 Update README.md 2018-10-19 10:19:18 +07:00
xmrig
c7c9d20b8b Update CHANGELOG.md 2018-10-19 09:59:14 +07:00
XMRig
dd6aeb26e8 v2.8.3 2018-10-19 09:56:28 +07:00
XMRig
ba0df6e973 Merge branch 'dev' 2018-10-19 09:52:09 +07:00
xmrig
a0f48adf5c Merge pull request #814 from 0xc0d32/patch-1
Update Pool.cpp
2018-10-19 09:40:00 +07:00
_0xc0d32
2b0cac5d4d Update Pool.cpp
Fixed to #813
2018-10-18 22:42:47 -03:00
XMRig
afeaabdca4 v2.8.2-dev 2018-10-15 18:22:45 +07:00
XMRig
6b584a78b2 Merge branch 'master' into dev 2018-10-15 18:21:37 +07:00
xmrig
4bf248f513 Update README.md 2018-10-09 07:41:40 +07:00
XMRig
93b54f8f44 v2.8.1 2018-10-09 07:22:23 +07:00
XMRig
dd7c776ff4 Merge branch 'dev' 2018-10-09 07:19:07 +07:00
xmrig
ff3ae25d16 Update CHANGELOG.md 2018-10-09 07:12:31 +07:00
XMRig
bdc16df418 #777 Make EOF as verbose error too. 2018-10-09 03:47:39 +07:00
XMRig
9ef59366ba Sync changes with proxy. 2018-10-09 02:32:29 +07:00
XMRig
dda8157a7b Add "--tls", "--tls-fingerprint", "--asm" and "--dry-run" to help output. 2018-10-09 01:35:33 +07:00
xmrig
023062b2f1 Update README.md 2018-10-09 01:32:07 +07:00
XMRig
ad92c3b025 Add ASM detection for builds without libcpuid. 2018-10-06 15:13:55 +03:00
xmrig
8f3d405b34 Update CHANGELOG.md 2018-10-06 14:25:59 +03:00
XMRig
20268d5291 #753 Removed unnecessary ext_family and ext_model checks. 2018-10-04 19:10:47 +03:00
XMRig
152c4f2f1b #768 Fixed build error with MSVC 2015 and enabled ASM code. 2018-10-02 17:50:19 +03:00
XMRig
c2f6c70044 #769 Fixed regression with colors. 2018-10-02 13:14:32 +03:00
XMRig
9a70f0e564 v2.8.1-dev 2018-10-02 01:22:13 +03:00
XMRig
0efd995b9b Merge branch 'master' into dev 2018-10-02 01:18:18 +03:00
xmrig
a33fbe32c6 Update README.md 2018-10-01 13:36:03 +03:00
XMRig
dc6d6bd539 v2.8.0-rc 2018-09-30 20:06:46 +03:00
XMRig
880747d0e0 Merge branch 'dev' 2018-09-30 19:59:25 +03:00
XMRig
dc67352ac5 Update default config.json. 2018-09-30 17:57:25 +03:00
xmrig
cb87c244c3 Update README.md 2018-09-30 17:44:10 +03:00
xmrig
ae25c01d36 Merge pull request #766 from Roboto12/patch-1
Update Asm.cpp
2018-09-30 17:36:07 +03:00
xmrig
fa38d97192 Update CHANGELOG.md 2018-09-30 16:20:20 +03:00
XMRig
9a173ce91e Fix default value for "restricted" option. 2018-09-29 18:05:38 +03:00
Roboto12
fbba3d1be6 Update Asm.cpp
parse(value.IsBool()) should be changed to parse(value.GetBool()), otherwise if the 'asm' parameter in config has a boolean value, it will be parse as 'true' even if it's actually 'false'.
2018-09-28 19:18:37 +03:00
xmrig
782a91f7e6 Update README.md 2018-09-28 12:37:21 +03:00
xmrig
52e871b810 Update README.md 2018-09-28 12:36:14 +03:00
XMRig
143da8380e Add "autosave" config option. 2018-09-27 19:07:04 +03:00
XMRig
a63677e255 Fix missing "asm" in generated config. 2018-09-27 17:17:19 +03:00
XMRig
850150dc00 Merge branch 'dev' of github.com:xmrig/xmrig into dev 2018-09-26 20:37:32 +03:00
XMRig
0d197f8906 New donations proxy addresses with SSL/TLS support. 2018-09-26 20:35:27 +03:00
xmrig
03b4e160ec Update CHANGELOG.md 2018-09-25 10:16:29 +03:00
xmrig
18dc19b1e8 Update CHANGELOG.md 2018-09-25 10:15:41 +03:00
XMRig
0d9db273a0 Fix template declaration. 2018-09-25 09:40:09 +03:00
XMRig
1a3de05096 Added ASM code for double hash mode, thanks @SChernykh. 2018-09-25 09:25:47 +03:00
XMRig
c9928a873d Merge branch 'feature-asm' into dev 2018-09-24 23:21:23 +03:00
XMRig
ebcdac7d13 Fixed crash when use ASM code for MSYS2, thanks @SChernykh. 2018-09-24 20:43:31 +03:00
XMRig
f4a867b70f Fix 32bit build. 2018-09-24 14:57:30 +03:00
XMRig
c2fcf23855 Implemented "asm" option. 2018-09-24 14:19:26 +03:00
XMRig
ba65a34a01 Initial ASM wrapper. 2018-09-24 09:51:21 +03:00
XMRig
f163aad38c Fix macOS/Clang build. 2018-09-23 20:45:10 +03:00
XMRig
dd27c42293 Initial compile with ASM. 2018-09-23 20:16:33 +03:00
XMRig
0c20d7a125 Auto-detect proper asm variant. 2018-09-23 19:09:05 +03:00
XMRig
c9fd8061c2 Fix Linux build. 2018-09-23 18:07:44 +03:00
XMRig
ee4d980955 Old static class Cpu replaced to interface ICpuInfo. 2018-09-23 17:51:56 +03:00
XMRig
1f609c7ebd Update libcpuid to recent git version. 2018-09-23 13:05:03 +03:00
xmrig
cf76d9254a Merge pull request #761 from SChernykh/dev
Cryptonight variant 2 - final version
2018-09-23 07:47:02 +03:00
SChernykh
d8ca5ef205 Cryptonight variant 2 - final version
Reference code: https://github.com/monero-project/monero/pull/4404

I tested it on x86 with av=1-10 and on ARM with av=1-4, self test passed.
2018-09-22 17:21:32 +02:00
XMRig
30791de5bc Don't use static OpenSSL on Linux by default. 2018-09-22 16:01:27 +03:00
XMRig
3a7e8647bb Fix for automatic variant specified by pool/proxy. 2018-09-22 15:54:31 +03:00
xmrig
f1a1e0814c Update CHANGELOG.md 2018-09-22 08:54:56 +03:00
xmrig
feb1a758c1 Update CHANGELOG.md 2018-09-22 08:42:15 +03:00
XMRig
0adad68471 # Fixed send buffer overflow and increase send buffer size. 2018-09-20 07:33:32 +03:00
XMRig
dc76879188 Merge branch 'feature-tls' into dev 2018-09-18 04:13:40 +03:00
XMRig
bcd27ca259 Sync changes. 2018-09-18 04:04:25 +03:00
XMRig
4c4e0593a7 Enable TLS by default. 2018-09-17 09:24:18 +03:00
XMRig
2189fe94ed Fix Linux build. 2018-09-17 06:37:53 +03:00
XMRig
a2d2c0418d Fix gcc build with OpenSSL 1.1.1 2018-09-17 01:43:44 +03:00
XMRig
1059189e2c Skip TLS pools if miner built without TLS support. 2018-09-17 01:02:17 +03:00
XMRig
7da9e7a599 Added TLS fingerprint validation. 2018-09-16 08:14:22 +03:00
XMRig
bc9130ded3 Show TLS version. 2018-09-16 06:35:49 +03:00
XMRig
2f3939396e Move shared summary to xmrig::CommonConfig. 2018-09-16 05:04:20 +03:00
XMRig
14ac7b556e Initial TLS support. 2018-09-16 03:06:54 +03:00
XMRig
812cd9760f Added debug thread log. 2018-09-15 16:48:57 +03:00
XMRig
93216a51f4 Fix compile error on macOS. 2018-09-14 22:04:52 +03:00
XMRig
357fbac62b Suppress rapidjson warnings on gcc 8 2018-09-14 21:42:42 +03:00
XMRig
0bc9016124 v2.8.0-dev 2018-09-13 11:20:10 +03:00
XMRig
310ad7fa37 Merge branch 'feature-cn-variant2' into dev 2018-09-13 11:16:10 +03:00
XMRig
23914e9a9f "xmrig::cn_uses_variant1" replaced to "xmrig::cn_base_variant". 2018-09-10 18:35:12 +03:00
XMRig
bb3990a076 Rewrite automatic variant handling. 2018-09-03 15:39:55 +03:00
XMRig
a27dfa8b70 Add WITH_DEBUG_LOG CMake option. 2018-09-03 01:26:19 +03:00
XMRig
a3873930a0 Fixed automatic variant. 2018-09-01 00:31:31 +03:00
XMRig
b948474d01 Small fixes. 2018-09-01 00:00:38 +03:00
XMRig
85946b0c40 Fixed numeric variant 2 in config file. 2018-08-31 23:55:50 +03:00
XMRig
075565e6fa Fix invalid hashes with gcc 7.1. 2018-08-31 23:32:33 +03:00
XMRig
eef4d9b102 Fixed 32 bit support. 2018-08-31 23:19:10 +03:00
XMRig
f11aad515b Fixed gcc build. 2018-08-31 21:51:34 +03:00
XMRig
85b829a1e3 Merge branch 'dev' of https://github.com/SChernykh/xmrig into feature-cn-variant2 2018-08-31 19:46:15 +03:00
XMRig
73fca9114e * Fixed API ID collision. 2018-08-31 18:30:51 +03:00
XMRig
57479cef8c Sync changes. 2018-08-31 18:01:15 +03:00
SChernykh
ea1658c818 Fixed spaces 2018-08-29 20:27:17 +02:00
SChernykh
7c4b718789 Fixed performance degradation for v0 & v1 2018-08-29 20:15:08 +02:00
SChernykh
f151c7131d Removed excess code for v0 & v1 2018-08-29 19:52:33 +02:00
SChernykh
36a562e1f1 Cryptonight variant 2 support
Reference code: https://github.com/monero-project/monero/pull/4218
2018-08-28 23:42:15 +02:00
xmrig
dd8590e6c8 Update ALGORITHMS.md 2018-07-29 19:23:55 +07:00
XMRig
f7b029eb05 Sync changes with AMD miner. 2018-07-20 03:37:07 +07:00
XMRig
e8d6514bd3 2.6.5-dev 2018-07-20 03:18:38 +07:00
XMRig
95092bfadb Merge branch 'master' into dev 2018-07-20 03:06:59 +07:00
xmrig
08e791b60d Update README.md 2018-07-12 02:11:25 +07:00
XMRig
6b7030cd6f v2.6.4 2018-07-12 00:48:30 +07:00
XMRig
b736f0a558 Merge branch 'dev' 2018-07-12 00:39:30 +07:00
xmrig
807b2e9d6e Update ALGORITHMS.md 2018-07-11 20:51:30 +07:00
xmrig
034d2f0c08 Update ALGORITHMS.md 2018-07-11 20:50:55 +07:00
xmrig
4a39321d74 Update CHANGELOG.md 2018-07-11 20:42:16 +07:00
XMRig
0041e9f0c1 Add new algorithms for ARM. 2018-07-10 00:29:16 +07:00
XMRig
969a26fb5d Optimize cn-heavy/tube. 2018-07-09 22:28:53 +07:00
XMRig
dac12a122f Add cn-heavy/tube. 2018-07-09 20:21:53 +07:00
XMRig
2702b6ffc8 Add reference hashes for cn/xao and cn/rto. 2018-07-09 16:54:39 +07:00
XMRig
25bac30862 Added "cn/xao" and "cn/rto". 2018-07-09 16:12:45 +07:00
XMRig
a8de81a51b #714 Simplify cn-heavy/xhv. 2018-07-09 00:23:27 +07:00
XMRig
b719bbfefc Better variant detection for nicehash.com and minergate.com. 2018-06-16 16:08:08 +07:00
XMRig
de6ee749fe #692 Add support for global algorithm variant. 2018-06-14 23:49:30 +07:00
XMRig
33d9094cdc Sync changes with proxy. 2018-06-14 21:49:27 +07:00
XMRig
63fed427f4 2.6.4-dev 2018-06-14 21:25:57 +07:00
XMRig
ae89ca0a5f Merge branch 'master' into dev 2018-06-14 21:06:09 +07:00
XMRig
25dce61369 Merge branch 'dev' 2018-06-13 21:49:13 +07:00
xmrig
8cb7483b2c Update README.md 2018-06-13 21:43:47 +07:00
xmrig
1e2fde0df1 Update CHANGELOG.md 2018-06-11 18:34:24 +07:00
XMRig
859515315c v2.6.3 2018-06-11 16:09:50 +07:00
XMRig
7f169e391d Merge branch 'dev' 2018-06-11 16:05:57 +07:00
XMRig
6a7a7ada2e Fix ARM build. 2018-06-11 15:44:45 +07:00
xmrig
21b2e2ca1e Update CHANGELOG.md 2018-06-11 15:23:06 +07:00
XMRig
1d31f1b0b8 Fix command line option "-a cn-heavy". 2018-06-11 12:26:49 +07:00
XMRig
dab4239aca Added support for cn-heavy/xhv. 2018-06-11 12:00:59 +07:00
XMRig
8908c2c027 Added support for "cn/msr" also known as "cn-fast". 2018-06-10 19:48:34 +07:00
XMRig
974cb4162a Fix Linux build. 2018-06-07 07:17:30 +07:00
XMRig
dba78717fa Move dry-run option to common code. 2018-06-05 11:48:31 +07:00
XMRig
48a214c3f1 Move files. 2018-06-05 07:34:58 +07:00
XMRig
e320b2e928 #672 Reverted back "cryptonight-light" and exit if no valid algorithm specified. 2018-06-04 02:09:29 +07:00
XMRig
1748a7bd57 Fix double hash mode too. 2018-06-03 05:42:10 +07:00
XMRig
6cf24936df #551 Fixed cn-heavy for ARMv8. 2018-06-03 02:56:49 +07:00
XMRig
651637d637 #446 Better fix, second variable always aligned. 2018-06-03 00:22:26 +07:00
XMRig
26ee5028e1 Use native checks instead of XMRIG_ARMv8. 2018-06-03 00:09:59 +07:00
XMRig
d900a6d9dd #446 Fixed SIGBUS error on 32 bit ARM CPUs. 2018-06-02 04:37:12 +07:00
XMRig
5d6a622b18 New detailed hashrate report. 2018-06-01 02:33:21 +07:00
XMRig
009bd1a507 Sync changes with amd miner and update summary. 2018-06-01 01:48:31 +07:00
XMRig
34a3454784 Small fix in CMakeLists.txt. 2018-05-20 14:27:46 +07:00
XMRig
14f0e8658c Sync changes with proxy. 2018-05-19 14:44:50 +07:00
XMRig
6dda4ad41c Merge branch 'feature-log-enhancement' into dev 2018-05-19 14:33:26 +07:00
XMRig
2b3f7f43ce Fix Linux build. 2018-05-19 13:47:27 +07:00
XMRig
5019493332 Correctly reset colors in FileLog. 2018-05-19 13:06:49 +07:00
XMRig
0086020b5c Optimize logs architecture. 2018-05-19 11:48:15 +07:00
XMRig
adc6adb6d5 Merge branch 'master' into dev 2018-05-19 11:06:17 +07:00
xmrig
8ab9f0f860 Merge pull request #629 from rivoreo/upstream-fix-log-file
#629 Fix FileLog (--log-file) fails on non-seekable files
2018-05-17 11:52:43 +07:00
WHR
19f409a85b Fix FileLog error 'invalid seek' on non-seekable files 2018-05-15 03:12:12 +08:00
XMRig
6a4f817693 #615 Fixed build without libcpuid. 2018-05-08 06:19:10 +07:00
XMRig
4cd7af3da1 Merge branch 'master' of github.com:xmrig/xmrig 2018-05-08 02:39:27 +07:00
XMRig
d7d3fec058 #614 Fix display issue with huge pages percentage when colors disabled. 2018-05-08 02:39:11 +07:00
xmrig
8d61df7cc9 Update README.md 2018-05-07 14:27:48 +07:00
xmrig
b383a382eb Update README.md 2018-05-07 02:37:23 +07:00
xmrig
bee1285e3a Update CHANGELOG.md 2018-05-07 02:17:20 +07:00
XMRig
c89889cc57 #607 Fixed donation bug. 2018-05-07 02:09:25 +07:00
XMRig
a1c5afa383 Fix Termux build. 2018-05-07 00:56:39 +07:00
XMRig
a00024cf51 Fixed ARMv8 build. 2018-05-05 22:44:20 +07:00
XMRig
a5325d9021 Merge branch 'master' into dev 2018-05-05 19:32:30 +07:00
xmrig
719b1cb90f Update README.md 2018-05-05 15:36:21 +07:00
XMRig
8530e6c4a5 v2.6.1 2018-05-05 14:22:32 +07:00
XMRig
6605e1f6f2 Merge branch 'dev' 2018-05-05 14:11:36 +07:00
XMRig
1f1bdcde51 Fix av option in generated config. 2018-05-04 03:31:17 +07:00
XMRig
298cf37121 Force variant 1 if no algorithm specified. 2018-05-04 03:19:42 +07:00
XMRig
c4a2dcc1fb Merge branch 'dev' of github.com:xmrig/xmrig into dev 2018-05-04 01:01:24 +07:00
XMRig
dfe20e116b Fix color issues. 2018-05-04 01:01:05 +07:00
xmrig
68e953345f Update ALGORITHMS.md 2018-05-03 22:20:36 +07:00
XMRig
b98d44ce10 Update CHANGELOG.md. 2018-05-03 22:17:40 +07:00
XMRig
734c0dbce1 Use block version to detect proper XTL variant and use variant 1 by default for cryptonight. 2018-05-03 20:16:42 +07:00
XMRig
1ab0829ab3 Added doc/ALGORITHMS.md. 2018-05-03 19:31:54 +07:00
XMRig
3da5823905 Remove obsolete tests. 2018-05-03 04:15:36 +07:00
XMRig
b533644f3f v2.6.1-dev 2018-05-03 04:12:53 +07:00
XMRig
7badca3aa5 Merge branch 'feature-algo' into dev 2018-05-03 01:02:30 +07:00
XMRig
3ca7f3eece Sync changes with proxy. 2018-05-03 00:37:01 +07:00
XMRig
9c23186172 Sync changes with proxy. 2018-04-30 18:17:07 +07:00
XMRig
2b0309e159 Sync changes with proxy. 2018-04-29 14:24:44 +07:00
XMRig
be232fa1f2 Also support variant received as string. 2018-04-27 00:40:22 +07:00
XMRig
3df99fbced Add Stellite (XTL) support as cn/xtl. 2018-04-27 00:28:52 +07:00
XMRig
85f9bd97f1 Verify & send algorithm name. 2018-04-26 23:27:53 +07:00
XMRig
2ddac1ce68 Silence primary pool errors if failover active. 2018-04-26 15:28:33 +07:00
XMRig
41e8c4f887 Send supported algorithms to pool in login request. 2018-04-26 15:02:01 +07:00
XMRig
bc2660f509 Add support for skip invalid pools. 2018-04-25 23:17:27 +07:00
XMRig
230962230f Better algorithm validation. 2018-04-25 22:03:26 +07:00
XMRig
a9cc5c5258 Basic algo selection from pool/proxy. 2018-04-25 19:09:08 +07:00
XMRig
ba5f92c6dd Added support for cn-lite/ipbc. 2018-04-25 18:31:18 +07:00
XMRig
ca149d2eed Sync changes with proxy. 2018-04-25 14:48:32 +07:00
XMRig
b9fec2fcc4 Added support for "rig id" protocol extension. 2018-04-23 13:20:43 +07:00
XMRig
6d40f2dd1a Sync changes with proxy. 2018-04-23 00:59:58 +07:00
XMRig
54c3cd5494 Merge branch 'dev' into feature-algo 2018-04-23 00:42:36 +07:00
XMRig
fe7cfddd29 Merge branch 'master' into dev 2018-04-23 00:37:11 +07:00
xmrig
8d9025f2ca Update README.md 2018-04-22 22:47:05 +07:00
XMRig
38874fbb0a Added workaround for nicehash.com if you use cryptonightv7.<region>.nicehash.com option variant=1 will be set automatically. 2018-04-22 12:57:37 +07:00
xmrig
90a09f20b3 Update CHANGELOG.md 2018-04-21 22:52:06 +07:00
XMRig
7365e0486b Disable IPv6 for API. 2018-04-21 22:35:26 +07:00
XMRig
593056113c #541 Revert all changes in Client::close(). 2018-04-21 22:23:12 +07:00
xmrig
c48e0821c5 Merge pull request #570 from AngeGallego/fix-conditional-jump
Valgrind showed conditonal jumps when printing the hashrate
2018-04-21 22:19:53 +07:00
XMRig
259a1774ca Fix Linux build. 2018-04-21 21:41:39 +07:00
xmrig
888d80240d Merge pull request #559 from chinarulezzz/master
log/Log.cpp: va_list 'args' was opened but not closed by va_end()
2018-04-21 21:35:41 +07:00
XMRig
45e8a0525c Prepare for per pool and per job algorithms. 2018-04-21 19:55:51 +07:00
Ange
f9dbd7bc78 valgrind showed some conditional jumps when printing the hashrate 2018-04-21 00:36:58 +02:00
XMRig
274992e50d Basic cryptonight-ipbc definition. 2018-04-21 00:19:33 +07:00
XMRig
8fe264bbd7 Move Job to common. 2018-04-20 23:44:32 +07:00
XMRig
36a612af9a Move logging code to common folder. 2018-04-20 18:54:58 +07:00
XMRig
98e7308597 Move keccak to common code. 2018-04-20 14:45:51 +07:00
XMRig
2d22f2aeff Move shared network code to common folder. 2018-04-20 13:44:30 +07:00
xmrig
a9178bd468 Update README.md 2018-04-20 11:13:00 +07:00
XMRig
78e2c12202 Fix msvc build. 2018-04-20 10:36:41 +07:00
XMRig
2d2e60a197 Fix x86 build. 2018-04-20 10:14:33 +07:00
xmrig
3f85b11e12 Update CHANGELOG.md 2018-04-19 21:19:00 +07:00
XMRig
91dd5fe68a v2.6.0-beta3 2018-04-19 20:57:23 +07:00
XMRig
fe1649a2c1 Revert old Client::close. 2018-04-19 20:29:23 +07:00
XMRig
9be897eb6b Merge remote-tracking branch 'remotes/origin/feature-advanced-threads' into dev 2018-04-19 19:45:29 +07:00
XMRig
14576f599c Fix ARMv7 build. 2018-04-19 19:44:17 +07:00
XMRig
e119f7f402 Rearrange test vectors, for catch cn-heavy bug. 2018-04-19 13:50:06 +07:00
XMRig
ad94e9a7d2 Simplify ARM implementation. 2018-04-19 11:54:11 +07:00
XMRig
bc67216f7f Added API docs and bug fixes. 2018-04-18 09:58:06 +07:00
chinarulezzz
0814c28998 log/Log.cpp: va_list 'args' was opened but not closed by va_end() 2018-04-17 23:24:31 +03:00
XMRig
d04a1fcb8f Add extra information to threads API. 2018-04-17 14:36:32 +07:00
XMRig
c0a72edf9a Added hashrate information to "GET /1/threads" endpoint. 2018-04-17 10:51:29 +07:00
XMRig
c221bf09f6 Use direct access to hashrate in API. 2018-04-17 10:29:37 +07:00
XMRig
b32ec5342e Fixed automatic threads mode for --av above 4 2018-04-17 09:42:53 +07:00
XMRig
9e3f2ae9f9 Added x3 x4 x5 hashing modes. 2018-04-16 15:40:37 +07:00
XMRig
dba1acd302 Finalize config changes. 2018-04-15 21:41:03 +07:00
XMRig
f8bf48a522 Added config only boolean option "hw-aes". 2018-04-15 19:25:09 +07:00
XMRig
f0158ae505 Fix again. 2018-04-15 15:10:41 +07:00
XMRig
6de83dddd6 Fix wrong memory usage displayed for cn-lite. 2018-04-15 15:01:41 +07:00
XMRig
e2d85d78a7 Added information about started threads. 2018-04-15 14:49:39 +07:00
XMRig
6b4f2d0a91 Fixed ARM build. 2018-04-15 12:58:17 +07:00
XMRig
8716f362f8 Fixed HW AES detection. 2018-04-15 11:36:48 +07:00
XMRig
9125b6c251 Rewrite memory allocation. 2018-04-15 11:08:47 +07:00
XMRig
4b71b7aa29 Added class MultiWorker and remove classes SingleWorker and DoubleWorker. 2018-04-14 22:14:57 +07:00
XMRig
c81401ab2d Basic advanced config reader, only single hash supported. 2018-04-14 07:01:12 +07:00
XMRig
c44b299750 Added reader for advanced threads. 2018-04-13 17:59:27 +07:00
XMRig
9ce9147dad Use new method to set affinity. 2018-04-13 09:27:37 +07:00
XMRig
c1800094d0 Move Platform. 2018-04-13 07:23:01 +07:00
XMRig
a6b698d4eb Move common parts of API. 2018-04-13 07:12:53 +07:00
XMRig
51422f4b1e Move xmrig.h to common/xmrig.h. 2018-04-13 07:00:51 +07:00
XMRig
f197f6b1eb Changed directory structure. 2018-04-13 06:38:18 +07:00
XMRig
01c8245846 #548 Fixed macOS build. 2018-04-13 05:05:53 +07:00
XMRig
b13640e4a1 Fixes for build without cn-lite and cn-heavy. 2018-04-12 11:38:43 +07:00
XMRig
a73ad9b089 Fixed build with APP_DEBUG. 2018-04-11 08:29:02 +07:00
XMRig
1ebaf677e0 Move static algo name conversions to Pool class. 2018-04-11 06:39:24 +07:00
XMRig
36ef254c73 Rename class Url to Pool. 2018-04-11 06:09:34 +07:00
XMRig
ad7545d149 Refactoring. 2018-04-11 03:52:23 +07:00
XMRig
3924a16048 Merge branch 'dev' of github.com:xmrig/xmrig into dev 2018-04-10 23:23:11 +07:00
XMRig
0bfd409bdf Remove unused class UploadCtx. 2018-04-10 23:22:49 +07:00
xmrig
916ff33058 Update CHANGELOG.md 2018-04-10 03:56:19 +07:00
xmrig
30903686bd Update README.md 2018-04-10 00:30:06 +07:00
XMRig
82e1138158 v2.6.0-beta2 2018-04-09 23:50:01 +07:00
XMRig
ccbb78d4e9 Improved performance for cryptonight v7. 2018-04-09 21:56:15 +07:00
XMRig
5b664f3681 Fix nonce calculation for --av 4. 2018-04-09 21:21:46 +07:00
XMRig
77207eaaae Fix build with APP_DEBUG. 2018-04-09 20:38:02 +07:00
XMRig
de83cfd53c #519 Fix donation start time randomization. 2018-04-08 22:19:21 +07:00
XMRig
eb56c2b56e Better implementation for algorithm aliases. 2018-04-08 03:20:44 +07:00
XMRig
bb2faaddc0 Added short aliases for algorithm names: cn, cn-lite and cn-heavy. 2018-04-08 02:44:31 +07:00
xmrig
1c2b5acb2c Update README.md 2018-04-08 02:31:04 +07:00
xmrig
89c095f79e Update CHANGELOG.md 2018-04-07 01:21:56 +07:00
XMRig
dff7636701 Merge branch 'dev' of github.com:xmrig/xmrig into dev 2018-04-07 01:18:22 +07:00
XMRig
3b83fa530c #499 Disabled IPv6 for internal HTTP API by default, was cause issues on some systems. 2018-04-07 01:17:58 +07:00
xmrig
bca087f111 Update CHANGELOG.md 2018-04-07 00:50:24 +07:00
XMRig
ae647699a4 #502 Fixed build without libmicrohttpd. 2018-04-07 00:44:48 +07:00
XMRig
3a67ee6d11 Small fixes. 2018-04-06 23:32:54 +07:00
XMRig
c227e3c7b4 Fix command line option --donate-level. 2018-04-04 00:10:53 +07:00
xmrig
6a1c52b904 Update README.md 2018-04-03 19:02:12 +07:00
XMRig
7003559c74 Merge branch 'feature-cryptonight-heavy' into dev 2018-04-03 18:23:17 +07:00
xmrig
6b710ff3b3 Update CHANGELOG.md 2018-04-03 18:12:24 +07:00
XMRig
4e8ef7c6ed Added cryptonight-heavy support for ARM 2018-04-03 17:51:06 +07:00
XMRig
26e1b14020 Added test hashes for self test. 2018-04-03 17:19:01 +07:00
XMRig
d4123b8fa6 Quick fix, temporary use old style affinity. 2018-04-03 17:06:03 +07:00
XMRig
dd6bc339bf First working cryptonight-heavy. 2018-04-03 16:55:41 +07:00
XMRig
7d5a97137d Fix autoconfig and memory allocation for heavy algo. 2018-04-03 16:08:15 +07:00
XMRig
5c6ec587ac Move selfTest to threads, remove legacy CryptoNight.cpp. 2018-04-03 14:51:05 +07:00
XMRig
d7c5630509 Fix nonce allocation in DoubleWorker. 2018-04-03 03:27:44 +07:00
XMRig
c1bc6acd26 Fix DoubleWorker. 2018-04-03 03:01:04 +07:00
XMRig
903b243308 New style function selector. 2018-04-03 02:55:28 +07:00
XMRig
72cd6d168e Now used IThread to start threads, cpu-affinity broken, nonce allocation in double mode probably broken too. 2018-04-02 15:03:56 +07:00
XMRig
6c970612bf Transform affinity and av to internal representation. 2018-04-02 14:05:16 +07:00
XMRig
a042cbf885 Added classes IThread, CpuThread and API endpoint "GET /1/threads". 2018-04-01 22:49:21 +07:00
XMRig
44d56393db Fix Linux build. 2018-03-31 20:26:07 +07:00
XMRig
edd47b12a8 Update CHANGELOG.md and version. 2018-03-31 19:43:16 +07:00
XMRig
6e51b4191e Merge branch 'feature-controller' into dev 2018-03-31 19:15:22 +07:00
XMRig
8d4d1a3285 Added API endpoint "GET /1/config". 2018-03-31 19:00:31 +07:00
XMRig
341557c34e Added client storage from proxy. 2018-03-31 18:12:52 +07:00
XMRig
af0a6fdf20 Small fixes. 2018-03-31 17:51:33 +07:00
XMRig
7f5d7cf7dd Fix Linux build. 2018-03-31 16:52:58 +07:00
XMRig
aac7b0404a Options class replaced to xmrig::Config. 2018-03-31 16:29:47 +07:00
XMRig
aad19f1a35 Added initial next gen config support from proxy. 2018-03-31 13:48:06 +07:00
XMRig
872148c35c Merge branch 'feature-http-in-main-loop' into dev 2018-03-29 17:55:10 +07:00
xmrig
d24babb96e Update README.md 2018-03-29 17:15:41 +07:00
XMRig
9fe863b5d7 Background http changes from proxy. 2018-03-27 14:01:38 +07:00
XMRig
f1bc06473f Merge branch 'dev' of github.com:xmrig/xmrig into dev 2018-03-27 12:13:44 +07:00
XMRig
bab6a63822 Merge branch 'master' into dev 2018-03-27 12:13:21 +07:00
xmrig
1bd05d136b Update README.md 2018-03-26 13:59:20 +07:00
XMRig
ec08550fd9 v2.5.2 2018-03-26 13:34:04 +07:00
XMRig
6f4ed5f66d #478 Fixed totally broken reconnect. 2018-03-26 11:47:01 +07:00
xmrig
f852996f97 Update README.md 2018-03-25 15:14:19 +07:00
xmrig
38da8ef86c Update README.md 2018-03-25 15:04:00 +07:00
XMRig
dd7f70d6e8 Fix error in config.json 2018-03-24 13:55:45 +07:00
XMRig
89608ade3b Removed unused private field in FailoverStrategy class. 2018-03-24 13:45:54 +07:00
XMRig
f8f89a0946 v2.5.1 release candidate. 2018-03-24 13:04:04 +07:00
xmrig
e99928aa44 Update CHANGELOG.md 2018-03-24 11:02:04 +07:00
XMRig
1011fd4891 Partial fix for ARMv7 2018-03-24 10:14:21 +07:00
XMRig
673a1291e1 Randomized donation start time. 2018-03-24 09:41:32 +07:00
XMRig
8aa73318c8 Backport changes from proxy. 2018-03-24 00:10:39 +07:00
xmrig
04a95e3aa8 Update CHANGELOG.md 2018-03-22 10:19:29 +07:00
XMRig
ff68840220 Merge branch 'master' of github.com:xmrig/xmrig 2018-03-20 06:21:14 +07:00
XMRig
f2625b7ff5 New app icon. 2018-03-20 06:20:43 +07:00
xmrig
4440d3edd5 Update README.md 2018-03-19 07:03:50 +07:00
XMRig
efa21b2531 #454 Fixed build with libmicrohttpd version below v0.9.35. 2018-03-18 08:30:56 +07:00
XMRig
2de5d92d3a Removed unnecessary pointers cast. 2018-03-18 05:48:19 +07:00
xmrig
2e320d28d9 Update CHANGELOG.md 2018-03-17 18:08:17 +07:00
XMRig
e58429a044 Merge branch 'feature-donate-failover' 2018-03-17 17:57:02 +07:00
XMRig
ed5bf3420c Add donate pool IP address to avoid DNS issues. 2018-03-17 17:55:11 +07:00
xmrig
a7cf34d2eb Update CHANGELOG.md 2018-03-17 16:38:32 +07:00
XMRig
de5016dda8 #459 Fix issue with xmr.f2pool.com 2018-03-17 16:30:41 +07:00
XMRig
1cf1d616c6 DonateStrategy now use FailoverStrategy internally and possible to use any other IStrategy. 2018-03-17 14:33:30 +07:00
XMRig
c46c019c83 Unify network strategies with upcoming proxy. 2018-03-17 05:03:14 +07:00
XMRig
a2f747fb0c Pass all options to network strategies in constructor. 2018-03-17 04:16:08 +07:00
XMRig
38c39321d0 Merge branch 'master' of github.com:xmrig/xmrig 2018-03-17 01:08:41 +07:00
XMRig
7ab81ef19a #456 Don't show error "JSON decode failed" in quiet mode. 2018-03-17 01:07:53 +07:00
XMRig
2e503f7f8c Merge branch 'master' into dev 2018-03-16 15:02:02 +07:00
xmrig
3d41629170 Update README.md 2018-03-15 01:32:09 +07:00
xmrig
7959cf39fa Update README.md 2018-03-14 23:43:57 +07:00
XMRig
d48921bfc8 v2.5.0 2018-03-14 20:33:17 +07:00
XMRig
04c02d4add Fix macOS compile. 2018-03-14 20:22:30 +07:00
XMRig
2c2b3d2f36 Fix FindMHD.cmake 2018-03-14 19:58:38 +07:00
XMRig
0e60c5802d Fix. 2018-03-14 17:17:36 +07:00
XMRig
7adf30e326 Remove align.h. 2018-03-14 17:11:51 +07:00
XMRig
f9a3315d75 Fixes for 32 bit gcc builds. 2018-03-14 16:58:39 +07:00
XMRig
c0ca68e2db Fix FindUV.cmake and FindMHD.cmake. 2018-03-14 06:32:43 +07:00
xmrig
fdc9fbe876 Merge pull request #442 from kpcyrd/static
Add -DBUILD_STATIC=ON for static builds
2018-03-13 22:35:06 +07:00
XMRig
18f1ac6c62 Merge branch 'dev' 2018-03-13 22:33:37 +07:00
XMRig
81ef40fbb7 Fix for previous commit. 2018-03-13 21:01:00 +07:00
XMRig
41abe17286 #438 Fixed memory release. 2018-03-13 20:59:35 +07:00
XMRig
a01b4d0566 Simplify variant selection. 2018-03-13 17:50:09 +07:00
kpcyrd
11f00a2e6e Add -DBUILD_STATIC=ON for static builds
See #238
2018-03-12 21:03:04 +01:00
XMRig
07f0a107d3 Change port for AEON donate. 2018-03-13 02:17:19 +07:00
XMRig
30ab6f79ff Merge branch 'v1-pow' into dev 2018-03-13 01:49:54 +07:00
XMRig
125072a30e Added test hashes for AEON. 2018-03-13 01:29:31 +07:00
XMRig
aec31c43c0 Better v1 PoW implementation, added variant option. 2018-03-12 22:29:44 +07:00
XMRig
83e5832bc1 Some small fixes. 2018-03-12 14:44:23 +07:00
XMRig
244ca93aa4 Change donation address to separate old and new versions. 2018-03-09 13:15:55 +07:00
XMRig
ff68c047f9 v2.5.0-dev 2018-03-09 01:49:24 +07:00
XMRig
b662cb77a4 Revert changes in Api class, single threaded http server will not be included in 2.5 release. 2018-03-09 01:47:44 +07:00
XMRig
3e2863dca5 Merge branch 'vtnerd-monero-v1-pow' into dev
# Conflicts:
#	src/api/Httpd.cpp
#	src/api/Httpd.h
2018-03-09 01:41:47 +07:00
xmrig
6e95b0d052 Update CHANGELOG.md 2018-03-09 01:30:32 +07:00
xmrig
da4aa69c89 Update CHANGELOG.md 2018-03-09 00:56:29 +07:00
XMRig
84970e9e9b Added coin field support added in xmrig-proxy 2.5. 2018-03-09 00:50:06 +07:00
XMRig
37ac1aa62c Automatically enable nicehash when use with upcoming xmrig-proxy 2.5. 2018-03-07 21:56:43 +07:00
XMRig
69b8a4faf1 Added option to disable Monero v7 PoW, may useful in future if other coins update their network to v7 without PoW change. 2018-03-07 19:12:18 +07:00
XMRig
8a6988d381 Added full IPv6 support. 2018-03-07 16:38:58 +07:00
XMRig
79779b51da Added reference hashes. 2018-03-07 15:32:44 +07:00
XMRig
8b60585004 PoW changes WIP 2018-03-06 21:34:20 +07:00
XMRig
df6a397e52 Update copyright and move version into Job class. 2018-03-06 17:06:07 +07:00
XMRig
274c6306a8 Merge branch 'monero-v1-pow' of https://github.com/vtnerd/xmrig into vtnerd-monero-v1-pow 2018-03-06 16:37:33 +07:00
XMRig
a398c8af2f Fixed regression (all versions since 2.4 affected) fragmented responses from pool/proxy parsed incorrectly. 2018-03-05 13:54:21 +07:00
XMRig
fc82cf1cf2 #428 Fixed regression with CPU cache size detection. 2018-03-05 02:15:05 +07:00
Lee Clagett
48b1de0b59 Changes for the Monero v1 PoW 2018-03-02 22:17:29 +00:00
XMRig
3edc30d067 Use adaptive timer instead of idle handler for HTTP server. 2018-03-01 09:53:27 +07:00
XMRig
ff6dc727f5 Added XMRIG_DEPS cmake variable for unified dependencies. 2018-02-21 00:52:52 +07:00
XMRig
a0d4e4ed3f Run internal http server in main loop to avoid requirement to thread synchronization. 2018-02-20 23:22:34 +07:00
XMRig
71759e3752 Merge branch 'master' into dev 2018-02-20 22:48:39 +07:00
xmrig
79345119c6 Update CHANGELOG.md 2018-02-19 15:58:44 +07:00
XMRig
9af8ceb063 v2.4.5 RC 2018-02-19 04:31:50 +07:00
xmrig
f5a0429f0d Update README.md 2018-02-19 04:17:50 +07:00
xmrig
cc22c9d61c Update README.md 2018-02-18 05:49:37 +07:00
xmrig
45f5afd2b7 Merge pull request #379 from DeadManWalkingTO/master
Update README.md
2018-02-18 05:48:09 +07:00
xmrig
c9acc2912e Update CHANGELOG.md 2018-02-18 05:32:36 +07:00
xmrig
f0604d1e97 Update README.md 2018-02-18 05:06:10 +07:00
XMRig
531c657b64 Merge branch 'master' of github.com:xmrig/xmrig 2018-02-08 17:35:20 +07:00
XMRig
c50ccd4e06 Merge branch 'Foudge-master' 2018-02-08 17:34:33 +07:00
XMRig
184f79ad3f Fix code style, replace tabs to space #2. 2018-02-08 17:21:12 +07:00
XMRig
e78e810cfe Fix code style, replace tabs to space. 2018-02-08 17:02:32 +07:00
XMRig
c804ef1888 Merge branch 'master' of https://github.com/Foudge/xmrig into Foudge-master 2018-02-08 16:56:20 +07:00
Foudge
037abd7037 Correct L2 cache size calculation for Intel Core 2 family
This is a workaround for total L2 cache size calculation of Intel Core Solo, Core Duo, Core 2 Duo, Core 2 Quad and their Xeon homologue. These processors have L2 cache shared by 2 cores.

There is maybe more CPU with L2 shared cache, but I am sure that these models are concerned and they are not so numerous.
A better way would be to modify libcpuid to implement L2 cache counting.
2018-02-03 16:31:13 +01:00
DeadManWalking
75f462f0e1 Update README.md 2018-02-02 00:58:11 +02:00
DeadManWalking
9f92449e15 Update README.md 2018-02-02 00:54:58 +02:00
DeadManWalking
a917590862 Update README.md 2018-02-02 00:14:39 +02:00
DeadManWalking
41b92740ea Merge pull request #1 from xmrig/master
!
2018-02-01 23:02:32 +02:00
Foudge
d2964576c7 Compilation error under FreeBSD
ULONG is not recognized under this OS, so replaced it with more portable definition.
2018-01-28 18:13:00 +01:00
Foudge
9a28ad590c up to 20% perf increase with Cryptonight with non-AES CPU
This time, the performance increase is got with MSVC and GCC. On non-AES CPU, there were an useless load/store SSE2 register. The last MSVC "hack" is replaced by a portable code and he's more complete (a load is saved).

On my C2Q6600, with 3 thread, I have +16% with MSVC2015 and +20% with GCC 7.3, compared to official 2.4.4 version.
2018-01-28 12:58:19 +01:00
Foudge
15fe6ce23f Remove compilation warnings under MSVC 2018-01-27 11:42:22 +01:00
xmrig
17f90de677 Merge pull request #353 from Foudge/master
up to 15% boost on CryptoNight algo with non-AES CPU
2018-01-26 00:53:22 +07:00
XMRig
631fd755c8 #341 Added option --dry-run. 2018-01-20 20:43:31 +07:00
Foudge
9bceb65ad8 +15% boost with non-AES CPU
Performance boost validated on Core 2 Quad processor under Windows 10.
But it's Windows/MS Visual C++ specific.
2018-01-20 10:43:56 +01:00
XMRig
56ffa7af79 #341 Fix wrong exit code. 2018-01-20 12:58:43 +07:00
xmrig
f210708f3b Merge pull request #324 from stanz2g/master
can build without microhttpd when WITH_HTTPD=OFF
2018-01-20 01:35:12 +07:00
xmrig
916cf0ae0d Update CHANGELOG.md 2018-01-11 15:08:24 +07:00
XMRig
e6540229cb #328 Added guard to prevent paused message spam and crash. 2018-01-10 22:55:45 +07:00
XMRig
360f0e8ffd Merge branch 'master' of github.com:xmrig/xmrig 2018-01-10 17:35:40 +07:00
XMRig
038bb1f6bc Fix version. 2018-01-10 16:56:08 +07:00
xmrig
d73bee81ab Update README.md 2018-01-07 21:36:49 +07:00
stanz2g
f93187b024 can build without microhttpd when WITH_HTTPD=OFF 2018-01-06 17:07:07 +08:00
XMRig
49b45ddd18 Add libmicrohttpd version to --version output. 2018-01-05 19:41:19 +07:00
XMRig
8b7a737ceb Fix recent MSVC 2017 version detection. 2018-01-05 17:23:39 +07:00
XMRig
5b88213f61 Fix wrong signal handle. 2018-01-04 11:38:32 +07:00
XMRig
785df62183 Update README.md. 2018-01-02 13:49:31 +07:00
XMRig
1b025f681c Remove extra semicolon. 2018-01-02 13:41:00 +07:00
XMRig
114a9b041d #279 Add missing stdio header 2018-01-02 12:24:57 +07:00
XMRig
fbd100ef10 #262 Reduce cmake version requirement to 2.8. 2017-12-16 19:27:11 +07:00
XMRig
e458c56139 v2.4.3 2017-11-30 02:11:15 +03:00
xmrig
b68b2a907b Update CHANGELOG.md 2017-11-29 18:49:28 +03:00
xmrig
905f9190ae Update CHANGELOG.md 2017-11-29 17:54:12 +03:00
XMRig
aa4f8b6fa7 #216 Added ARMv7 support. 2017-11-26 22:23:23 +03:00
XMRig
9100e3fb65 Merge branch 'arm' 2017-11-24 23:47:12 +03:00
XMRig
47527d48ee Fixed build in termux environment, thanks Imran Yusuff. 2017-11-24 00:23:04 +03:00
XMRig
989c217b3f #200 Use fprintf failback when fail to use uv_tty. 2017-11-18 14:07:04 +03:00
XMRig
1961dcf824 #204 Fix Linux build, again. 2017-11-17 22:44:36 +03:00
XMRig
4b00eb4a9f #196 Fix Linux build. 2017-11-17 12:59:46 +03:00
XMRig
6cc152e26f Added ARMv8 (aarch64) support. 2017-11-06 03:11:35 +03:00
XMRig
d403dcf95c Optimized software aes. 2017-11-03 05:35:29 +03:00
xmrig
c0e849b394 Update CHANGELOG.md 2017-11-02 19:49:25 +03:00
XMRig
2e4c2d3ca8 Merge branch 'master' of github.com:xmrig/xmrig 2017-11-02 19:42:19 +03:00
XMRig
1391a2d858 #184 Workaround for CPUs with disabled Hyper-Threading. 2017-11-02 19:40:33 +03:00
xmrig
ee441b6b9a Update README.md 2017-11-02 03:39:47 +03:00
xmrig
c384df9651 Update README.md 2017-11-02 03:37:58 +03:00
XMRig
6479d6bb6f #157 Explicitly add linking with librt, probably fix build issue with some old Linux. 2017-10-30 00:48:49 +03:00
XMRig
fd029201b0 v2.4.2. 2017-10-23 15:32:07 +03:00
xmrig
a7c0ba6d28 Update CHANGELOG.md 2017-10-23 14:10:37 +03:00
XMRig
66e9f5a8bf Merge branch 'vcambur-master' 2017-10-20 19:55:03 +03:00
XMRig
10df3ec227 Code style fixes for FreeBSD support pull request. 2017-10-20 19:54:18 +03:00
vcambur
9c0fe73102 Some FreeBSD fixes 2017-10-20 08:41:08 +00:00
XMRig
1af1ba6b5f #153 Force reconnect when duplicated job received. 2017-10-16 01:26:55 +03:00
XMRig
bea3bc74b2 v2.4.1. 2017-10-15 04:52:00 +03:00
xmrig
7e4d0d83ff Update CHANGELOG.md 2017-10-15 03:42:45 +03:00
xmrig
4138d4a178 Update README.md 2017-10-12 22:40:20 +03:00
XMRig
f9202c6951 #147 Fixed comparability with monero-stratum. 2017-10-10 16:31:19 +03:00
XMRig
a3297b9ea4 Fixed 32 bit version crash. 2017-10-07 20:36:02 +03:00
XMRig
b46f376f32 Remove unused variables . 2017-10-07 19:23:46 +03:00
XMRig
f02b98efe7 Fix clang warnings and job comparison bug. 2017-10-07 18:58:04 +03:00
XMRig
7d4bdfc913 v2.4.0 2017-10-07 16:55:58 +03:00
XMRig
1964e4f370 Merge branch 'dev' 2017-10-07 00:58:24 +03:00
xmrig
14cd81a7a1 Update CHANGELOG.md 2017-10-07 00:56:32 +03:00
XMRig
1123c20da0 Add comments to config file. 2017-10-07 00:49:38 +03:00
XMRig
fc810dc87b Fix for msvc 2017-10-07 00:06:58 +03:00
XMRig
8729616698 Added special option -t all 2017-10-06 23:44:25 +03:00
xmrig
b43d986537 Update CHANGELOG.md 2017-10-06 19:37:42 +03:00
XMRig
04d3dd6df1 #130 Fixed compatibility with CMake older than 3.1.0. 2017-10-06 19:34:06 +03:00
XMRig
603a9c4c6e Merge branch 'dev' of github.com:xmrig/xmrig into dev 2017-10-06 19:11:05 +03:00
XMRig
914fdd5f0a #97 Ignore keepalive option with minergate and nicehash.com 2017-10-06 19:10:08 +03:00
xmrig
08f6c222ca Update CHANGELOG.md 2017-10-06 17:25:23 +03:00
xmrig
3ead4eba89 Update CHANGELOG.md 2017-10-06 17:17:56 +03:00
XMRig
af51513614 libjansson replaced to rapidjson.
Sync changes with proxy.
2017-10-04 23:33:30 +03:00
XMRig
4cf3bb9930 #111 Fixed build without AEON support. 2017-09-16 15:20:33 +03:00
XMRig
3a7bb24b40 #108 Silently ignore invalid values for donate-level option. 2017-09-13 18:01:28 +03:00
XMRig
729ee08631 #101 Fix MSVC 2017 (15.3) version detection. 2017-09-08 14:54:43 +03:00
XMRig
80b0ac2492 #87 Use CMAKE_CXX_STANDARD. 2017-09-04 06:12:45 +03:00
XMRig
e9a16912c3 Fix typo. 2017-09-02 19:24:06 +03:00
XMRig
4928b6d3e3 Sync changes with xmrig-nvidia 2017-09-02 19:04:40 +03:00
XMRig
d0db4770ed Added API port to summary. 2017-09-02 15:50:27 +03:00
XMRig
38e93ed6e3 Fixed Linux build. 2017-09-02 14:33:53 +03:00
XMRig
d52aa5a72b v2.4.0-dev 2017-09-02 14:25:54 +03:00
XMRig
3d10636a8f Merge branch 'feature-httpd' into dev 2017-09-02 14:21:32 +03:00
XMRig
5591666069 Fixed msvc build. 2017-09-02 14:14:10 +03:00
XMRig
fd98dc236a Added support to build without API. 2017-09-02 12:12:40 +03:00
XMRig
325e116624 Added API authorization via Bearer token. 2017-09-02 08:18:24 +03:00
XMRig
7798f09dc7 Added connection statistics to API. 2017-09-02 05:47:30 +03:00
XMRig
8e08df2fd2 Rename Results => NetworkState. 2017-09-01 15:35:00 +03:00
XMRig
9e9cddedc5 Added results statistics to API. 2017-09-01 08:02:56 +03:00
XMRig
1651b041de Added hashrate to reports. 2017-09-01 03:45:08 +03:00
XMRig
30dd7d6fe4 Added support for id and worker_id in API. 2017-08-31 06:31:49 +03:00
XMRig
71f06530df Added classes Api and ApiState. 2017-08-31 04:30:59 +03:00
XMRig
5601c7a672 Added Httpd class and API config options. 2017-08-31 02:28:33 +03:00
XMRig
35c2a729ec Merge branch 'master' into dev 2017-08-30 22:11:00 +03:00
XMRig
850e355049 Force define __STDC_FORMAT_MACROS on all platforms. 2017-08-29 23:41:57 +03:00
XMRig
6f89c51db5 v2.3.1 2017-08-25 22:24:42 +03:00
xmrig
6bf1ef0170 Update CHANGELOG.md 2017-08-25 22:21:58 +03:00
XMRig
4e039a9bce #68 Fixed console output in docker containers. 2017-08-22 11:16:33 +03:00
XMRig
7b44fa3737 v2.3.0 2017-08-20 10:39:19 +03:00
xmrig
f96e9d5ab7 Update README.md 2017-08-20 10:32:52 +03:00
XMRig
f041571674 Merge branch 'dev' 2017-08-20 10:24:49 +03:00
xmrig
bb4aeed874 Update README.md 2017-08-20 10:02:52 +03:00
xmrig
076a69907c Update README.md 2017-08-20 09:55:03 +03:00
xmrig
fa5e326d5e Update README.md 2017-08-20 09:48:31 +03:00
xmrig
55bfab95f9 Update CHANGELOG.md 2017-08-20 09:42:35 +03:00
xmrig
fbaae0f080 Update README.md 2017-08-18 17:11:26 +03:00
xmrig
d53a47b12f Update README.md 2017-08-18 06:47:51 +03:00
XMRig
e3e52f6d06 #62 Don't send the login to the dev pool. 2017-08-18 06:08:35 +03:00
xmrig
b5897b336a Update CHANGELOG.md 2017-08-18 04:44:02 +03:00
XMRig
60224ccd23 Fix error if stdout not available. 2017-08-17 18:54:41 +03:00
xmrig
168b1aac2f Update CHANGELOG.md 2017-08-17 18:11:03 +03:00
XMRig
fc1d6c7e84 Better fix for MSVC. 2017-08-17 07:33:21 +03:00
XMRig
e3dd4a6581 Fixed config load for MSVC. 2017-08-17 06:43:32 +03:00
XMRig
9cb7d727c2 Force close connection if IP address banned. 2017-08-16 15:14:21 +03:00
XMRig
e049b80f1a Fixed linux build. 2017-08-16 14:49:37 +03:00
XMRig
beb9af4313 Fixed, message "Huge pages support was successfully enabled, but reboot required to use it" was not shown in release builds. 2017-08-16 14:44:35 +03:00
XMRig
8bba0df054 Added option --no-huge-pages. 2017-08-16 14:21:12 +03:00
XMRig
27f02d5f9f Added option --user-agent. 2017-08-16 13:19:14 +03:00
XMRig
79ffb95f05 Added support for --cpu-priority for OS X. 2017-08-16 12:57:05 +03:00
XMRig
1b0ddae4eb Fixed: failed open default config file if path contains non English characters. 2017-08-16 12:22:35 +03:00
XMRig
ad0d876b18 Added support --cpu-priority support for Linux. 2017-08-15 09:03:10 +03:00
XMRig
2f371e884e Merge branch 'dev' of github.com:xmrig/xmrig into dev 2017-08-15 08:20:33 +03:00
XMRig
f05a328474 Added --cpu-priority option. 2017-08-15 08:19:55 +03:00
XMRig
c40f212e23 Fix Linux build. 2017-08-15 03:13:11 +03:00
XMRig
61859dfe14 Add class Platform. 2017-08-15 03:04:46 +03:00
XMRig
eb140fd30f Fix gcc warnings. 2017-08-14 09:53:48 +03:00
XMRig
a07b0e5953 Fix Visual Studio warnings. 2017-08-14 09:30:41 +03:00
XMRig
9975b4e4cd Backport unified client timer from proxy project. 2017-08-14 08:41:54 +03:00
XMRig
5ad1a48489 Merge branch 'master' into dev 2017-08-14 08:19:11 +03:00
XMRig
62681adcfb Fixed assert when try read unavailable stdin. 2017-08-05 18:45:06 +03:00
XMRig
1720d3e096 Fixed initialization, no need init logs and network if configuration not ready. 2017-08-04 21:47:43 +03:00
xmrig
92d787c817 Update CHANGELOG.md 2017-08-04 11:51:09 +03:00
XMRig
816fc3ee43 Fixed terminal issues after exit on Linux and OS X. 2017-08-04 11:10:33 +03:00
XMRig
7004a51ce6 v2.2.0 2017-08-02 20:08:41 +03:00
XMRig
3cc18d30de Merge branch 'dev' 2017-08-02 20:01:10 +03:00
xmrig
bd3665e111 Update CHANGELOG.md 2017-08-02 19:53:10 +03:00
XMRig
a680220d28 Fixed autoconf mode for AMD FX CPUs. 2017-08-02 18:59:24 +03:00
xmrig
2d1fdec618 Update CHANGELOG.md 2017-08-01 20:20:30 +03:00
XMRig
b1a2215829 Add missing port in config.json. 2017-08-01 19:34:36 +03:00
XMRig
eb5f7c6a7b #46 Simplify config parsing 2017-08-01 12:56:30 +03:00
XMRig
1bc23354d3 #46 Add support for default config. 2017-07-31 18:38:02 +03:00
XMRig
e6a72b2f78 #46 Added config file support. 2017-07-31 16:05:16 +03:00
XMRig
5bed17a8af Fix stop for FailoverStrategy. 2017-07-27 07:36:16 +03:00
XMRig
7b21749a19 Merge branch 'feature-async-console' into dev 2017-07-23 11:08:09 +03:00
XMRig
0b5587fd6a Add commands help. 2017-07-23 10:04:23 +03:00
XMRig
776f77a8d4 Added IConsoleListener 2017-07-23 09:36:30 +03:00
XMRig
583f45e2da Add Console class. 2017-07-23 08:35:26 +03:00
XMRig
9b474f239f Disable QuickEdit mode for Windows. 2017-07-23 07:38:57 +03:00
XMRig
9665ff15ae Use uv_tty for console output and remove legacy winansi. 2017-07-23 05:59:57 +03:00
xmrig
b6bf6d9bc9 Update CHANGELOG.md 2017-07-20 02:56:07 +03:00
XMRig
3d9be9484d Merge branch 'dev'
# Conflicts:
#	src/version.h
2017-07-20 00:54:03 +03:00
XMRig
35fd43a6b4 Changed donation address, new xmrig-proxy is coming soon. 2017-07-19 23:57:03 +03:00
xmrig
294453fdc1 Update CHANGELOG.md 2017-07-19 23:54:50 +03:00
XMRig
30a7f9f7f5 Backport crypto changes from Dead2 xmr-stak-cpu fork. 2017-07-19 21:02:38 +03:00
XMRig
8f38462bbe #40 Fix crash on Linux. 2017-07-19 04:28:59 +03:00
XMRig
ebf54c6d04 Fix warnings on Linux. 2017-07-18 22:38:38 +03:00
XMRig
d7659b5093 Fixed %lld and %llu related warnings. 2017-07-18 20:20:29 +03:00
XMRig
e00c568ae9 Fix OS X build. 2017-07-18 14:09:20 +03:00
XMRig
a3988374f0 Fixed graceful shutdown. 2017-07-18 05:20:36 +03:00
XMRig
9732636155 Fixed bug, login request was contain malformed JSON if username or password has some special characters for example \. 2017-07-18 01:49:04 +03:00
XMRig
986aee4297 Better support for Round Robin DNS, related https://github.com/fireice-uk/xmr-stak-cpu/pull/220 2017-07-17 23:35:36 +03:00
XMRig
66d3e96a1a Sync changes with upcoming xmrig-proxy project. 2017-07-17 21:57:03 +03:00
XMRig
9f4e1ee373 Update version. 2017-07-14 21:26:22 +03:00
xmrig
ff0c6b6365 Update CHANGELOG.md 2017-07-14 21:22:48 +03:00
XMRig
7397efaf6d Merge branch 'master' of github.com:xmrig/xmrig 2017-07-14 21:16:05 +03:00
XMRig
aadc15ce66 Ignore duplicated job received from pool, with warning message. 2017-07-14 21:06:08 +03:00
XMRig
ad7c925a1a Merge branch 'dev' 2017-07-14 20:54:32 +03:00
XMRig
57be6f94bb Small code cleanup. 2017-07-13 18:02:48 +03:00
xmrig
35b188762c Update README.md 2017-07-12 14:02:07 +03:00
XMRig
7c6e429854 Improved pause/resume mechanism. 2017-07-10 21:42:28 +03:00
XMRig
c15aefd968 Merge branch 'master' into dev 2017-07-10 18:53:39 +03:00
XMRig
4a712354f1 #28 Fixed Alpine Linux support. 2017-07-07 07:15:58 +03:00
xmrig
4545c84a11 Update CHANGELOG.md 2017-07-06 10:05:36 +03:00
XMRig
a66297bed8 Merge branch 'master' into dev 2017-07-06 09:36:16 +03:00
XMRig
f4dadfd90b Improve nicehash detection. 2017-07-05 07:54:21 +03:00
XMRig
955134b162 #27 Fix possibility crash on 32bit. 2017-07-05 07:20:28 +03:00
XMRig
68795137da Merge branch 'master' into dev 2017-07-04 14:56:40 +03:00
XMRig
6ed2d61586 Probably fix OS X support. 2017-07-03 11:02:32 +03:00
xmrig
a96782218f Update README.md 2017-07-03 07:24:56 +03:00
257 changed files with 35128 additions and 16156 deletions

View File

@ -1,3 +1,192 @@
# v2.10.0
- [#904](https://github.com/xmrig/xmrig/issues/904) Added new algorithm `cn-pico/trtl` (aliases `cryptonight-turtle`, `cn-trtl`) for upcoming TurtleCoin (TRTL) fork.
- Default value for option `max-cpu-usage` changed to `100` also this option now deprecated.
# v2.9.4
- [#913](https://github.com/xmrig/xmrig/issues/913) Fixed Masari (MSR) support (this update required for upcoming fork).
- [#915](https://github.com/xmrig/xmrig/pull/915) Improved security, JIT memory now read-only after patching.
# v2.9.3
- [#909](https://github.com/xmrig/xmrig/issues/909) Fixed compile errors on FreeBSD.
- [#912](https://github.com/xmrig/xmrig/pull/912) Fixed, C++ implementation of `cn/half` was produce up to 13% of invalid hashes.
# v2.9.2
- [#907](https://github.com/xmrig/xmrig/pull/907) Fixed crash on Linux.
# v2.9.1
- Restored compatibility with https://stellite.hashvault.pro.
# v2.9.0
- [#899](https://github.com/xmrig/xmrig/issues/899) Added support for new algorithm `cn/half` for Masari and Stellite forks.
- [#834](https://github.com/xmrig/xmrig/pull/834) Added ASM optimized code for AMD Bulldozer.
- [#839](https://github.com/xmrig/xmrig/issues/839) Fixed FreeBSD compile.
- [#857](https://github.com/xmrig/xmrig/pull/857) Fixed impossible to build for macOS without clang.
# v2.8.3
- [#813](https://github.com/xmrig/xmrig/issues/813) Fixed critical bug with Minergate pool and variant 2.
# v2.8.1
- [#768](https://github.com/xmrig/xmrig/issues/768) Fixed build with Visual Studio 2015.
- [#769](https://github.com/xmrig/xmrig/issues/769) Fixed regression, some ANSI escape sequences was in log with disabled colors.
- [#777](https://github.com/xmrig/xmrig/issues/777) Better report about pool connection issues.
- Simplified checks for ASM auto detection, only AES support necessary.
- Added missing options to `--help` output.
# v2.8.0
- **[#753](https://github.com/xmrig/xmrig/issues/753) Added new algorithm [CryptoNight variant 2](https://github.com/xmrig/xmrig/issues/753) for Monero fork, thanks [@SChernykh](https://github.com/SChernykh).**
- Added global and per thread option `"asm"` and and command line equivalent.
- **[#758](https://github.com/xmrig/xmrig/issues/758) Added SSL/TLS support for secure connections to pools.**
- Added per pool options `"tls"` and `"tls-fingerprint"` and command line equivalents.
- [#767](https://github.com/xmrig/xmrig/issues/767) Added config autosave feature, same with GPU miners.
- [#245](https://github.com/xmrig/xmrig-proxy/issues/245) Fixed API ID collision when run multiple miners on same machine.
- [#757](https://github.com/xmrig/xmrig/issues/757) Fixed send buffer overflow.
# v2.6.4
- [#700](https://github.com/xmrig/xmrig/issues/700) `cryptonight-lite/ipbc` replaced to `cryptonight-heavy/tube` for **Bittube (TUBE)**.
- Added `cryptonight/rto` (cryptonight variant 1 with IPBC/TUBE mod) variant for **Arto (RTO)** coin.
- Added `cryptonight/xao` (original cryptonight with bigger iteration count) variant for **Alloy (XAO)** coin.
- Better variant detection for **nicehash.com** and **minergate.com**.
- [#692](https://github.com/xmrig/xmrig/issues/692) Added support for specify both algorithm and variant via single `algo` option.
# v2.6.3
- **Added support for new cryptonight-heavy variant xhv** (`cn-heavy/xhv`) for upcoming Haven Protocol fork.
- **Added support for new cryptonight variant msr** (`cn/msr`) also known as `cryptonight-fast` for upcoming Masari fork.
- Added new detailed hashrate report.
- [#446](https://github.com/xmrig/xmrig/issues/446) Likely fixed SIGBUS error on 32 bit ARM CPUs.
- [#551](https://github.com/xmrig/xmrig/issues/551) Fixed `cn-heavy` algorithm on ARMv8.
- [#614](https://github.com/xmrig/xmrig/issues/614) Fixed display issue with huge pages percentage when colors disabled.
- [#615](https://github.com/xmrig/xmrig/issues/615) Fixed build without libcpuid.
- [#629](https://github.com/xmrig/xmrig/pull/629) Fixed file logging with non-seekable files.
- [#672](https://github.com/xmrig/xmrig/pull/672) Reverted back `cryptonight-light` and exit if no valid algorithm specified.
# v2.6.2
- [#607](https://github.com/xmrig/xmrig/issues/607) Fixed donation bug.
- [#610](https://github.com/xmrig/xmrig/issues/610) Fixed ARM build.
# v2.6.1
- [#168](https://github.com/xmrig/xmrig-proxy/issues/168) Added support for [mining algorithm negotiation](https://github.com/xmrig/xmrig-proxy/blob/dev/doc/STRATUM_EXT.md#1-mining-algorithm-negotiation).
- Added IPBC coin support, base algorithm `cn-lite` variant `ipbc`.
- [#581](https://github.com/xmrig/xmrig/issues/581) Added support for upcoming Stellite (XTL) fork, base algorithm `cn` variant `xtl`, variant can set now, no need do it after fork.
- Added support for **rig-id** stratum protocol extensions, compatible with xmr-stak.
- Changed behavior for option `variant=-1` for `cryptonight`, now variant is `1` by default, if you mine old coins need change `variant` to `0`.
- A lot of small fixes and better unification with proxy code.
# v2.6.0-beta3
- [#563](https://github.com/xmrig/xmrig/issues/563) **Added [advanced threads mode](https://github.com/xmrig/xmrig/issues/563), now possible configure each thread individually.**
- [#255](https://github.com/xmrig/xmrig/issues/563) Low power mode extended to **triple**, **quard** and **penta** modes.
- [#519](https://github.com/xmrig/xmrig/issues/519) Fixed high donation levels, improved donation start time randomization.
- [#554](https://github.com/xmrig/xmrig/issues/554) Fixed regression with `print-time` option.
# v2.6.0-beta2
- Improved performance for `cryptonight v7` especially in double hash mode.
- [#499](https://github.com/xmrig/xmrig/issues/499) IPv6 disabled for internal HTTP API by default, was causing issues on some systems.
- Added short aliases for algorithm names: `cn`, `cn-lite` and `cn-heavy`.
- Fixed regressions (v2.6.0-beta1 affected)
- [#494](https://github.com/xmrig/xmrig/issues/494) Command line option `--donate-level` was broken.
- [#502](https://github.com/xmrig/xmrig/issues/502) Build without libmicrohttpd was broken.
- Fixed nonce calculation for `--av 4` (software AES, double hash) was causing reduction of effective hashrate and rejected shares on nicehash.
# v2.6.0-beta1
- [#476](https://github.com/xmrig/xmrig/issues/476) **Added Cryptonight-Heavy support for Sumokoin ASIC resistance fork.**
- HTTP server now runs in main loop, it make possible easy extend API without worry about thread synchronization.
- Added initial graceful reload support, miner will reload configuration if config file changed, disabled by default until it will be fully implemented and tested.
- Added API endpoint `PUT /1/config` to update current config.
- Added API endpoint `GET /1/config` to get current active config.
- Added API endpoint `GET /1/threads` to get current active threads configuration.
- API endpoint `GET /` now deprecated, use `GET /1/summary` instead.
- Added `--api-no-ipv6` and similar config option to disable IPv6 support for HTTP API.
- Added `--api-no-restricted` to enable full access to api, this option has no effect if `--api-access-token` not specified.
# v2.5.3
- Fixed critical bug, in some cases miner was can't recovery connection and switch to failover pool, version 2.5.2 affected. If you use v2.6.0-beta3 this issue doesn't concern you.
- [#499](https://github.com/xmrig/xmrig/issues/499) IPv6 support disabled for internal HTTP API.
- Added workaround for nicehash.com if you use `cryptonightv7.<region>.nicehash.com` option `variant=1` will be set automatically.
# v2.5.2
- [#448](https://github.com/xmrig/xmrig/issues/478) Fixed broken reconnect.
# v2.5.1
- [#454](https://github.com/xmrig/xmrig/issues/454) Fixed build with libmicrohttpd version below v0.9.35.
- [#456](https://github.com/xmrig/xmrig/issues/459) Verbose errors related to donation pool was not fully silenced.
- [#459](https://github.com/xmrig/xmrig/issues/459) Fixed regression (version 2.5.0 affected) with connection to **xmr.f2pool.com**.
# v2.5.0
- [#434](https://github.com/xmrig/xmrig/issues/434) **Added support for Monero v7 PoW, scheduled on April 6.**
- Added full IPv6 support.
- Added protocol extension, when use the miner with xmrig-proxy 2.5+ no more need manually specify `nicehash` option.
- [#123](https://github.com/xmrig/xmrig-proxy/issues/123) Fixed regression (all versions since 2.4 affected) fragmented responses from pool/proxy was parsed incorrectly.
- [#428](https://github.com/xmrig/xmrig/issues/428) Fixed regression (version 2.4.5 affected) with CPU cache size detection.
# v2.4.5
- [#324](https://github.com/xmrig/xmrig/pull/324) Fixed build without libmicrohttpd (CMake cache issue).
- [#341](https://github.com/xmrig/xmrig/issues/341) Fixed wrong exit code and added command line option `--dry-run`.
- [#385](https://github.com/xmrig/xmrig/pull/385) Up to 20% performance increase for non-AES CPU and fixed Intel Core 2 cache detection.
# v2.4.4
- Added libmicrohttpd version to --version output.
- Fixed bug in singal handler, in some cases miner wasn't shutdown properly.
- Fixed recent MSVC 2017 version detection.
- [#279](https://github.com/xmrig/xmrig/pull/279) Fixed build on some macOS versions.
# v2.4.3
- [#94](https://github.com/xmrig/xmrig/issues/94#issuecomment-342019257) [#216](https://github.com/xmrig/xmrig/issues/216) Added **ARMv8** and **ARMv7** support. Hardware AES supported, thanks [Imran Yusuff](https://github.com/imranyusuff).
- [#157](https://github.com/xmrig/xmrig/issues/157) [#196](https://github.com/xmrig/xmrig/issues/196) Fixed Linux compile issues.
- [#184](https://github.com/xmrig/xmrig/issues/184) Fixed cache size detection for CPUs with disabled Hyper-Threading.
- [#200](https://github.com/xmrig/xmrig/issues/200) In some cases miner was doesn't write log to stdout.
# v2.4.2
- [#60](https://github.com/xmrig/xmrig/issues/60) Added FreeBSD support, thanks [vcambur](https://github.com/vcambur).
- [#153](https://github.com/xmrig/xmrig/issues/153) Fixed issues with dwarfpool.com.
# v2.4.1
- [#147](https://github.com/xmrig/xmrig/issues/147) Fixed comparability with monero-stratum.
# v2.4.0
- Added [HTTP API](https://github.com/xmrig/xmrig/wiki/API).
- Added comments support in config file.
- libjansson replaced to rapidjson.
- [#98](https://github.com/xmrig/xmrig/issues/98) Ignore `keepalive` option with minergate.com and nicehash.com.
- [#101](https://github.com/xmrig/xmrig/issues/101) Fixed MSVC 2017 (15.3) compile time version detection.
- [#108](https://github.com/xmrig/xmrig/issues/108) Silently ignore invalid values for `donate-level` option.
- [#111](https://github.com/xmrig/xmrig/issues/111) Fixed build without AEON support.
# v2.3.1
- [#68](https://github.com/xmrig/xmrig/issues/68) Fixed compatibility with Docker containers, was nothing print on console.
# v2.3.0
- Added `--cpu-priority` option (0 idle, 2 normal to 5 highest).
- Added `--user-agent` option, to set custom user-agent string for pool. For example `cpuminer-multi/0.1`.
- Added `--no-huge-pages` option, to disable huge pages support.
- [#62](https://github.com/xmrig/xmrig/issues/62) Don't send the login to the dev pool.
- Force reconnect if pool block miner IP address. helps switch to backup pool.
- Fixed: failed open default config file if path contains non English characters.
- Fixed: error occurred if try use unavailable stdin or stdout, regression since version 2.2.0.
- Fixed: message about huge pages support successfully enabled on Windows was not shown in release builds.
# v2.2.1
- Fixed [terminal issues](https://github.com/xmrig/xmrig-proxy/issues/2#issuecomment-319914085) after exit on Linux and OS X.
# v2.2.0
- [#46](https://github.com/xmrig/xmrig/issues/46) Restored config file support. Now possible use multiple config files and combine with command line options also added support for default config.
- Improved colors support on Windows, now used uv_tty, legacy code removed.
- QuickEdit Mode now disabled on Windows.
- Added interactive commands in console window:: **h**ashrate, **p**ause, **r**esume.
- Fixed autoconf mode for AMD FX CPUs.
# v2.1.0
- [#40](https://github.com/xmrig/xmrig/issues/40)
Improved miner shutdown, fixed crash on exit for Linux and OS X.
- Fixed, login request was contain malformed JSON if username or password has some special characters for example `\`.
- [#220](https://github.com/fireice-uk/xmr-stak-cpu/pull/220) Better support for Round Robin DNS, IP address now always chosen randomly instead of stuck on first one.
- Changed donation address, new [xmrig-proxy](https://github.com/xmrig/xmrig-proxy) is coming soon.
# v2.0.2
- Better deal with possible duplicate jobs from pool, show warning and ignore duplicates.
- For Windows builds libuv updated to version 1.13.1 and gcc to 7.1.0.
# v2.0.1
- [#27](https://github.com/xmrig/xmrig/issues/27) Fixed possibility crash on 32bit systems.
# v2.0.0
- Option `--backup-url` removed, instead now possibility specify multiple pools for example: `-o example1.com:3333 -u user1 -p password1 -k -o example2.com:5555 -u user2 -o example3.com:4444 -u user3`
- [#15](https://github.com/xmrig/xmrig/issues/15) Added option `-l, --log-file=FILE` to write log to file.

File diff suppressed because it is too large Load Diff

133
README.md
View File

@ -1,8 +1,19 @@
# XMRig
XMRig is high performance Monero (XMR) CPU miner, with the official full Windows support.
Based on cpuminer-multi with heavy optimizations/rewrites and removing a lot of legacy code.
<img src="http://i.imgur.com/GdRDnAu.png" width="596" >
[![Github All Releases](https://img.shields.io/github/downloads/xmrig/xmrig/total.svg)](https://github.com/xmrig/xmrig/releases)
[![GitHub release](https://img.shields.io/github/release/xmrig/xmrig/all.svg)](https://github.com/xmrig/xmrig/releases)
[![GitHub Release Date](https://img.shields.io/github/release-date-pre/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/releases)
[![GitHub license](https://img.shields.io/github/license/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/xmrig/xmrig.svg)](https://github.com/xmrig/xmrig/network)
XMRig is a high performance Monero (XMR) CPU miner, with official support for Windows.
Originally based on cpuminer-multi with heavy optimizations/rewrites and removing a lot of legacy code, since version 1.0.0 completely rewritten from scratch on C++.
* This is the **CPU-mining** version, there is also a [NVIDIA GPU version](https://github.com/xmrig/xmrig-nvidia) and [AMD GPU version]( https://github.com/xmrig/xmrig-amd).
* [Roadmap](https://github.com/xmrig/xmrig/issues/106) for next releases.
<img src="http://i.imgur.com/OKZRVDh.png" width="619" >
#### Table of contents
* [Features](#features)
@ -13,12 +24,14 @@ Based on cpuminer-multi with heavy optimizations/rewrites and removing a lot of
* [Common Issues](#common-issues)
* [Other information](#other-information)
* [Donations](#donations)
* [Release checksums](#release-checksums)
* [Contacts](#contacts)
## Features
* High performance (290+ H/s on i7 6700).
* High performance.
* Official Windows support.
* Small Windows executable, only 535 KB without dependencies.
* Small Windows executable, without dependencies.
* x86/x64 support.
* Support for backup (failover) mining server.
* keepalived support.
* Command line options compatible with cpuminer.
@ -30,73 +43,96 @@ Based on cpuminer-multi with heavy optimizations/rewrites and removing a lot of
## Download
* Binary releases: https://github.com/xmrig/xmrig/releases
* Git tree: https://github.com/xmrig/xmrig.git
* Clone with `git clone https://github.com/xmrig/xmrig.git`
* Clone with `git clone https://github.com/xmrig/xmrig.git` :hammer: [Build instructions](https://github.com/xmrig/xmrig/wiki/Build).
## Usage
### Basic example
```
xmrig.exe -o xmr-eu.dwarfpool.com:8005 -u YOUR_WALLET -p x -k
```
### Failover
```
xmrig.exe -o pool.supportxmr.com:5555 -u YOUR_WALLET1 -k -o xmr-eu.dwarfpool.com:8005 -u YOUR_WALLET2 -p x -k
```
For failover you can add multiple pools, maximum count not limited.
Use [config.xmrig.com](https://config.xmrig.com/xmrig) to generate, edit or share configurations.
### Options
```
-a, --algo=ALGO cryptonight (default) or cryptonight-lite
-o, --url=URL URL of mining server
-O, --userpass=U:P username:password pair for mining server
-u, --user=USERNAME username for mining server
-p, --pass=PASSWORD password for mining server
-t, --threads=N number of miner threads
-v, --av=N algorithm variation, 0 auto select
-k, --keepalive send keepalived for prevent timeout (need pool support)
-r, --retries=N number of times to retry before switch to backup server (default: 5)
-R, --retry-pause=N time to pause between retries (default: 5)
--cpu-affinity set process affinity to cpu core(s), mask 0x3 for cores 0 and 1
--no-color disable colored output
--donate-level=N donate level, default 5% (5 minutes in 100 minutes)
-B, --background run the miner in the background
-c, --config=FILE load a JSON-format configuration file
--max-cpu-usage=N maximum cpu usage for automatic threads mode (default 75)
--safe safe adjust threads and av settings for current cpu
--nicehash enable nicehash support
--print-time=N print hashrate report every N seconds
-h, --help display this help and exit
-V, --version output version information and exit
-a, --algo=ALGO specify the algorithm to use
cryptonight
cryptonight-lite
cryptonight-heavy
-o, --url=URL URL of mining server
-O, --userpass=U:P username:password pair for mining server
-u, --user=USERNAME username for mining server
-p, --pass=PASSWORD password for mining server
--rig-id=ID rig identifier for pool-side statistics (needs pool support)
-t, --threads=N number of miner threads
-v, --av=N algorithm variation, 0 auto select
-k, --keepalive send keepalived packet for prevent timeout (needs pool support)
--nicehash enable nicehash.com support
--tls enable SSL/TLS support (needs pool support)
--tls-fingerprint=F pool TLS certificate fingerprint, if set enable strict certificate pinning
-r, --retries=N number of times to retry before switch to backup server (default: 5)
-R, --retry-pause=N time to pause between retries (default: 5)
--cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1
--cpu-priority set process priority (0 idle, 2 normal to 5 highest)
--no-huge-pages disable huge pages support
--no-color disable colored output
--variant algorithm PoW variant
--donate-level=N donate level, default 5% (5 minutes in 100 minutes)
--user-agent set custom user-agent string for pool
-B, --background run the miner in the background
-c, --config=FILE load a JSON-format configuration file
-l, --log-file=FILE log all output to a file
-S, --syslog use system log for output messages
--max-cpu-usage=N maximum CPU usage for automatic threads mode (default 75)
--safe safe adjust threads and av settings for current CPU
--asm=ASM ASM code for cn/2, possible values: auto, none, intel, ryzen.
--print-time=N print hashrate report every N seconds
--api-port=N port for the miner API
--api-access-token=T access token for API
--api-worker-id=ID custom worker-id for API
--api-id=ID custom instance ID for API
--api-ipv6 enable IPv6 support for API
--api-no-restricted enable full remote access (only if API token set)
--dry-run test configuration and exit
-h, --help display this help and exit
-V, --version output version information and exit
```
Also you can use configuration via config file, default name **config.json**. Some options available only via config file: [`autosave`](https://github.com/xmrig/xmrig/issues/767), [`hw-aes`](https://github.com/xmrig/xmrig/issues/563). `watch` option currently not implemented in miners only in proxy.
## Algorithm variations
Since version 0.8.0.
* `--av=1` For CPUs with hardware AES.
* `--av=2` Lower power mode (double hash) of `1`.
* `--av=3` Software AES implementation.
* `--av=4` Lower power mode (double hash) of `3`.
- `av` option used for automatic and simple threads mode (when you specify only threads count).
- For [advanced threads mode](https://github.com/xmrig/xmrig/issues/563) each thread configured individually and `av` option not used.
| av | Hashes per round | Hardware AES |
|----|------------------|--------------|
| 1 | 1 (Single) | yes |
| 2 | 2 (Double) | yes |
| 3 | 1 (Single) | no |
| 4 | 2 (Double) | no |
| 5 | 3 (Triple) | yes |
| 6 | 4 (Quard) | yes |
| 7 | 5 (Penta) | yes |
| 8 | 3 (Triple) | no |
| 9 | 4 (Quard) | no |
| 10 | 5 (Penta) | no |
## Common Issues
### HUGE PAGES unavailable
* Run XMRig as Administrator.
* Since version 0.8.0 XMRig automatically enable SeLockMemoryPrivilege for current user, but reboot or sign out still required. [Manual instruction](https://msdn.microsoft.com/en-gb/library/ms190730.aspx).
* Since version 0.8.0 XMRig automatically enables SeLockMemoryPrivilege for current user, but reboot or sign out still required. [Manual instruction](https://msdn.microsoft.com/en-gb/library/ms190730.aspx).
## Other information
* No HTTP support, only stratum protocol support.
* No TLS support.
* Default donation 5% (5 minutes in 100 minutes) can be reduced to 1% via command line option `--donate-level`.
* Default donation 5% (5 minutes in 100 minutes) can be reduced to 1% via option `donate-level`.
### CPU mining performance
* **i7-6700** - 290+ H/s (4 threads, cpu affinity 0xAA)
* **Dual E5620** - 377 H/s (12 threads, cpu affinity 0xEEEE)
* **Intel i7-7700** - 307 H/s (4 threads)
* **AMD Ryzen 7 1700X** - 560 H/s (8 threads)
Please note performance is highly dependent on system load. The numbers above are obtained on an idle system. Tasks heavily using a processor cache, such as video playback, can greatly degrade hashrate. Optimal number of threads depends on the size of the L3 cache of a processor, 1 thread requires 2 MB of cache.
### Maximum performance checklist
* Idle operating system.
* Do not exceed optimal thread count.
* Use modern CPUs with AES-NI instructuon set.
* Use modern CPUs with AES-NI instruction set.
* Try setup optimal cpu affinity.
* Enable fast memory (Large/Huge pages).
@ -107,3 +143,4 @@ Please note performance is highly dependent on system load. The numbers above ar
## Contacts
* support@xmrig.com
* [reddit](https://www.reddit.com/user/XMRig/)
* [twitter](https://twitter.com/xmrig_dev)

49
cmake/FindMHD.cmake Normal file
View File

@ -0,0 +1,49 @@
# - Try to find MHD
# Once done this will define
#
# MHD_FOUND - system has MHD
# MHD_INCLUDE_DIRS - the MHD include directory
# MHD_LIBRARY - Link these to use MHD
find_path(
MHD_INCLUDE_DIR
NAMES microhttpd.h
PATHS "${XMRIG_DEPS}" ENV "XMRIG_DEPS"
PATH_SUFFIXES "include"
DOC "microhttpd include dir"
NO_DEFAULT_PATH
)
find_path(MHD_INCLUDE_DIR NAMES microhttpd.h)
find_library(
MHD_LIBRARY
NAMES libmicrohttpd.a microhttpd libmicrohttpd
PATHS "${XMRIG_DEPS}" ENV "XMRIG_DEPS"
PATH_SUFFIXES "lib"
DOC "microhttpd library"
NO_DEFAULT_PATH
)
find_library(MHD_LIBRARY NAMES microhttpd libmicrohttpd)
set(MHD_INCLUDE_DIRS ${MHD_INCLUDE_DIR})
set(MHD_LIBRARIES ${MHD_LIBRARY})
# debug library on windows
# same naming convention as in qt (appending debug library with d)
# boost is using the same "hack" as us with "optimized" and "debug"
# official MHD project actually uses _d suffix
if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
find_library(
MHD_LIBRARY_DEBUG
NAMES microhttpd_d microhttpd-10_d libmicrohttpd_d libmicrohttpd-dll_d
DOC "mhd debug library"
)
set(MHD_LIBRARIES optimized ${MHD_LIBRARIES} debug ${MHD_LIBRARY_DEBUG})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MHD DEFAULT_MSG MHD_LIBRARY MHD_INCLUDE_DIR)
mark_as_advanced(MHD_INCLUDE_DIR MHD_LIBRARY)

View File

@ -1,5 +1,22 @@
find_path(
UV_INCLUDE_DIR
NAMES uv.h
PATHS "${XMRIG_DEPS}" ENV "XMRIG_DEPS"
PATH_SUFFIXES "include"
NO_DEFAULT_PATH
)
find_path(UV_INCLUDE_DIR NAMES uv.h)
find_library(UV_LIBRARY NAMES uv libuv)
find_library(
UV_LIBRARY
NAMES libuv.a uv libuv
PATHS "${XMRIG_DEPS}" ENV "XMRIG_DEPS"
PATH_SUFFIXES "lib"
NO_DEFAULT_PATH
)
find_library(UV_LIBRARY NAMES libuv.a uv libuv)
set(UV_LIBRARIES ${UV_LIBRARY})
set(UV_INCLUDE_DIRS ${UV_INCLUDE_DIR})

25
cmake/OpenSSL.cmake Normal file
View File

@ -0,0 +1,25 @@
if (WITH_TLS)
set(OPENSSL_ROOT_DIR ${XMRIG_DEPS})
if (WIN32)
set(OPENSSL_USE_STATIC_LIBS TRUE)
set(OPENSSL_MSVC_STATIC_RT TRUE)
set(EXTRA_LIBS ${EXTRA_LIBS} Crypt32)
endif()
find_package(OpenSSL)
if (OPENSSL_FOUND)
set(TLS_SOURCES src/common/net/Tls.h src/common/net/Tls.cpp)
include_directories(${OPENSSL_INCLUDE_DIR})
else()
message(FATAL_ERROR "OpenSSL NOT found: use `-DWITH_TLS=OFF` to build without TLS support")
endif()
else()
set(TLS_SOURCES "")
set(OPENSSL_LIBRARIES "")
add_definitions(/DXMRIG_NO_TLS)
set(CMAKE_PROJECT_NAME "${CMAKE_PROJECT_NAME}-notls")
endif()

33
cmake/asm.cmake Normal file
View File

@ -0,0 +1,33 @@
if (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
set(XMRIG_ASM_LIBRARY "xmrig-asm")
if (CMAKE_C_COMPILER_ID MATCHES MSVC)
enable_language(ASM_MASM)
if (MSVC_TOOLSET_VERSION GREATER_EQUAL 141)
set(XMRIG_ASM_FILE "src/crypto/asm/cn_main_loop.asm")
else()
set(XMRIG_ASM_FILE "src/crypto/asm/win64/cn_main_loop.asm")
endif()
set_property(SOURCE ${XMRIG_ASM_FILE} PROPERTY ASM_MASM)
else()
enable_language(ASM)
if (WIN32 AND CMAKE_C_COMPILER_ID MATCHES GNU)
set(XMRIG_ASM_FILE "src/crypto/asm/win64/cn_main_loop.S")
else()
set(XMRIG_ASM_FILE "src/crypto/asm/cn_main_loop.S")
endif()
set_property(SOURCE ${XMRIG_ASM_FILE} PROPERTY C)
endif()
add_library(${XMRIG_ASM_LIBRARY} STATIC ${XMRIG_ASM_FILE})
set(XMRIG_ASM_SOURCES src/crypto/Asm.h src/crypto/Asm.cpp)
set_property(TARGET ${XMRIG_ASM_LIBRARY} PROPERTY LINKER_LANGUAGE C)
else()
set(XMRIG_ASM_SOURCES "")
set(XMRIG_ASM_LIBRARY "")
add_definitions(/DXMRIG_NO_ASM)
endif()

25
cmake/cpu.cmake Normal file
View File

@ -0,0 +1,25 @@
if (NOT CMAKE_SYSTEM_PROCESSOR)
message(WARNING "CMAKE_SYSTEM_PROCESSOR not defined")
endif()
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$")
add_definitions(/DRAPIDJSON_SSE2)
endif()
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64)$")
set(XMRIG_ARM ON)
set(XMRIG_ARMv8 ON)
set(WITH_LIBCPUID OFF)
add_definitions(/DXMRIG_ARM)
add_definitions(/DXMRIG_ARMv8)
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7|armv7f|armv7s|armv7k|armv7-a|armv7l)$")
set(XMRIG_ARM ON)
set(XMRIG_ARMv7 ON)
set(WITH_LIBCPUID OFF)
add_definitions(/DXMRIG_ARM)
add_definitions(/DXMRIG_ARMv7)
endif()

73
cmake/flags.cmake Normal file
View File

@ -0,0 +1,73 @@
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 11)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE Release)
endif()
if (CMAKE_BUILD_TYPE STREQUAL "Release")
add_definitions(/DNDEBUG)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-strict-aliasing")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Ofast")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-exceptions -fno-rtti -Wno-class-memaccess")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -s")
if (XMRIG_ARMv8)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv8-a+crypto")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+crypto -flax-vector-conversions")
elseif (XMRIG_ARMv7)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -flax-vector-conversions")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
endif()
if (WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif()
add_definitions(/D_GNU_SOURCE)
if (${CMAKE_VERSION} VERSION_LESS "3.1.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
#set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -gdwarf-2")
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Ox /Ot /Oi /MT /GL")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox /Ot /Oi /MT /GL")
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
add_definitions(/D_CRT_NONSTDC_NO_WARNINGS)
add_definitions(/DNOMINMAX)
elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Ofast -funroll-loops -fmerge-all-constants")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-exceptions -fno-rtti -Wno-missing-braces")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -funroll-loops -fmerge-all-constants")
if (XMRIG_ARMv8)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv8-a+crypto")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+crypto")
elseif (XMRIG_ARMv7)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -march=${CMAKE_SYSTEM_PROCESSOR}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -march=${CMAKE_SYSTEM_PROCESSOR}")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
endif()
endif()

31
doc/ALGORITHMS.md Normal file
View File

@ -0,0 +1,31 @@
# Algorithms
XMRig uses a different way to specify algorithms, compared to other miners.
Algorithm selection splitted to 2 parts:
* Global base algorithm per miner or proxy instance, `algo` option. Possible values: `cryptonight`, `cryptonight-lite`, `cryptonight-heavy`.
* Algorithm variant specified separately for each pool, `variant` option.
* [Full table for supported algorithm and variants.](https://github.com/xmrig/xmrig-proxy/blob/master/doc/STRATUM_EXT.md#14-algorithm-names-and-variants)
#### Example
```json
{
"algo": "cryptonight",
...
"pools": [
{
"url": "...",
"variant": 1,
...
}
],
...
}
```
## Mining algorithm negotiation
If your pool support [mining algorithm negotiation](https://github.com/xmrig/xmrig-proxy/issues/168) miner will choice proper variant automaticaly and if you choice wrong base algorithm you will see error message.
Pools with mining algorithm negotiation support.
* [www.hashvault.pro](https://www.hashvault.pro/)

53
doc/API.md Normal file
View File

@ -0,0 +1,53 @@
# HTTP API
If you want use API you need choice a port where is internal HTTP server will listen for incoming connections. API will not available if miner built without `libmicrohttpd`.
Example configuration:
```json
"api": {
"port": 44444,
"access-token": "TOKEN",
"worker-id": null,
"ipv6": false,
"restricted": false
},
```
* **port** Port for incoming connections `http://<miner ip>:<port>`.
* **access-token** [Bearer](https://gist.github.com/xmrig/c75fdd1f8e0f3bac05500be2ab718f8e#file-api-html-L54) access token to secure access to API.
* **worker-id** Optional worker name, if not set will be detected automatically.
* **ipv6** Enable (`true`) or disable (`false`) IPv6 for API.
* **restricted** Use `false` to allow remote configuration.
If you prefer use command line options instead of config file, you can use options: `--api-port`, `--api-access-token`, `--api-worker-id`, `--api-ipv6` and `api-no-restricted`.
## Endpoints
### GET /1/summary
Get miner summary information. [Example](api/1/summary.json).
### GET /1/threads
Get detailed information about miner threads. [Example](api/1/threads.json).
## Restricted endpoints
All API endpoints below allow access to sensitive information and remote configure miner. You should set `access-token` and allow unrestricted access (`"restricted": false`).
### GET /1/config
Get current miner configuration. [Example](api/1/config.json).
### PUT /1/config
Update current miner configuration. Common use case, get current configuration, make changes, and upload it to miner.
Curl example:
```
curl -v --data-binary @config.json -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer SECRET" http://127.0.0.1:44444/1/config
```

63
doc/api/1/config.json Normal file
View File

@ -0,0 +1,63 @@
{
"algo": "cryptonight",
"api": {
"port": 44444,
"access-token": "TOKEN",
"worker-id": null,
"ipv6": false,
"restricted": false
},
"av": 1,
"background": false,
"colors": true,
"cpu-affinity": null,
"cpu-priority": null,
"donate-level": 5,
"huge-pages": true,
"hw-aes": null,
"log-file": null,
"max-cpu-usage": 75,
"pools": [
{
"url": "pool.monero.hashvault.pro:3333",
"user": "48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD",
"pass": "x",
"keepalive": false,
"nicehash": false,
"variant": -1
},
{
"url": "pool.supportxmr.com:3333",
"user": "48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD",
"pass": "x",
"keepalive": false,
"nicehash": false,
"variant": -1
}
],
"print-time": 60,
"retries": 5,
"retry-pause": 5,
"safe": false,
"threads": [
{
"low_power_mode": 1,
"affine_to_cpu": 0
},
{
"low_power_mode": 1,
"affine_to_cpu": 1
},
{
"low_power_mode": 1,
"affine_to_cpu": 2
},
{
"low_power_mode": 1,
"affine_to_cpu": 3
}
],
"user-agent": null,
"syslog": false,
"watch": false
}

73
doc/api/1/summary.json Normal file
View File

@ -0,0 +1,73 @@
{
"id": "92f3104f9a2ee78c",
"worker_id": "Ubuntu-1604-xenial-64-minimal",
"version": "2.6.0-beta3",
"kind": "cpu",
"ua": "XMRig/2.6.0-beta3 (Linux x86_64) libuv/1.8.0 gcc/5.4.0",
"cpu": {
"brand": "Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz",
"aes": true,
"x64": true,
"sockets": 1
},
"algo": "cryptonight",
"hugepages": true,
"donate_level": 5,
"hashrate": {
"total": [
296.24,
296.23,
295.97
],
"highest": 296.5,
"threads": [
[
73.39,
73.39,
73.28
],
[
74.72,
74.72,
74.71
],
[
74.72,
74.72,
74.71
],
[
73.39,
73.39,
73.27
]
]
},
"results": {
"diff_current": 9990,
"shares_good": 30,
"shares_total": 30,
"avg_time": 31,
"hashes_total": 311833,
"best": [
278199,
181923,
103717,
96632,
56154,
51580,
45667,
33159,
29581,
29514
],
"error_log": []
},
"connection": {
"pool": "pool.monero.hashvault.pro:3333",
"uptime": 953,
"ping": 35,
"failures": 0,
"error_log": []
}
}

65
doc/api/1/threads.json Normal file
View File

@ -0,0 +1,65 @@
{
"hugepages": [
4,
4
],
"memory": 8388608,
"threads": [
{
"type": "cpu",
"algo": "cryptonight",
"av": 1,
"low_power_mode": 1,
"affine_to_cpu": 0,
"priority": -1,
"soft_aes": false,
"hashrate": [
73.39,
73.4,
73.28
]
},
{
"type": "cpu",
"algo": "cryptonight",
"av": 1,
"low_power_mode": 1,
"affine_to_cpu": 1,
"priority": -1,
"soft_aes": false,
"hashrate": [
74.72,
74.72,
74.7
]
},
{
"type": "cpu",
"algo": "cryptonight",
"av": 1,
"low_power_mode": 1,
"affine_to_cpu": 2,
"priority": -1,
"soft_aes": false,
"hashrate": [
74.71,
74.72,
74.7
]
},
{
"type": "cpu",
"algo": "cryptonight",
"av": 1,
"low_power_mode": 1,
"affine_to_cpu": 3,
"priority": -1,
"soft_aes": false,
"hashrate": [
73.39,
73.4,
73.28
]
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -4,8 +4,8 @@
IDI_ICON1 ICON DISCARDABLE "app.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION APP_VER_MAJOR,APP_VER_MINOR,APP_VER_BUILD,APP_VER_REV
PRODUCTVERSION APP_VER_MAJOR,APP_VER_MINOR,APP_VER_BUILD,APP_VER_REV
FILEVERSION APP_VER_MAJOR,APP_VER_MINOR,APP_VER_PATCH,0
PRODUCTVERSION APP_VER_MAJOR,APP_VER_MINOR,APP_VER_PATCH,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG

65
src/3rdparty/aligned_malloc.h vendored Normal file
View File

@ -0,0 +1,65 @@
/* 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 2016-2017 XMRig <support@xmrig.com>
*
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ALIGNED_MALLOC_H__
#define __ALIGNED_MALLOC_H__
#include <stdlib.h>
#ifndef __cplusplus
extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
#else
// Some systems (e.g. those with GNU libc) declare posix_memalign with an
// exception specifier. Via an "egregious workaround" in
// Sema::CheckEquivalentExceptionSpec, Clang accepts the following as a valid
// redeclaration of glibc's declaration.
extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
#endif
static __inline__ void *__attribute__((__always_inline__, __malloc__)) _mm_malloc(size_t __size, size_t __align)
{
if (__align == 1) {
return malloc(__size);
}
if (!(__align & (__align - 1)) && __align < sizeof(void *))
__align = sizeof(void *);
void *__mallocedMemory;
if (posix_memalign(&__mallocedMemory, __align, __size)) {
return 0;
}
return __mallocedMemory;
}
static __inline__ void __attribute__((__always_inline__)) _mm_free(void *__p)
{
free(__p);
}
#endif /* __ALIGNED_MALLOC_H__ */

View File

@ -56,7 +56,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#pragma warning(disable:4996);
#pragma warning(disable:4996)
#define __GETOPT_H__

View File

@ -1,25 +0,0 @@
cmake_minimum_required (VERSION 2.8)
project (jansson C)
add_definitions(-DHAVE_CONFIG_H)
# Add the lib sources.
file(GLOB JANSSON_SRC *.c)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Os")
set(JANSSON_HDR_PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/hashtable.h
${CMAKE_CURRENT_SOURCE_DIR}/jansson_private.h
${CMAKE_CURRENT_SOURCE_DIR}/strbuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/utf.h
${CMAKE_CURRENT_SOURCE_DIR}/jansson_private_config.h)
set(JANSSON_HDR_PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/jansson_config.h
${CMAKE_CURRENT_SOURCE_DIR}/jansson.h)
add_library(jansson STATIC
${JANSSON_SRC}
${JANSSON_HDR_PRIVATE}
${JANSSON_HDR_PUBLIC})

View File

@ -1,19 +0,0 @@
Copyright (c) 2009-2014 Petri Lehtinen <petri@digip.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@ -1,63 +0,0 @@
#include <string.h>
#include "jansson_private.h"
void jsonp_error_init(json_error_t *error, const char *source)
{
if(error)
{
error->text[0] = '\0';
error->line = -1;
error->column = -1;
error->position = 0;
if(source)
jsonp_error_set_source(error, source);
else
error->source[0] = '\0';
}
}
void jsonp_error_set_source(json_error_t *error, const char *source)
{
size_t length;
if(!error || !source)
return;
length = strlen(source);
if(length < JSON_ERROR_SOURCE_LENGTH)
strncpy(error->source, source, length + 1);
else {
size_t extra = length - JSON_ERROR_SOURCE_LENGTH + 4;
strncpy(error->source, "...", 3);
strncpy(error->source + 3, source + extra, length - extra + 1);
}
}
void jsonp_error_set(json_error_t *error, int line, int column,
size_t position, const char *msg, ...)
{
va_list ap;
va_start(ap, msg);
jsonp_error_vset(error, line, column, position, msg, ap);
va_end(ap);
}
void jsonp_error_vset(json_error_t *error, int line, int column,
size_t position, const char *msg, va_list ap)
{
if(!error)
return;
if(error->text[0] != '\0') {
/* error already set */
return;
}
error->line = line;
error->column = column;
error->position = (int)position;
vsnprintf(error->text, JSON_ERROR_TEXT_LENGTH, msg, ap);
error->text[JSON_ERROR_TEXT_LENGTH - 1] = '\0';
}

File diff suppressed because it is too large Load Diff

View File

@ -1,176 +0,0 @@
/*
* Copyright (c) 2009-2016 Petri Lehtinen <petri@digip.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
#ifndef HASHTABLE_H
#define HASHTABLE_H
#include <stdlib.h>
#include "jansson.h"
struct hashtable_list {
struct hashtable_list *prev;
struct hashtable_list *next;
};
/* "pair" may be a bit confusing a name, but think of it as a
key-value pair. In this case, it just encodes some extra data,
too */
struct hashtable_pair {
struct hashtable_list list;
struct hashtable_list ordered_list;
size_t hash;
json_t *value;
char key[1];
};
struct hashtable_bucket {
struct hashtable_list *first;
struct hashtable_list *last;
};
typedef struct hashtable {
size_t size;
struct hashtable_bucket *buckets;
size_t order; /* hashtable has pow(2, order) buckets */
struct hashtable_list list;
struct hashtable_list ordered_list;
} hashtable_t;
#define hashtable_key_to_iter(key_) \
(&(container_of(key_, struct hashtable_pair, key)->ordered_list))
/**
* hashtable_init - Initialize a hashtable object
*
* @hashtable: The (statically allocated) hashtable object
*
* Initializes a statically allocated hashtable object. The object
* should be cleared with hashtable_close when it's no longer used.
*
* Returns 0 on success, -1 on error (out of memory).
*/
int hashtable_init(hashtable_t *hashtable);
/**
* hashtable_close - Release all resources used by a hashtable object
*
* @hashtable: The hashtable
*
* Destroys a statically allocated hashtable object.
*/
void hashtable_close(hashtable_t *hashtable);
/**
* hashtable_set - Add/modify value in hashtable
*
* @hashtable: The hashtable object
* @key: The key
* @serial: For addition order of keys
* @value: The value
*
* If a value with the given key already exists, its value is replaced
* with the new value. Value is "stealed" in the sense that hashtable
* doesn't increment its refcount but decreases the refcount when the
* value is no longer needed.
*
* Returns 0 on success, -1 on failure (out of memory).
*/
int hashtable_set(hashtable_t *hashtable, const char *key, json_t *value);
/**
* hashtable_get - Get a value associated with a key
*
* @hashtable: The hashtable object
* @key: The key
*
* Returns value if it is found, or NULL otherwise.
*/
void *hashtable_get(hashtable_t *hashtable, const char *key);
/**
* hashtable_del - Remove a value from the hashtable
*
* @hashtable: The hashtable object
* @key: The key
*
* Returns 0 on success, or -1 if the key was not found.
*/
int hashtable_del(hashtable_t *hashtable, const char *key);
/**
* hashtable_clear - Clear hashtable
*
* @hashtable: The hashtable object
*
* Removes all items from the hashtable.
*/
void hashtable_clear(hashtable_t *hashtable);
/**
* hashtable_iter - Iterate over hashtable
*
* @hashtable: The hashtable object
*
* Returns an opaque iterator to the first element in the hashtable.
* The iterator should be passed to hashtable_iter_* functions.
* The hashtable items are not iterated over in any particular order.
*
* There's no need to free the iterator in any way. The iterator is
* valid as long as the item that is referenced by the iterator is not
* deleted. Other values may be added or deleted. In particular,
* hashtable_iter_next() may be called on an iterator, and after that
* the key/value pair pointed by the old iterator may be deleted.
*/
void *hashtable_iter(hashtable_t *hashtable);
/**
* hashtable_iter_at - Return an iterator at a specific key
*
* @hashtable: The hashtable object
* @key: The key that the iterator should point to
*
* Like hashtable_iter() but returns an iterator pointing to a
* specific key.
*/
void *hashtable_iter_at(hashtable_t *hashtable, const char *key);
/**
* hashtable_iter_next - Advance an iterator
*
* @hashtable: The hashtable object
* @iter: The iterator
*
* Returns a new iterator pointing to the next element in the
* hashtable or NULL if the whole hastable has been iterated over.
*/
void *hashtable_iter_next(hashtable_t *hashtable, void *iter);
/**
* hashtable_iter_key - Retrieve the key pointed by an iterator
*
* @iter: The iterator
*/
void *hashtable_iter_key(void *iter);
/**
* hashtable_iter_value - Retrieve the value pointed by an iterator
*
* @iter: The iterator
*/
void *hashtable_iter_value(void *iter);
/**
* hashtable_iter_set - Set the value pointed by an iterator
*
* @iter: The iterator
* @value: The value to set
*/
void hashtable_iter_set(void *iter, json_t *value);
#endif

View File

@ -1,277 +0,0 @@
/* Generate sizeof(uint32_t) bytes of as random data as possible to seed
the hash function.
*/
#ifdef HAVE_CONFIG_H
#include <jansson_private_config.h>
#endif
#include <stdio.h>
#include <time.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_SCHED_H
#include <sched.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if defined(_WIN32)
/* For GetModuleHandle(), GetProcAddress() and GetCurrentProcessId() */
#include <windows.h>
#endif
#include "jansson.h"
static uint32_t buf_to_uint32(char *data) {
size_t i;
uint32_t result = 0;
for (i = 0; i < sizeof(uint32_t); i++)
result = (result << 8) | (unsigned char)data[i];
return result;
}
/* /dev/urandom */
#if !defined(_WIN32) && defined(USE_URANDOM)
static int seed_from_urandom(uint32_t *seed) {
/* Use unbuffered I/O if we have open(), close() and read(). Otherwise
fall back to fopen() */
char data[sizeof(uint32_t)];
int ok;
#if defined(HAVE_OPEN) && defined(HAVE_CLOSE) && defined(HAVE_READ)
int urandom;
urandom = open("/dev/urandom", O_RDONLY);
if (urandom == -1)
return 1;
ok = read(urandom, data, sizeof(uint32_t)) == sizeof(uint32_t);
close(urandom);
#else
FILE *urandom;
urandom = fopen("/dev/urandom", "rb");
if (!urandom)
return 1;
ok = fread(data, 1, sizeof(uint32_t), urandom) == sizeof(uint32_t);
fclose(urandom);
#endif
if (!ok)
return 1;
*seed = buf_to_uint32(data);
return 0;
}
#endif
/* Windows Crypto API */
#if defined(_WIN32) && defined(USE_WINDOWS_CRYPTOAPI)
#include <wincrypt.h>
typedef BOOL (WINAPI *CRYPTACQUIRECONTEXTA)(HCRYPTPROV *phProv, LPCSTR pszContainer, LPCSTR pszProvider, DWORD dwProvType, DWORD dwFlags);
typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer);
typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV hProv, DWORD dwFlags);
static int seed_from_windows_cryptoapi(uint32_t *seed)
{
HINSTANCE hAdvAPI32 = NULL;
CRYPTACQUIRECONTEXTA pCryptAcquireContext = NULL;
CRYPTGENRANDOM pCryptGenRandom = NULL;
CRYPTRELEASECONTEXT pCryptReleaseContext = NULL;
HCRYPTPROV hCryptProv = 0;
BYTE data[sizeof(uint32_t)];
int ok;
hAdvAPI32 = GetModuleHandle(TEXT("advapi32.dll"));
if(hAdvAPI32 == NULL)
return 1;
pCryptAcquireContext = (CRYPTACQUIRECONTEXTA)GetProcAddress(hAdvAPI32, "CryptAcquireContextA");
if (!pCryptAcquireContext)
return 1;
pCryptGenRandom = (CRYPTGENRANDOM)GetProcAddress(hAdvAPI32, "CryptGenRandom");
if (!pCryptGenRandom)
return 1;
pCryptReleaseContext = (CRYPTRELEASECONTEXT)GetProcAddress(hAdvAPI32, "CryptReleaseContext");
if (!pCryptReleaseContext)
return 1;
if (!pCryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
return 1;
ok = pCryptGenRandom(hCryptProv, sizeof(uint32_t), data);
pCryptReleaseContext(hCryptProv, 0);
if (!ok)
return 1;
*seed = buf_to_uint32((char *)data);
return 0;
}
#endif
/* gettimeofday() and getpid() */
static int seed_from_timestamp_and_pid(uint32_t *seed) {
#ifdef HAVE_GETTIMEOFDAY
/* XOR of seconds and microseconds */
struct timeval tv;
gettimeofday(&tv, NULL);
*seed = (uint32_t)tv.tv_sec ^ (uint32_t)tv.tv_usec;
#else
/* Seconds only */
*seed = (uint32_t)time(NULL);
#endif
/* XOR with PID for more randomness */
#if defined(_WIN32)
*seed ^= (uint32_t)GetCurrentProcessId();
#elif defined(HAVE_GETPID)
*seed ^= (uint32_t)getpid();
#endif
return 0;
}
static uint32_t generate_seed() {
uint32_t seed;
int done = 0;
#if !defined(_WIN32) && defined(USE_URANDOM)
if (seed_from_urandom(&seed) == 0)
done = 1;
#endif
#if defined(_WIN32) && defined(USE_WINDOWS_CRYPTOAPI)
if (seed_from_windows_cryptoapi(&seed) == 0)
done = 1;
#endif
if (!done) {
/* Fall back to timestamp and PID if no better randomness is
available */
seed_from_timestamp_and_pid(&seed);
}
/* Make sure the seed is never zero */
if (seed == 0)
seed = 1;
return seed;
}
volatile uint32_t hashtable_seed = 0;
#if defined(HAVE_ATOMIC_BUILTINS) && (defined(HAVE_SCHED_YIELD) || !defined(_WIN32))
static volatile char seed_initialized = 0;
void json_object_seed(size_t seed) {
uint32_t new_seed = (uint32_t)seed;
if (hashtable_seed == 0) {
if (__atomic_test_and_set(&seed_initialized, __ATOMIC_RELAXED) == 0) {
/* Do the seeding ourselves */
if (new_seed == 0)
new_seed = generate_seed();
__atomic_store_n(&hashtable_seed, new_seed, __ATOMIC_RELEASE);
} else {
/* Wait for another thread to do the seeding */
do {
#ifdef HAVE_SCHED_YIELD
sched_yield();
#endif
} while(__atomic_load_n(&hashtable_seed, __ATOMIC_ACQUIRE) == 0);
}
}
}
#elif defined(HAVE_SYNC_BUILTINS) && (defined(HAVE_SCHED_YIELD) || !defined(_WIN32))
void json_object_seed(size_t seed) {
uint32_t new_seed = (uint32_t)seed;
if (hashtable_seed == 0) {
if (new_seed == 0) {
/* Explicit synchronization fences are not supported by the
__sync builtins, so every thread getting here has to
generate the seed value.
*/
new_seed = generate_seed();
}
do {
if (__sync_bool_compare_and_swap(&hashtable_seed, 0, new_seed)) {
/* We were the first to seed */
break;
} else {
/* Wait for another thread to do the seeding */
#ifdef HAVE_SCHED_YIELD
sched_yield();
#endif
}
} while(hashtable_seed == 0);
}
}
#elif defined(_WIN32)
static long seed_initialized = 0;
void json_object_seed(size_t seed) {
uint32_t new_seed = (uint32_t)seed;
if (hashtable_seed == 0) {
if (InterlockedIncrement(&seed_initialized) == 1) {
/* Do the seeding ourselves */
if (new_seed == 0)
new_seed = generate_seed();
hashtable_seed = new_seed;
} else {
/* Wait for another thread to do the seeding */
do {
SwitchToThread();
} while (hashtable_seed == 0);
}
}
}
#else
/* Fall back to a thread-unsafe version */
void json_object_seed(size_t seed) {
uint32_t new_seed = (uint32_t)seed;
if (hashtable_seed == 0) {
if (new_seed == 0)
new_seed = generate_seed();
hashtable_seed = new_seed;
}
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +0,0 @@
/*
* Copyright (c) 2010-2016 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*
*
* This file specifies a part of the site-specific configuration for
* Jansson, namely those things that affect the public API in
* jansson.h.
*
* The configure script copies this file to jansson_config.h and
* replaces @var@ substitutions by values that fit your system. If you
* cannot run the configure script, you can do the value substitution
* by hand.
*/
#ifndef JANSSON_CONFIG_H
#define JANSSON_CONFIG_H
/* If your compiler supports the inline keyword in C, JSON_INLINE is
defined to `inline', otherwise empty. In C++, the inline is always
supported. */
#ifdef __cplusplus
#define JSON_INLINE inline
#else
#define JSON_INLINE inline
#endif
/* If your compiler supports the `long long` type and the strtoll()
library function, JSON_INTEGER_IS_LONG_LONG is defined to 1,
otherwise to 0. */
#define JSON_INTEGER_IS_LONG_LONG 1
/* If locale.h and localeconv() are available, define to 1,
otherwise to 0. */
#define JSON_HAVE_LOCALECONV 1
/* Maximum recursion depth for parsing JSON input.
This limits the depth of e.g. array-within-array constructions. */
#define JSON_PARSER_MAX_DEPTH 2048
#endif

View File

@ -1,109 +0,0 @@
/*
* Copyright (c) 2009-2016 Petri Lehtinen <petri@digip.org>
*
* Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
#ifndef JANSSON_PRIVATE_H
#define JANSSON_PRIVATE_H
#include "jansson_private_config.h"
#include <stddef.h>
#include "jansson.h"
#include "hashtable.h"
#include "strbuffer.h"
#define container_of(ptr_, type_, member_) \
((type_ *)((char *)ptr_ - offsetof(type_, member_)))
/* On some platforms, max() may already be defined */
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
/* va_copy is a C99 feature. In C89 implementations, it's sometimes
available as __va_copy. If not, memcpy() should do the trick. */
#ifndef va_copy
#ifdef __va_copy
#define va_copy __va_copy
#else
#define va_copy(a, b) memcpy(&(a), &(b), sizeof(va_list))
#endif
#endif
typedef struct {
json_t json;
hashtable_t hashtable;
int visited;
} json_object_t;
typedef struct {
json_t json;
size_t size;
size_t entries;
json_t **table;
int visited;
} json_array_t;
typedef struct {
json_t json;
char *value;
size_t length;
} json_string_t;
typedef struct {
json_t json;
double value;
} json_real_t;
typedef struct {
json_t json;
json_int_t value;
} json_integer_t;
#define json_to_object(json_) container_of(json_, json_object_t, json)
#define json_to_array(json_) container_of(json_, json_array_t, json)
#define json_to_string(json_) container_of(json_, json_string_t, json)
#define json_to_real(json_) container_of(json_, json_real_t, json)
#define json_to_integer(json_) container_of(json_, json_integer_t, json)
/* Create a string by taking ownership of an existing buffer */
json_t *jsonp_stringn_nocheck_own(const char *value, size_t len);
/* Error message formatting */
void jsonp_error_init(json_error_t *error, const char *source);
void jsonp_error_set_source(json_error_t *error, const char *source);
void jsonp_error_set(json_error_t *error, int line, int column,
size_t position, const char *msg, ...);
void jsonp_error_vset(json_error_t *error, int line, int column,
size_t position, const char *msg, va_list ap);
/* Locale independent string<->double conversions */
int jsonp_strtod(strbuffer_t *strbuffer, double *out);
int jsonp_dtostr(char *buffer, size_t size, double value, int prec);
/* Wrappers for custom memory functions */
void* jsonp_malloc(size_t size);
void jsonp_free(void *ptr);
char *jsonp_strndup(const char *str, size_t length);
char *jsonp_strdup(const char *str);
char *jsonp_strndup(const char *str, size_t len);
/* Windows compatibility */
#if defined(_WIN32) || defined(WIN32)
# if defined(_MSC_VER) /* MS compiller */
# if (_MSC_VER < 1900) && !defined(snprintf) /* snprintf not defined yet & not introduced */
# define snprintf _snprintf
# endif
# if (_MSC_VER < 1500) && !defined(vsnprintf) /* vsnprintf not defined yet & not introduced */
# define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
# endif
# else /* Other Windows compiller, old definition */
# define snprintf _snprintf
# define vsnprintf _vsnprintf
# endif
#endif
#endif

View File

@ -1,173 +0,0 @@
/* jansson_private_config.h. Generated from jansson_private_config.h.in by configure. */
/* jansson_private_config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if gcc's __atomic builtins are available */
#ifndef _MSC_VER
# define HAVE_ATOMIC_BUILTINS 1
#endif
/* Define to 1 if you have the `close' function. */
#define HAVE_CLOSE 1
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have the <endian.h> header file. */
/* #undef HAVE_ENDIAN_H */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `getpid' function. */
#define HAVE_GETPID 1
/* Define to 1 if you have the `gettimeofday' function. */
#ifndef _MSC_VER
# define HAVE_GETTIMEOFDAY 1
#endif
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `localeconv' function. */
#define HAVE_LOCALECONV 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if the system has the type 'long long int'. */
#define HAVE_LONG_LONG_INT 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `open' function. */
#define HAVE_OPEN 1
/* Define to 1 if you have the `read' function. */
#define HAVE_READ 1
/* Define to 1 if you have the <sched.h> header file. */
#ifndef _MSC_VER
# define HAVE_SCHED_H 1
#endif
/* Define to 1 if you have the `sched_yield' function. */
#ifndef _MSC_VER
# define HAVE_SCHED_YIELD 1
#endif
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strtoll' function. */
#define HAVE_STRTOLL 1
/* Define to 1 if gcc's __sync builtins are available */
#define HAVE_SYNC_BUILTINS 1
/* Define to 1 if you have the <sys/param.h> header file. */
#ifndef _MSC_VER
# define HAVE_SYS_PARAM_H 1
#endif
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#ifndef _MSC_VER
# define HAVE_SYS_TIME_H 1
#endif
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#ifndef _MSC_VER
# define HAVE_UNISTD_H 1
#endif
/* Define to 1 if the system has the type 'unsigned long long int'. */
#define HAVE_UNSIGNED_LONG_LONG_INT 1
/* Number of buckets new object hashtables contain is 2 raised to this power.
E.g. 3 -> 2^3 = 8. */
#define INITIAL_HASHTABLE_ORDER 3
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "jansson"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "petri@digip.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "jansson"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "jansson 2.9"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "jansson"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "2.9"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if /dev/urandom should be used for seeding the hash function */
#define USE_URANDOM 1
/* Define to 1 if CryptGenRandom should be used for seeding the hash function
*/
#define USE_WINDOWS_CRYPTOAPI 1
/* Version number of package */
#define VERSION "2.9"
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
/* #undef _UINT32_T */
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
/* #undef _UINT8_T */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to the type of a signed integer type of width exactly 32 bits if
such a type exists and the standard includes do not define it. */
/* #undef int32_t */
/* Define to the type of an unsigned integer type of width exactly 16 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint16_t */
/* Define to the type of an unsigned integer type of width exactly 32 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint32_t */
/* Define to the type of an unsigned integer type of width exactly 8 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint8_t */

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More