December Progress Report
Repos:
- LumeWeb/relay: Hypercore DHT based relay for RPC - relay - Lume Web Git Service - Relay software is experimental but mostly stable
- LumeWeb/relay-types: TS Types for @lumeweb/relay - relay-types - Lume Web Git Service - Typescript types for relay and plugin API
- LumeWeb/relay-plugin-rollup-preset - relay-plugin-rollup-preset - Lume Web Git Service - DX/Tooling
- LumeWeb/rollup-plugin-bundle-native-modules - rollup-plugin-bundle-native-modules - Lume Web Git Service - DX/Tooling
- LumeWeb/cfg: Config parser for @lumeweb/relay - cfg - Lume Web Git Service - Relay configuration store library
- LumeWeb/dht-flood - dht-flood - Lume Web Git Service - Flood library for DHT
- LumeWeb/dht-data - dht-data - Lume Web Git Service - Early version of the DHT Cache library was forked to keep its design before pivoting
- LumeWeb/dht-cache - dht-cache - Lume Web Git Service - DHT Cache library. Used to track RPC requests in a DAG graph. This may further heavily change or be discarded based on testing on approaches
- LumeWeb/cf-cdn-purge - cf-cdn-purge - Lume Web Git Service - CI Tooling/DevOps
- LumeWeb/do-cdn-purge - do-cdn-purge - Lume Web Git Service - CI Tooling/DevOps
- LumeWeb/aptly-publisher - aptly-publisher - Lume Web Git Service - CI Tooling/DevOps
- LumeWeb/repo - repo - Lume Web Git Service - APT repository package
- LumeWeb/rpc - rpc - Lume Web Git Service - Low-level RPC Client
- LumeWeb/rpc-client: A client library that uses hypercore and the @lumeweb/relay server along with Skynet for web, to perform "Wisdom of the crowd" RPC requests. - rpc-client - Lume Web Git Service - High-level RPC client
- LumeWeb/peer-discovery - peer-discovery - Lume Web Git Service - Initial agnostic library for relay peer discovery
- LumeWeb/relay-plugin-discovery-bittorrent - relay-plugin-discovery-bittorrent - Lume Web Git Service - Peer discovery using bittorrent BEP44 via DHT. I discovered early on, it would not work in the browser. No plans to further build it
- LumeWeb/relay-plugin-discovery-irc - relay-plugin-discovery-irc - Lume Web Git Service - Peer discovery using IRC. This is possible since IRC servers can support WebSockets. Client code still needs to be built
- LumeWeb/relay-plugin-handshake: Handshake plugin for @lumeweb/relay - relay-plugin-handshake - Lume Web Git Service - Updated handshake relay plugin based on significant relay changes. More refactoring is likely needed.
- LumeWeb/relay-plugin-registry - relay-plugin-registry - Lume Web Git Service - Work-in-progress (W.I.P.) registry plugin based off @redsolver’s S5 registry design. The goal will be to have interoperability. This will replace the Sia/Skynet registry store with a simpler IPNS-like registry protocol and format.
Progress:
Progress so far has been switching to the Protomux and Protomux-RPC libraries and building a new RPC protocol based off of it from the original RPC design. This has the benefit of enabling any plugin to define a custom protocol due to the new PluginAPI.protocols
at relay-types/plugin.ts at 7c3c193b4ac571dd7e66a56e2289cfcb5c29d9ae - relay-types - Lume Web Git Service and relay-types/swarm.ts at 7c3c193b4ac571dd7e66a56e2289cfcb5c29d9ae - relay-types - Lume Web Git Service
The entire PluginAPI has been redone as well and now supports namespaced events via eventemitter2
relay & plugin wide. Example: relay/plugin.ts at 1b78d0e696f57520fb717d839c648e400d7bbe83 - relay - Lume Web Git Service
Next, various DHT libraries have been created and will likely continue development. It is still being determined if all will be used, so testing is needed to determine the best RPC cache performance strategy.
The RPC client side is split between two packages. The rpc
which overrides a few things from protomux-rpc
, and rpc-client
, which used to be dht-rpc-client
and has been near-completely rewritten.
Several DevOps packages/repos have been created for CI that are docker tooling or other automation and are deployed and hosted by the Git server itself (Gitea).
Next, I have started on a peer discovery system that is very simplistic in design and modular. I started with what felt most common sense, BitTorrent, but utilizing the DHT BEP44 spec did not work in the browser because the relay needed a WebSocket proxy. Using torrents for this would be too easy to DDoS and abuse the tracker systems based on a dummy INFOHASH, so this is being abandoned but not deleted since it can still serve use outside the browser, even if that’s redundant.
The first helpful peer discovery source
as I call it, is IRC. There are IRC servers that support websockets now! This means browsers can directly talk to a supported IRC network. Lume has found an initial IRC network willing to partner with and host the project and is fully informed of our mission.
At the core, all a discovery source does is return a host and port for a given pubkey. So you could theoretically go as far as using snail mail to “dial in” to the network. In the future, I look forward to finding many out-of-the-box/unorthodox methods to enable censorship resistance. As long as the browser can directly connect and do so without an account, API key, or security restrictions, it can be used as a means to discover a peer/relay.
Lastly, work has started on a registry relay plugin. This will replace the Sia registry for everything. The Sia registry may find use in the future, but as it is very niche and economically expensive at scale, it can only have very targeted use cases. What is being designed is an implementation of @redsolver’s registry system in S5, which itself is still a WIP. This is DHT based, and it is expected that paid sia portals and other actors who can afford to host some or all registry entries will be the ones to take on the burden.
The plugin will support Memory, LMDB, and Redis backends.
One final thing to know is Lume is now operating with BIP39 and BIP44 and has registered a coin ID at Add Lume Web to SLIP-0044 by pcfreak30 · Pull Request #1469 · satoshilabs/slips · GitHub to ensure adoption and interoperability with the industry. Lume will not be using “MySky” in its current form, and anything moving forward will just be a “Lume Web” account. Specific components or approaches of MySky tech may be used, but they will only be internal details.
The coin ID was not randomly picked, so kudos to the person who solves the puzzle
Outreach
I have done outreach to a few early projects to make them aware of Lume Web and the tech being built to onboard and partner with them in the coming year or later. One established naming project also outreached to me.
What’s next
Continue developing the registry plugin, refactor ecosystem libraries as needed, and then start on the browser side of development, which will require much rebuilding to shift to the new primitives.
It has also been confirmed by @nemo that getting trustless, A.K.A. verified streaming will be possible in sia. S5 currently uses blake3, and while it has been stated that blake2b is possible for this, blake3 would be the ideal route and ensure unity given its nature and the GitHub - oconnor663/bao: an implementation of BLAKE3 verified streaming library.
The sooner this can be ready, the better for the project.
Renterd will either need to be forked, or, if possible, a plugin system created so projects such as Lume or @mike76’s Sia Satellite can extend without forks or needing to use the renter as a library.
The direction of Lume is pivoting such that almost nothing will be compatible with what I now consider Skynet v1. S5 is doing the same and is breaking compatibility. The future “Skynet” idea will likely turn into a fork as a Layer 2 project with a unique name. Those details are still undecided, but it is clear Skynet is dead in its current form, and only the bones, if any, will be picked.
As such, future timeline plans have changed such that there will be no plans to maintain the existing portal software after the hard fork or keep uptime for it. Two parallel systems will likely exist. The new software can be ported to the Skynet v1 portal stack to maintain continuity at a fundamental level, if practical. Otherwise, the portal will be shut down until it is ready, which will also mean partial Lume downtime.
The current primary focuses of Lume as of now are:
- Web3 Hypercore P2P network and related ecosystem software
- Browser extension and related ecosystem software
- Educational and Community Sites
- A new web portal software stack
The portal stack will overlap @mike76’s Sia Satellite or use some of the code. It is too early to say. This may also become a project for 2024. But it will be required for Lume as a network to function since web accounts will use sia for the browser extension. If it is done this year, it will take priority over the extension work since it is effectively the backend service that the browser needs to save data. The extension will have already had its initial release.
Overall these unknowns are the bright red line initially outlined for Q2 of 2023 (this year now) on where things may go crazy.
There have already been many bumps in the road, and many more are expected, given the unknown. The overall vision and goals of the project are the same, but how we get there has changed and may continue to change to ensure we can get the best outcome.
This concludes my report