Unitalk with Medha of CasperLabs
CasperLabs Higway — A Provably Live and Secure CBC Casper Protocol
We had a terrific chat with Medha and Sanaya of CasperLabs last night, talking about CasperLabs Highyway, the two critical security properties in consensus protocol, and CasperLabs’ developer network.
Welcome to Untialk, Medha! Could you tell us what is CasperLabs and your role in it?
Medha: Sure! I am the CTO, responsible for managing the Core development team and building the blockchain.
Sanaya: I work on the marketing team here at CasperLabs as a marketing manager focused on content, product, community and more.
Medaha: CasperLabs is a layer one solution powered by the first implementation of CBC Casper proof of stake. We are building a truly scalable, simple to use and secure smart contracting platform. We aim to build a platform that removes the barriers to mainstream adoption for developers, validators, and end-users.
What problems is CasperLabs trying to solve? Why CasperLabs?
Medha: We are creating a platform that will help bring blockchain technology into the mainstream. First generation blockchains have a few big problems: they don’t perform well at large scale, costs are too unpredictable, and it’s difficult to build and use apps.
We are building a network that removes the barriers to mainstream adoption.
CasperLabs network will be efficient at scale, and it will always be decentralized and public.
It will make developing blockchain apps much easier for developers, and much easier for end-users to adopt the apps. Developers will be able to use the tools, languages, and workflows they are already familiar with to build apps that run on computers and the blockchain. This is because we support any language that compiles to Web Assembly (WASM), such as RUST. And, unlike other platforms, it’s really easy to get application insights and to upgrade smart contracts on our platform.
We are making the costs of running a dapp predictable — and app developers will not have to pay more just because the network grows and gets more popular.
When you say “we’re removing barriers to mainstream adoption”. How are you trying to achieve that?
Medha: Because we use WASM, developers do not need to learn a new special language. Our platform presently works with Rust, and we are adding support for Typescript. We also use existing tools like GraphQL for state queries.
So in the future, one may be able to build on the CasperLabs blockchain using languages like Java, solidity, python and the likes?
Medha: As WASM compilation targets for each of these languages are created, we will be able to add support for these languages to CasperLabs.
Sanaya: Solidity is a proprietary language, although languages like Java, Python and the likes do work. You can actually find a nice list of languages here: https://github.com/appcypher/awesome-wasm-langs
“CasperLab’s is working on making cost of running DApps predictable” how would this work? Who would pay the DApp fees? What happens when there’s a surge in network fees?
Medha: Our platform uses the Ethereum gas model. We are working to create a model where companies can purchase computer at a fixed price, so they can have cost guarantees. Because our platform scales, there should not be network fee surges.
You were at Fortune 500 companies in decades, and got into blockchain business in 2017. Have you got any challenges while this transition?
Medha: When I started in blockchain, learning about how the technology worked, while building the specifications for the releases I was managing was challenging. The project had a very aggressive timeline.
What happened since you started the CasperLabs? Could you give us an overview of your achievements, especially your latest progress?
Medha: Yes, of course. We started CaspeLabs in October 31, 2018. In July 2019 we released our public Developer Network, the block explorer is at https://clarity.casperlabs.io/. We make releases every month. Our next release is planned for next week — and TestNet is planned on March, 2020. We also completed the math paper for the provably live and safe CBC Casper protocol in October. We are the first organization to specify a complete protocol that is provably live and safe, without sacrificing decentralization.
There are two critical security properties in consensus protocol: safety and liveness. How do you know if a protocol is safe or live?
Medha: That is correct. For a practically useful decentralized consensus protocol, proof of two theorems must be provided:
1) safety: a theorem that states a transaction shall not be reverted — it is safe.
2) liveness: a theorem saying that network will make a decision consistently — forever.
A protocol is safe if it will not make inconsistent decisions (transactions are finalized and not reversed), whereas a protocol is live if it is guaranteed to eventually make a decision. The first theorem is essentially another name for the machinery of finality detectors and it is the easier one of the two. The second theorem tends to be substantially harder to prove and these difficulties are showing up in pretty much any blockchain design studied.
I saw the introduction of CasperLabs Highway, a provably live and safe consensus protocol. How do you address the live AND safe issues?
Medha: That is a great question. Highway utilizes an innovative approach that offers a new “summit” construction for finality which consist of “levels” of agreement. In order to effectively achieve liveness, the design uses a pseudorandom leader sequence with a dynamic round length system.
An idealized “round” in Highway is a time interval during which a pseudo randomly selected leader proposes a block, and the validators send two layers of confirmation messages for that block. However, the round length is not fixed. The mechanism is designed so that it works even if not all nodes are using the same round length. That way the network can adapt itself, so that it always runs as fast as possible.
What do you mean by the “summit construction” and “the levels of agreement”? Can you please explain more? How do you set the “levels”?
Medha: A summit is a certain pattern in the graph of messages:
There is a first layer of messages that all vote for the same block. Then there are additional layers consisting of messages that cite (include the hash of) the previous layer, thereby confirming it.
The more validators involved in a summit, and the more layers, the higher the level of safety for the block that those messages vote for.
Here is an example of summits. You can see layers of agreement for the 2 blocks in the ‘choke point’ in the DAG.
Is the CasperLabs Highway an extension of CBC Casper research? If so, how does the Highway extend it?
Medha: That is correct, CasperLabs Highway extends on CBC Casper research in two ways. First, the consensus protocol provides a novel, efficient way of detecting safety at different thresholds. Second, Highway provides the first-ever specification for a liveness strategy in the CBC Casper framework. We believe this is a significant step for our industry and have also released CasperLabs Highway to the public via an open source license. We hope to inspire further innovation for the benefit of all.
Sanaya: You can also learn a bit more on Highway here where we’ve also included a Github link for some deeper documentation: https://medium.com/casperlabs/introducing-casperlabs-highway-552d7c2ee1b4
Let’s look at the bigger picture. There are other consensus trying to address blockchain’s scalability and safety problems. What’s the differences between the Casper Consensus and BFT Consensus?
Medha: Most BFT protocols come to consensus on the order of transactions. The Highway Protocol comes to consensus only on the validity of blocks, and the weight of blocks (the number of validators that have voted on a block) — and this enables the system to be completely concurrent (for transactions that do not conflict — such as double spend) — because the order of transactions do not matter. Our protocol supports optimistic block merging, because we can detect conflicting transactions during the merging process.
Also, most consensus algorithms have one fixed in-protocol fault tolerance threshold. With CBC Casper, each client can set their own threshold, as a tradeoff between latency and safety.
Is your coding practice well documented and developer friendly?
Medha: Our code is open source, and we try our best to write clean and well-documented software.
Sanaya: We do also provide documentation on our github at: https://github.com/CasperLabs/CasperLabs
The node is written in idiomatic FP-style scala, which should be accessible to any developer familiar with that style. Similarly, our execution engine is written in rust, and should be accessible to any rust developer. Even C++ developers should be able to follow it reasonably well.
What’s the relationship between CasperLabs and the Ethereum?
Medha: CasperLabs and Ethereum are both focused on Casper work. Inside CasperLabs, we also have several former members from the Ethereum foundation, along with a current board member, who also serves on our board of directors. We have relationships with Ethereum researchers and core developers, and we share knowledge and research.
Will you hire developers from China?
Medha: We have Chinese developers right now that are part of the core team! https://github.com/AbnerZheng
Certainly, as we hire, we would be happy to have more participation from Chinese developers.
What can I do on the developer network, today? How can I get involved?
Sanaya: Our public block explorer for the Developer Network is located at https://clarity.casperlabs.io . You can create accounts, and fund them with token. If you want to try a transaction, you can perform a token transfer from one account to another, as well as write smart contracts and deploy them to the platform. You can also get involved by joining our community calls or weekly workshops!
If you are interested in keeping the conversation going to learn more you can add me on wechat: ssmirpuri to join our CasperLabs wechat channel as well! You can also find all respective links to our other community groups and channels at our website at https://casperlabs.io/
You can keep up with our Twitter at @meetcasperlabs for announcements and access our Github here for greater documentation: https://github.com/CasperLabs/CasperLabs
[The copyright of this article belongs to Unitimes. Please contact us at firstname.lastname@example.org if you want to repost the article. Opinions expressed by contributors belong to themselves.]