<feed xmlns='http://www.w3.org/2005/Atom'>
<title>monzero-core.git/src/crypto, branch main</title>
<subtitle>Monzero core node, command-line wallet, consensus code, and release tooling.
</subtitle>
<id>https://code.monzero.org/monzero-core.git/atom?h=main</id>
<link rel='self' href='https://code.monzero.org/monzero-core.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/'/>
<updated>2026-05-08T22:02:38Z</updated>
<entry>
<title>crypto: implement CTHR_THREAD_CLOSE to avoid leaking memory</title>
<updated>2026-05-08T22:02:38Z</updated>
<author>
<name>ComputeryPony</name>
<email>ComputeryPony@gmail.com</email>
</author>
<published>2026-05-08T22:02:38Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=dede3a5d7198b675afd480a4c9aa9715746e3dae'/>
<id>urn:sha1:dede3a5d7198b675afd480a4c9aa9715746e3dae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tx_memory_pool: speedup get_complement() for large requests</title>
<updated>2026-03-22T09:50:10Z</updated>
<author>
<name>jeffro256</name>
<email>jeffro256@tutanota.com</email>
</author>
<published>2025-11-03T23:05:57Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=0761024b349048ebf79dbfe71caab11826833464'/>
<id>urn:sha1:0761024b349048ebf79dbfe71caab11826833464</id>
<content type='text'>
Changes complexity from M*N to (2*N+M)*log2(M). The FCMP++ stressnet recently hit mempool sizes of ~55k txs.
If the requesting node's mempool is populated, this results in an average of (55000*55000)/2
(about 1.5 billion) comparisons for the responding node. Under this commit, this would be reduced to
(55000+55000)*log2(55000) comparisons (about 2.6 million), a 99.83% reduction.
</content>
</entry>
<entry>
<title>crypto: check+throw for Cryptonight v1 invalid input</title>
<updated>2025-07-11T16:37:08Z</updated>
<author>
<name>jeffro256</name>
<email>jeffro256@tutanota.com</email>
</author>
<published>2025-07-11T16:19:40Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=1d3d30c5076200a308de4764491ace1d8a4d52af'/>
<id>urn:sha1:1d3d30c5076200a308de4764491ace1d8a4d52af</id>
<content type='text'>
If `crypto::cn_slow_hash()` is called with `variant=1` and an input length of less thab 43 bytes, it triggers a program exit.
This checks first and throws an exception instead.

Thank you to ADA Logics and the MAGIC Monero Fund for reporting this!
</content>
</entry>
<entry>
<title>crypto: make CRYPTO_DEFINE_HASH_FUNCTIONS adhere strict aliasing</title>
<updated>2025-01-09T18:01:06Z</updated>
<author>
<name>jeffro256</name>
<email>jeffro256@tutanota.com</email>
</author>
<published>2025-01-09T06:48:51Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=27858049da753ea7d0ce44829a6c06f1597d72d5'/>
<id>urn:sha1:27858049da753ea7d0ce44829a6c06f1597d72d5</id>
<content type='text'>
This code could've caused issues if the pointer to the `public_key`, `key_image`, `hash`, etc wasn't aligned on an 8-byte boundary.
</content>
</entry>
<entry>
<title>build: fix build with Boost 1.85 and remove instances of viewkey logging [RELEASE]</title>
<updated>2024-09-10T21:07:36Z</updated>
<author>
<name>jeffro256</name>
<email>jeffro256@tutanota.com</email>
</author>
<published>2024-08-23T17:15:17Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=65568d3a884857ce08d1170f5801a6891a5c187c'/>
<id>urn:sha1:65568d3a884857ce08d1170f5801a6891a5c187c</id>
<content type='text'>
1. Use std::is_standard_layout and std::is_trivially_copyable instead of std::is_pod for KV byte-wise serialization, which fixes compile issue for Boost UUIDs
2. Removed reimplementation of std::hash for boost::uuids::uuid
3. Removed &lt;&lt; operator overload for crypto::secret_key
4. Removed instances in code where private view key was dumped to the log in plaintext

Release version of #9450, containing C++14 modified assertions
</content>
</entry>
<entry>
<title>JH hash compiler workarounds</title>
<updated>2023-11-04T20:01:47Z</updated>
<author>
<name>SChernykh</name>
<email>sergey.v.chernykh@gmail.com</email>
</author>
<published>2023-10-27T12:09:58Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=e7d51e558326e5d9621189ec1c801acdf36f0fda'/>
<id>urn:sha1:e7d51e558326e5d9621189ec1c801acdf36f0fda</id>
<content type='text'>
- Fixed uninitialized `state-&gt;x` warning
- Fixed broken code with `-O3` or `-Ofast`

The old code is known to break GCC 10.1 and GCC 11.4
</content>
</entry>
<entry>
<title>Fixed deadlock and crash when syncing with full dataset on Windows</title>
<updated>2023-03-29T06:44:20Z</updated>
<author>
<name>SChernykh</name>
<email>sergey.v.chernykh@gmail.com</email>
</author>
<published>2023-03-29T06:43:47Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=c742fa4c6ef83eb7f2495128a23d7cc250dc7db2'/>
<id>urn:sha1:c742fa4c6ef83eb7f2495128a23d7cc250dc7db2</id>
<content type='text'>
It's not allowed to use WaitForSingleObject with _beginthread, because the thread closes its own handle before exiting.

So the wait function will either wait on an invalid handle, or on a different handle used by something else.

Or, if it starts waiting before the thread exits, the behavior is undefined according to MS: "If this handle is closed while the wait is still pending, the function's behavior is undefined."

In my test sync I observed threads getting stuck infinitely on WaitForSingleObject, and then rx_set_main_seedhash spamming new threads when RandomX seed changes again. Eventually the system ran out of resources, and monerod aborted with "Couldn't start RandomX seed thread" message.

This PR fixes it by using `_beginthreadex` instead and explicitly closing the handle when it's safe.
</content>
</entry>
<entry>
<title>Demote large pages warning to `mdebug`</title>
<updated>2023-01-17T17:16:47Z</updated>
<author>
<name>SChernykh</name>
<email>sergey.v.chernykh@gmail.com</email>
</author>
<published>2023-01-14T14:57:52Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=f456b3f02334e3ee751fc1d845cc93b690e665c6'/>
<id>urn:sha1:f456b3f02334e3ee751fc1d845cc93b690e665c6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>RandomX: print VM allocation warnings only once</title>
<updated>2023-01-11T18:18:41Z</updated>
<author>
<name>SChernykh</name>
<email>sergey.v.chernykh@gmail.com</email>
</author>
<published>2023-01-11T18:18:41Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=480b050cc3d075fdb2ef9eb0e21340cbd4bbf324'/>
<id>urn:sha1:480b050cc3d075fdb2ef9eb0e21340cbd4bbf324</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactored rx-slow-hash.c</title>
<updated>2022-12-14T06:21:00Z</updated>
<author>
<name>SChernykh</name>
<email>sergey.v.chernykh@gmail.com</email>
</author>
<published>2022-12-10T17:30:59Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=f698f2b708be742afa286c65868a48f7ef80b0ba'/>
<id>urn:sha1:f698f2b708be742afa286c65868a48f7ef80b0ba</id>
<content type='text'>
- Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)`
- Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens
- `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance)
- New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification)
- When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then)
- When mining is running, PoW checks now also use dataset for faster verification
</content>
</entry>
</feed>
