Zilliqa Project Update #15

— Updated Roadmap, Ramping Up Marketing, Zilliqa Infrastructure

As always, we have been focusing on BUIDLing over the last few weeks. The Zilliqa team is committed to delivering our secure, decentralized, and scalable blockchain platform. We are dedicated to not just delivering our mainnet by the end of this year or the beginning of 2019, but also continuing to push the boundaries of blockchain technology and adoption in the long term as well. Right from the start, we have employed prudent risk management measures to financially support high-quality research and development for the next 4 years, regardless of volatility in the market.

As communicated with our community, we have updated our development roadmap for the remainder of this year to ensure a smooth journey leading up to the Zilliqa mainnet launch in Dec 2018/Jan 2019.

Q3 2018: Support for sharding-friendly smart contracts

Highlights: All primary features/functionalities for the core protocol, including sharding-friendly smart-contract implementation, adjustment of PoW difficulty, GPU mining and new node joining. Apart from network/transaction sharding, we will be supporting smart-contract sharding with full functionality of Scilla.

Q4 2018: Large-scale tests and security auditing

Highlights: We will be opening up our system to the public and allow nodes/users to join and mine test tokens. We will also be performing thorough large-scale testing and security auditing.

Dec 2018/Jan 2019: Mainnet launch

Highlights: Public launch with toolchains for developers and applications for users.

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 have just announced the first batch of ecosystem grant awardees and are looking forward to more! 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

#BuildonZil — our first dozen ecosystem grant awardees

When we launch our mainnet, we intend to have an ecosystem of applications running on Zilliqa that will support enterprises as well as end consumers. We believe that the true strength behind a blockchain protocol is in its community. The community’s involvement through the grant programme will ensure that the necessary development tools, frameworks and libraries will be in place to drive the development of new “killer applications” that will be built on our platform in the future.

We announced the first batch of 12 Zilliqa Ecosystem Grant awardees that have been chosen after weeks of rigorous selection and active conversations. These teams will be working alongside us to build infrastructure and also new applications on Zilliqa.

These include Web3 libraries, wallets, extensions, smart contract libraries, Scilla language server, games as well as a cross-chain protocol for BTC issuance. You can read more about them here.

New Zilliqa Team Members

In addition to announcing Yiling Ding will join Zilliqa as CMO from Google, we are also adding some great new members to our team.

Sophia Fang joins as VP, Business Development

Sophia Fang will be joining us as VP, Business Development focusing on the China market.

Sophia has extensive experience in business and technology consulting and has led design and multinational rollout of large scale and complex technology initiatives across a broad array of sectors. With strong understanding of business operations and deep knowledge in technology, Sophia has displayed consistent abilities of identifying unique business opportunities, facilitating strategy planning and delivering successful implementation of solutions, to build up clients’ technology capabilities to match the constantly evolving business environment.

Deli Gong joins as Core Developer

Deli is a practitioner in building distributed and network systems using trusted hardware, e.g., Intel SGX. He has extensive experience in programming high-performance, distributed and FPGA systems. Deli was working in research at the National University of Singapore, with the focus on system security, trusted hardware, and DDoS defense. Before that, he received his Bachelor’s Degree in Computer Science and also the excellent student award from Zhejiang University, China. He was a recipient of the first-class award in ASC Student Supercomputer Challenge in 2015 and a first prize winner at the National Olympiad in Informatics in Provinces — Shanxi, China in 2011.

Sandip Bhoir joins as Core Developer

Sandip has over 12 years of experience in software development across multiple domains like ATM domain, retail banking, and investment banking. Previously he was a senior software developer in EPAM Systems, and was actively involved in design and development of systems for investment banks. He has been involved in the development of various distributed systems using C++ with focus on reliability, scalability, and performance.

Upcoming Events

September is going to be an event-filled month and we will be at numerous events globally.

1. Cluj, Romania

Date: 4 Sep 2018 10am-6pm

Event: Scilla Full-day Workshop — Learning how to programme in Scilla

https://medium.com/cryptoland-tech/workshop-2-diving-into-scilla-a-safe-by-design-smart-contract-language-5cb23f71222b

2. Berlin, Germany

Date: 6 Sep 2018

Event: Dezentral

https://www.dezentral.io/

3. Beijing, China

Date: 5 Sep 2018

Event: PublicChain Odaily Developer Conference

https://www.odaily.com/post/5133227

4. Beijing, China

Date: 7–9 Sep 2018

Event: BlockChain Cases Center Conference

http://bccc.msup.com.cn/

5. Hanoi, Vietnam

Date: 15–16 Sep 2018

Event: Cryptocurrencies and Digital Assets Dialogue

https://www.vietnamcryptodialogue.com/

6. Singapore

Date: 19–20 Sep 2018

Event: Consensus: Singapore 2018

https://www.coindesk.com/events/consensus-singapore-2018/

7. Singapore

Date: 19 Sep 2018 7–9pm

Event: Zilliqa x DMM.com x LayerX: Tools, Use cases and New initiatives for blockchain adoption

https://www.meetup.com/Ethereum-Singapore/events/253942745/

Tech Updates

For the past two weeks, our tech team has been working on improving node recovery, new node joining, GPU mining, network and protocol-level support for sharding-friendly smart contracts, as well as enhancement of the Scilla interpreter.

Node Recovery

We have experimented with the failure recovery mechanism under different scenarios at the node level. There are two categories of failures, i.e., single-node recovery, and entire-testnet recovery. To recover a single node, we allow an immediate reconnection to the network with the previous run’s identity and persistent data. If a node goes down for too long and lags behind the network, while joining the original shard may not be possible, it can still participate in the next round of shard assignment. The latter recovery scenario, which requires the entire network to resume the previous state, is used to preserve the data and state across testnet restarts. It’s an experimental approach at the testnet stage before the upgrade protocol is finalized. Although less likely to be used in mainnet, it’s worth experimenting and helpful for us to identify pitfalls in planning recovery.

New Node Joining

We have merged PoW1/2 into a single round of PoW each DS epoch. Thus, we have also changed the method for new nodes to join the system. In the current implementation, a new node queries the DS block/final block from a lookup node periodically. If the coming epoch is for PoW, the node fetches the latest account states from the lookup node. Once the lookup receives a signal from the DS nodes that PoW has started, it sends a message to the new node and the new node starts to run PoW using CPU/GPU to generate a solution. Subsequently, the node will submit its solution to the DS nodes to join the system.

GPU Mining

We have completed the implementation to support GPU mining using OpenCL and CUDA. Now users or miners can enable/disable OpenCL/CUDA option in the constant file and configure the parameters of GPU devices. We have updated our wiki page for configuring GPU mining. For more details and instructions, please refer to our wiki page at https://github.com/Zilliqa/Zilliqa/wiki/GPU-mining. We welcome everyone in the community to try out GPU mining for the local testnet and provide your valuable feedback!

Sharding-friendly Smart contract Support

In our design of sharding-friendly smart contract, we leverage DS nodes to process certain types of cross-shard smart contract transactions. This requires another round of microblock consensus at the DS level, which occurs when the DS nodes receive all the microblocks from normal shards. DS nodes will process transactions based on the temporary account states generated by the state delta received from shard microblocks. If the DS microblock consensus fails or timeouts, DS nodes will discard the changes in state delta resulting from DS microblock and proceed to the final block consensus. Finally, DS nodes will generate a final block with the latest state to all shard nodes. We will soon be releasing a blog article to elaborate the details.

Network/Logging

For DDoS defense, we have implemented a blacklist mechanism to prevent a node from sending/receiving messages to/from the blacklisted nodes. For P2P network, we have refactored network reading, applied event_base & evconnlistener to handle socket bind()/listen()/accept(). We have wrapped socket read() & write() function to be more modularized, and added a utility to convert between ASCII and numerical representation of IP address. Previously, our logging timestamp only had one second of precision. Numerous messages may be coming within a second, from different nodes/threads. It was not easy for developers to distinguish the messages using their timestamps. We have refactored the implementation to enable the logging timestamp precision to a millisecond, which has been helpful for debugging.

Scilla Interpreter

On the Scilla side, the team has been busy improving the typechecker and making it complete. Recall that the goal of a typechecker is to report type inconsistencies in a program. The first version of the typechecker that we released a few weeks ago only reported the first type inconsistency error. In the new version, the typechecker does not stop upon seeing an error, but instead continues and collects as many independent errors as possible. Independent errors are those that are in different libraries or transitions. This also involved reorganizing some of the unit tests.

Scilla also comes with a set of standard libraries, e.g., BoolUtils — — a library that contains implementation of standard Boolean operations. As libraries form a part of the contract code, any imported library in a contract should also be typechecked. In order to make type-checking of standard libraries more efficient, we have added type caching. The idea is to cache the type information for all library functions in a separate file along with the library. When a library is to be typechecked, the typechecker tries to load the type information from the cache (after verifying a footprint) instead of re-doing the typing. If a library is updated, the cache also gets automatically updated. A more fine-grained version (for example, functions within the same library) of caching is planned for the future.

A summary of other enhancements and code changes on the interpreter side is given below:

  1. Code clean-up in preparation for caching type information for libraries.
  2. Fixed a bug in scilla-checker that checks for parsing and type errors in a contract. scilla-checker also prints a JSON that contains information on the transitions, mutable and immutable variables defined in a contract. However, it used to print the JSON even when type errors were present in the contract.
  3. Alpha equivalence for type comparison.
  4. More well-formed checks for types.
  5. Pretty printing utilities for Scilla literals. Earlier, SExp printers (automatically generated) were used, which made texts hard to read. Pretty printing also makes it easier to maintain tests.

We have also been working on refactoring the Scilla interpreter pipeline to allow for multi-stage processing of an input contract. The purpose of refactoring is to allow users of Scilla to write their own analyses and checks, and plug them into the existing interpreter pipeline. The refactoring is not complete, and there are still some outstanding issues about how to deal with recursion principles for built-in datatypes and the cached typechecking of the standard library (both of which are currently parsed and typechecked separately from the main program), and about how JSON data should be formatted after this refactoring.

Dapp Development Tools and Libraries

In the past two weeks, we have been optimizing the lower-level Zilliqa-Javascript-Library in preparation for production usage by grantees of the #BuildOnZil Ecosystem Grant initiative. In short, the changes are as follows:

  1. Reduced the final bundle size of the library to < 190kb (a reduction by around 50% from the previous version) by streamlining cryptographic dependencies to a bare minimum and relying entirely on JS-native APIs. As a side effect, there are now two bundles; one for node.js and one for browsers. These should be automatically linked, with no intervention required on the side of the consuming code.
  2. Ported the code base to TypeScript, with accompanying automatically-generated type definitions, for developers who prefer to have the additional safety net of a robust type checker when writing client code.
  3. Added a test suite that is automatically executed on every Pull Request or commit to a branch. Merging is blocked if any tests fail. Importantly, the tests are executed against test vectors generated from our C++ core code base, in order to ensure that behavior on the client side is on par with what is expected on the blockchain side.
  4. Refactored code in numerous places to ensure internal consistency and robustness.
  5. Given the maximum safe size of integers in JavaScript is 53 bits, we now enforce the usage of BigNums( bn.js) in places where overflows are possible, particularly, the amount field in transactions. This is a breaking change.

We have further begun work on a rewrite of the Scilla IDE. This is to facilitate greater adoption of the language by providing a superior developer experience. Progress so far:

  1. A simple codec for decoding the JSON representation of smart contract state returned by the Scilla interface. For instance, Pair(T,T') is decoded to a pseudo-tuple [T,T']in JavaScript, and Maps are encoded as plain objects, to make life easier for client developers trying to traverse or otherwise manipulate the state of smart contracts on the client side. Over time, we intend to make this even more robust by implementing the same data structures in JavaScript.
  2. Ported the current build process to Webpack, which should allow for reduction of initial load times for developers with slow internet connections.

The team has also been working on the Kaya RPC server codebase, where, we now have set up automated testing and continuous integration. In preparation for future feature enhancements, we plan to refactor the code and make the components in Kaya RPC more modular. A general roadmap for Kaya RPC server is now available on the Github page. We will continue to integrate more test cases and improve on the software quality of Kaya RPC in the next two weeks.

Ongoing Work:

For the next 2–4 weeks, our tech team will work on PoW difficulty auto-adjustment, the upgrading protocol, testnet recovery, enhancement of sharding assignment and implementation of Scilla events.

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 Yiling hiring announcement:

The first 12 ecosystem grant projects:

Interview with Xinshu and Blockchaingamer: https://blockchaingamer.net/exclusive-interview-with-the-ceo-of-zilliqa-mr-xinshu-dong/