Zilliqa Project Update #13 — Building on Zilliqa

We have launched our dedicated website for Scilla. Stay tuned as we will be adding more videos and tutorials shortly. Check it out at: https://scilla-lang.org/

The past two weeks have been extremely busy with our attendance at major events across Asia and strong progress from the technical team. Importantly, we have also been working on the onboarding of new partners and applications building on our platform, scheduled for public release by the end of this quarter.

It’s very exciting and humbling for us to receive such a warm reception to Zilliqa at events and to get such positive feedback from new and existing partners. As we enter into this phase, we can really sense the excitement around Zilliqa’s development. We attribute this to our community and also to our fantastic team of blockchain engineers and business developers who strongly believe in what we are doing and reflect this philosophy in their work.

Zilliqa is built from the ground up to be scalable, using our sharding technology to increase transaction throughput as the network grows, and to be more secure with our new intermediate level programming language, Scilla. In addition, the design of Zilliqa also provides many other benefits such as low transaction costs, ease of mining with much lower energy consumption, true decentralization, and more.

In the coming months, we plan to outline the different features of Zilliqa, and highlight the many types of applications, from games to exchanges, that are perfectly suited to run on our next-generation blockchain platform.

Currently, we’re working closely with a number of external technical teams to build the first wave of applications that will be launching on Zilliqa. We welcome any enquiries and are happy to discuss whether or not a project or applications, existing or not, could be a fit for the Zilliqa platform.

As always, to learn more about Zilliqa or to discuss technical aspects of the project, feel free to connect with us through any of our official channels below:

Telegram: https://t.me/zilliqachat

Slack: https://invite.zilliqa.com/

Twitter: https://twitter.com/zilliqa

Reddit: https://www.reddit.com/r/zilliqa/

Github: https://github.com/Zilliqa/zilliqa

Gitter: https://gitter.im/Zilliqa/ (Dev-related topics including the Ecosystem Grant)

We are receiving more applications for our Ecosystem grant and look forward to sharing some of the selected applicants with all of you soon. If you have an interesting idea or wish to explore how you can implement your idea on Zilliqa, do reach out to us on Gitter https://gitter.im/Zilliqa/ .

Community Updates

Past Events

The past two weeks have been a whirlwind with events in China and Korea — where we were attending and hosting meetings for Korea Blockchain Week. The reception has been incredible.

We spoke at the Bluzelle meetup in Beijing.

Conducted a sharing session at Fosun International, a Chinese international conglomerate and investment company.

The enthusiastic crowd at Fosun had many questions and interesting use cases which they wanted to apply to their lines of businesses.

And finished with a dedicated meetup in Shanghai for developers.

Xinshu addressing the developers in Shanghai and walking through our latest developments.

Yaoqi spoke at Huobi Talk on the security aspects of blockchain, in Singapore. Watch the video HERE.

Yaoqi and Jin Han, also an expert in Blockchain security spoke with in Huobi Talk Live on YouTube

Korea Blockchain Week

We held a meetup along with Kyber, Quantstamp and others in Seoul on 19 July.

A full house at the meetup.

We were also invited by KakaoTalk to present at the Ground X Technology Forum in Jeju. Xinshu presented a crowdfunding contract using Scilla, our secure smart contract language.

Demoing Scilla to a packed crowd
Xinshu on a security panel together with Dawn Song (Oasis Labs) and the team from Orbs

Tech Updates

During the last two weeks, we have been working on several technical matters including but not limited to the core blockchain protocol, dev ops, smart contract layer etc. Below, we discuss the progress that we have made in each area.

Dev Ops

Since Testnet 2.0, we’ve successfully migrated our public testnet to Kubernetes. Every component of the testnet, including testnet nodes, Zilliqa Explorer, and Zilliqa Wallet, is now running on Kubernetes clusters that we maintain on AWS cloud. We have also unified our workflows of internal development and product delivery into one, making the life of our engineers easier.

Apart from improving the development workflow, Kubernetes has also made it easier to identify and fix several critical issues that appear only in large-scale testnets.

To enhance developers’ experience when contributing to the Zilliqa codebase, we have also created a pull request template in Github. This template will guide developers in describing the details of his/her implementation/changes.

As the team has grown in the last few months and development has been moving fast, we felt that we needed a better pull request management system. To this end, we have created a PR tracking board in the projects section in the Github repository, which would show what every team member is working on and the PRs that need reviewing. The team will pilot the usability of this board next week and see if reviewing and merging becomes easier to manage moving forward.

Consensus Layer

We have made several improvements on the consensus layer specifically to handle out-of-order messages in the consensus protocol. More details follow.

Consensus Error Codes

During consensus, all sorts of errors may emerge. However, the current consensus implementation does not return error details. As an enhancement, we have implemented functions that can return the error code along with an error string. The inspiration of creating error code comes from Linux error number.

Some examples of error messages are:


Out-of-Order Consensus Messages

Out-of-order consensus messages can cause the consensus to fail. In particular, there is the following dependency: the consensus leader first makes an announcement regarding a block, then the other nodes run a multi-signature protocol (S1) to agree on the validity followed by another round of the multi-signature protocol (S2) to agree that all the honest nodes have signed in the previous step. Note that ordering is important as each step depends on the previous step.

A hotfix that we had previously used to reduce the chances of out-of-order messages was to delay S1 and S2 to allow the network to receive messages in the right order. In the new enhancement, this has been removed and instead the node will block momentarily and process consensus messages in the right order.

We have also fixed other out-of-order issues. For instance, synchronization between announcements at shard-level and the DS-level so as to ensure that operations at the DS-level are handled after operations at the shard-level have terminated.

Missing Transactions

When a shard leader proposes a microblock (via the announcement message in the consensus protocol), it includes all the transaction hashes it has received. However, it is possible that other nodes may not have received the exact same set of transactions. In such cases, there will be a consensus error and nodes will not commit to the announcement message.

With our new enhancement, nodes will request any missing transactions from the leader and re-process the announcement message. This allows for smooth processing of consensus messages.


We have done several optimizations to improve protocol latency and throughput. A list of some of the optimizations are given below:

  1. Removed TxHashes in microblock when sending to the DS committee to reduce network overhead.
  2. Optimized the new node rejoining process so that it can join the network by fetching only the latest blocks. This required us to refactor the implementation of a circular array that stores a pruned blockchain.
  3. Removed transaction submission time window: We have removed an explicit time window for transaction submission. The maximum duration to process a transaction will now be determined by the block gas limit.

Smart Contract Layer

On the smart contract front, we have been working on adding support for (un)signed integer support for 256 bits among others. Further details are provided below:


Scilla now supports an import construct. With this, both the standard Scilla library as well as user-defined Scilla code (both pure functions) can be imported for reuse. This would mean that instead of writing a function to compute the boolean `and` in the following way in every contract, one could simply `import BoolUtils` which defines pure functions on boolean inputs and then use `andb`.

let andb =
 fun(b : Bool) => fun(c : Bool) =>
   match b with
     | False => False
     | True =>
       match c with
         | False => False
         | True => True

We have also added support for special contract parameters in init.json. Recall that init.json provides values to the immutable variables in the contract that cannot be changed once the contract has been created. With the added support, contracts will have access to values such as _creation_block— — the block number during which the contract was deployed/created. Adding support for other parameters say creation block hash can be easily done in the future.

As mentioned in a previous update, Scilla supports (un)signed integers of 32, 64 and 128 bits. Since the language supports hashes of 256 bits, we felt that it was necessary to support 256 bits (un)signed integers as well. To this end, we have finished adding 256 bits integer support. This involved implementing support for 256 bit arithmetic in OCaml and writing a wrapper around it for Scilla. The implementation again uses a pair of 128 bit values from OCaml’s stdint. See how useful pairs are?

Dapp Development

In order to facilitate future dapp development, we have coded a Scilla contract that implements a non-fungible token standard a la ERC-721. The contract will be added to the template contracts in the Scilla IDEs in the next release.

Scilla being an intermediate-level language does not support struct directly. However, the language supports a construct Pair that represents a pair of two data types. Pair makes it possible to define a struct in the following way:

Struct in C++

struct Books {
 Uint32 ID;
 String title;
 String author;

Struct in Scilla

Books: Map Uint32
      (Pair (String) (String))

We have coded a Bookstore contract that demonstrates how a CRUD dapp might be developed on Scilla. The contract makes use of pair or mapping to represent a struct. Bookstore contract will also be added to Scilla IDEs in the next update.

New Team Member

We’re very pleased to announce that Jacob will be joining us as a Compiler Developer starting 19 July 2018.

Jacob specializes in programming language semantics and compiler implementation. As a software developer Jacob has worked in compiler design, quantum cryptography, pensions and life-insurance policy management, editorial software for the newspaper industry, and bespoke web applications. His non-professional interests include comedy, snooker, American football, film and theatre literature and poetry, avantgarde music, languages, board games, craft beer, fine dining, and chocolate.

Join Zilliqa!

We are actively interviewing and seeking to bring on high quality members to help Zilliqa achieve its maximum potential. We’re looking for programmers with deep C++ experience, compiler engineers, and associates and executives in business development. Please reach out if you feel you can bring value to the growing Zilliqa ecosystem!

Zilliqa in the News

Some of the extensive coverage of Etheremon exploring a partnership with Zilliqa:

Interview with Amrit and Southeast Asia Globe: http://sea-globe.com/the-blockchain-platform-capable-of-nearly-3000-transactions-per-second/