You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In build_light_cache() function, the address of variable `cache' changes in each loop
for (int i = 0; i < num_items; ++i)
{
const uint32_t index_limit = static_cast<uint32_t>(num_items);
// Fist index: 4 first bytes of the item as little-endian integer.
const uint32_t t = le::uint32(cache[i].word32s[0]);
const uint32_t v = t % index_limit;
// Second index.
const uint32_t w = static_cast<uint32_t>(num_items + (i - 1)) % index_limit;
cache[i] = keccak512(bitwise_xor(cache[v], cache[w]));
}
In particular, for i=0, cache[0] is the first element of array cache (as expected). However, for i=1, cache[0] is the second element of array cache, and for i=2, cache[0] is the third element of array cache, ...
By observing the address of cache, I found that the address of cache changes each time when arriving at
" const uint32_t t = le::uint32(cache[i].word32s[0]);".
As a result, the generated cache is different from that generated in go-ethereum.
The text was updated successfully, but these errors were encountered:
In build_light_cache() function, the address of variable `cache' changes in each loop
for (int i = 0; i < num_items; ++i)
{
const uint32_t index_limit = static_cast<uint32_t>(num_items);
In particular, for i=0, cache[0] is the first element of array cache (as expected). However, for i=1, cache[0] is the second element of array cache, and for i=2, cache[0] is the third element of array cache, ...
By observing the address of cache, I found that the address of cache changes each time when arriving at
" const uint32_t t = le::uint32(cache[i].word32s[0]);".
As a result, the generated cache is different from that generated in go-ethereum.
The text was updated successfully, but these errors were encountered: