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

Add guidelines on data storage model #486

Open
marta-lokhova opened this issue Jan 20, 2023 · 4 comments
Open

Add guidelines on data storage model #486

marta-lokhova opened this issue Jan 20, 2023 · 4 comments

Comments

@marta-lokhova
Copy link
Contributor

(as per discussion with @tomerweller) It would be nice to have some guidelines on storing large sets of data on chain. For example, when storing a list of accounts, it's not immediately obvious that a scalable approach is to have each individual account as a separate key (instead of having one key "accounts" and a list as a value). An explanation that each key-val pair creates a ledger entry in core that is strictly limited in size would also be helpful.

@janewang janewang transferred this issue from stellar/soroban-docs Apr 16, 2024
@janewang
Copy link
Contributor

janewang commented Apr 25, 2024

@marta-lokhova Is this something that you could help document? Maybe add to the granularity section on this page https://developers.stellar.org/docs/learn/smart-contract-internals/persisting-data#granularity

@marta-lokhova
Copy link
Contributor Author

@janewang I think it'd be more appropriate for someone from the protocol team to take a stab at this (things probably have changed quite a bit since I opened the issue). tagging @sisuresh @dmkozh for input

@dmkozh
Copy link
Contributor

dmkozh commented May 1, 2024

@marta-lokhova Is this something that you could help document? Maybe add to the granularity section on this page https://developers.stellar.org/docs/learn/smart-contract-internals/persisting-data#granularity

I think this section is fine as it stands and describes the lower-level protocol behavior quite well.
Maybe the sections that mention storage should make a more clear statement that env.storage().persistent()/temporary() creates or modifies a ledger entry, and that ledger entries are subject to fees and limits (as per respective docs section).

@janewang
Copy link
Contributor

janewang commented May 6, 2024

@marta-lokhova Thanks, please feel free re-assign to the best person from the protocol team as you've suggested. @dmkozh Thank you for your inputs here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

4 participants
@janewang @marta-lokhova @dmkozh and others