State storage/locality #1028
Unanswered
orthecreedence
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Forgive me if this is covered in the docs and I missed it, but I'm wondering where the state for a contract is stored? Is it simply stored on the nodes that are operating that particular contract? Or is it stored in some kind of DHT?
I've been evaluating projects like Freenet and Holochain for building a system where multiple agents can interact with a decentralized system that has "rules" on its own state. For a contrived example, take currency. Let's say a contract represents a shared pool of money. The users authorized to interact with that contract can deposit and withdraw, however if the contract's state-value goes to zero then it would not allow any more withdrawls.
Something like this is difficult in Holochain because all state is stored in the DHT, and each transaction would have to read the DHT (possibly multiple locations) leading to situations where some peer-validators might validate the transaction and others reject it, depending on their view of the DHT at a given time. In other words, to my understanding transactions must be self-contained in Holochain.
So my question extends from a scenario like this...does any given contract have local access to its own state?
Beta Was this translation helpful? Give feedback.
All reactions