Reducing data stored on tfchain #768
Replies: 6 comments 12 replies
-
I'll start with my thoughts. How I would want to see it is having minimal data on chain. I think we should introduce some "database" service that gathers this information from the nodes and that opens it up to the world. This service would ofcourse be replicated for scaling and safety purposes. The service doesn't have to use a pull mechanism, instead we could let the zos nodes push their information to the service. The zos nodes can ask tfchain for the location of the service(s). ZOS can then push it's information to the first service that is live. This does raise some questions on minting though. Maybe the actual tokens to mint could be calculated outside the chain and we could introduce an extrinsic that will execute the transaction once multiple services send the same price. I'm just thinking out loud here, I might be completely on the wrong track. |
Beta Was this translation helpful? Give feedback.
-
I think the Ideally this ipfs (or ipfs like) system can be hosted on other zos nodes on the grid that has higher availability and granted to not shutdown. This also raises few concerns since the data will have to be pushed first then committed to the chain how to prevent abuse of the storage (cost for persistence ? who is paying? etc...) |
Beta Was this translation helpful? Give feedback.
-
We know storing things on chain should only be done if it is actually needed for the chain/relevant. In that regard, one obvious issue is the Aside from that, we currently need a couple of things on chain:
Generally the chain should only contain data relevant for minting and payment, anything else should be removed. We also need to make sure we do not add any more data which is not strictly needed for these purposes. Data needed for these purposes could also be stored off chain, and indeed a hash can be used on chain to verify the data. The chain does not really care where the data comes from, as long as it is deterministic. For this uses case, off chain workers can be used to compute the minting reward (if any), so long as this is easily verifiable by others. |
Beta Was this translation helpful? Give feedback.
-
You stole my words, this is exactly my though. Meanwhile, a first task would be identifying which data could be off chain. On the other side, I will emphasis that fact that we should also clean our existing storage first since there could be some inconsistencies. And to prevent storage "leaking" we should generalize to all pallets the use of a live storage checking tool that can be run on a target network to make sure everything is as expected. |
Beta Was this translation helpful? Give feedback.
-
A standard solution: "We don't want it here, let's just throw it in another system".
|
Beta Was this translation helpful? Give feedback.
-
When thinking about it, we don't need a traditional storage system. |
Beta Was this translation helpful? Give feedback.
-
It is no news that we are storing too much data on tfchain, it is too centralized and not scalable. Let's discuss some ideas on how we can move the data out of the chain (not all data of course but most of it). Any ideas are welcome, we want to think outside of the box here.
The goal of this discussion is to find a better solution, to setup a plan of action, to setup a timeline and most important of all to reach consensus. It's important that we think this through and that we all believe in this new idea before we proceed. @DylanVerstraete, @maxux, @LeeSmet, @muhamadazmy, @coesensbert, @robvanmieghem, @delandtj, @renauter, @sabrinasadik can you all share your thoughts? Please tag other people that might have good ideas.
Beta Was this translation helpful? Give feedback.
All reactions