Skip to content

Add guidelines on data storage model #486

Closed

Description

@marta-lokhova

(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.

Activity

  1. janewang commented on Apr 25, 2024

    @janewang
    Contributor
  2. marta-lokhova commented on May 1, 2024

    @marta-lokhova
    ContributorAuthor

    @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

  3. dmkozh commented on May 1, 2024

    @dmkozh
    Contributor

    @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).

  4. janewang commented on May 6, 2024

    @janewang
    Contributor

    @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 :)

  5. dmkozh commented on Dec 20, 2024

    @dmkozh
    Contributor
  6. moved this from Backlog to Done in Dev Docson Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions