Zilliqa Project Update #11

— Preparing for Testnet v2, Building the Zilliqa Ecosystem

Hello everyone, over the past few weeks we have been extremely busy preparing to release the latest version of our testnet — that will begin to support Scilla, our new smart contract language to bring a new level of security to decentralized applications that run on Zilliqa. For a more detailed overview of Scilla, check out Amrit’s article about the design story behind Scilla.

While we’re busy building out our technology, we’re also developing initiatives that will allow applications to more easily build or even migrate their existing products to Zilliqa. Our goal is to not only provide a scalable and more secure infrastructure for smart contract applications but also to facilitate the development of new types of applications that can push the boundaries of existing smart contract applications. As we have mentioned many times in the past, we strive to build Zilliqa around some of the leading minds in blockchain technology — but ultimately we also strive to lend our expertise to our community to build things that are truly remarkable.

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/ecogrant (Ecosystem Grant channel)

Community Updates

To begin incentivizing teams or individuals to #BuildonZIL, we have opened applications for the Zilliqa Ecosystem Grant. The grant is a pool of $5 million USD that will be given to great projects, teams, and individuals to start building tools and applications for the Zilliqa platform. If you would like to work on any of these tasks listed, please apply here: https://goo.gl/forms/cD9m8Hv3yM10h6gl1

You can also join our dedicated Gitter channel if you wish to find other like-minded people to work with or ask any questions you have about the program.

New Dapps that will #BuildonZIL

We are also happy to announce that more new Dapps have announced that they will be powered by Zilliqa.

These include

  1. Spokkz, an initiative by Spuul — an over-the-top provider of video streaming content in 180 countries with an existing user base of over 57 million users. Spokkkz is a Film and TV Blockchain Ecosystem.
  2. Bolt, an open entertainment network that aims to revolutionise ways to access content, data and education resources, powered by blockchain technologies.

If you have a Dapp project and would like to discuss how to build on the upcoming Zilliqa platform we will be happy to go over the technical details with your team. Join our Gitter channel at https://gitter.im/Zilliqa/ecogrant

Zilliqa’s Chinese Name: 晶砺

We have also just announced the winners of the Zilliqa Chinese naming contest. An overwhelming number of entries was received and the winning entry was 晶砺 which is read ‘Jing Li’ in Chinese. This was the rationale submitted — the word ‘Jing’ looks like 3 shards, and ‘Li’ means a sharpening stone which symbolises the sharp edge that Zilliqa has in scalability.

More Smart Contract Vulnerabilities Exposed

In the most recent Blockchain Technical Fundamentals Reading Group that we are supporting, Aashish Kolluri from the National University of Singapore presented on hacking smart contracts and his tool MAIAN which analyzes smart contracts to identify common vulnerabilities. The findings were reported here https://news.bitcoin.com/report-claims-34000-ethereum-smart-contracts-vulnerable-bugs/

Upcoming Events

We are will be in China and Korea for events in July so stay tuned for details.

Tech Updates

In preparation for the release of testnet v2.0, our tech team has been focusing on the implementation of the coinbase mechanism to reward miners, NAT resolver for new nodes joining and the smart contract layer in the last 2 weeks.

Mining Rewards

In the current implementation of the testnet, we reward all the nodes (or miners) including DS and shard nodes through their involvement in the consensus protocol. Specifically for each transaction epoch, nodes that participate more actively in the consensus protocol (through signature count) are rewarded with more tokens. For instance, for a microblock/final block, a node can contribute a maximum of two signatures, thereby being rewarded twice. With this scheme, every node will be treated fairly and tokens are distributed more evenly every epoch.

NAT Resolver

Previously, our testnet supported new nodes joining the network with public IP addresses. However, for most cases, users don’t have public IP addresses. To resolve this issue, we have implemented NAT resolver for new nodes joining.

As a result of IPv4 address scarcity, most home internet gateway devices (IGD) such as “home routers” and “switches” use network address translation (NAT) to map a public IP address assigned by the internet service provider (ISP) to a private network such as a local area network (LAN).

This means that a node behind such devices will be assigned a private IP address and the gateway will route the traffic to and from the outside world. As such, external nodes in the Internet are unable to route messages to nodes before devices with NAT. For instance, in the diagram below, when Alice wants to route a message to 192.168.1.101:12345, she would be unable to do so.

One could manually specify a rule on the IGD to route network traffic received on one port to one of the devices in the LAN. For instance, one rule can be such that any message going to 177.66.55.44:12345 will be forwarded to 192.168.1.101:12345. This is known as port forwarding.

Other than manual port forwarding, applications supporting universal plug and play (UPnP) can make use of the network protocol of UPnP to automatically get a mapping of router port(s) to its own port(s). Supporting UPnP is important for Zilliqa nodes, as it allows nodes behind IGD to join and communicate within the Zilliqa network.

We have recently implemented and merged support for UPnP via the use of MiniUPnP library.

We have implemented the following:

  • Use UPnP to get a direct port mapping from the IDG (Port n to Port n)
  • If direct port mapping fails, the node will attempt to map to 10 random ports on the IGD for 10 times
  • If this fails, the node will ask the IGD to return a port suitable for the mapping
  • In addition, we also added valid port checking and removed dangling mapping before attempting to get the mapping

Smart Contract Layer

We have made progress in four related areas on the smart contract front.

  1. Interpreter and language: On the language side, we have implemented a major change regarding the support for integer types. In our previous implementation, integers were arbitrary-sized and signed. In the new implementation, we have moved to fixed-size signed and unsigned integers of 32, 64 and 128 bits. We will be adding support for 256 bit signed and unsigned integers in the coming weeks. In order to facilitate coding in Scilla, we have coded a standard library that includes basic operations on some data primitives and data structures. For instance, the library provides support for fold-like operations on lists. Some sample fold operations that the library supports are list_append and list_reverse (among others), the former allows appending a new entry to a given list, while, the latter allows to change the order of entries in a list. We have also made a few changes to the way the Scilla interpreter handles some implicit data that comes along with a transaction. For instance, sender, recipient and amount can now be inferred directly from a transaction. Previously, a client had to pass these parameters explicitly in the data field of a transaction. Scilla now comes with a standalone parser binary that can be used by a client (such as an editor) to point out errors in a contract.
  2. IDE and Wallet/Block Explorer Integration: We have implemented a stand-alone web-based Scilla IDE to try and test smart contracts. The IDE is not connected to the blockchain and hence has no persistent memory. It however provides an interface for developers to simulate the blockchain environment by passing inputs that contain the contract state and blockchain parameters (such as current block number). The IDE also comes with some sample contracts. We have also been working on an IDE that is connected with the blockchain network via our testnet wallet. During the last two weeks, we have added features such as syntax error highlighting, better CSS and UX. Both the IDEs required us to create and deploy a nodejs server that uses Scilla parser and interpreter binaries to deploy and invoke test contracts. We have also added C++ API (and JS libraries) to obtain the smart contract code for a given contract address and all smart contract addresses created by a given non-smart contract account.
  3. Interpreter Invoker: We have improved the logic of handling account balances when smart contracts are invoked and also added more unit test cases for smart contracts. We also fixed bugs that showed up when a contract invoked another contract. We now have a basic implementation of the gas mechanism. In the current implementation, a normal payment-like transaction from a non-contract account to another non-contract account costs 1 unit of gas. Any call from a non-contract account or otherwise to a contract costs 10 units of gas, and creating a contract requires 50 units of gas. This gas mechanism is temporary and will be changed in the coming weeks.
  4. Scilla Documentation: As we are approaching the next release, we are working in parallel on documenting Scilla both on the language side and how to use the interpreter and the different accompanying tools. We are using readthedocs to write the documentation. The Scilla documentation repository will be made public soon. Stay tuned!

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

Coverage of the $5M Zilliqa Ecosystem Grant Programme:

Zilliqa is one of 5 projects to watch in July: https://cryptorecorder.com/2018/06/21/5-hot-cryptos-to-watch-out-for-in-july-2018-ethereum-classic-zilliqa-icon-tron-binance-coin/

Spokkz building on Zilliqa: http://www.digitaljournal.com/pr/3813749