Lighthouse
Ask or search…
K
📖

PoDSI

Proof of Data Segment Inclusion (PoDSI) is like a certificate of authenticity. It assures that your file is safely tucked inside a special package, known as a "deal", made by the Lighthouse Node. This node combines several files, gives them a unique ID, offers proof of their inclusion, and even throws a mini-proof of the entire package's structure.
The time between uploading and being able to get your PoDSI should only be a few minutes. You can get the PoDSI for your file by calling the getProof function in one of the following ways:
via Axios in node.js
1
let response = await axios.get("https://api.lighthouse.storage/api/lighthouse/get_proof", {
2
params: {
3
cid: lighthouse_cid,
4
network: "testnet" // Change the network to mainnet when ready
5
}
6
})
or via curl
# Assumes that uploaded your file to mainnet.
# Alternatively, if you are using testnet, add &network=testnet to the end of the URL.
curl https://api.lighthouse.storage/api/lighthouse/get_proof?cid=<puppy_CID>
curl example:
# An example of how to get the PoDSI for a file uploaded to testnet
curl https://api.lighthouse.storage/api/lighthouse/get_proof?cid=QmS7Do1mDZNBJAVyE8N9r6wYMdg27LiSj5W9mmm9TZoeWp&network=testnet
The response, an example of a PoDSI proof on Calibration, should look something like this:
PoDSI response
1
{
2
"pieceCID": "baga6ea4seaqgbiszkxkzmaxio5zjucpg2sd4n6abvmcsenah27g4xtjszxtzmia",
3
"pieceSize": 4194304,
4
"carFileSize": 4161536,
5
"proof": {
6
"pieceCID": "baga6ea4seaqn6s6n3irnz2ewfwlybhpjzrg6i57fzuwletj5sxcv7hz5rauewli",
7
"id": "19845d2a-4fae-426c-893d-491770c317e8",
8
"lastUpdate": 1692888301,
9
"fileProof": {
10
"verifierData": {
11
"commPc": "0181e203922020df4bcdda22dce8962d97809de9cc4de477e5cd2cb24d3d95c55f9f3d88284b2d",
12
"sizePc": "200000"
13
},
14
"inclusionProof": {
15
"proofIndex": {
16
"index": "ffe0",
17
"path": [
18
"f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb0b",
19
"3731bb99ac689f66eef5973e4a94da188f4ddcae580724fc6f3fd60dfd488333",
20
"642a607ef886b004bf2c1978463ae1d4693ac0f410eb2d1b7a47fe205e5e750f",
21
"57a2381a28652bf47f6bef7aca679be4aede5871ab5cf3eb2c08114488cb8526",
22
"1f7ac9595510e09ea41c460b176430bb322cd6fb412ec57cb17d989a4310372f",
23
"fc7e928296e516faade986b28f92d44a4f24b935485223376a799027bc18f833",
24
"08c47b38ee13bc43f41b915c0eed9911a26086b3ed62401bf9d58b8d19dff624",
25
"b2e47bfb11facd941f62af5c750f3ea5cc4df517d5c4f16db2b4d77baec1a32f",
26
"f9226160c8f927bfdcc418cdf203493146008eaefb7d02194d5e548189005108",
27
"2c1a964bb90b59ebfe0f6da29ad65ae3e417724a8f7c11745a40cac1e5e74011",
28
"fee378cef16404b199ede0b13e11b624ff9d784fbbed878d83297e795e024f02",
29
"8e9e2403fa884cf6237f60df25f83ee40dca9ed879eb6f6352d15084f5ad0d3f",
30
"752d9693fa167524395476e317a98580f00947afb7a30540d625a9291cc12a07",
31
"7022f60f7ef6adfa17117a52619e30cea82c68075adf1c667786ec506eef2d19",
32
"d99887b973573a96e11393645236c17b1f4c7034d723c7a99f709bb4da61162b",
33
"df4bcdda22dce8962d97809de9cc4de477e5cd2cb24d3d95c55f9f3d88284b2d"
34
]
35
},
36
"proofSubtree": {
37
"index": "0",
38
"path": [
39
"83ccb895e53b292546ccda9c45017c247ffa54b406f492605c9148e09aa2f208"
40
]
41
}
42
},
43
"indexRecord": {
44
"checksum": "4a8e39cfd5af583596f54f95954a991b",
45
"proofIndex": "df4bcdda22dce8962d97809de9cc4de477e5cd2cb24d3d95c55f9f3d88284b2d",
46
"proofSubtree": 0,
47
"size": 2097152
48
}
49
}
50
},
51
"dealInfo": [
52
{
53
"dealUUID": "f064d4d5-7b35-4647-8df7-91fb8fb99f23",
54
"dealId": 13279,
55
"storageProvider": "t017840"
56
},
57
{
58
"dealUUID": "ae8f6709-5ca0-4944-abb1-cd04cf05e0c3",
59
"dealId": null,
60
"storageProvider": "t017819"
61
}
62
],
63
"previousAggregates": [
64
"975afcd3-ff3e-4395-a50e-24500ca0bfb7"
65
]
66
}
  1. 1.
    The pieceCID is a content identifier used for referencing data in distributed information systems by it’s contents rather than its location using cryptographic hashing and self-describing formats. A core component of IPFS and IPLD, you can read more about it here.
  2. 2.
    The proof contains information that can be used to confirm whether your file was included in a specific aggregated data bundle.
  3. 3.
    The dealInfo provides details about the file's storage deal. If the "dealId" is null, it means that the storage deal has been initiated but the miner hasn't started the sealing process yet.
  4. 4.
    The previousAggregates parameter lists older aggregate IDs for the file, if the file's storage deal has been renewed. You can use these IDs to get more details about previous aggregates. To do this, use the provided API link, substituting the appropriate aggregate ID and network information.
Previous Aggregates Info
To get information about a previous aggregate with the ID '975afcd3-ff3e-4395-a50e-24500ca0bfb7' on the Testnet, you would use the following:
curl https://api.lighthouse.storage/api/lighthouse/aggregate_info?aggregateId=975afcd3-ff3e-4395-a50e-24500ca0bfb7&network=testnet