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
As we deprecate the context due to the design of server/v2 we will need modules to fetch data from the consensus module if they need the consensus params. this poises an new overhead.
Problem Definition
Asking users to fetch data from other modules means there is another layer of decoding needing to happen. In the case of context params they would need to fetch it from consensus, while it may already be in the cache, it will need to be decoded each time.
Proposed Feature
Add a way object cache to be used with collections so items that are repeatedly fetched from other modules will be stored in this cache already decoded. The cache would need to be flushed upon every write.
This is somewhat similar to interblock cache except, the change is that the values will already be decoded. We should avoid doing this for all state but for values that are touched repeatedly in a block this would reduce the over head.
Future Optimisations: If we have a way to prefetch keys from store we could decode them ahead of time there fore reducing the total time of execution by avoiding the fetch and decode in the execution path.
The text was updated successfully, but these errors were encountered:
If I'm reading this correctly, the proposal is to have an (unlimited sized) cache that stores typed objects (collections) and will be purged/cleared at the end of every block, right?
Summary
As we deprecate the context due to the design of server/v2 we will need modules to fetch data from the consensus module if they need the consensus params. this poises an new overhead.
Problem Definition
Asking users to fetch data from other modules means there is another layer of decoding needing to happen. In the case of context params they would need to fetch it from consensus, while it may already be in the cache, it will need to be decoded each time.
Proposed Feature
Add a way object cache to be used with collections so items that are repeatedly fetched from other modules will be stored in this cache already decoded. The cache would need to be flushed upon every write.
This is somewhat similar to interblock cache except, the change is that the values will already be decoded. We should avoid doing this for all state but for values that are touched repeatedly in a block this would reduce the over head.
Future Optimisations: If we have a way to prefetch keys from store we could decode them ahead of time there fore reducing the total time of execution by avoiding the fetch and decode in the execution path.
The text was updated successfully, but these errors were encountered: