• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

pipermerriam/ipfs-persistence-consortium: A consortium to help persist IPFS obje ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

pipermerriam/ipfs-persistence-consortium

开源软件地址:

https://github.com/pipermerriam/ipfs-persistence-consortium

开源编程语言:

Python 100.0%

开源软件介绍:

IPFS Consortium

A agreement among trusted parties to assist with persistance of IPFS objects.

How To Use

Clone the source

$ git clone https://github.com/pipermerriam/ipfs-persistence-consortium.git

cd into the newly cloned repository

Install Requirements

You can do this with pip. Recommended to do this in a virtual environment

$ pip install -r requirements.txt

Setup a config file

Setup a config.json in the root directory of the project that looks like the following.

{
    "peers": [
        "QmP24Zx4uEh1ZhmPsERb4ZwBDVdXjHiFqRSkHyqeSJQEsW"
    ]
}

The peers key needs to be an array of IPFS ids.

Run the script

$ python ipfs_consortium.py

This will loop through all of the peers and pin their files locally. This script can be setup to run periodically with something like cron.

How it works

  1. For each peer in the peers list, the script uses ipfs name resolve to find the ipfs address that has been published from that peer.
  2. This address is expected to point to a directory of JSON files. Each of these json files should contain a top level array of IPFS hashes. These hashes represent the files that this peer wishes to have mirrored.
  3. Each of these hashes is pinned.

How to ask others to mirror your IPFS content

Create a directory to contain your IPFS manifest JSON files.

$ mkdir ~/ipfs-manifests

In this directory, create any number of *.json files. These files should contain a single top level array of IPFS file hashes.

// manifest1.json
[
    "QmYwxuzozCBSD3FLP5Rg1pAXA4qjDtNrdGjyNzqEtr8TKu",
    "QmTrXyK24CAymWj5eATjxrisc8QaJocnGSY11BFFDEvqtH"
]

Add this file into IPFS

$ ipfs add -r ipfs-manifests
added QmPSM44WZ6rFW7d81pMQYG7BzDJRjhrWh7s69dTUpgmtRY ipfs-manifests/manifest-1.json
added QmbsC66VNjNdBU8simUfmxj2dUdpyWgkJKRiVBxBE9sBXQ ipfs-manifests

Take the hash associated with the ~/ipfs-manifests directory and publish it on IPNS

$ ipfs name publish QmbsC66VNjNdBU8simUfmxj2dUdpyWgkJKRiVBxBE9sBXQ
Published to QmP24Zx4uEh1ZhmPsERb4ZwBDVdXjHiFqRSkHyqeSJQEsW: QmbsC66VNjNdBU8simUfmxj2dUdpyWgkJKRiVBxBE9sBXQ

Give other members your IPFS id and ask them to add it to their peers list. You can get this your IPFS id with:

{
    "ID": "QmfGr14Jmu3fUvN74MGG7C8Av8buDbtLVK7Bs4yiaS4chX",
    "PublicKey": "CAASpgIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQxRzWJvimlHD0sHY8+n5X4TYhj2tNLVfiJZLJz1vZRMwSTqgmMyrFEh2o+4B21EtfR6tf0eKLwUerfPR0DUWRjJv4YL1+SidNxESsqIaENPBsaLwhGRFXM3PYeW+UjlTjrEybOf2cCY1h8+9XrlCMLHPROzS+QHbAW4Elz7CfqmbMbhDVXEuIVkDQxvXPVgVQEFwkKYexwfHbeLa2n5WTunsSec6GlEUfbwQOlmb/iMYfu2HfPztmwS1wXk1d4WvsUiB53gqljp7jsTPaE5YD4wyyUlQDeulO1zCdDjq2gQDxjtZ0fUzLfJU3dsdnpPcP1KQzvvSEAxNedjAsRRQTAgMBAAE=",
    "Addresses": [
        "/ip4/127.0.0.1/tcp/4001/ipfs/QmfGr14Jmu3fUvN74MGG7C8Av8buDbtLVK7Bs4yiaS4chX",
        "/ip4/10.0.1.48/tcp/4001/ipfs/QmfGr14Jmu3fUvN74MGG7C8Av8buDbtLVK7Bs4yiaS4chX"
    ],
    "AgentVersion": "go-ipfs/0.4.0-dev",
    "ProtocolVersion": "ipfs/0.1.0"
}

Setting up an EC2 instance running ipfs

EC2_setup.md




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
leanthebean/ipfs_streaming发布时间:2022-06-24
下一篇:
BusterLabs/Partyshare: A free, open source file sharing application, built on th ...发布时间:2022-06-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap