API for writing MapStore to recorders #8355
Labels
devex
developer experience
enhancement
New feature or request
performance
Performance related issues
read-no-tx
topic: reading from the chain without a transaction
What is the Problem Being Solved?
It's intuitive for a contract developer to serialize the data in a collection and write it out in a recorder to vstorage. But it doesn't scale. For example, Kryha/KREAd#17
The solution is generally to write out multiple nodes, but this is a burden on the developer and multiple implementations leave room for errors.
Description of the Design
A common utility for serializing durable storage across multiple storage nodes.
E.g. given a
MapStore
it puts the data at each key under a node with that key as the subpath. For efficiency, it can wrap the MapStore with methods (like Recorder wraps PublishKit) so that it's aware when items are deleted are added to know what storage operations to perform.We might also have helpers for writing out a SetStore or vector/array but those can be other tickets.
Security Considerations
Abstraction
Scaling Considerations
Should improve use of best practices
Test Plan
Unit tests
Upgrade Considerations
The collection is local to the vat and this code will be too. Does not complicate upgrade.
The text was updated successfully, but these errors were encountered: