6

As I am setting out to build my first proper smart contract backed application, I need to set up a database & index for the website for fast query times etc. How can I set this up in a way so that users can still have confidence I'm not modifying any data in my index before displaying it?

I saw the new and great https://tezvote.com application - which is somewhat similar to what I am building - state the following:

We pull all results from the blockchain, and store them in a secondary database to improve usability, whilst remaining auditable.

It's this whilst remaining auditable part I'm curious about. How exactly are they doing that? Any best practices in dapp development around this issue?

Thanks!

2

I'm the TezVote dev - our index is 100% powered by the on-chain data. We have a blog post coming out in future that will describe how the data is being pulled and stored in our index/DB, along with instructions on how to use the RPC API to pull the same data. We will also look to opensource the indexer code as well.

I suggest you do the same - provide the methods and calculation for your data store and how people can validate the data using on-chain RPC commands.

2
  • That is what I was thinking. Privode a mechanism or atleast documentation to verify that whatever data is displayed coincides with what is on chain 👍 thanks! Feb 13 '19 at 9:55
  • Please leave a comment here if you end up FOSS your db/index solution 👍 Feb 13 '19 at 9:56
2

I think the "Auditable" part is only the fact that the smart contract stores the content of all the votes that were sent. So, anybody can iter on the smart contract and recompute the results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.