Zilliqa Technical Blog 30 July
After addressing the operation of the Lookup nodes in several of our more recent releases, the core tech team is now turning its focus to improving the efficiency and robustness of the operation of the mainnet.
Greetings everyone,
As new announcements come your way this week, the tech team is still busy as ever improving the efficiency of our blockchain operations. Below is a summary of the core tech and scilla developments.
Core Tech Updates
After addressing the operation of the Lookup nodes in several of our more recent releases, the core tech team is now turning its focus to improving the efficiency and robustness of the operation of the mainnet. This involves several major changes not just to the core C++ source code but to our hosted infrastructure as well, including the internal scripts and utilities we maintain for the infrastructure.
For the infrastructure refactoring, we have fully separated our workloads into isolated environments and created guidelines for hosting deployments for our different needs. We have reviewed our access-control policies and enforced them with proper tools to make another step towards infrastructure-as-code.
For the core Zilliqa work in progress, users can also expect the next major release to include multiple enhancements along such aspects as smart transaction and micro-blocks processing, Directory Service committee reputation system. Alongside these, as per usual practice, we will also be introducing some other functional and security improvements.
Scilla Updates
Our test suite contains a multisignature wallet which was written about a year ago when Scilla missed some crucial features that it has today. Following a security audit of this wallet contract, we have begun rewriting it to be more secure by using some of the newer and more efficient features. We plan to add this and other contracts to a repository of contract templates that contract developers can use for inspiration.
On the core Scilla development, we have been working on optimizing the I/O requirement of the interpreter. In the current version, Scilla comes with an interpreter (with a minimal trusted codebase) that interacts with the core blockchain in a blackbox manner, i.e., it expects the current contract state and the function (aka transition) to be invoked and returns the updated state of the contract. The current state fed to the interpreter can, however, be large and may create I/O bottlenecks. We have been working on improving this by ensuring that the interpreter will only read the necessary entries from the state and not the entire state. To this end, we have restructured the way states are stored by each node and the way they are passed to the interpreter. Further details to follow in the coming weeks.
In order to ease development in Scilla, we have also added two new fold primitives nat_foldk
and list_fold
— a version of fold that allows traversal with early termination. As an extension, we refactored NatUtils
and ListUtils
to take advantage of the newly introduced folding primitives and reduce gas usage: nat_eq
, list_zip_with
, list_eq
, list-nth
, and list_find.
We have also added two new functions into ListUtils
and NatUtils
: nat_fold_while
, list_foldl_while
. Documentations on these functions are underway.
A summary of other improvements and bug fixes are given below:
- Refactored
BoolUtils
to reduce gas usage - Refactored
nat_fold, list_foldl
andlist_foldr
primitives to reduce gas usage - Increase test coverage for map builtins to fix the semantics of
put
andremove
built-ins - Increased test coverage for several functions of the standard library
- Added
_gaslimit cli
option foreval-runner
for performance testing - Fixed stackoverflow error for
to_nat
built-in and pretty-printing for nats. - Fixed quadratic complexity for
list
pretty-printing (now it’s quasi-linear) - Fixed quadratic complexity for
nat
folds
Development for the Ledger Support
A few weeks ago, we had submitted a Ledger app for review by the Ledger team. We recently received some initial feedback on it. In order to address these, we refactored the app code so as to support the following features:
- Enabling signing of transactions of arbitrary size by instrumenting the schnorr signature function to work in a “streaming mode”
- Adding
nanopb
(protobuf library for embedded devices) into the ZIL ledger app code to deserialize transaction bytes to display amount, toaddr and gas fees - Modifying the host python and nodejs apps
For further information, connect with us on one of our social channels: