Polkadot Light Client in C++
- Team Name: Equilibrium
- Payment Address: 0x4126272BA14F7a124b1B98633678e0e5F87Ec478
- Level: 2
Project Overview πβ
This project is to create a C++ implementation of a Light Client for Substrate-based chains. On a high level, the C++ Light Client will allow users (via JSON-RPC) to:
- Query chain state within the client (on synced chain state, including runtime code)
- Route user transactions to peers and track results
Project Detailsβ
We will deliver a detailed specification of a light client for the implementation based on the research done in the time frame specified in this proposal. The actual implementation will be performed in the next phase.
The specification includes:
Cryptographyβ
Define primitives / library requirements such as blake2 hashing for proof verification
Check library availabilities and provide estimates for missing libraries
Embedding Runtimeβ
Define runtime environment requirements (Browser / NodeJS application / Other?)*
Select runtimes such as wasmedge and/or emscripten cross-compilation for desktop / server and/or browser
Define embedding environment interface such as bindings in JavaScript
Specifications for multichain supportβ
Specify scope and support for Parachain and Relay chain
JSON-RPC service APIsβ
Define APIs to be supported* (submitting transactions, watching transactions / blocks / accounts, etc)
As the RPC API is currently unstable (see PSPs#41), specification must be written first.
Components specifications / selectionβ
Networking (likely cpp-libp2p)
Database (likely SQLite)
*Web3 Foundation input required
Ecosystem Fitβ
This is an alternate implementation to the WASM light node in Smoldot.
Team π₯β
Team membersβ
- Vaclav Barta
- Mark Henderson
Contactβ
- Contact Name: Mark Henderson
- Contact Email: mark@equilibrium.co
- Website: https://equilibrium.co/
Legal Structureβ
- Registered Address: LeipΓ€tehdas, Kaikukatu 4, 6th floor 00530 Helsinki, Finland
- Registered Legal Entity: Equilibrium Group Oy
Team's experienceβ
- Vaclav Barta is a Senior Software Developer at Equilibrium. Having implemented C++ projects for companies from Akamai to Deutsche Bank, currently creating smart contract pipelines from C to WebAssembly for XRPL Foundation.
- Mark Henderson is the VP of Engineering at Equilibrium. He has led the team starting with the original Rust IPFS grant in late 2019, through engagements with many of the largest names in Web3, and is now circling back to finish the critical work the team started with the original Ziggurat proposal. Core contributor to OrbitDB, Rust IPFS, and Ziggurat.
Team Code Reposβ
Development Status πβ
Equilibrium discussed with David Hawig on different implementation on Polkadot host, C++, AssemblyScript and Zig. After initial research, Equilibrium has decided to apply for the C++ implementation of the light node.
Development Roadmap π©β
To achieve the final implementation, the project is broken down into 2 phases:
- Phase 0: Initial research for C++ Light Client specification
- Phase 1: Light Client implementation
This proposal is only for Phase 0 and will culminate with the delivery of a detailed specification for the light client implementation in Phase 1.
Overviewβ
- Total Estimated Duration: 5 weeks
- Full-Time Equivalent (FTE): 1
- Total Costs: $34000 USD
Milestone 1 β Substrate Module Researchβ
- Estimated duration: 5 weeks
- FTE: 1
- Costs: $34000 USD
Number | Deliverable | Specification |
---|---|---|
0a. | License | Apache 2.0 / MIT |
0b. | Format | Markdown (mdBook) |
0c. | Published | GitHub, GitHub Pages |
1. | Cryptography | security advantages over connecting to 3rd-party node, limitations compared to full client |
2. | Runtime environment requirements | for browser and Node.js |
3. | JSON-RPC APIs | minimal run-time access interface |
4. | Dependencies | libraries for cryptography, networking, build |
Future Plansβ
From here we would move on to the implementation of the light client node in Phase 1. We expect Phase 1 to be completed by a larger team at Equilibrium.