Why Rust

Team HYCON
Aug 31, 2018 · 3 min read

We have an announcement for those eager to learn about Hycon’s development progress. We are changing the programming language of Hycon to Rust in order to improve the blockchain network.

You can find more details on the announcement below in Q&A format.

  1. Initially, Hycon’s mainnet was developed with MS TypeScript. Can you describe what has been achieved up to this point?

“The voting procedure in SPECTRE is quite a drain on resources, so its implementation needs to be carefully managed. Our initial prototype was written in Python for ease of development, however, the final version of the INFINITY SPECTRE implementation is to be written in language such C, C++, or Rust, such that complete control over data structure and memory management is maintained allowing for better performance.” Hycon Whitepaper v1.2.2

According to the above excerpt from the Hycon Whitepaper the plan was to prototype in TS, then change to Rust. The Hycon R&D team started off small, and the team was able to develop the project rapidly by using TS.

Using TS, the team has been able to create a blockchain with the following features (as of August 2018):

  • Number of Nodes: ~40–60
  • Transactions per second/Throughput: 100 TPS
  • Transaction Speed [Public BC]: Depends on each user ~ 180 kb/s
  • Blocksize [Public]: 300 kb (Block transactions are limited to 4096)
  • Block Interval/Latency/Creation Time: 30 seconds (median), 43 seconds (mean)
  • Hash Rate: 12,985 kh/s

TS is single threaded, therefore we can’t exploit multithread processing. In other words, performance decline cannot be avoided at a certain critical point. Now that our mainnet is launched and running in a stable manner, we began migration to Rust for a full-fledged performance enhancement.

2. What is RUST? Can you explain more about it?

Rust’s automatic memory management happens at compile time, instead of runtime. This clever compile analysis results in faster outcomes and allows developers to find bugs more efficiently like they do when using C++. Rust’s enables the developers to take advantage of multithreading, thus exploiting multithread processing.

Considering the project, coding in Rust makes memory management more complicated, however, results in higher performance code.

3. Why do you change software language to RUST from Hycon? Is there any major step MS TypeScript does not support?

TS is quicker to code; however, high performance is hard to achieve. Rust is harder to code; however, results in higher performance. The reason the Hycon R&D Team chose to use Rust specifically is because it guarantees memory safety, and zero cost abstraction. Developers are able to use high-level concepts without any performance costs and garbage collectors; ultimately leading to better performance.

4. Do you expect Hycon development speed would be faster than before?

The speed of writing all the components from TS to Rust will be dependent on each developer. Because Rust is a difficult language compared to TS, Hycon development speed will be slower compared to the development of mainnet. Our roadmap takes this into account, so this shouldn’t affect development plans.

To developers it’s not important which language is used. It’s important to use the language that is best for the project and achieves the project goal. The decision to use Rust has been decided since the writing of the whitepaper, as a means to achieve scalability. For the time being, TS and Rust coexist peacefully; Rust integrates with any language that exists. However, when we move to SPECTRE, we will no longer be supporting TS because it will not be able to handle the greater computational load.

Team HYCON

Written by

We are the HYCON Cryptocurrency Team

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade