-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider deduping ShardTries for Runtime and view Runtime #9229
Comments
From my understanding about trie caches, we have two types of caches, Are we saying the view_client only uses |
Could be really nice to assume, but this is not the case yet. We could start refactoring from separating non-view and view runtimes. To do so, we need to look over all places where ...Or we can just cut corners and pass |
I agree the right design should have a Passing
|
I recently noticed that if we use split store we have two different NightshadeRuntimes for Client and view Client, respectively:
nearcore/nearcore/src/lib.rs
Lines 239 to 266 in a5ede1d
AFAIK that's what we wanted to have for a long time, but there is a inaccuracy inside - we create separate
ShardTries
instances inside withShardTries::new_with_state_snapshot
. And this is bad because each instance has its own set of caches and view_caches. So now we have a copy of cache and view cache for each shard and each client. I don't think view client uses non-view cache though, it is only design issue.I see two directions to resolve that:
ShardTries
to store only caches of one type. But I'm not sure if non-view client wants to make view reads and whether it makes sense to do them and not use non-view cache. (Question: could it make sense to storeViewRuntimeAdapter
for calls to view client inside non-view client?)ShardTries
instance toNightshadeRuntime
constructor.cc @jbajic @wacban
The text was updated successfully, but these errors were encountered: