Thursday, 21 May 2020

Building a distributed ledger supporting peer to peer applications using Node.JS

A project I am currently working on and just wanted to get the idea out there. I think this is really exciting and has potential. I'm putting together an infrastructure to support peer-to-peer applications using node.JS. Put together a bit of an overview. Would be glad to share more info if there is interest.---In the last several years the concept of blockchain is getting broad popularity as an infrastructure to support distributed applications with secure, peer-to-peer transactions. Such applications and transactions have many advantages compared with the current, centralized, cloud-based applications: transactions are performed directly and instantaneously between partners, therefore such applications provide better efficiency, security and privacy, as there are no third parties involved in those transactions. Distributed applications are more convenient for scaling, they have higher throughput, and they do not have dependencies on any third party or network component.The concept of blockchain that supports distributed, peer-to-peer transactions was on a broader scale proposed and also implemented in the Bitcoin system. But, Bitcoin blockchain has limited functionality (fixed – only payments), and many external components (wallets and exchanges) were implemented using simple scripting technology with security vulnerabilities, so many of them were hacked. Bitcoin blockchain and technology can be considered as “the first generation” of blockchains.In order to introduce broader and more general functionality of blockchain applications, the concept and implementation of Ethereum blockchain was introduced. Ethereum is based on fully functional scripting language (Solidarity), so developers may develop any application and execute it with the support of the blockchain. That approach extended the functionality of the blockchain, but due to weaknesses in applications, it also introduced many new vulnerabilities. It was even claimed by research community that applications developed using Solidarity are inherently vulnerable, based on the features and properties of that scripting language.The concept of Hyperledger introduced some security features of the blockchain, but since the project is open-source, security of blockchain and its applications can not be guaranteed. Some companies addressed the issues of blockchain security by implementing their own distributed system of nodes (R3 Corda, Ripple). However, those infrastructures are not, in fact, blockchains, but so called Distributed Ledger Technologies (DLT). The main difference between blockchains and DLTs is that validation of transactions with blockchain is performed in a fully distributed environment, by many parties, and in parallel, while with DLTs transactions are validated by several parties and sequentially.All these current blockchains can be considered as “the second generation” of blockchains, as they either have rich functionality, but no security or they have some security, but no parallel validation of transactions. Therefore, what is needed is in fact “the third generation” of blockchain technologies and infrastructures. This should be a blockchain supporting the full functionality of applications, full set of security services, peer-to-peer transactions, their parallel validation, full scaling of components, and high throughput.Node.JS appears to be very suitable technology for design and implementation of such blockchains and their applications. First, it is very rich in its functionality, so all types of applications can easily be developed using Node.JS technology and packages. Its net package is convenient to create generic network clients and servers needed to access blockchain nodes. CryptoJS package has many standard cryptographic mechanisms that can be used to implement secure blockchain and its applications. There are also packages to create Web servers “out of the box” that can represent front-end of user applications.Furthermore, the archive of Node Package Manager (npm) and its services is convenient to deploy various Node.JS packages that can be considered as “smart contracts” in the blockchain infrastructure. Developers can themselves develop such packages, upload them to the npm archives, so that other users can conveniently download and deploy them.Based on all these functional and architectural features of the Node.JS technology, we are currently designing our secure permissioned and unpermissioned blockchain infrastructure and a “generic” (template) application using blockchain supporting secure, peer-to-peer transactions. We are analyzing various currently available Node.JS packages for that project and designing our own packages for strong security, flexible application-to-ledger APIs, and packages for a template application supporting secure peer-to-peer transactions. We consider such blockchain and its applications to be “the third generation” of blockchains. That will be a global infrastructure comprising scalable secure blockchain, a set of secure peer-to-peer applications, and application-to-blockchain protocols.

Submitted May 21, 2020 at 06:46PM by Theus5

No comments:

Post a Comment