Nimiq: Past, Present & Future

Blog Series — Network Performance

Team Nimiq
Nimiq

--

While observing the blockchain in the “wild”, we identified and started working a number of aspects of the Nimiq protocol to make it stronger and more resilient. The most prominent tasks are:

  • Reducing both dependency on DNS as well as hassle of setting up a certificate
  • Performance optimizations of the Nimiq Full Node implementation
  • Opening seed node setup to the community

DNS and certificates

In the current implementation of the Nimiq Protocol, TLS certificates are required as bridge to the browser network. This is due to two restrictions in browsers: First, some of the APIs we use for Nimiq require the content to be served through HTTPS. Second, when a webpage is delivered through a secure connection, only secure WebSocket connections are allowed — thus requiring a certificate on the backbone side.

Setting up a certificate can be a hassle at times and led many participants of the Nimiq Network to run their nodes in “dumb” mode, i.e. without a certificate. But “dumb” nodes have a drawback: while they can connect to every other non-dumb node in the network, other nodes in the network cannot connect to a “dumb” node. This led to increased load on the backbone nodes that have a certificate installed — as these became the hubs for all browser and dumb nodes. And this works against Nimiqs decentralization ambitions. We found multiple ways to address this issue and already started on implementing solutions:

  • Nodes in the backbone network should not require certificates, instead they should communicate with each other via TCP/WS connectivity if no certificates are provided. We are currently testing this new feature on the Nimiq Testnet.
  • We are working on providing a setup script which will choose the most appropriate configuration for your node automatically and guide you through the necessary steps (such as opening ports in a firewall). This also includes creating a TLS certificate in most cases, supporting the bridge between browsers and the backbone network.
  • As soon as this automatic procedure works reliably, we consider adding a feature for nodes to filter connections from “dumb” nodes — with the aim of discouraging the use of them — while at the same time supporting “dumb” configurations in situations that do not allow otherwise.

Performance optimizations

An essential step towards keeping the network safe is balancing the mining power. For that reason, we want to provide the most performant implementation of the Nimiq Protocol as Open Source to the community to make sure that everybody has an equal chance to participate. To further improve the network and mining performance, we are planning to rewrite the Node.js-based implementation using Rust — an ideal language from a performance and security perspective. Moreover, Rust can be compiled to WebAssembly and thus also runs very efficiently in the browser. This implementation will be developed alongside the JavaScript version and is meant for situations where performance is of primary concern, while the Node.js implementation can still be used to build additional applications on top of Nimiq using the popular platform and JavaScript.

Once we achieve seamless compatibility and integration of the Rust codebase into browsers via WebAssembly, we intend to provide this potentially enormous performance improvement as a drop-in update to JavaScript-based platforms and environments.

Community seed nodes

Temporary spike of new connections to seed nodes

Recently, the Nimiq network has seen unexpectedly high loads on the eight seed nodes initially provided and maintained by the Nimiq Team. As immediate action to mitigate the issue, we are working on increasing the number of seed nodes.

To further scale the network down the road, we are researching the best procedures that give the community the ability to operate seed nodes, while at the same time making sure that the quality as well as the security of the network remain as high as possible. Community members have already shown their interest in supporting the Nimiq Network by providing seed nodes and first tests are in the works on integrating such community seed nodes. We hope to soon being able to announce a proper, transparent solution that will enable a community driven seed node setup.

Follow Nimiq on Twitter, Discord and Telegram to be notified about Nimiq core updates including performance improvements and community seed nodes.

The next planned post in this series will cover the Nimiq Ecosystem.

DISCLAIMER: None of the statements must be viewed as an endorsement or recommendation for Nimiq, any cryptocurrency, or investment product. Neither the information, nor any opinion contained herein constitutes a solicitation or offer by the creators or participants to buy or sell any securities or other financial instruments or provide any investment advice or service.

--

--