Decentralising Astar with Light Clients

Gregory Luneau
Astar Network
Published in
4 min readDec 5, 2022

--

Look ma’, no RPC! The best part is no part.

I am not sure if you heard, but Astar is the first parachain on Polkadot to support Light Clients via Polkadot{JS}. While this is true, the first team to do it on Kusama was our friends at Invarch and the GM parachain. They’re pioneers in the space, and I’m thankful for Gabe’s work!

Why is this such a big deal?

It is huge for the decentralization of the backend infrastructure that the frontend relies on today.

As Elon Musk said: ‘’The best part is no part. The best process is no process. It weighs nothing. Costs nothing.’’ While we are not concerned with the weight of the RPC service, if it is not there then it can’t break! So one less single point of failure is a huge win for the resilience of the Astar Network.

If the RPC service costs nothing, then neither the users nor the developers have to bear the burden of paying for the RPC infrastructure. While we’ll certainly continue supporting RPCs as an effective way for users to access the network, supporting light clients means that costs for this service will be less, and projects can redirect those funds to other development. More importantly, developers won’t have to pay for services to build and scale their dApps. Can I say a win-win-win scenario?

Where is it used?

The Polkadot{JS} website is a great place to start and demonstrate the possibilities and limitations of light clients as they exist right now.

We are implementing it into the Astar dApps portal as well, again as a showcase to inspire teams to do the same with their projects.

Documentation on how to do it will be available so developers can easily use light clients for their projects while utilizing the Astar Network; simply doing this further decentralizes our blockchain.

What is an RPC service?

RPC nodes are the entry point of all connections from outside the blockchain. They are used to post transactions, and query chain data from users and dApps. It is a translation layer from one protocol to another. This is the status quo, the way things are now.

It is the most centralized part of a blockchain ecosystem because only a few endpoints serve all the requests outside of the blockchain. Claiming staking rewards, on-chain voting, or bidding for your favourite NFT, it all passes through a trusted centralized service.

Accessing Astar Network using Light Clients vs RPC Nodes
Accessing Astar Network using Light Clients vs RPC Nodes

Another reason you may not want RPC is to first, do no harm (from the Hippocratic Oath). While it’s one thing that an endpoint may break, it is quite another that it can be compromised (DNS hijack), used maliciously (buffer overflow attacks), or exist as a seemingly benign metadata harvester (troubled by IP address collection, anyone?). These are the potential risks to the user that we want to address.

Light clients, in order to avoid RPC servers effectively–a very obvious choke point for any supposedly decentralized network–will need to be innovated. They’ll need to be created, and they’ll need to be made extremely performative in order to ensure that the user experience in decentralized applications is viable,” Gavin Wood.

And that leads me to the need to reduce our reliance on the RPC service. Just like our cypherpunk forefathers saw the need to create cryptocurrencies to disintermediate banks and fiat money, we see the need to build an option for users to break away from relying entirely on centralized nodes.

Disintermediate is to remove the middlemen, or in this case the middleware. That will bring us one step closer to the dream of full decentralization, unstoppable utility and the freedom to be sovereign of our data, our identity, and our currency for generations to come.

How to use it?

  1. Install Substrate Connect Extension (This will go away later…)
  2. Go to polkadot.js.org/apps and choose Astar from Polkadot, light client.
  3. You’re already done. Use as usual and notice the smoldot-light-wasm top right corner to be cool & verify.

Congratulations, you’ve created a light node in your browser. Now it’s just your browser connected to the blockchain. Hasta la vista RPC!

About Astar

Astar Network — The Future of Smart Contracts for Multichain.

Astar Network supports the building of dApps with EVM and WASM smart contracts and offers developers true interoperability, with cross-consensus messaging (XCM). Astar’s unique Build2Earn model empowers developers to get paid through a dApp staking mechanism for the code they write and dApps they build.

Astar’s vibrant ecosystem has become Polkadot’s leading Parachain globally, supported by all major exchanges and tier 1 VCs. Astar offers the flexibility of all Ethereum and WASM toolings for developers to start building their dApps. To accelerate growth on Polkadot and Kusama Networks, Astar SpaceLabs offers an Incubation Hub for top TVL dApps.

Website | Twitter | Discord | Telegram | GitHub | Reddit

--

--