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
@AnnaShaleva and @AliceInHunterland can tell a bit more about the way storage is handled in NeoGo. What we're doing here is very similar to storeBlock except that we work with events and some data needs to be obtained additionally (but it's not a part of the state proper at the same time).
So we have a new DB now for our indexes (not sure why it is a reuse of neo-go's one but ok, dont mind) and also have a MemCachedStore memory instance for every block, why? That is exactly "cached" version, not just a memory instance per block, right? Over what is it created, the original disk DB? What does the cache solve?
"listen for events", "for each block". What is this new DB subscribed for? I thought that it should receive only our new events from meta-on-chain TXs but it also needs to process every block?
It can be done without MemCachedStore using per-block Bolt transactions, but reusing NeoGo storage subsystem allows to simplify some interfaces and make DBs changeable. In future we can also optimize flushing from per-block to something smarter. Memory itself is irrelevant here.
Listen for new events, you need to watch for objects, that's the only thing you care about (epochs are interesting too, but maybe not immediately).
MPT is to identify and synchronize state. Prefixes are those created above, not the full index.
Reproducibility. I can fetch headers and recreate index using data stored in MPT, so adding everything into MPT is a resource waste.
Is your feature request related to a problem? Please describe.
A part of #2878.
Describe the solution you'd like
Add meta event handling:
MemCachedStore
, process in-block data immediatelyDescribe alternatives you've considered
There can be some, but we need this data to be processed fast and we'll need MPT for subsequent synchronization.
The text was updated successfully, but these errors were encountered: