1 line
6.3 KiB
JavaScript
1 line
6.3 KiB
JavaScript
"use strict";(self.webpackChunkcanine_docs=self.webpackChunkcanine_docs||[]).push([[5689],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var o=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=o.createContext({}),c=function(e){var t=o.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},u=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(r),u=n,f=d["".concat(l,".").concat(u)]||d[u]||h[u]||a;return r?o.createElement(f,i(i({ref:t},p),{},{components:r})):o.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:n,i[1]=s;for(var c=2;c<a;c++)i[c]=r[c];return o.createElement.apply(null,i)}return o.createElement.apply(null,r)}u.displayName="MDXCreateElement"},2121:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var o=r(7462),n=(r(7294),r(3905));const a={sidebar_position:1},i="Jackal Proof-of-Persistence Documentation",s={unversionedId:"protocol/p-o-p",id:"protocol/p-o-p",title:"Jackal Proof-of-Persistence Documentation",description:"Overview",source:"@site/docs/protocol/p-o-p.md",sourceDirName:"protocol",slug:"/protocol/p-o-p",permalink:"/docs/protocol/p-o-p",draft:!1,editUrl:"https://github.com/JackalLabs/canine-docs/blob/master/docs/protocol/p-o-p.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Filetree Module",permalink:"/docs/protocol/modules/filetree"},next:{title:"JKL Token",permalink:"/docs/protocol/tokens"}},l={},c=[{value:"Overview",id:"overview",level:2},{value:"Building the Trees",id:"building-the-trees",level:2},{value:"Proving Data Availability",id:"proving-data-availability",level:2}],p={toc:c},d="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,o.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"jackal-proof-of-persistence-documentation"},"Jackal Proof-of-Persistence Documentation"),(0,n.kt)("h2",{id:"overview"},"Overview"),(0,n.kt)("p",null,"Jackal Storage is powered by a Proof-of-Storage algorithm called Proof-of-Persistence (JPOP). JPOP is designed to ensure\nthe secure and persistent storage of user data through a series of contracts formed between the storage provider and the\nuser. These contracts contain the Merkle Tree root hash of the file and the information required to prove ownership of\nthe file. In this documentation, we'll explain the core components and processes involved in the Jackal\nProof-of-Persistence."),(0,n.kt)("h2",{id:"building-the-trees"},"Building the Trees"),(0,n.kt)("p",null,"Merkle Trees are a core component of the JPOP mechanism, thus, it is important to outline how these trees are used to\ncreate efficient and trustworthy proofs. When saving a file for the first time, providers split each file into many 1kb\nchunks. Providers must also hash the entire file to create a folder to house every chunk, this is displayed by the\nfollowing diagram."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"File Tree",src:r(4671).Z,width:"601",height:"382"})),(0,n.kt)("p",null,"These chunks are used as leaves on the Merkle Tree defining each storage contract. Immediately after saving a file to\ndisk, the storage provider builds a tree using each chunk. To create this tree, each chunk is hashed into a respective\nHashed Chunk. These chunks are then recursively paired together and hashed until a single root node is created. This is\ncalled the Merkle Root, the only piece of data relative to a file that is saved directly on the blockchain itself."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Merkle Roots",src:r(9302).Z,width:"601",height:"512"})),(0,n.kt)("p",null,"In the diagram above, displays how each file is hashed together to create a single root node."),(0,n.kt)("h2",{id:"proving-data-availability"},"Proving Data Availability"),(0,n.kt)("p",null,"These nodes are essential as they only require the nodes below them to prove they are part of the tree. This means that\nwe can create a proof claiming a single chunk belongs to the file using the Merkle Root saved on the chain. In the\nfollowing diagram, we can see that only the blue nodes are required to build a successful proof. The green nodes\nrepresent information that we can generate given the blue nodes. Finally, we can compare the root generated from the\nproof to the root saved on the chain and determine if the chunk does belong to the contract we are proving. This results\nin small message sizes due to not needing to send the entire file every proof."),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Merkle Roots Graphed",src:r(9614).Z,width:"601",height:"512"})))}h.isMDXComponent=!0},4671:(e,t,r)=>{r.d(t,{Z:()=>o});const o=r.p+"assets/images/tree1-9d95b0b5007debff9495443e8075c918.png"},9302:(e,t,r)=>{r.d(t,{Z:()=>o});const o=r.p+"assets/images/tree2-6ed53d85e2efa8a87bfd1bc6b88757e5.png"},9614:(e,t,r)=>{r.d(t,{Z:()=>o});const o=r.p+"assets/images/tree3-4f9ab62526b9143823b59eebc0f2b724.png"}}]); |