Skip to content

Commit e11c47b

Browse files
TippyFlitsUKjennijuju
authored andcommitted
GITBOOK-9: No subject
1 parent 4db4492 commit e11c47b

File tree

6 files changed

+253
-13
lines changed

6 files changed

+253
-13
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
* [Install & Run YugabyteDB](storage-providers/pdp/install-and-run-yugabytedb.md)
8787
* [Install & Run Curio](storage-providers/pdp/install-and-run-curio.md)
8888
* [Enable PDP](storage-providers/pdp/enable-pdp.md)
89+
* [Use PDP](storage-providers/pdp/use-pdp.md)
8990

9091
## Nodes
9192

storage-providers/pdp/enable-pdp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,6 @@ You’ve successfully launched a PDP-enabled Filecoin Storage Provider stack. Yo
197197

198198
### 🔜 Next Steps
199199

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
200+
* 🚙 Take PDP for a test drive with the [Use PDP](use-pdp.md) guide
201201
* 🧭 Monitor logs and metrics
202202
* 💬 Join the community - Filecoin Slack - [#fil-pdp](https://filecoinproject.slack.com/archives/C0717TGU7V2)

storage-providers/pdp/install-and-run-lotus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ lotus --version
3535
```
3636

3737
{% hint style="success" %}
38-
You should see something like: lotus version 1.32.2+mainnet+git.ff88d8269
38+
You should see something like: `lotus version 1.32.2+mainnet+git.ff88d8269`
3939
{% endhint %}
4040

4141
***

storage-providers/pdp/install-and-run-yugabytedb.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Set ulimit configuration
66

77
{% hint style="info" %}
8-
 Before starting Yugabyte, you must increase the default ulimit values to ensure system limits do not interfere with the database.
8+
 Before starting Yugabyte, you must increase the default `ulimit` values to ensure system limits do not interfere with the database.
99
{% endhint %}
1010

1111
To do this:
@@ -17,19 +17,19 @@ Add these lines to `/etc/security/limits.conf`:
1717
```sh
1818
echo "$(whoami) soft nofile 1048576" | sudo tee -a /etc/security/limits.conf
1919
echo "$(whoami) hard nofile 1048576" | sudo tee -a /etc/security/limits.conf
20-
This ensures the increased limits are automatically applied to future sessions.
2120
```
2221

22+
This ensures the increased limits are automatically applied to future sessions.
23+
2324
#### **Apply limit immediately (for current shell only)**
2425

25-
```sh
26-
ulimit -n 1048576
27-
Verify:
28-
ulimit -n
29-
```
26+
<pre class="language-sh"><code class="lang-sh">ulimit -n 1048576
27+
<strong># Verify:
28+
</strong>ulimit -n
29+
</code></pre>
3030

3131
{% hint style="success" %}
32-
This should output 1048576.
32+
This should output `1048576`.
3333
{% endhint %}
3434

3535
### Install Yugabyte

storage-providers/pdp/prerequisites.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: >-
77
# Prerequisites
88

99
{% hint style="info" %}
10-
⚠️ Note: This guide is written specifically for Ubuntu 22.04. If you are using a different Linux distribution, refer to the relevant documentation for package installation and compatibility.
10+
This guide is written specifically for Ubuntu 22.04. If you are using a different Linux distribution, refer to the relevant documentation for package installation and compatibility.
1111
{% endhint %}
1212

1313
Before starting, make sure you have a user with **sudo privileges**. This section prepares your system for the PDP stack.
@@ -34,7 +34,7 @@ go version
3434
```
3535

3636
{% hint style="success" %}
37-
You should see something like: go version go1.23.7 linux/amd64
37+
You should see something like: `go version go1.23.7 linux/amd64`
3838
{% endhint %}
3939

4040
***
@@ -55,7 +55,7 @@ rustc --version
5555
```
5656

5757
{% hint style="success" %}
58-
You should see something like: rustc 1.86.0 (05f9846f8 2025-03-31)
58+
You should see something like: `rustc 1.86.0 (05f9846f8 2025-03-31)`
5959
{% endhint %}
6060

6161
***

storage-providers/pdp/use-pdp.md

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
---
2+
description: >-
3+
This guide walks you through using the PDP client tool (pdptool) to interact
4+
with a Filecoin Storage Provider running the Proof of Data Possession (PDP)
5+
service.
6+
---
7+
8+
# Use PDP
9+
10+
PDP ensures that your data is verifiably stored by a Filecoin Storage Provider using cryptographic proofs without needing to retrieve the file itself.
11+
12+
### Prerequisites
13+
14+
Before beginning, ensure:
15+
16+
* You have access to a terminal with internet connectivity
17+
* Your system has pdptool installed (bundled with Curio)
18+
19+
### If pdptool is not installed:
20+
21+
* **Option 1**: Clone Curio and build pdptool:
22+
23+
```sh
24+
git clone
25+
https://github.com/filecoin-project/curio.git
26+
27+
cd curio
28+
cd cmd/pdptool
29+
go build .
30+
```
31+
32+
* **Option 2**: Install the [Docker version ](https://github.com/LesnyRumcajs/pdp)of pdptool - Provided by our friends at [ChainSafe](https://chainsafe.io/)
33+
34+
***
35+
36+
### Authenticate Your Client (JWT Token)
37+
38+
You first need to authenticate your pdptool with a PDP-enabled Storage Provider
39+
40+
Generate a service secret:
41+
42+
```sh
43+
./pdptool create-service-secret
44+
```
45+
46+
```sh
47+
# Example output:
48+
49+
-----BEGIN PUBLIC KEY-----
50+
LxP9MzVmHdC7KwYBvNAo1jXuIRfGXqQyo2JzE4Uctn0a5eFZbs6Wlvq3dKYgphTD
51+
XAqRsm38LPt2iVcGb9MruZJxEkBhO71wDdNyaFMoXpCJnUqRAezvKlfbIg==
52+
-----END PUBLIC KEY-----
53+
```
54+
55+
{% hint style="success" %}
56+
Reach out in the [#fil-pdp](https://filecoinproject.slack.com/archives/C0717TGU7V2) channel in Filecoin Slack to register your public key with a PDP-enabled Storage Provider
57+
{% endhint %}
58+
59+
***
60+
61+
### Connect to a PDP Service
62+
63+
Start by pinging the PDP service to confirm availability:
64+
65+
```sh
66+
./pdptool ping --service-url https://yablu.net --service-name pdp-service
67+
```
68+
69+
{% hint style="success" %}
70+
You should see something like:
71+
{% endhint %}
72+
73+
```sh
74+
Ping successful: Service is reachable and JWT token is valid.
75+
```
76+
77+
***
78+
79+
### Create a Proof Set
80+
81+
Start by creating an empty proof set. This step must happen **before** uploading files:
82+
83+
```sh
84+
./pdptool create-proof-set \
85+
--service-url https://yablu.net \
86+
--service-name pdp-service \
87+
--recordkeeper 0x6170dE2b09b404776197485F3dc6c968Ef948505
88+
```
89+
90+
```sh
91+
# Example output:
92+
93+
Proof set creation initiated successfully.
94+
Location: /pdp/proof-sets/created/0xf91617ef532748efb5a51e64391112e5328fbd9a5b9ac20e5127981cea0012a5
95+
Response:
96+
```
97+
98+
Use the `0x` transaction hash from the previous output to monitor proof set creation status:
99+
100+
```sh
101+
./pdptool get-proof-set-create-status \
102+
--service-url https://yablu.net \
103+
--service-name pdp-service \
104+
--tx-hash 0xf91617ef532748efb5a51e64391112e5328fbd9a5b9ac20e5127981cea0012a5
105+
```
106+
107+
{% hint style="success" %}
108+
You should see something like:
109+
{% endhint %}
110+
111+
```sh
112+
Proof Set Creation Status:
113+
Transaction Hash: 0xf91617ef532748efb5a51e64391112e5328fbd9a5b9ac20e5127981cea0012a5
114+
Transaction Status: confirmed
115+
Transaction Successful: true
116+
Proofset Created: true
117+
ProofSet ID: 43
118+
```
119+
120+
{% hint style="info" %}
121+
The proof set creation process can take a few seconds to complete
122+
{% endhint %}
123+
124+
***
125+
126+
### Upload Files to the Storage Provider
127+
128+
Once your proof set is ready, you can begin uploading files:
129+
130+
```sh
131+
./pdptool upload-file --service-url https://yablu.net --service-name pdp-service /path/to/file.ext
132+
```
133+
134+
{% hint style="success" %}
135+
Example output:
136+
{% endhint %}
137+
138+
```sh
139+
0: pieceSize: 65536
140+
baga6ea4seaqhsevhssmv3j7jjavm4gzdckpjrvbwhhvn73sgibob5bdvtzoqkli:baga6ea4seaqhsevhssmv3j7jjavm4gzdckpjrvbwhhvn73sgibob5bdvtzoqkli
141+
```
142+
143+
***
144+
145+
### 🌳 Add File Roots to Proof Set
146+
147+
After uploading each file, extract its CID and add it to your proof set:
148+
149+
```sh
150+
./pdptool add-roots \
151+
--service-url https://yablu.net \
152+
--service-name pdp-service \
153+
--proof-set-id <PROOF-SET-ID> \
154+
--root <CID1>+<CID2>+<CID3>...
155+
```
156+
157+
Example using the information returned in the previous steps:
158+
159+
```sh
160+
./pdptool add-roots \
161+
--service-url https://yablu.net \
162+
--service-name pdp-service \
163+
--proof-set-id 43 \
164+
--root baga6ea4seaqhsevhssmv3j7jjavm4gzdckpjrvbwhhvn73sgibob5bdvtzoqkli:baga6ea4seaqhsevhssmv3j7jjavm4gzdckpjrvbwhhvn73sgibob5bdvtzoqkli
165+
```
166+
167+
{% hint style="info" %}
168+
In the above example, `--proof-set-id` came from the [Create Proof Set](use-pdp.md#create-a-proof-set) step, and `--root` from the [Upload Files to the Storage Provider](use-pdp.md#upload-files-to-the-storage-provider) step.
169+
{% endhint %}
170+
171+
{% hint style="success" %}
172+
Example output:
173+
{% endhint %}
174+
175+
```sh
176+
Roots added to proof set ID 43 successfully.
177+
Response:
178+
```
179+
180+
***
181+
182+
### View a Piece or Proof Set
183+
184+
You can retrieve a proof set or inspect a file root directly:
185+
186+
```sh
187+
./pdptool get-proof-set \
188+
--service-url https://yablu.net \
189+
--service-name pdp-service 43
190+
```
191+
192+
{% hint style="success" %}
193+
Example output:
194+
{% endhint %}
195+
196+
```sh
197+
Proof Set ID: 43
198+
Next Challenge Epoch: 2577608
199+
Roots:
200+
- Root ID: 0
201+
Root CID: baga6ea4seaqhsevhssmv3j7jjavm4gzdckpjrvbwhhvn73sgibob5bdvtzoqkli
202+
Subroot CID: baga6ea4seaqhsevhssmv3j7jjavm4gzdckpjrvbwhhvn73sgibob5bdvtzoqkli
203+
Subroot Offset: 0
204+
```
205+
206+
***
207+
208+
### Retrieve From a Proof Set
209+
210+
Download a file using an ordered chunks list:
211+
212+
```sh
213+
./pdptool download-file \
214+
--service-url https://yablu.net \
215+
--chunk-file chunks.list \
216+
--output-file file.ext
217+
```
218+
219+
{% hint style="info" %}
220+
💡In the above example, `–chunk-file` and `–output-file` flags were defined in the [Upload Files to the Storage Provider step](use-pdp.md#upload-files-to-the-storage-provider)
221+
{% endhint %}
222+
223+
***
224+
225+
### You’re Done!
226+
227+
You’ve now:
228+
229+
✅ Connected to a PDP-enabled storage provider\
230+
✅ Created a proof set\
231+
✅ Uploaded files and added file roots\
232+
✅ Verified availability and proof status
233+
234+
🧭 Next: Track your proof sets in the PDP Explorer
235+
236+
* [Calibration PDP Explorer](https://calibration.pdp-explorer.eng.filoz.org)
237+
* [Mainnet PDP Explorer](https://pdp-explorer.eng.filoz.org)&#x20;
238+
239+
💬 Questions? Join the conversation on Filecoin Slack: [#fil-pdp](https://filecoinproject.slack.com/archives/C0717TGU7V2)

0 commit comments

Comments
 (0)