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

Research Spike: best way to store registry data (members/proposals) #82

Open
falkonprods opened this issue Aug 31, 2021 · 3 comments
Open
Assignees

Comments

@falkonprods
Copy link
Collaborator

falkonprods commented Aug 31, 2021

Some thoughts:

  • Can create user in Gaia for the application, and store private key with the app
  • Can update this registry when a new user registers or new proposal is created
@JMKJR
Copy link
Contributor

JMKJR commented Aug 31, 2021

We want the frontend to provide a rich user experience with features like...

  • Show a list of members.
  • Show a list of proposals.
    etc.

The challenge here is you can't iterate through a map in a smart contract to return this data even if it's stored there.
Additionally, Gaia stores user-specific data in a bucket for each user meaning the frontend app can't make a single call to a location to serve this data.

We need a solution for the best approach to serve these features while making sure the data in the frontend is in sync with the data on-chain.

@JMKJR
Copy link
Contributor

JMKJR commented Aug 31, 2021

Proposed solution 1:

Store all of this info in a centralized database solution. When the frontend presents this info to the user (like showing a proposal) - it will reference the smart contract in question in the frontend so a user can verify that what the frontend is presenting is true.

eg. a proposal in the frontend will have a tag/chip with the smart contract address it is referencing and users can make read-only calls to the contract to verify what the frontend is presenting is true. (The frontend could provide buttons/mechanisms from within the same page to provide a simple means for the user to call those contract functions it references and verify the data).

@falkonprods
Copy link
Collaborator Author

Proposed solution 2: store application data in a bucket for the app in Gaia - I asked in Stacks Discord and was told that this is something that a lot of apps do.

We could additionally use a client db solution that could sync to gaia, this will keep the data decentralized (and lower calls to smart contracts), but also allow for better performance.

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

No branches or pull requests

3 participants