<feed xmlns='http://www.w3.org/2005/Atom'>
<title>monzero-core.git/src/crypto, branch v0.18.4.2</title>
<subtitle>Monzero core node, command-line wallet, consensus code, and release tooling.
</subtitle>
<id>https://code.monzero.org/monzero-core.git/atom?h=v0.18.4.2</id>
<link rel='self' href='https://code.monzero.org/monzero-core.git/atom?h=v0.18.4.2'/>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/'/>
<updated>2025-07-11T16:37:08Z</updated>
<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>
<entry>
<title>Merge pull request #8262</title>
<updated>2022-05-10T21:47:13Z</updated>
<author>
<name>luigi1111</name>
<email>luigi1111w@gmail.com</email>
</author>
<published>2022-05-10T21:47:13Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=156151396e12043fd3ee0307a4c46522bb515ca0'/>
<id>urn:sha1:156151396e12043fd3ee0307a4c46522bb515ca0</id>
<content type='text'>
268a039 Optimized keccak implementation (SChernykh)
</content>
</entry>
<entry>
<title>Optimized keccak implementation</title>
<updated>2022-04-18T08:01:13Z</updated>
<author>
<name>SChernykh</name>
<email>sergey.v.chernykh@gmail.com</email>
</author>
<published>2022-04-16T09:48:37Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=268a0393e9e7e02c5f2c41dc0137540cbf61ab76'/>
<id>urn:sha1:268a0393e9e7e02c5f2c41dc0137540cbf61ab76</id>
<content type='text'>
All tests were conducted on the same PC (Ryzen 5 5600X running at fixed 4.65 GHz).

Before:
test_cn_fast_hash&lt;32&gt; (100000 calls) - OK: 1 us/call
test_cn_fast_hash&lt;16384&gt; (1000 calls) - OK: 164 us/call

After:
test_cn_fast_hash&lt;32&gt; (100000 calls) - OK: 0 us/call
test_cn_fast_hash&lt;16384&gt; (1000 calls) - OK: 31 us/call

More than 5 times speedup for cn_fast_hash.

Also noticed consistent 1-2% improvement in test_construct_tx results.
</content>
</entry>
</feed>
