Skip to content

Commit 9abd1e1

Browse files
authored
Amendment: Decentralized Threshold Signing Service (#2618)
* Create DecentralizedThresholdSigningService.md * Update DecentralizedThresholdSigningService.md * Update DecentralizedThresholdSigningService.md * Amend DecentralizedThresholdSigningService.md * Amend DecentralizedThresholdSigningService.md * Amend DecentralizedThresholdSigningService.md * Amend DecentralizedThresholdSigningService.md
1 parent 85d3292 commit 9abd1e1

File tree

1 file changed

+31
-21
lines changed

1 file changed

+31
-21
lines changed

applications/DecentralizedThresholdSigningService.md

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,34 @@ This project is a continuation of [this one](https://github.com/w3f/Grants-Progr
1414

1515
### Technical Details
1616

17-
Each participant in the threshold signing group will run a dedicated node application. This application will include:
17+
Each participant in the threshold signing group will run a browser-based application that performs decentralized key generation and signing operations through the Olaf threshold signature protocol, compiled to WebAssembly (WASM). The networking layer is built using JavaScript and `libp2p` for peer discovery and communication.
1818

19-
- Core Threshold Signing Protocol: The service will use the Olaf threshold signature protocol, which was implemented in the previous grant.
19+
#### 🌐 Networking Layer (JavaScript)
2020

21-
- Peer-to-peer networking via [`rust-libp2p`](https://github.com/libp2p/rust-libp2p) (Milestone 1):
21+
##### Transport
22+
- Peers connect to a relay server using WebSockets.
2223

23-
- Peer discovery: nodes will identify and discover each other through a Distributed Hash Table (DHT) that maps their Substrate/Polkadot/Kusama public addresses to their peer IDs.
24+
##### Discovery
25+
- When a peer connects, it sends its Substrate/Polkadot/Kusama address to the relay server.
26+
- The relay server assigns the peer a random `libp2p` Peer ID and stores the mapping:
27+
Address → Peer ID
2428

25-
- Secure communication: [`libp2p_noise`](https://docs.rs/libp2p-noise/latest/libp2p_noise/) provides secure, authenticated channels between participating nodes for exchanging protocol messages.
29+
- Peers can query the relay server with a known blockchain address to obtain the corresponding Peer ID.
2630

27-
- Integration of the Olaf protocol with the underlying network (Milestone 2), managing:
28-
- Distributed Key Generation (DKG) and signing rounds.
31+
##### Direct Peer Communication
32+
- Once a Peer ID is obtained, the peer establishes a WebRTC connection using `libp2p`.
33+
- All protocol messages are exchanged via this secure, direct P2P channel.
2934

30-
- Local storage of key shares and protocol state.
35+
#### 🔐 Cryptographic Protocol (Rust → WASM)
3136

32-
- A Command Line Interface (Milestone 3) that allow users to:
37+
The cryptographic logic is written in Rust and compiled to WebAssembly (WASM) for browser use.
3338

34-
- Configure node settings (network addresses and peer IDs).
35-
36-
- Configure protocol settings (threshold and number of participants).
37-
38-
- Execute the Olaf protocol.
39+
##### Core Functionality
40+
- Distributed Key Generation (DKG) to derive a shared threshold public key.
41+
- Threshold Signing for signing Substrate/Kusama/Polkadot extrinsics.
42+
43+
##### State Management
44+
- Key shares and protocol state are stored in browser-local storage (e.g., `IndexedDB`).
3945

4046
### Ecosystem Fit
4147

@@ -75,7 +81,7 @@ The most similar project we found is [this](https://github.com/nulltea/tss-libp2
7581
- **Total Costs:** 30,000 USD
7682
- **DOT %:** 50%
7783

78-
### Milestone 1 - Development of the Node
84+
### Milestone 1 - Peer Discovery via Blockchain Address
7985

8086
- **Estimated duration:** 1 month
8187
- **FTE:** 1
@@ -87,9 +93,9 @@ The most similar project we found is [this](https://github.com/nulltea/tss-libp2
8793
| **0b.** | Documentation | We will provide **inline documentation** of the code. |
8894
| **0c.** | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. |
8995
| **0d.** | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. |
90-
| **1.a** | Development of the Node | Two peers running on different machines are able to discover each other through their Substrate/Kusama/Polkadot address, establish a connection, and exchange messages. |
96+
| **1.a** | Peer Discovery via Blockchain Address | Two browsers connect to a relay server, register with a Substrate/Kusama/Polkadot address, discover each other, and exchange messages directly over WebRTC using `libp2p`. |
9197

92-
### Milestone 2 - Integration of Olaf into the Node
98+
### Milestone 2 - Distributed Key Generation
9399

94100
- **Estimated duration:** 1 month
95101
- **FTE:** 1
@@ -101,9 +107,9 @@ The most similar project we found is [this](https://github.com/nulltea/tss-libp2
101107
| **0b.** | Documentation | We will provide **inline documentation** of the code. |
102108
| **0c.** | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. |
103109
| **0d.** | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. |
104-
| **1.a** | Integration of Olaf into the Node | Two peers on different machines exchange messages and successfully produce a threshold signature using the Olaf protocol with hardcoded protocol parameters. |
110+
| **1.a** | Distributed Key Generation | Two browsers exchange messages and successfully produce a shared threshold public key using the Olaf DKG protocol compiled to WASM. |
105111

106-
### Milestone 3 - Decentralized Threshold Signature Service CLI
112+
### Milestone 3 - Threshold Signature
107113

108114
- **Estimated duration:** 1 month
109115
- **FTE:** 1
@@ -116,8 +122,12 @@ The most similar project we found is [this](https://github.com/nulltea/tss-libp2
116122
| **0c.** | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. |
117123
| **0d.** | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. |
118124
| **0e.** | Article | We will publish an **article**/workshop that explains how the service works under the hood and how it can be used from a user perspective. |
119-
| **1.a** | Decentralized Threshold Signature Service CLI | Two peers on different machines exchange messages and produce a threshold signature using the Olaf protocol with protocol parameters defined by user input from the CLI. |
125+
| **1.a** | Threshold Signature | Two browsers exchange messages and produce a valid threshold signature over a given Substrate/Kusama/Polkadot extrinsic using the Olaf protocol compiled to WASM. |
120126

121127
## Future Plans
122128

123-
- Develop a webwallet for the user interface or integrate it in an established webwallet of the ecosystem, if there is interest.
129+
Build a production-ready, secure Progressive Web App (PWA) that includes:
130+
- Robust asynchronous peer-to-peer communication.
131+
- Support for configurable t-out-of-n threshold schemes.
132+
- Add proof of ownership to prevent address spoofing.
133+
- Implement a network of relay servers to achieve full decentralization.

0 commit comments

Comments
 (0)