Skip to content

Commit 4db4492

Browse files
TippyFlitsUKjennijuju
authored andcommitted
GITBOOK-8: No subject
1 parent 56b29ab commit 4db4492

File tree

2 files changed

+203
-0
lines changed

2 files changed

+203
-0
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
* [Install & Run Lotus](storage-providers/pdp/install-and-run-lotus.md)
8686
* [Install & Run YugabyteDB](storage-providers/pdp/install-and-run-yugabytedb.md)
8787
* [Install & Run Curio](storage-providers/pdp/install-and-run-curio.md)
88+
* [Enable PDP](storage-providers/pdp/enable-pdp.md)
8889

8990
## Nodes
9091

storage-providers/pdp/enable-pdp.md

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
---
2+
description: >-
3+
This section enables Proof of Data Possession (PDP) for a Storage Provider
4+
node using Curio. These steps guide you through running a standalone PDP
5+
service using Curio and pdptool.
6+
---
7+
8+
# Enable PDP
9+
10+
<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><a href="https://docs.curiostorage.org/experimental-features/enable-pdp">PDP Documentation</a></td><td><a href="../../.gitbook/assets/Curio_placeholder.webp">Curio_placeholder.webp</a></td></tr><tr><td><a href="https://filecoinproject.slack.com/archives/C0717TGU7V2">Filecoin Slack - #fil-pdp</a></td><td><a href="../../.gitbook/assets/Filecoin.svg.png">Filecoin.svg.png</a></td></tr><tr><td><a href="../../basics/assets/metamask-setup.md">Filecoin Wallet - MetaMask Setup</a></td><td><a href="../../.gitbook/assets/Filecoin.svg.png">Filecoin.svg.png</a></td></tr></tbody></table>
11+
12+
### Attach Storage Locations
13+
14+
With Curio running with the GUI layer:
15+
16+
```sh
17+
curio run --layers=gui
18+
```
19+
20+
Run the following commands in your Curio CLI to attach storage paths:
21+
22+
```sh
23+
curio cli storage attach --init --seal /fast-storage/path
24+
curio cli storage attach --init --store /long-term-storage/path
25+
```
26+
27+
{% hint style="info" %}
28+
Your fast-storage path should point to high-performance storage media such as NVMe or SSD
29+
{% endhint %}
30+
31+
***
32+
33+
### Add a PDP Configuration Layer
34+
35+
Browse to the Configurations page of the Curio GUI.
36+
37+
Create a new layer named pdp. Enable and set to `true` the following under Subsystems:
38+
39+
{% hint style="info" %}
40+
You may find it helpful to search for the setting names in your browser.
41+
{% endhint %}
42+
43+
*`EnableParkPiece`
44+
*`EnablePDP`
45+
*`EnableCommP`
46+
*`EnableMoveStorage`
47+
48+
In the HTTP section:
49+
50+
* ✅ Enable: `true`
51+
* 🌐 DomainName: `your domain (e.g., pdp.mydomain.com)`
52+
* 📡 ListenAddress: `0.0.0.0:443`
53+
54+
{% hint style="info" %}
55+
&#x20;You must point your domain’s A record to your server’s public IP address for Let’s Encrypt to issue a certificate.
56+
{% endhint %}
57+
58+
***
59+
60+
### Set Up PDP Service Keys
61+
62+
Build the pdptool:
63+
64+
```sh
65+
cd curio/cmd/pdptool
66+
go build .
67+
```
68+
69+
Generate a service secret:
70+
71+
```sh
72+
./pdptool create-service-secret
73+
```
74+
75+
```sh
76+
# Example output:
77+
78+
-----BEGIN PUBLIC KEY-----
79+
LxP9MzVmHdC7KwYBvNAo1jXuIRfGXqQyo2JzE4Uctn0a5eFZbs6Wlvq3dKYgphTD
80+
XAqRsm38LPt2iVcGb9MruZJxEkBhO71wDdNyaFMoXpCJnUqRAezvKlfbIg==
81+
-----END PUBLIC KEY-----
82+
```
83+
84+
Browse to the **PDP** page of the Curio GUI and in the **Services** section:
85+
86+
* Select **Add PDP Service**
87+
* Input a **Service Name** of your choice (e.g. `pdp-service`)
88+
* Copy the previously generated public key into the **Public Key** field.
89+
* Select **Add Service**
90+
91+
***
92+
93+
### Import your Filecoin Wallet Private Key:
94+
95+
{% hint style="info" %}
96+
There are several ways to obtain private keys for Ethereum addresses. For this guide, we will use a new delegated Filecoin wallet address.
97+
{% endhint %}
98+
99+
Create a new delegated wallet:
100+
101+
```sh
102+
lotus wallet new delegated
103+
```
104+
105+
```sh
106+
# Example output:
107+
108+
t410fuo4dghaeiqzokiqnxruzdr6e3cjktnxprrc56bi
109+
```
110+
111+
{% hint style="info" %}
112+
You can display your Lotus wallets at any time by running:
113+
{% endhint %}
114+
115+
```sh
116+
lotus wallet list
117+
```
118+
119+
Export & convert your new delegated wallet address private key:&#x20;
120+
121+
```sh
122+
lotus wallet export <your-delegated-wallet-address> | xxd -r -p | jq -r '.PrivateKey' | base64 -d | xxd -p -c 32
123+
```
124+
125+
```sh
126+
# Example output:
127+
128+
d4c2e3f9a716bb0e47fa91b2cf4a29870be3c5982fd6eafed71e8ac3f9c0b12
129+
```
130+
131+
Browse to the **PDP** page of the Curio GUI and in the **Owner Address** section:
132+
133+
* Select **Import Key**
134+
* Copy the previously generated private wallet key into the **Private Key (Hex)** field.
135+
* Select **Import Key**
136+
137+
{% hint style="success" %}
138+
Your 0x wallet address - the delegated Ethereum address derived from your Filecoin Metamask private key - will be added to the **Owner Address** section of the Curio PDP page.
139+
{% endhint %}
140+
141+
Make sure to send a small amount of FIL to your 0x wallet - we recommend 5 FIL to ensure uninterrupted PDP operation during initial setup and testing.
142+
143+
{% hint style="danger" %}
144+
Important: Secure your private key material. Don’t expose or store it in plain text without protection.
145+
{% endhint %}
146+
147+
***
148+
149+
### Restart and Verify
150+
151+
Restart Curio with both layers:
152+
153+
```sh
154+
curio run --layers=gui,pdp
155+
```
156+
157+
{% hint style="warning" %}
158+
&#x20;If you encounter errors binding to port 443 when starting Curio with the pdp configuration layer, run:
159+
{% endhint %}
160+
161+
```sh
162+
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/curio
163+
```
164+
165+
Test the PDP service:
166+
167+
```sh
168+
./pdptool ping --service-url https://your-domain.com --service-name <ServiceName>
169+
```
170+
171+
{% hint style="success" %}
172+
Use the service name specified in the **Service Name** field when you added your public **PDP Service** key - e.g. `pdp-service`
173+
{% endhint %}
174+
175+
Expected output:
176+
177+
```sh
178+
Ping successful: Service is reachable and JWT token is valid.
179+
```
180+
181+
{% hint style="info" %}
182+
Note: The first ping often fails. Try again after a short delay.
183+
{% endhint %}
184+
185+
***
186+
187+
### 🎉 You’re Ready!
188+
189+
You’ve successfully launched a PDP-enabled Filecoin Storage Provider stack. Your system is now:
190+
191+
* ✅ Syncing with the Filecoin network via Lotus
192+
* ✅ Recording deal and sector metadata in YugabyteDB
193+
* ✅ Operating Curio to manage sealing and coordination
194+
* ✅ Submitting Proof of Data Possession to verify storage integrity
195+
196+
***
197+
198+
### 🔜 Next Steps
199+
200+
* 🚙 Take PDP for a test drive with the [Getting Started with PDP for Storage Clients](https://docs.google.com/document/d/1MTPVZVqNqB8symaiSe-FmBSqd4byl76q5rZ54vrOp9E/edit?tab=t.0#heading=h.7oxcvntk0n0d) guide
201+
* 🧭 Monitor logs and metrics
202+
* 💬 Join the community - Filecoin Slack - [#fil-pdp](https://filecoinproject.slack.com/archives/C0717TGU7V2)

0 commit comments

Comments
 (0)