Getting Started with IPFS in Ethereum Grid – Ethereum Grid
IPFS is a protocol and network designed to create a content-addressable, peer-to-peer method of storing and sharing hypermedia in a distributed file system. That’s a mouthful, but in short it is a way of sharing files with no central authority in charge, like Google or Dropbox.
IPFS has done an extraordinary job making peer-to-peer file sharing accessible. With Ethereum Grid, our goal is to make the technology even easier to use and build on top of.
If you haven’t already, you can download Grid at grid.ethereum.org. It is currently available for Mac and Windows, with Linux support coming soon.
Open Grid and click on the IPFS plugin to get to its tab. Within the “Versions” tab, download the latest IPFS release. Once installed and back on the “About” tab, you can click LAUNCH for the Web UI app. A pop-up dialog will ask if you want to start IPFS with the daemon flag, which is exactly what we are looking for to start discovering, uploading, and serving files to others.
From here, you can check the status of your IPFS node, upload files, discover other files, and start connecting and sharing with other peers. Let’s walk through it together.
Uploading a File
It is very easy to upload content onto IPFS from here. Click the Add button, and choose to upload a file, folder, or re-host content with an existing IPFS content identifier (CID). A CID hash is a string of letters and numbers, e.g. QmVL79CiYZAPvW99C6rf5hyyHFhi1GMLw2fsYTig5BioXq.
It is important to note when you add a file to IPFS, only your node will have an initial copy of the data. That means when your node is online, the file will be accessible in the IPFS universe, however if you turn off your node before anyone else re-hosts the content, then it will become unavailable.
Exploring the Merkle Forest
In the Explore tab, you can enter an IPFS content identifier (CID) and investigate the underlying structure of data. For more information on how IPFS handles files, check out this great article: What’s really happening when you add a file to IPFS?
The content is chunked up into smaller parts (about 256k each), each part is hashed, a CID is created for each chunk, and then these chunks are combined into a hierarchical data structure, for which a single, base CID is computed.
This data structure is essentially something called a Merkle DAG, or directed acyclic graph.
Viewing your Peers
IPFS is a peer-to-peer network, meaning that your node connects to other peers, not a central server, to download and upload files. On the Peers tab, you can see how many peers you are connected to and some of their metadata. Note that when you start IPFS for the very first time, it may take some a moment for your node to begin discovering and connecting to other peers.
IPFS is an incredible leap in file-sharing technology and we are happy to make it accessible in Grid, a platform for decentralized tools and services.
If you run into any issues or have any suggestions for Grid or our IPFS integration, please share your thoughts. Is there another project you’d like to see integrated within Grid? Let us know!
Published at Wed, 28 Aug 2019 16:48:11 +0000
{flickr|100|campaign}
