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
HashList/HashArray cache the hash of the underlying data - for reasons of simplicity, when we load SSZ into an existing instance (via var overloads), we wipe both data and caches then load the data into a fresh instance.
However, for certain lists - validator sets in ethereum in particular - the majority of such loads do not change the data at all or change it only a little (ie add a few entries or modify a small subset of entries).
It would thus make sense to detect when this happens and not clear the cache, instead letting it be - however, this does not make sense for all lists or for known-large-changes so some heuristics need to be in place.
The overhead of comparing data vs simply overwriting + hashing should probably be studied - re-hashing the validator set on ethereum however is known to take up a significant amount of time.
The text was updated successfully, but these errors were encountered:
HashList/HashArray cache the hash of the underlying data - for reasons of simplicity, when we load SSZ into an existing instance (via
var
overloads), we wipe both data and caches then load the data into a fresh instance.However, for certain lists - validator sets in ethereum in particular - the majority of such loads do not change the data at all or change it only a little (ie add a few entries or modify a small subset of entries).
It would thus make sense to detect when this happens and not clear the cache, instead letting it be - however, this does not make sense for all lists or for known-large-changes so some heuristics need to be in place.
The overhead of comparing data vs simply overwriting + hashing should probably be studied - re-hashing the validator set on ethereum however is known to take up a significant amount of time.
The text was updated successfully, but these errors were encountered: