Blockstack 2.0


Hey there!

After reading the new whitepaper, I got more confused about the newly introduced smart contracts. What happened to virtualchain? Wasn’t the virtualchain the special thing in blockstack and it contained only BNS operations? Now the BNS itself is referred to as a smart contract. Wasn’t the old structure enough to build good and scalable apps? Why are you adding more code to the blockchain and making it heavier? Even if a non-turing complete language is used with an interpreter not a compiler, won’t this slow the blockstack system?

Thank you :slight_smile:

1 Like

It’s still there, but the virtualchain is now concerned with anchoring Stacks blocks to the Bitcoin chain and providing nodes with enough information to do the cryptographic sortition. The naming system has been taken off-chain.

The virtualchain was a way to graft naming operations onto Bitcoin (or any blockchain) without requiring us to modify the blockchain itself (also, virtualchain predates Ethereum, and was designed to operate on blockchains that do not provide smart contracts).

The BNS system will be preserved in Stacks v2 – all names that will have been registered up until Stacks v2 goes live will be automatically ported over.

Yes, but only apps that have no global state of their own. It turns out you can build many dapps that don’t need global state beyond BNS. However, there are also many dapps that do need their own global state, as well as rules for manipulating that state so anyone can read or write it subject to those rules. Smart contracts are meant to implement this global state and enforce its rules without requiring the developer to operate a centralized server. For example:

  • A Reddit-like dapp that implements subreddits. The list of subreddits, their moderators, and their moderation policies are global state. A subreddit’s creator is its initial moderator. A moderator must publish their policies publicly, as well as publish decisions to admit/remove other moderators. No one can become a moderator without the existing moderator’s say-so. But, anyone must be able to create their own subreddit. Enforcing all of these rules is very difficult without a centralized server and without smart contracts.

  • An Uber-like dapp. The list of drivers and reviews are global state. Only a valid customer can submit a review for a ride they took (i.e. riders can’t remove bad reviews, or inflate their reviews).

  • A dapp that implements license keys for its enterprise features. Only a license key bearer can access the features. To ensure this, the dapp developer would encrypt their dapp’s code so only license key bearers can decrypt it. But to ensure this, there needs to be a global registry of all license key bearers’ public keys.

It’s very hard to build these kinds of dapps today with Blockstack because Blockstack doesn’t give developers a way to address the above kinds of concerns.

To enable the above kinds of dapps. Given the history of Blockstack, it should be clear that we don’t implement something unless we have reason to believe it will be necessary :wink:

It will take a comparable amount of CPU/disk to process Stacks v2 (i.e. within a factor of 5 I’m guessing).

How will you use smart contracts?

Thanks for you helpful reply.

So, we are taking the coins and the addresses from the Bitcoin Blockchain, at the Stacks Blockchain the money will be burned for mining and other stuff, and the hashes of the global states of the smart contracts are stored also. At the Atlas will be stored the gaia hub locations for each user data and for each global state of a smart contract? Will the data of Blockstack Auth for example be stored in a single gaia location?


Atlas will work as it did before – it will read the sequence of name hashes from the BNS smart contract, and proceed to replicate the associated routing state to all Atlas-speaking nodes. Gaia and Blockstack Auth will continue to work as they do now.


Sorry for asking a lot, but something is still not clear for me.
I am having some confusion because of the term smart contracts. Smart Contracts introduced by Ethereum are code running on the Blockchain. This is how they made their Blockchain programmable. Yours however, is not on-chain anymore as you said BNS has been taken off-chain. Only the global state is stored on the Blockchain. Blockstack is made programmable with Clarity. Before, Blockstack’s blockchain contained only rules and operations for BNS (virtualchain). Now it can host BNS and other global-state apps with Clarity.
Coming back to Ethereum, their code is made secure because its bytecode is stored on the blockchain itself. How is BNS’s code made secure if it has been taken off-chain? How is the security of each smart contract handled? I think there’s something I am missing, if you could elaborate on that more, it would be very helpful.


The smart contracts are on the Stacks blockchain, not the Bitcoin blockchain. Stacks blocks are anchored to Bitcoin blocks (through a cryptographic hash), so the act of altering Stacks blockchain data is tantamount to altering the Bitcoin chain.