Skip to content
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

API for writing MapStore to recorders #8355

Open
turadg opened this issue Sep 19, 2023 · 0 comments
Open

API for writing MapStore to recorders #8355

turadg opened this issue Sep 19, 2023 · 0 comments
Labels
devex developer experience enhancement New feature or request performance Performance related issues read-no-tx topic: reading from the chain without a transaction

Comments

@turadg
Copy link
Member

turadg commented Sep 19, 2023

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.

@turadg turadg added enhancement New feature or request performance Performance related issues devex developer experience labels Sep 19, 2023
@dckc dckc added the read-no-tx topic: reading from the chain without a transaction label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex developer experience enhancement New feature or request performance Performance related issues read-no-tx topic: reading from the chain without a transaction
Projects
None yet
Development

No branches or pull requests

2 participants