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
CachingBeaconChainSpec::hash_tree_root can be passed with a mutable object, e.g. MutableBeaconState or WriteList/WriteVector. Thus it can return wrong value, if the mutable object is modified, since the caching code uses Object identity (BeaconStateImple::hashCode is not overridden).
There are several possible ways to solve the problem:
implement proper BeaconStateImple::hashCode to match the BeaconStateImple::equals implementation
Invalidate cache based on updates
Do not cache mutable objects. This will require implementing an appropriate flag/interface to manifest (im)mutability.
The text was updated successfully, but these errors were encountered:
CachingBeaconChainSpec::hash_tree_root
can be passed with a mutable object, e.g.MutableBeaconState
orWriteList
/WriteVector
. Thus it can return wrong value, if the mutable object is modified, since the caching code usesObject
identity (BeaconStateImple::hashCode
is not overridden).There are several possible ways to solve the problem:
BeaconStateImple::hashCode
to match theBeaconStateImple::equals
implementationThe text was updated successfully, but these errors were encountered: