rezky_nightky
67cc6cfd1c
fix: cross typos detail below:
...
What I did
Repository rules / exclusions
I didn’t find repo-specific spelling tooling already in place (no existing codespell config).
Given this is a C/C++ repo with vendored sources, I treated src/3rdparty/** as third-party and excluded it from typo fixing (and encoded that in the new .codespellrc).
Typos fixed (first-party only)
Docs
CHANGELOG.md: perfomance -> performance
doc/API.md: optionaly -> optionally, Offical -> Official
doc/BENCHMARK.md: parameteres -> parameters
doc/CPU.md: loosing -> losing, instuctions -> instructions
doc/CHANGELOG_OLD.md: multiple obvious text typos like Breaked -> Broken, singal -> signal, previos -> previous, secons -> seconds, automaticaly -> automatically, perfomance -> performance
Code comments / doc comments (safe text-only changes)
src/base/crypto/sha3.cpp: Inteface -> Interface (comment banner)
src/backend/opencl/cl/cn/cryptonight.cl: performe -> perform, crashs -> crashes (comments)
src/backend/opencl/cl/kawpow/kawpow.cl: regsters -> registers, intial -> initial (comments)
src/crypto/randomx/aes_hash.cpp: intial -> initial (comment)
src/crypto/randomx/intrin_portable.h: cant -> can't (comment)
src/crypto/randomx/randomx.h: intialization -> initialization (doc comment)
src/crypto/cn/c_jh.c: intital -> initial (comment)
src/crypto/cn/skein_port.h: varaiable -> variable (comment)
src/backend/opencl/cl/cn/wolf-skein.cl: Build-in -> Built-in (comment)
What I intentionally did NOT change
Anything under src/3rdparty/** (vendored).
A few remaining codespell hits are either:
Upstream/embedded sources we excluded (groestl256.cl, jh.cl contain Projet)
Potentially valid identifier/name (Carmel CPU codename)
Low-risk token in codegen comments (vor inside an instruction comment)
These are handled via ignore rules in .codespellrc instead of modifying code.
Added: .codespellrc
Created /.codespellrc with:
skip entries for vendored / embedded upstream areas:
./src/3rdparty
./src/crypto/ghostrider
./src/crypto/randomx/blake2
./src/crypto/cn/sse2neon.h
./src/backend/opencl/cl/cn/groestl256.cl
./src/backend/opencl/cl/cn/jh.cl
ignore-words-list for:
Carmel
vor
Verification
codespell . --config ./.codespellrc now exits clean (exit code 0).
Signed-off-by: rezky_nightky <with.rezky@gmail.com >
2026-01-21 22:36:59 +07:00
XMRig
db24bf5154
Revert "Merge branch 'pr3764' into dev"
...
This reverts commit 0d9a372e49 , reversing
changes made to 1a04bf2904 .
2026-01-21 21:32:51 +07:00
rezky_nightky
5ca4828255
feat: stability improvements, see detail below
...
Key stability improvements made (deterministic + bounded)
1) Bounded memory usage in long-running stats
Fixed unbounded growth in NetworkState latency tracking:
Replaced std::vector<uint16_t> m_latency + push_back() with a fixed-size ring buffer (kLatencyWindow = 1024) and explicit counters.
Median latency computation now operates on at most 1024 samples, preventing memory growth and avoiding performance cliffs from ever-growing copies/sorts.
2) Prevent crash/UAF on shutdown + more predictable teardown
Controller shutdown ordering (Controller::stop()):
Now stops m_miner before destroying m_network.
This reduces chances of worker threads submitting results into a network listener that’s already destroyed.
Thread teardown hardening (backend/common/Thread.h):
Destructor now checks std::thread::joinable() before join().
Avoids std::terminate() if a thread object exists but never started due to early exit/error paths.
3) Fixed real leaks (including executable memory)
Executable memory leak fixed (crypto/cn/CnCtx.cpp):
CnCtx::create() allocates executable memory for generated_code via VirtualMemory::allocateExecutableMemory(0x4000, ...).
Previously CnCtx::release() only _mm_free()’d the struct, leaking the executable mapping.
Now CnCtx::release() frees generated_code before freeing the ctx.
GPU verification leak fixed (net/JobResults.cpp):
In getResults() (GPU result verification), a cryptonight_ctx was created via CnCtx::create() but never released.
Added CnCtx::release(ctx, 1).
4) JobResults: bounded queues + backpressure + safe shutdown semantics
The old JobResults could:
enqueue unlimited std::list items (m_results, m_bundles) → unbounded RAM,
call uv_queue_work per async batch → unbounded libuv threadpool backlog,
delete handler directly while worker threads might still submit → potential crash/UAF.
Changes made:
Hard queue limits:
kMaxQueuedResults = 4096
kMaxQueuedBundles = 256
Excess is dropped (bounded behavior under load).
Async coalescing:
Only one pending async notification at a time (m_pendingAsync), reducing eventfd/uv wake storms.
Bounded libuv work scheduling:
Only one uv_queue_work is scheduled at a time (m_workScheduled), preventing CPU starvation and unpredictable backlog.
Safe shutdown:
JobResults::stop() now detaches global handler first, then calls handler->stop().
Shutdown detaches m_listener, clears queues, and defers deletion until in-flight work is done.
Defensive bound on GPU result count:
Clamp count to 0xFF inside JobResults as well, not just in the caller, to guard against corrupted kernels/drivers.
5) Idempotent cleanup
VirtualMemory::destroy() now sets pool = nullptr after delete:
prevents accidental double-delete on repeated teardown paths.
Verification performed
codespell . --config ./.codespellrc: clean
CMake configure + build completed successfully (Release build)
Signed-off-by: rezky_nightky <with.rezky@gmail.com >
2026-01-21 21:22:43 +07:00
rezky_nightky
cb7511507f
fix: cross typos detail below:
...
What I did
Repository rules / exclusions
I didn’t find repo-specific spelling tooling already in place (no existing codespell config).
Given this is a C/C++ repo with vendored sources, I treated src/3rdparty/** as third-party and excluded it from typo fixing (and encoded that in the new .codespellrc).
Typos fixed (first-party only)
Docs
CHANGELOG.md: perfomance -> performance
doc/API.md: optionaly -> optionally, Offical -> Official
doc/BENCHMARK.md: parameteres -> parameters
doc/CPU.md: loosing -> losing, instuctions -> instructions
doc/CHANGELOG_OLD.md: multiple obvious text typos like Breaked -> Broken, singal -> signal, previos -> previous, secons -> seconds, automaticaly -> automatically, perfomance -> performance
Code comments / doc comments (safe text-only changes)
src/base/crypto/sha3.cpp: Inteface -> Interface (comment banner)
src/backend/opencl/cl/cn/cryptonight.cl: performe -> perform, crashs -> crashes (comments)
src/backend/opencl/cl/kawpow/kawpow.cl: regsters -> registers, intial -> initial (comments)
src/crypto/randomx/aes_hash.cpp: intial -> initial (comment)
src/crypto/randomx/intrin_portable.h: cant -> can't (comment)
src/crypto/randomx/randomx.h: intialization -> initialization (doc comment)
src/crypto/cn/c_jh.c: intital -> initial (comment)
src/crypto/cn/skein_port.h: varaiable -> variable (comment)
src/backend/opencl/cl/cn/wolf-skein.cl: Build-in -> Built-in (comment)
What I intentionally did NOT change
Anything under src/3rdparty/** (vendored).
A few remaining codespell hits are either:
Upstream/embedded sources we excluded (groestl256.cl, jh.cl contain Projet)
Potentially valid identifier/name (Carmel CPU codename)
Low-risk token in codegen comments (vor inside an instruction comment)
These are handled via ignore rules in .codespellrc instead of modifying code.
Added: .codespellrc
Created /.codespellrc with:
skip entries for vendored / embedded upstream areas:
./src/3rdparty
./src/crypto/ghostrider
./src/crypto/randomx/blake2
./src/crypto/cn/sse2neon.h
./src/backend/opencl/cl/cn/groestl256.cl
./src/backend/opencl/cl/cn/jh.cl
ignore-words-list for:
Carmel
vor
Verification
codespell . --config ./.codespellrc now exits clean (exit code 0).
Signed-off-by: rezky_nightky <with.rezky@gmail.com >
2026-01-21 20:14:59 +07:00
slayingripper
643b65f2c0
RISC-V Intergration
2025-10-22 18:57:20 +02:00
SChernykh
4131aa4754
Update sse2neon.h
2023-10-30 20:07:03 +01:00
Jackson Zheng
2fa754825d
Update cn_main_loop.asm
...
Found this line to be missing. I looked through the history and seemed like the original author of the commit missed it out.
2023-10-08 23:29:52 +01:00
Jackson Zheng
f3446c0a94
Update cn_main_loop.asm
...
I was scanning the code and found this line to be missing. Not sure if this was a mistake or if it was intentionally left out?
2023-10-08 23:12:58 +01:00
SChernykh
12b9b62ef7
Fix for 32-bit clang 15
...
Don't define `_mm_cvtsi128_si64` and `_mm_cvtsi64_si128` because clang 15 already has them in its headers.
2023-02-19 09:42:16 +01:00
XMRig
3f7533a645
Update to latest sse2neon.h.
2023-01-23 20:45:02 +07:00
Tony Butler
eeb459506c
Update to latest sse2neon.h from github:DLTcollab/sse2neon
2022-10-23 15:27:14 -06:00
SChernykh
7fc45dfb2d
RandomX: added MSR mod for Zen 4
...
+0.8% faster on Ryzen 9 7950X
2022-10-01 18:33:04 +02:00
SChernykh
22d6a7525e
Removed deprecated AstroBWTv1 and v2
2022-06-12 11:47:36 +02:00
SChernykh
a3cb74f29b
Removed old AstroBWT algorithm
...
It's not used anywhere now.
2022-04-15 10:59:31 +02:00
SChernykh
b5da73389f
Dero HE fork support (astrobwt/v2 algorithm)
2022-03-05 00:31:18 +01:00
XMRig
39609c9183
Merge branch 'dev'
2022-01-25 21:53:19 +07:00
benthetechguy
10111fd7f9
armv7 compilation fix
...
Compilation fails for armv7 on gcc 11, and updating the version in that line fixes it.
2022-01-20 20:47:26 -05:00
SChernykh
8dede14ac8
Fixed cn-heavy in 32-bit builds
2021-12-15 21:17:25 +00:00
SChernykh
c2ae625032
Compilationn fixes
2021-12-02 13:34:24 +01:00
SChernykh
e87d5111a2
Compiler fix
2021-12-01 17:08:40 +01:00
SChernykh
1a9eaaad8f
VAES crash fixes
2021-11-29 21:05:51 +01:00
xmrig
cd046f6fd0
Merge pull request #2747 from SChernykh/dev
...
Disable VAES in 32-bit builds
2021-11-29 15:50:17 +07:00
SChernykh
6db480a1ab
Disable VAES in 32-bit builds
2021-11-29 09:32:00 +01:00
Tony Butler
a7acd9de6d
Fix compile for VAES support with GCC<10
2021-11-28 22:11:42 -07:00
SChernykh
a4d5d0a75a
Added VAES support for Cryptonight variants
2021-11-28 20:49:54 +01:00
Tony Butler
02240eff8c
Slash and burn EOL whitespace everywhere
2021-11-27 17:59:40 -07:00
SChernykh
5c951ddb8a
Optimized quad hash for Ryzens
2021-11-24 08:16:41 +01:00
SChernykh
e67eb47796
Faster quad hash for GhostRider algos (Ryzen CPUs)
2021-11-23 22:14:46 +01:00
SChernykh
ceaebfd877
GhostRider algorithm (Raptoreum) support
2021-11-23 08:14:01 +01:00
Tony Butler
f6d45f7990
Fix various memory leaks
2021-10-25 04:06:49 -06:00
XMRig
c7ac314110
Code cleanup based on Clang-Tidy.
2021-08-25 18:45:15 +07:00
XMRig
4f6ffb67c1
Cleanup.
2021-08-14 04:58:01 +07:00
SChernykh
30f7e876a2
Update CnHash.cpp
2021-08-13 16:03:15 +02:00
SChernykh
5958490c23
Fixed Termux build
2021-08-13 12:02:03 +02:00
XMRig
e6332eff2b
Implemented stable algorithm ids.
2021-08-11 03:46:34 +07:00
XMRig
d0a632f557
Optimize CnHash storage.
2021-08-10 14:54:35 +07:00
XMRig
661dc515ab
namespace cleanup.
2021-08-09 23:51:07 +07:00
SChernykh
ebe299902c
Proxy miner signature support (WIP)
2021-06-17 16:58:18 +02:00
SChernykh
7bfb801ce2
Cryptonote tools WIP
2021-06-15 00:28:32 +02:00
SChernykh
dbda2e9ccd
Update sse2neon.h
2021-05-03 18:08:59 +02:00
SChernykh
b7adb34c37
Fixed Zen3 asm for cn/upx2
...
- Invalid rounding mode was used which caused rejected shares sometimes
- Also optimized CN implode/explode functions a bit.
2021-04-21 13:22:25 +02:00
SChernykh
69186f2470
Optimized cn/upx for Zen3
...
0.9% faster
2021-04-19 12:29:44 +02:00
SChernykh
54bc91d5e3
Fixed rounding mode after running cn/upx
2021-04-19 12:02:57 +02:00
SChernykh
16fe462cad
Optimized cn/upx2 for Ryzen CPUs
2021-04-17 18:18:26 +02:00
SChernykh
ed456b02cf
Update CnHash.cpp
2021-04-17 15:06:31 +02:00
SChernykh
da7f5826cb
Added support for Uplexa (cn/upx2 algorithm)
2021-04-17 14:53:42 +02:00
SChernykh
1741354498
Fixed cn-heavy for GCC-8
2021-04-04 10:18:27 +02:00
esrrhs
ec2793bcc9
remove useless v4_random_math_init if algo is not cn/r
2021-04-02 14:59:09 +08:00
SChernykh
dc70893e6b
Optimize cn-heavy in GCC builds
...
+0.7% in GCC builds, but GCC is still slower than MSVC on cn-heavy.
2021-03-28 16:12:09 +02:00
SChernykh
bcfd9edaa5
Optimized cn-heavy
...
- Remove unnecessary type conversion when doing `idx0 = d ^ q;`
- Saves 1 CPU cycle in the main loop
- 0.2% speedup on Ryzen 5 5600X, results on other CPUs may vary
2021-03-27 22:21:01 +01:00