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
We will be storing read/write keys in sets and doing intersection/union operations on them often. Since std::collections::HashSet uses a random hash function per-instance by default to prevent DoS attacks, that means we have to hash each key a significant number of times.
It would be more efficient to create sets which share a hash function, and cache the computed hash somewhere (possibly inside the Key struct, see #8).
We can still randomize the hash function periodically to prevent DoS (e.g. once per block, with each node picking a random seed since it doesn't need to be deterministic).
This feature could live in its own crate, named hashcache.
The text was updated successfully, but these errors were encountered:
We will be storing read/write keys in sets and doing intersection/union operations on them often. Since
std::collections::HashSet
uses a random hash function per-instance by default to prevent DoS attacks, that means we have to hash each key a significant number of times.It would be more efficient to create sets which share a hash function, and cache the computed hash somewhere (possibly inside the
Key
struct, see #8).We can still randomize the hash function periodically to prevent DoS (e.g. once per block, with each node picking a random seed since it doesn't need to be deterministic).
This feature could live in its own crate, named
hashcache
.The text was updated successfully, but these errors were encountered: