The model for development for Ethereum apps features a web frontend with a smart contract backend. On the frontend you have your typical application that uses a library called web3.js to make read calls (getting state) and write calls (transaction sending) to Ethereum nodes. On the backend you have a smart contract that stores global application state. This could be a token with balances for each user (or key), or it could be a naming system with the domain name that each user (or key) owns.
Key takeaways from this model is that there’s often a heavy reliance of putting state on the blockchain. There are advantages to this, in that it makes decentralization fairly simple and smart contracts are very expressive. But unfortunately it comes with several major drawbacks. It’s very hard to scale, and each individual user will have to spend a large amount of money just to be able to handle the transaction fees. Further, it’s very easy to shoot yourself in the foot with smart contracts.
The model for development on Blockstack, meanwhile, features a web frontend and a simple, reliable backend for a core set of services. Blockstack simplifies the process of building decentralized applications by cutting out the complexity of having to program smart contracts and introducing common API’s and libraries for identity, authentication, storage, payments and tokens. With this model, apps can be built out in a much more scalable, reliable, and secure way. And users don’t have to foot an enormous bill simply to use the application.
How does decentralization in blockstack compare to decentralization in ethereum? If state is not being saved on chain, where does state get saved? Is this off-chain store decentralized?
In ethereum the chain, and thus state, is replicated worldwide. Is blockstack similar, or is it more of a means of achieving redundancy within or among multiple datacenters since that state is off-chain?
Does blockstack benefit from up and coming improvements to blockchain networks like Lightning for Bitcoin or Raiden for ethereum?
Hey @mateodelnorte yes all of the data is either in decentralized networks or under the user’s control.
All of the routing information / zone file data is stored in a peer-to-peer network called the Atlas network. It is fully replicated and unstructured so it is much more reliable on several fronts than DHT-based systems like BitTorrent.
All user-specific information is stored on user devices and then encrypted and synced up to cloud storage. Social applications allow users to find and decrypt one another’s data.
@mateodelnorte I’ll take a crack at answering your questions:
Blockstack takes a different route to scalability than Ethereum. Ethereum has chosen to store all state in the system on their blockchain. Blockstack chose an architecture where users control their own data and use identities anchored in the Bitcoin blockchain to point other users/applications to that data, and gate access.
Because each user holds their own data we don’t need that kind of worldwide replicated state. We leave redundancy up to each user. They provide the link(s) to their storage backend(s).
Yes! We use bitcoin transactions to register names so the lightning network improvements promise to reduce prices. We have not done the work to integrate lightening payments as of yet, but it is on our roadmap.
I’m really curious on why storage is still first handled on a third party service instead of locally first. Yes I get you are thinking about large apps like Twitter however, what if I want to build a local intranet for a home that only accesses the outside internet when necessary and only for specific files?
As a late contribution to the original question, I did a sample app that uses both approaches to decentralization at https://bitbucket.org/friedger/pet-shop-tutorial It is the truffle/ethereum pet shop sample with the addition of blockstack to mark pets as favorites.
It uses ethereum to store the state of the “pet-shop” because all user is concerned about the “state” of it.
It uses blockstack to store personal preferences.