Javascript implementation

Aside from the bridge and consensus algorithm development, work has begun on a Polkadot JavaScript implementation (an effort to provide a collection of tools, utilities and libraries for interacting with the Polkadot network from JavaScript). At the moment this has two main parts: the JavaScript API (a set of tools for building software that includes rules for how said software should act) & JS Client implementations (where code is run on the client machine or in-browser). JavaScript interactions are the main means of interacting with the Polkadot network, and actions on the relay-chain and the initial parachain depend on them. You can check out the full overview here: https://polkadot.js.org/.

The skeleton is in place for the API (supporting both WebSockets & HTTP) and it has been tested with the Polkadot Rust client, but since the RPC layer (or “Remote Procedure Call layer”; a client-server layer where software will be coded to run tasks on non-local machines as if they were native/local operations) for the clients is way down the priority list, it (API) does not do much yet.

The JavaScript Client is very much a work in progress and less developed than the Rust implementation. It has an operational libp2p network layer that discovers other nodes and sends status messages between clients.

For Proof of Concept 1 (POC-1) in which the Polkadot Rust client will use DevP2p, communications between the clients won’t (yet) be possible (remember to see the Simplified Developer Update #1’s glossary for a refresher on the Polkadot Proof of Concept, Devp2p vs. libp2p, Rust & wasm and more!). However, libp2p will eventually be used in the Rust version as well, and you can see the progress on this on the dedicated github page. Currently the client work here is focussed on tracking the Rust WASM runtime implementation, and expanding the JS runtime to expose all the same methods. This means that things are implemented in one API and exposed in another (JS), and the focus is to bring the JavaScript implementation up to par with the Rust work. The initial target is to have a JS node (a client that stores the entire chain and which has the ability to receive and broadcast new blocks and transactions to the network) that can validate blocks & transactions generated by the Rust client.

If you would like to follow the daily musings on the Polkadot build, please join the dedicated Riot channel we have set up, and where you can follow the technical conversation in real time: #polkadot-technical:matrix.org.

If you would like to follow the progress of Polkadot, ask further questions, or meet others in the community, join us in our Polkadot Riot channel:

https://riot.im/app/#/room/#polkadot-watercooler:matrix.org

Join the Web3 Foundation Riot channel to learn more about what the Web3 Foundation is working on beyond Polkadot, and discuss decentralization.

https://riot.im/app/#/room/#web3foundation:matrix.org