Hot search keywords

Hot search keywords

Zilliqa & Prysmatic Lab | Geekhub Sharding Deep Talk Online

Geekhub Global Online, the first blockchain online technology dialogue event in China,begins to meet with  blockchain enthusiasts from around the world! The event aims to deliver cutting-edge high-quality blockchain technology content to the technology community. Each session will invite senior technical geeks from around the world to talk, and members of the Geekhub technical community can also participate in live interactions to discuss blockchain technology, development and the future.


The first session of the event,”Sharding and Cross Sharding Communication technology” was successfully completed on September 20th. Two core members of the most innovative team in the blockchain segment were invited to serve as guests: Preston Van Loon, co-founder of Prysmatic Lab, a sharding protocol team in Ethereum, and Jia Yaoqi, co-founder of Zilliqa, the public blockchain platform. From the basic design of the shard, to the specific implementation, to the future direction, the two guests and the host discuss the sharding technology with you.

1.What do you think about sharding to this blockchain industry in a general way? What does the sharding blockchain look like and what are the challenges here?

Preston: I think we have a really big scaling problem right now and  throughput at least of  Ethereum  and bitcoin  is not suitable for global use. So we have to come up with  layer two solutions,  trade-offs to get scalability, but we really need something at the protocol layer, and that is where sharding comes in. Sharding is used in a traditional database, and blockchain is basically just a big database, so this same idea should apply. Sharding is a little bit complex  in implementation, but it  is quite a good direction for improving the scalability of blockchain .

2.What’s the basic design of sharding in blockchain?

Jia: There are state channels, sidechains and also these delegated consensus protocols for improving scalability of the blockchain but all of these approaches have some disadvantages, and  decentralization property of the blockchain  and for sharding  we will ensure the security and also the decentralization properties for blockchain at the same time we try to improve the scalability .

Right now, ethereum has nodes in the network, so basically we divide these 14,000 nodes into different small groups,for example,we can divide the 14,000 nodes into 14 groups  at the same time since Ethereum processes over 1 million transactions per day, so we can basically assign something to different shards and this is how the sharded system can improve the scalability of the blockchain.

3.How do you write a smart contract that splits state data and execution into different shards?

Preston:We want to split those up into smaller groups like shards By using the security pool instead of using 14 groups, we’ll keep them as one group.  If your contract loses on a specific shard it will only have local access to that shard, it gets a little tricky with cross shard communication.  You’ll have some kind of mechanism where contracts can communicate across shards but ideally as the decentralized App developer, you would deploy in a localized way  so that if you had a system of 100 contracts you would deploy them on to one shard so that you don’t have to do a lot of cross shard communication.

So we’re looking to rewrite the Ethereum Virtual Machine(EVM), and after that, EVM will be replaced by the new virtual machine, eWASM. We allow different shards to have different implementations, so that shards are not executed on the chain, only data that can be executed on the virtual machine is provided, which is more efficient.

Jia: We have sharded smart contracts. At the current stage, if the sender’s address and the smart contract address are on the same shard, the transaction will be executed on this shard. Other related transactions will be assigned to a dedicated shard and executed within that epoch. The future will be different. We are developing a new smart contract programming language, Scilla. The language itself is very secure, and smart contracts written in that language can be easily verified by other tools.

4.What are the security models that we are operating under if we would like to shard the transactions and also the state data?

Jia: For the security model of Zilliqa,  there are at least 600 nodes.  After we do random samplings,  1/3 nodes are malicious. You have over 600 nodes within one shard, then with very high probability  for example the failure rate can be as low as 1 in 1 million.In that case every shard has over 2/3 of the nodes that are honest, so we can perform the consensus protocol which we are using the variant of BFT protocol.

For cross-shard communication, at the beginning of this month, Zilliqa implemented the smart contract sharding, but we try to prevent cross-shard communication for the current phase. So we use some algorithms and try to assign different smart contracts into different shards including the transactions. For complex smart contract transactions,  we directly assign them into a special shard. In the future,  we want to provide sharding for smart contracts in the language level which means the developers can directly write some shard data structure in the smart contracts.  Different smart contracts can exist in different shards and at the same time, there’s no security issue.  It’s similar to  Map Reduce computation model but that’s our next stage.

5.Have you ever thought about the the possible economic model for sharding so that it might lead to a bigger market cap both for Ethereum and the sharding project?

Preston:  I haven’t considered the economics and how this number would look, but in general , I feel this is a positive impact on both the market cap and general usability because what we’re doing with the stake is opening the opportunity to earn money by participating with more individuals.

Jia: But for Zilliqa, it’s a little bit different from Ethereum, because we apply sharding for the mainchain.   Zilliqa’s incentive model is different from Bitcoin’s and Etheruem’s. In bitcoin, there is only one winner, and  the winner will take all the rewards. Our current incentive model is that  the reward will be given to all nodes who make a contribution to the consensus protocol for the last epoch. The reward will be given based on the number of signatures they contribute. It’s more fair to the nodes and the miners.

Ethereum would apply Casper to the network so that those who run the shard nodes would also get the rewards.This approach is more difficult because for ERC 20 tokens,  you have to consider the supply of that token and also the economics for that token itself.

6.What is the transparent sharding? What are advantages and disadvantages of this?

Jia:  In terms of the concept, the transparent sharding means we make the sharding system to be transparent to the developers and the users. So when developers deploy or code the smart contract, they won’t care about the underlying protocol. For example,to write the Solidity smart contract, the system itself will handle the  execution and also the deployment of the smart contract. I think the advantage is that  it’s quite convenient to the developers, so we don’t create more troubles for the developers. But on the other side, for the disadvantage, I think it exposes the underlying protocol to the developer, so sometimes developers can not leverage  the advantage of your sharded structure. For example, if developers can code smart contracts in a way like MapReduce, then they may just send some of contracts to the  Map, and some to the Reduce, so it’s more efficient to see smart contracts to be executed in different shards in parallel .

7.What are the characteristics of sharding in Ethereum and Zilliqa respectively?

Preston: Ethereum has different sharding development teams. Developers form a specification, different teams build their own implementations according to the specifications, and in the end we may have 4-5 reliable clients, which can increase security. Even if one or two are not working, the network will operate normally. Instead of using the Casper CBC consensus protocol, our team uses FFT to try to improve resource efficiency. At the same time, the Beacon chain is used in Ethereum to generate random numbers. It combines random numbers and uses a Verifiable Delay Function to obtain “true” random numbers. In addition, we need a lot of verifier signatures, BLS signatures can be summarized and executed on the chain, without one signature to verify the past, which will improve efficiency.

Jia: Zilliqa’s architecture is different from other blockchains. We considered sharding from the very beginning. In the current architecture, we have normal sharding and specialized sharding called the Directory Service Committee. Normal sharding will initiate Macroblock and will also include the epoch network status, broadcast to other normal shards, while all the normal shards get the latest status information.

For Zilliqa, our nodes do not store the history of transactions, we only store the latest status of the transaction, thus reducing the storage of data. We work with some projects in Europe and want to use distributed storage services or projects to put data into their systems. Although we are doing state sharding we can only partially reduce the storage overhead. Although, we must find a way to put most of the state and transaction overhead into other systems, such as moving them to a distributed storage service or by creating another layer to store data. But state sharding is not the ultimate solution, we still need to find a better way.

8.So do you  have any idea if state channels can be combined with the sharding approach so that onchain, off chain scalability could lead to much larger State Updates? What’s the direction of sharding in the future?

Jia: If you just have a centralized server for the service, I think the state channel of sharding is the most efficient one. It is possible to apply sharding to the sidechain.I feel that it’s doable for Zilliqa to also apply Etheruem’s current sharding approach because you just need to put sharded smart  contract on Zilliqa’s mainchain.

Decentralizing exchanges prefer onchain solutions because it’s more secure and more decentralized,  so the combination of sharding and the state channel will not be applied in this scenario. In the future,  we may have multiple public chains coexisting in the world, and we may also have Cosmos and Polkadot.  For some industries like gaming and digital advertisement,  if you want to achieve some sort of real time response, you definitely need state channels .In the future,  I’m still not sure whether we need sharding for state channels. For different scenarios you should apply different technologies.

9.What’s your future vision of the blockchain industry in the future?

Preston: I think this technology has a real opportunity to have a positive impact on everybody. I think you can help out a lot of people especially those in the commercial markets or places where there’s a lot of volatility. In general , my vision is just an optimistic one that some combination of these technologies will come to light in order to really benefit everybody, and it depends on use cases.

Jia: For one decade now we have tried to figure out a bunch of ways to leverage the blockchain technology, since last year,  ICO and the token sales have really brought blockchain and cryptocurrency to ordinary people. But for the next phase, I think all  new blockchain projects will try to solve two pain points for this space , first is scalability and second is the security of the smart contracts.  I’m also very worried about the future of blockchain space because right now we figure out the ways to solve scalability and security issues but we haven’t really implemented the systems and push this system to the ordinary people.  In the future,  we want to see everyone is using some applications based on blockchain.


Please sign in first