polkadot-js 2020 flashback

Jaco Greeff
6 min readDec 30, 2020

--

Generally instead of talking about doing stuff, I prefer to write some code make a pull-request. But on the last day of the year it is good to look back over the last 365 days of code and see what fell into place. Additionally it is also a good idea to provide a brief look forward into the next year, although as the saying goes “the best laid plans of men and mice often go awry”…

For those that doing have a lot of time to read through details (understandable, there are other places to be) a brief summary is probably in order:

  • In 2020 we swapped to weekly releases for critical pieces such as the apps UI and the api, allowing any upstream Substrate changes to be in the hands of users and developers at a much quicker pace.
  • In the polkadot-js repositories we saw a marked increase in the number of contributions from external teams, each not only moving their piece of the world forward, but also allowing others to follow suit
  • Out in the real world the number of projects building on top of the polkadot-js family has seen a huge increase, at last count there were 1,151 repositories on GitHub using the @polkadot/api as a dependency

With the overview in-place, it is time to do a deep-dive (well, a shallow deep-dive) into some of the projects under the polkadot-js umbrella. For some the last year was just business as-usual, for others a large number of changes and some exciting (according to us) enhancements.

Documentation

Perhaps not the most sexy place to start, however there has been some great steps taken over the last year that sets the stage for making the tools we provide better from a developer usability perspective.

Documentation has been consolidated into a single repository and web location. This means that instead of navigating around, there are a single Docusaurus site which contains the quick starts, cookbooks and FAQs. Additionally changes are now just a click away. This has immediately starting bearing fruits with contributions both big and small.

Documentation has improved, but it really is still an area where a lot of work is needed for clarity, ease-of-use and quite importantly, improved samples while keeping up-to-date with new changes as they land in our libraries.

Apps UI

From a user-perspective this is probably what the polkadot-js family is best known for, from a developer perspective it is a valuable tool while developing their infrastructure. Looking back at the start of 2020, the UI has come a long way.

2020 saw the extended support for 14 live networks (and almost double that in test networks), the addition of the first hardware wallet (Ledger), noticeable improvements in usability (lots and lots and lots of work left), the on-going support of new Substrate interfaces (this translates to a “it continues working without interruptions, despite upgrades”) and playing a bit of inception on Kusama with the first bounty to build a bounty interface.

The last year also taught a lesson that we are not yet where we should be — the UI has grown alongside Polkadot/Substrate (as those that were around and poc-1 can attest), but live networks do bring new challenges to the fore in terms of expected UX.

So while 2021 will rapidly add support for extended functionality unlocked by Substrate (with a massive focus on parachains and the experience around them), it also needs to get better for users with no technical background. All while not removing flexibility from those that need to inspect the nuts and bolts of the chains they are working with.

Where 2020 was making sure everything can be done, 2021 aims to smooth things out.

API

At this point even Rust developers can use JavaScript with the polkadot-js API and the vast majority of them do. From a developer-centric perspective it is the product polkadot-js is best known for with all teams in the ecosystem having at least some familiarity with it.

The most exciting part of 2020 has the number of non-trivial code contributions by teams building infrastructure, chains and wallets. Since the changelogs are available, I’m not going to call out specific contributors (valuable work efforts will be missed in a very long list), however seeing people solve trivial and entirely non-trivial issues for themselves and those that come after them, has been a highlight of the past year.

The API managed to keep up with the Polkadot/Substrate rate of change (no small effort, just on metadata formats we have gone from v9 to v12), while also managing to improve from a structure, usability and extensibility perspective. This was all done while trying to not break the developer experience on each new release — not breaking user space is a priority, although those on the ground may not always agree with the outcomes.

There are certainly some large gaps left. Since Substrate is a bunch of lego pieces and each builder has their own way of stitching it together, the API to has to make sense of intent. With this in mind the top-most priority in 2021 (in addition of keeping up with functionality) is to really find novel ways of making the first setup experience better. Together with documentation, here we have some way to go.

Wasm, Utils

Unlike the apps UI and the API, the common library level has really reached a level of stability with less-frequent releases and certainly no break-the-world changes. Sometimes slightly boring is also a good outcome.

Not all has been more-of-the-same though, along with all other repositories (such as the API), in 2020 we started publishing ESM modules in addition to the CJS variant. The means that users have seen some real improvements when using modern up-to-date bundlers where only the code used is actually the code packaged in their final bundle. Even in our own products this has been apparent, for instance in the extension UI we saw the bundled variant now being 42% of the pre-ESM size.

In 2021, I’m hoping to continue down a slightly boring, no-crazy-breaking road in this environment, we have enough rapid-fire adaptations elsewhere.

Phishing

Phishing? Yes, this is a new addition in 2020.

We have introduced a phishing list that, together with community contributions and checking against external sources, provides freshly curated information on less-than-above-board websites. With the aid of a library (already used in the polkadot-js extension to warn users in real-time), this is available for easy integration to all developers.

We certainly hope that both the speed of additions to the list by the community and usage of the library/list by other wallets/extensions/providers will increase in the new year.

Extension

I’ve intentionally left the extension for last, not because it is boring (it is not), or unimportant (it is not) or neglected (it certainly is not that either), but rather since in the next couple of days there will be an extension-specific post on all the recent additions that has gone in. And I do not want to distract from that effort.

Having said that, some small highlights in 2020 include password persistence, supports for a bunch of additional networks, account derivations, JSON imports, phishing detection and quite a bit of under-the-hood cleanups.

In 2021 we will continue to move at a slightly slower than neck-breaking pace to ensure it is as effective and secure it could be, however at the same time will continue to improve from a usability and security perspective.

That is a wrap

For myself, it is back to the salt mines. Before I go, I sincerely wish a great 2021 to all those building on Polkadot and all those using Polkadot and related chains.

Let’s continue building out our ecosystem.

--

--

Jaco Greeff
Jaco Greeff

Written by Jaco Greeff

A code monkey just having fun. Me. In cryptic detail.

Responses (1)