<feed xmlns='http://www.w3.org/2005/Atom'>
<title>monzero-core.git/src/crypto, branch v0.18.3.0</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.3.0</id>
<link rel='self' href='https://code.monzero.org/monzero-core.git/atom?h=v0.18.3.0'/>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/'/>
<updated>2023-03-29T06:44:20Z</updated>
<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>
<entry>
<title>Add view tags to outputs to reduce wallet scanning time</title>
<updated>2022-04-18T07:49:53Z</updated>
<author>
<name>j-berman</name>
<email>justinberman@protonmail.com</email>
</author>
<published>2021-11-15T13:23:53Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=ea87b30f8907ee11252433811e7a7d0c46758cca'/>
<id>urn:sha1:ea87b30f8907ee11252433811e7a7d0c46758cca</id>
<content type='text'>
Implements view tags as proposed by @UkoeHB in MRL issue
https://github.com/monero-project/research-lab/issues/73

At tx construction, the sender adds a 1-byte view tag to each
output. The view tag is derived from the sender-receiver
shared secret. When scanning for outputs, the receiver can
check the view tag for a match, in order to reduce scanning
time. When the view tag does not match, the wallet avoids the
more expensive EC operations when deriving the output public
key using the shared secret.
</content>
</entry>
<entry>
<title>CMake: Add missing headers via monero_find_all_headers macro</title>
<updated>2022-04-06T06:12:44Z</updated>
<author>
<name>mj-xmr</name>
<email>mjxmr@protonmail.com</email>
</author>
<published>2022-03-05T09:37:04Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=4db6aed98cc7ff713fc58b9054412ed734b01aba'/>
<id>urn:sha1:4db6aed98cc7ff713fc58b9054412ed734b01aba</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Copyright: Update to 2022</title>
<updated>2022-03-04T05:59:20Z</updated>
<author>
<name>mj-xmr</name>
<email>mjxmr@protonmail.com</email>
</author>
<published>2022-03-01T11:16:17Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=da9aa1f7f802552b9de459f331a2f39c84898009'/>
<id>urn:sha1:da9aa1f7f802552b9de459f331a2f39c84898009</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge pull request #8052</title>
<updated>2022-03-02T23:52:51Z</updated>
<author>
<name>luigi1111</name>
<email>luigi1111w@gmail.com</email>
</author>
<published>2022-03-02T23:52:51Z</published>
<link rel='alternate' type='text/html' href='https://code.monzero.org/monzero-core.git/commit/?id=abae63c37dfcddbfcae3260edab4a1f939831390'/>
<id>urn:sha1:abae63c37dfcddbfcae3260edab4a1f939831390</id>
<content type='text'>
c36ea26 fix ge_p3_is_point_at_infinity(), which is evaluating field elements that haven't been reduced by the field order (koe)
</content>
</entry>
</feed>
