The researchers at the DWeb Lab, led by Professor G.S. Park and part of the IT College at Incheon National University, introduce a novel concept of blockchain featuring Federated Proof of Work implementation via WebGPU and HTTP(S)-based communication.
Concept
Our research introduces a groundbreaking federated mining mechanism based on the Bitcoin blockchain, leveraging the WebGPU API to enable direct GPU utilization within web browsers. This study evaluates the feasibility and performance of integrating WebGPU with proof-of-work (PoW) mechanisms, laying the groundwork for a new blockchain paradigm.
Addressing Decentralization Barriers
Modern blockchain systems, including Bitcoin, heavily rely on centralized third-party services due to storage constraints on mobile devices. Moreover, proof-of-work systems are increasingly dominated by specialized mining hardware (e.g., ASICs), undermining the principles of decentralization. This makes it nearly impossible for everyday devices like laptops, smartphones, or even high-performance GPUs to profitably participate in mining.
To address these challenges, we propose a web-based blockchain architecture utilizing the WebGPU API. By leveraging WebGPU’s computational capabilities, we aim to democratize participation in blockchain networks, enabling users to contribute to mining and transactions directly through their browsers.
Key Findings
- WebGPU Implementation
We adapted an open-source code to implement SHA256d, the hashing algorithm used in Bitcoin. This implementation was written using WGSL’s compute shader.
- Performance Analysis
When executing the compute shader code, you can directly determine how threads are executed, which is controlled by the methods dispatchWorkgroups(x, y, z) and workgroup_size(x, y, z). We conducted experiments to identify the optimal arguments for each of these methods to achieve maximum performance and efficiency on various mobile devices (e.g., Apple M3 Pro, M1 Pro, M1 Air).
(Test was conducted with workgroup_size(64, 1, 1), and the DispatchSize under graph means the dispatchWorkgroups(x, 1, 1)).
Prototype Architecture
We developed an architecture enabling federated PoW across multiple devices. The solid nodes are connected 24/7, supporting uninterrupted blockchain operations. And each solid node is mapped to multiple fluid nodes in a 1:N relationship to perform federated Proof of Work (PoW).
- Solid Nodes (SN): Storage nodes managing block data, pending transactions, and worker memberships, implemented using Node.js, Express, and Socket.io.
- Fluid Nodes (FN): Worker nodes performing PoW tasks, implemented using React, Typescript, WebGPU, WebRTC, and Socket.io-client.
- Security Enhancements: SN-FN communication is secured via HTTPS, and FN-FN communication ensures task integrity.
Future Direction
Our proposed concept offers infinite scalability. For instance, it allows for the implementation of a web-based mining pool where participants can generate revenue using their mobile devices on the go. In practice, we modified an open-source Node.js-based mining pool software called NOMP to create a prototype capable of interacting with web-based workers. Below, we provide the source link for NOMP and the client view we designed.
Foundational Research
For full details, refer to our foundational research published in the IEEE ICTC 2024 proceedings.
- M. Park and G. S. Park, “WebGPU-Based Cooperative and ASIC-Resistant Proof of Work,” 2024 15th International Conference on Information and Communication Technology Convergence (ICTC), Jeju Island, Korea, 2024, pp. 1692–1694, doi: 10.1109/ICTC62082.2024.10827666.
- Paper: https://ieeexplore.ieee.org/document/10827666
Link
Visit Our Lab and Professor’s Page to learn more.