Hicetnunc.xyz IPFS Pinning
💡 These steps will become easier, less technical, and more accessible as more open tools begin to emerge around Hicetnunc pinning. The steps below assume macOS but should work similarly across other platforms. This gist can be seen as a working draft toward more polished documentation; if you see any issues please post a comment below.
Hicetnunc.xyz aims to be "decentralized" which means the OBJKTs are owned by the users, not the platform. So, in theory, if hicetnunc disappears, another marketplace could emerge on the same (user-owned) assets. But, this paradigm of decentralization means that you own the assets; so the responsibility to maintain them lies on the users, not the platform.
Of course, hicetnunc and some of its users will probably also make an effort to help maintain all the assets on its platform; but you should not rely purely on that, as it goes against the core ethos of decentralization (it means you are placing your trust entirely upon a central authority).
The way you maintain your OBJKTs (that you mint, collect, or are simply interested in seeing last) is by 'pinning' them. The assets (images, meta data, etc) are stored in a peer-to-peer manner, shared across many devices (i.e. peers or nodes). If an asset is not being pinned, i.e. nobody is interested in it, there is a chance it could get garbage collected and potentially lost forever. So, we first need to run a "IPFS Node" to ensure we are connected to the p2p network, and then we need to "pin" the assets we want to maintain to ensure that they won't be garbage collected. Once pinned, as long as we continue to run our IPFS Node, those resources should not be garbage collected.
- A Terminal, such as macOS Terminal
- The IPFS Desktop App (or CLI if you prefer that)
- You will need some free disk space depending on how many assets you plan to pin, and how large these assets are
1. Install Requirements
Install the IPFS App from the downloads page and then run/open it. It should say "Connected to IPFS" once it's running. This is known as running an IPFS Node (also called a daemon).
Install Node.js (note: the name has no relation to IPFS Nodes) and ensure it's accessible as a command from your Terminal. Once installed, quit and re-open terminal and run
node --version to ensure it's been installed correctly.
2. Download hicetnunc_tools
Go to the GitHub repository below (thanks to @antic for doing all the hard work).
Click the green button "Code" with the arrow, then select Download ZIP. Unzip to a folder of your choice.
cd into hicetnunc_tools
Open your Terminal and
cd into the newly unzipped folder (you can drag and drop the folder into Terminal on macOS). This sets the working directory of the shell to that folder.
4. Pin files
Now you can run the "pin" command:
node pin.js your-tz-address
Change the address to your own tz address, here's what it looks like if I pin my resources:
node pin.js tz1XHADaUcMSkTN9gdmtRqcnrrZfs4tNkCPg
This should pin your own mints and your collected work. You can re-run this command when you mint/collect new work to ensure it too is pinned. You can also pin other addresses to ensure you are pinning your favourite NFTs.
If you quit/close the IPFS Desktop App (and your "IPFS Node"), and it's no longer running (i.e. not even in your task bar), then you are essentially not maintaining your OBJKTs and their pinned state across the network.1 You can re-open the IPFS App which will restart the IPFS Node, and that will continue pinning the same resources as before. (You don't need to re-pin them whenever you restart the IPFS Node.)
Presumably, hicetnunc as a platform, and some of its users, may still be pinning your work, but if you care about your NFTs, it's best not to rely only on that assumption. If nobody is pinning your work, it could eventually be garbage collected. It's not always clear how long before collection occurs; perhaps hours or days depending on node configuration.
For more persistent pinning (i.e. doesn't quit with your computer), something like an always-on Raspberry Pi might be a good solution, or a cloud based provider. More details will come as I continue to explore this space. The more devices you have pinning your work, the more fail-safes you have that are maintaining your work in case one goes offline.
The more people are pinning everybody's work (rather than just their own work), the more everybody will collectively benefit. Some users are already pinning the entire hicetnunc platform, and there is some discussion in the Discord around economizing this (ie. providing tez rewards for pinning a lot of hicetnunc assets).
There are also likely many other (perhaps better) ways of pinning than described here, and perhaps some information here that may be incorrect. This is an area of hicetnunc (and NFTs in general) that needs more research, better tools, and better documentation.
1 – When the IPFS Node is not running, the pinned files/resources should still exist on your computer's hard disk, but the IPFS network won't be able to access them, and nobody else in the network will see them, so it's like being offline. If that happens, and nobody else on the network is pinning/hosting the resources, there's a chance the NFT will point to a broken URL. Turning your IPFS Node back on should then bring your NFT back, so long as you still have the files on disk. (Thanks @marchingsquare for these details.)