(*Trie).updateValueIfDirty is called recursively and possibly concurrently.
https://github.com/NethermindEth/juno/blob/v0.15.16/core/trie/trie.go#L656-L660
https://github.com/NethermindEth/juno/blob/v0.15.16/core/trie/trie.go#L707-L718
Calling (*Trie).Hash() temporarily replace storage by synced storage:
https://github.com/NethermindEth/juno/blob/v0.15.16/core/trie/trie.go#L793-L795
However, this doesn't replace the read storage with synced version, which means a read and a write can happen concurrently, which result in a race condition.