Zilliqa Technical Update 16 July 2019

Further to references in our previous tech updates, the core tech team has finally completed and rolled out Zilliqa version 4.7.0. This version brings with it several improvements and bug fixes. Below, we highlight the more notable ones.

Zilliqa Technical Update 16 July 2019

Greetings all,

Further to references in our previous tech updates, the core tech team has finally completed and rolled out Zilliqa version 4.7.0. This version brings with it several improvements and bug fixes. Below, we highlight the more notable ones.

Core Tech Updates

Lookup node fixes and improvements: Zilliqa versions 4.6.2 to 4.6.5 were almost entirely dedicated to shoring up our Lookup nodes. Version 4.7.0 brings in all those changes, including: support for custom persistent storage paths (4.6.2), preventing block queries while the chain is empty (4.6.3), buffering new block and transaction data while syncing up (4.6.4), and a fix for retrieval of state delta from seed nodes (4.6.5).

Apart from these integrated changes, we have also re-coded the Lookup to prevent processing JSONRPC queries while syncing up. This should prevent seeing incorrect API results if the Lookup assigned to process a request happens to be out of sync.

P2P communication fixes. After observing the mainnet operation, we realised that the previous limit for the number of connections to the same peer was too low, so we have doubled it starting from version 4.7.0.We also discovered that the connection counter was not being decremented after a peer gets blacklisted. This meant that after being removed from the blacklist, a peer may be unable to establish the correct number of connections allowed for it. On a similar note, we noticed that a Lookup node was not clearing peer connection counts during each new DS epoch, and this has been fixed in this new version as well.

PoW mining improvements. As mentioned last week, we have made some improvements to our mining code based on valuable feedback from our mining community. These include the ability to retry sending PoW solutions to the proxy server in the event of intermittent network issues, avoiding downloading all persistence data unnecessarily (and just resynchronize instead) in the event of mining failure, and preventing prematurely aborting checking the result of mining from the proxy server unless the timeout has elapsed.

Other notable fixes. As also mentioned last week, we addressed the source of one stall that occurred last month after DS node IP changes caused multiple view change failures. The fix involved removing the IP address check around faulty DS leader nodes and relying on the public key instead. Another notable fix is the addition of a missing check for new contract account generation during contract creation. Prior to this fix, contract creation would proceed incorrectly even though the account storage was unsuccessfully updated for the new account.

Scilla Updates

Work has begun on adding custom inductive datatypes to Scilla. Scilla already allows the programmer to define his own algebraic datatypes, but since Scilla does not allow general recursion, inductive datatypes (datatypes that refer to themselves, e.g., trees) have been disallowed since values of such a datatype cannot be traversed recursively anyway.

For inductive datatypes to be usable in practice, an inductive datatype needs to be equipped with a recursion principle. For the predefined inductive datatypes List and Nat we use standard folds, which combine a powerful computational model with easy embedding into proof assistants such as Coq.

For custom inductive datatypes we are planning on providing a recursion principle similar to fold. However, we would like the recursion principle to be more general, because a traditional fold requires a complete traversal of a data-structure. This requirement means that it is, for instance, impossible to only traverse one path through a tree from the root to a leaf, which in particular prevents the implementation of efficient search trees.

Scilla vs Move: The language team at Zilliqa has also been busy studying Move — a smart contract language being developed for the Libra blockchain by Facebook. The team will soon share a blog post explaining the difference between Scilla and Move. Here is a sneak peek:

Scilla backend compiler: We have also been working on an efficient compiler backend for Scilla, and are writing a detailed article to explain the design. This will be released in the coming weeks.

A summary of other bug fixes and changes is given below:

  • Update Scilla Travis version to Ubuntu 16.04
  • Updated the one-msg warning analysis to handle procedures correctly

For further information, connect with us on one of our social channels: