Zilliqa Project Update #26 — Final Testing Before Mainnet Launch

Yiling Ding
Zilliqa — Official Blog
9 min readJan 22, 2019

As we continue to progress towards our mainnet launch, we have been heads down focusing on building. We are focused on ensuring that we can maintain high levels of security in this crucial early phase of our technology platform. Given how new and complex our platform is, we will be rolling out features and scaling up the network in phases. We will provide more details about the launch and our 2019 roadmap in another post later this week, so please stay tuned.

This project update is a special one: it is the last project update before the launch of the Zilliqa mainnet on January 31, it marks the one-year anniversary of our token generation event (TGE), and it — most importantly for us — represents an entire year’s worth of work and bi-weekly updates from the Zilliqa team. We’d like to thank everyone for taking the time to read about what we are building and we will make sure to continue the tradition moving forward. To reminisce, check out Zilliqa Project Update #1 from February 2, 2018.

We will also be holding an online AMA on Feb 1, 4pm SGT (8am GMT) to address your questions on mainnet and our future plans. You can find more details here.

As always, please feel free to connect with us in any of our social channels:

Discourse Forum: https://forum.zilliqa.com/
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)

Upcoming Events

We are happy to share that we will be attending a slew of events across Asia, Europe, and the USA in the first half of the year, and will be adding more to this list as they get confirmed. We are looking forward to seeing all of you!

January

February

  • ETHDenver | 15–17 February | Denver, CO
  • Developer Week | 20–22 February | San Francisco, CA
    We will be hosting a 2-hour developer workshop during this event, hope to see some of you there!

March

April

May

External Code Review

In order to ensure our code robustness, we have been engaging several auditors for several rounds of security audit on Zilliqa’s core protocol code and cryptographic implementations since August 2018. These auditors include Beijing Zhenyuan Cybersecurity Co. Ltd, Cure53, Kudelski group, and NCC Group, all of which are expert in cryptography and digital security. We sincerely thank them for their professional services and insightful feedback, which have greatly helped us improve the security and robustness of our codebase. We will be gradually releasing the audit reports in the next few weeks.

In addition, we believe in crowd-sourced efforts and in ensuring security, and started a private security bug bounty program in November 2018 on the Bugcrowd platform. We are in the final phase of scaling the private program and will be making the security bug bounty program public in early February 2019. We have also recently awarded a community member from our ecosystem grant programme to conduct code review and fuzzing of our codebase and other community wallet implementations.

Tech Updates

For the past two weeks, we’ve been working on refining the reward mechanism, network’s upgrade mechanism of Zilliqa/Scilla, multiple security enhancements and mining proxy with community members. For the next two weeks, we’ll have our final touch on the codebase and finalize the parameters for mainnet.

Refining Reward Mechanism

In the original design of Zilliqa’s incentive mechanism, the network only rewards nodes who successfully verify transactions and sign blocks with the coinbase/gas fees. However, based on the feedback received by the mining community, we decided to provide 25% of the coinbase/gas fees as base rewards to all the nodes who manage to successfully submit qualifying PoW results. The remaining 70% of rewards will still be distributed equally based on the number of valid signatures submitted by all validating nodes. The last 5% will go to seed/lookup nodes for providing services such as helping new nodes join the network, executing transaction forwarding/assignment, providing historical data storage, and serving JSON-RPC requests.

NOTE: The emission rate for mining reward is set at 4% for the first year, hence the current COINBASE_REWARD_PER_DS is currently set at 191780.82 ZILs. Please do note the COINBASE_REWARD_PER_DS will be subjected to changes based on the testnet’s average DS Epoch time collected over the span of the following week.

If you’re interested in participating in our mainnet, please visit our mining guide located in our Mining wiki.

If you wish to find out the profitability of mining in Zilliqa, please make a copy of this Reward Calculator spreadsheet that is provided.

Network Upgrade of Zilliqa/Scilla

For our previous upgrading mechanism, we only support the single-version upgrade of the Zilliqa protocol side but not Scilla interpreter. Now we provide the network upgrade with both Zilliqa protocol and Scilla interpreter plus multi-version support, which ensures the backward compatibility of Scilla smart contracts and states.

Security Updates

To prevent a replay-style attack, e.g., a valid transaction on a testnet is replayed on the mainnet, we use the first half of transaction version ID for as CHAIN_ID to differentiate the mainnet from other testnets. This helps us to detect whether a given transaction is meant for a testnet or for a mainnet.

To ensure only valid messages to gossip within a shard, we apply signature schemes on all gossip messages. Now all the gossip messages are signed and verified before sending and receiving. We also enforce additional checks to verify if the pubkey in a message actually maps to sender host IP/port. Further, we walked through our implementations of various types of messages and applied signature check for them, e.g., DSMicroBlockSubmission, LookupSetDirectoryBlocksFromSeed, and DSPowPacketSubmission.

To prevent a node from receiving a huge amount of data from malicious nodes and exhausting its RAM by sending a few GB of data till it is out-of-memory, we apply watermark on the bytes to read from another node and will blacklist the malicious sender. In the consensus phase, we further check if the sender id/IP address is in the committee member list, and ignore duplicate messages, to protect the consensus message buffer and avoid accepting an unlimited number of messages.

Remote/Dual Mining

As our PoW window is only 1 min per 2–3 hours (for 1 DS Epoch), dual mining is a logical choice for all miners to partake in, i.e., 99% uptime for mining ETH/GRIN, and 1% uptime for mining ZIL. To help simplify this process, we helped our community developer, Gully, to develop the Zilminer.

Zilminer allows miners to mine Zilliqa remotely on both Ubuntu and Windows OS via the Getwork protocol. You can connect Zilminer to just 1 CPU node’s client (running on Ubuntu) as shown below in Option 1 or to a cluster of CPU nodes’ clients (running on Ubuntu) via the open sourced Zilliqa-Mining-Proxy server as shown in Option 2.

Zilminer also provides the convenience in mining ZIL as it automatically spins up your GPU rigs when it is time for the Zilliqa’s PoW window, and pauses them when the CPU nodes are running the Zilliqa’s pBFT consensus process. Therefore if you wish to setup the dual mining processes, you can simply run both Zilminer and ethminer software concurrently on your GPU rigs. However, do note that if you with to mine ZIL and ETH concurrently, your GPUs must have a vRAM of > 4GB in order to accommodate both ZIL’s DAG size (~1.02GB) and ETH’s DAG size (~2.84GB).

Option 1: Setting up many GPU rigs to 1 CPU node

  • The Zilliqa node will be running on 1 CPU and carrying out the pBFT consensus to receive rewards.
  • The GPU rigs will run Zilminer on a separate GPU cluster to do PoW mining and provide PoW solutions directly to the CPU node.

Option 2: Setting up many GPU rigs to many CPU nodes

  • The Zilliqa nodes will be running on a CPU cluster to process transactions and carrying out the pBFT consensus to receive rewards.
  • The GPU rigs will run Zilminer on a separate GPU cluster to do PoW mining and provide PoW solutions via the Mining proxy to CPU cluster.
  • The Mining proxy will handle the mining request from the CPU cluster and process the Mining Register/Response from the GPU cluster.

Scilla Interpreter

In the last two weeks, we have made some small changes to the language and the interpreter. These include:

  • Provided an implicit variable (_this_address) for Scilla contracts to access self address.
  • Modified gas tracking in Scilla to use Uint64 rather than native integers.
  • Removed key generation and signing builtins for Schnorr and ECDSA to disallow having private keys in a contract.
  • No more gas charge proportional to state size. The cost now is only going to be based on the actual computational work defined to be done in the transition.
  • Removed the zil-game specific builtin dist and added a more general builtin to_int : ByStrX -> Uint256 when X <= 32. Implemented dist as a library function in zil-game based on the new builtin.

We have also added some new checks to scilla-checker:

  • Separate types for messages constructed for send and events. This enables the checker to throw errors when a message constructed for send is used for an event.
  • Enhance the Event/Message checker to check library entries also.
  • Print a warning when contracts use non in-place Map accesses.

As announced in the last bi-weekly update, the first version of custom type declarations (ADTs) in Scilla is ready. Custom ADTs allow type declarations similar to the ones allowed in OCaml, although we do not yet have support for inductive types (types that refer to themselves, e.g., trees), or for polymorphic types. We have added an example of how to use custom ADTs in the form of a simple implementation of the Shogi game or Japanese Chess (https://en.wikipedia.org/wiki/Shogi) in Scilla. Check it out!

Dev Tools and Libraries

As mainnet is just around the corner, we have started to prepare for the impending token swap. As earlier mentioned, in order to better assist the exchanges that will be supporting our token swap, we have already made significant progress with the following two SDKs in the last two weeks with the help of our community:

- LaksaJ: Java port of zilliqa-js

- LaksaRuby : Ruby port of zilliqa-js

Further SDKs for native C# and Python support are also in the works and will be started on shortly. Moving forward, we intend to continue investing heavily into integration options for various stacks and developers.

On a related note, we have also firmed up our plans for our token swap window. Once the Zilliqa main net is launched, we urge all ERC20 ZIL holders to pay attention to our public communication channels for instructions on how and when you will be able to swap interim ZILs for native ZILs on Zilliqa.

Zilliqa in the News

Xinshu shares more about Zilliqa’s technology, our focus on security, and our key partnerships/collaborations:

An interview with Xinshu about Blockchain and gaming:

En Hui writes in Nasdaq that the potential of STOs depends largely on product innovation:

Xinshu was quoted on his outlook for the blockchain industry in 2019:

General coverage from our last technical update:

--

--