Hi everyone,
I’m Jr, currently part of the CKBuilders cohort, working on integrating a CKB Light Client into an Android application. I wanted to share my progress, the challenges I’ve encountered, and get community input on whether now is the right time to deliberately move toward a mobile-ready P2P standard for CKB.
What I’ve Accomplished So Far
Over the last few months, I’ve been working on:
-
Experimenting with both the Rust-native and WASM/browser light client implementations.
-
Attempting to compile and run the Rust light client directly on Android through the NDK.
-
Attempting to embed the browser WASM version inside an Android environment (Web View [i haven’t tried WebKit yet ]).
-
Building a practical mobile wallet flow: account generation, script tracking, balance queries, and transaction building/signing.
Where Things Started Breaking Down.
Through this process, I hit multiple structural blockers:
1. Tentacle’s P2P layer currently doesn’t work on Android
While the Rust light client builds successfully, the P2P layer fails at runtime. Tentacle/ckb-network relies on behaviors and APIs that are not compatible with Android’s networking stack. This prevents the node from fully starting or maintaining peer sessions.
2. The browser WASM light client cannot run in Android WebView
The browser implementation requires:
-
SharedArrayBuffer
-
Atomics.wait
-
Worker-based IndexedDB storage
-
COOP + COEP headers for cross-origin isolation
Android Web View cannot supply this environment. So the browser light client cannot be embedded into a mobile wallet.
3. Neither current implementation is designed with mobile constraints in mind
Mobile has strict limitations around:
-
Background execution
-
Long-lived TCP
-
Resource usage (battery, disk, IO)
-
Sandboxed file systems
Even if Tentacle ran, RocksDB + full P2P gossip would be a heavy burden for typical mobile users.
My Conclusion So Far
The existing light client implementations both Rust and WASM are excellent for desktop/browser, but they cannot currently serve as a foundation for a production mobile light client.
A mobile client probably needs:
-
A different networking strategy (QUIC / WebSocket / mobile-safe P2P)
-
A lighter storage backend (SQLite instead of RocksDB / IndexedDB)
-
A redesigned sync model that respects Android/iOS lifecycle
-
A modular core that can target Rust/WASM/Android/iOS from the same codebase
This is not a small patch; what we need is architectural chnage.
Why I’m Bringing This Up Now
Recently Jan commented on a thread imagining HashLottery running as a fully client-side Android P2P application.
This is exactly the kind of experience we want long-term, but based on my work the last few months, I believe:
CKB needs a new or adapted P2P standard and a mobile-first architecture to make on-device light clients realistic.
Right now, the path is blocked at a fundamental level.
My Proposal
I’d like to:
-
Start a collaborative discussion on what a mobile-capable light client should look like.
-
Contribute my findings to help define the requirements.
I believe this kind of project would significantly grow the CKB ecosystem, enabling:
-
Serverless mobile apps,
-
Wallets with true on-chain verification (not relying on RPC services),
-
Better decentralization,
-
New P2P use cases like HashLottery.
Looking for Feedback
-
Does the community agree that mobile support requires a dedicated effort?
-
Are other builders or core team members interested in collaborating?
-
Are there existing discussions or research efforts I should be aware of?
-
Would this be an appropriate target for a Nervos grant?
Excited to hear everyone’s thoughts.
If we can solve this, CKB mobile experiences could reach a whole new level.
Jr.
CKBuilders Cohort