Merge pull request 'initial commit' (#3) from itzelot01/docs:develop into develop
Reviewed-on: #3
This commit is contained in:
commit
b61c82de72
|
@ -112,6 +112,7 @@ You can view the page on any browser using the following link <http://127.0.0.1:
|
|||
> NOTE: If you want to access remotely use the `mdbook serve -n 0.0.0.0` which means any IP address can access the DECA Docs project.
|
||||
|
||||
## Contribute (Usage)
|
||||
>ToDo
|
||||
|
||||
|
||||
|
||||
|
@ -120,6 +121,9 @@ You can view the page on any browser using the following link <http://127.0.0.1:
|
|||
* [Telegram](https://t.me/deca_currency/1)
|
||||
* [Matrix](https://matrix.to/#/#DECA:matrix.org)
|
||||
|
||||
***Developers***
|
||||
- [itzelot01](mailto:itzeltellez59@aragon.unam.mx)
|
||||
|
||||
## License
|
||||
|
||||
```
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
added bafkreigyony7zmbrvisi54friqzmx3dmmvxqg753hcfarrims5fjppjoxm book/404.html
|
||||
added bafkreidztlvsltadop664dq3dw3223bpnihaldp23krtpfuj6wbscmmqxu book/FontAwesome/css/font-awesome.css
|
||||
added bafkreifkldzt6i42b6yc6xd2nrc4aq6xvgwjucjtgwagnfhm23ko3qgwva book/FontAwesome/fonts/FontAwesome.ttf
|
||||
added bafkreid37svw3om5lt57c4c4ubjw3xdylbkdftc7uqn326wq6aeqgozjpe book/FontAwesome/fonts/fontawesome-webfont.eot
|
||||
added bafybeifkkyg3opqf3yygg6yu7pxdvm2odenwz4xdgpocov3oknoenysm24 book/FontAwesome/fonts/fontawesome-webfont.svg
|
||||
added bafkreifkldzt6i42b6yc6xd2nrc4aq6xvgwjucjtgwagnfhm23ko3qgwva book/FontAwesome/fonts/fontawesome-webfont.ttf
|
||||
added bafkreif2brm55nkfb5oligz7snqj5ywq3gkucwdx3x5cepukrj2tgr2pa4 book/FontAwesome/fonts/fontawesome-webfont.woff
|
||||
added bafkreibk336lyba6pumpz4wuc6dz3rnatgl2uzgwow32hrfwzyz5ue7t7y book/FontAwesome/fonts/fontawesome-webfont.woff2
|
||||
added bafkreicajihrjp3s27qq7z7xzyxrdrdvfoxsmns3webnoum6igqzmojl7q book/IPFSNodes.html
|
||||
added bafkreicwmerubjxtmuswq3bft4n7fkfdpfqyd2l7zxi63jo6h4skyrznzy book/ayu-highlight.css
|
||||
added bafkreig4pojhuk62sealqfnyts7j5oh6i2wnoxl3baynhxuazswsur3dhi book/book.js
|
||||
added bafkreifo6hv2gvxzh6fl2p3pj4k7m654txwkfmd6efuxhdwwabnercso5a book/chapter_1.html
|
||||
added bafkreiawezygv7ei3fpl4eltwvj6y4zmnxecuv3jreyv7x26o542644kiq book/clipboard.min.js
|
||||
added bafkreih7qy6mjbkcmurdioy5445x4kajjqqc3tdkrhfwbgquca4dwzmeru book/css/chrome.css
|
||||
added bafkreid3sh7lw3c4gu73lso5kbs5bq7ts3oq7bafh2idgegvxbctiqn6ym book/css/general.css
|
||||
added bafkreigr4kora73dwhjs6wo4rhybrwi4w3a2rpvh7jo6cxrvfpfxrua35m book/css/print.css
|
||||
added bafkreia3jc2oweb24d4kflaqakfvidohhcep4ifbepbt25v3q5nqdhoqgy book/css/variables.css
|
||||
added bafkreihpjyi4cv5r4lujpawtbplsn4wv754dj2s6e2wqer2dex4ld4jgze book/elasticlunr.min.js
|
||||
added bafkreiebcti7y5huwvrbvwnp3z3un3m467scbprrpjxcsar5ekmnlcvblm book/favicon.png
|
||||
added bafkreig6epsqwhcn23qffm7cdvce7tklcnliwocavq6jtwn6j2jghqhple book/favicon.svg
|
||||
added bafkreigpy52jxfxwhpjrypccwxchdp3vnakakpuepqiph2yagql3yur5ga book/fonts/OPEN-SANS-LICENSE.txt
|
||||
added bafkreigr43kglkb3ugr34uw3mscindhvqevoto7zdk622oiaxiawll6psm book/fonts/SOURCE-CODE-PRO-LICENSE.txt
|
||||
added bafkreibnwej6n27n5badyyd5wpoowwwmkpbeo4qnlfk5el35wvv6w4jzwy book/fonts/fonts.css
|
||||
added bafkreidxg2vdlfwenbivymqj6l45ndh25fwzjqcwrg6mcgs5zzbgu3xc5a book/fonts/open-sans-v17-all-charsets-300.woff2
|
||||
added bafkreibmpok4bdpq2iumv3dnjp7na3na66vww5xkltb7ow24nlsbnpcxdm book/fonts/open-sans-v17-all-charsets-300italic.woff2
|
||||
added bafkreicinrtvsjzruczwvco3uh6qxf5ow47sg257mdn7fdl4nnlshqdzre book/fonts/open-sans-v17-all-charsets-600.woff2
|
||||
added bafkreia2h2dfs5ycj5ceqnfhlinthoe3smjuzeyaplr5nykpettmrdmn7m book/fonts/open-sans-v17-all-charsets-600italic.woff2
|
||||
added bafkreigcf7umodbw6hmgfeb3o4xk5wde2oupvbeuope4v7zcj7nykjbi4q book/fonts/open-sans-v17-all-charsets-700.woff2
|
||||
added bafkreibdrluvsokecev65dowl6hlyxz5hbrbmcukerp34hxdcuf4tix5qe book/fonts/open-sans-v17-all-charsets-700italic.woff2
|
||||
added bafkreib5fsasvx3u32zw72wt76cgtaanhqfsh2zmqwfojeyqfepyssibiy book/fonts/open-sans-v17-all-charsets-800.woff2
|
||||
added bafkreif2cuq6yim5xg6fx7wa4pt2rfzwtwmlgdkoqu7ojksskmrhqrbixa book/fonts/open-sans-v17-all-charsets-800italic.woff2
|
||||
added bafkreidmsrr7oclmboowcdqjl3jerla6rkg2p2jnc7u34vcphowo263cwi book/fonts/open-sans-v17-all-charsets-italic.woff2
|
||||
added bafkreibohmotjldhoy5lkbss3imtaxklg2kmnnxgx427jomechhev5sg2i book/fonts/open-sans-v17-all-charsets-regular.woff2
|
||||
added bafkreibl3wkbbmaudwz4xp2m7q4brtdpvutz5dtdsqeubydm22xxntf7z4 book/fonts/source-code-pro-v11-all-charsets-500.woff2
|
||||
added bafkreibdogrtmogsfhq4a76nzed7aj6jo3i7it7xgnyt5ji2y2ozvpojfi book/highlight.css
|
||||
added bafkreic2fno23vqighor7arcair6fkyy4ytqmgiszse3lrcqvmwi6jx7sa book/highlight.js
|
||||
added bafkreideryiao36q6jyglkinhl3ws2xq5vts26onzykn4sjckgaufs4uy4 book/index.html
|
||||
added bafkreiaj5cgcz6xsh2ukg62wqfbt5l7ks4btv5rs5teursgb52muizdxim book/mark.min.js
|
||||
added bafkreihjpk3jhspndxjx46xmueaaxzphkq47umi2flozloacum6ivy3d3a book/print.html
|
||||
added bafkreiczpmk46vuezeut4twnq3ho3p4i2nt74aud5qmhjlgvj6fxos2ulm book/searcher.js
|
||||
added bafkreihwyhatou3c3vuxdcikv6fmjzd7amj3z3kajonf3nhqw6x2rwq6sa book/searchindex.js
|
||||
added bafkreida6ladjrk4lopwlqgwtpqv57y2xfehhhdpqw3bnjv5qmrostf4ci book/searchindex.json
|
||||
added bafkreifrli5vovgq2mpnhwgu54flacebm5v4ti2x3zhffojoqsxyajd6ym book/tomorrow-night.css
|
||||
added bafybeiazjgra7f2bmhqd6ojrx2koty7m53gywrqbjmtbzuvxvs2mhflvyq book/FontAwesome/css
|
||||
added bafybeibdyiw3m4bevtsghw3uae3tzmun2w52yearz46p66r4nkxe3qiymu book/FontAwesome/fonts
|
||||
added bafybeidbnx3j45n4bnv7bwfzep7ndw4udyspfmzkeqf76hwwblcdt57tam book/FontAwesome
|
||||
added bafybeigmf4pualxxiweq5xfjxywhgsy2l7bvtutmedpggigvd4euzvbyoe book/css
|
||||
added bafybeia2qxbpzqe6n4qms3w2grldow2ul6hxelhnnihzmv4qh5sfilociq book/fonts
|
||||
added bafybeia53xpa36cgjtncuviu4l7forw4v4my2p4ok2cvpljtp3cs7hofku book
|
||||
added bafybeie3gerc6anagdz2fk7ntshlth2eivh6xtnmayaezqkkktl2t2muky
|
13
index.html
13
index.html
|
@ -83,7 +83,7 @@
|
|||
|
||||
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
||||
<div class="sidebar-scrollbox">
|
||||
<ol class="chapter"><li class="chapter-item expanded affix "><a href="../index.html" class="active">Introduction</a></li><li class="chapter-item expanded "><a href="chapter_1.html"><strong aria-hidden="true">1.</strong> Chapter 1</a></li></ol>
|
||||
<ol class="chapter"><li class="chapter-item expanded affix "><a href="../index.html" class="active">Introduction</a></li><li class="chapter-item expanded "><a href="IPFSNodes.html"><strong aria-hidden="true">1.</strong> IPFSNodes</a></li></ol>
|
||||
</div>
|
||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||
</nav>
|
||||
|
@ -169,8 +169,7 @@
|
|||
<h1 id="deca-docs"><a class="header" href="#deca-docs">DECA Docs</a></h1>
|
||||
<p>The DECA Project Documentation</p>
|
||||
<h2 id="introduction"><a class="header" href="#introduction">Introduction</a></h2>
|
||||
<p>Hola Itzel
|
||||
como estas</p>
|
||||
<p>A general DECA protocol specification and some example use cases.</p>
|
||||
<h2 id="requirements"><a class="header" href="#requirements">Requirements</a></h2>
|
||||
<p>There are some requirements you need to fulfill to be able to work with DECA docs.</p>
|
||||
<ul>
|
||||
|
@ -184,7 +183,7 @@ como estas</p>
|
|||
<p>NOTE: These are the recommended versions since they were tested in the development environment.</p>
|
||||
</blockquote>
|
||||
<h2 id="installation"><a class="header" href="#installation">Installation.</a></h2>
|
||||
<p>The easiest way to get both Rust and Cargo's latest versions is by using the <code>rustup</code> script, which also means that you have to use the <code>Curl</code> command.</p>
|
||||
<p>The easiest way to get both Rust and Cargo's latest versions is by using the <code>rustup</code> script, which also means that you have to use the <code>curl</code> command.</p>
|
||||
<h3 id="1-git-installation"><a class="header" href="#1-git-installation">1. Git Installation.</a></h3>
|
||||
<p>The first step is to install git on you Unix system. To do that, you only need to run the following command:</p>
|
||||
<pre><code class="language-shell">$ sudo apt install git
|
||||
|
@ -193,7 +192,7 @@ como estas</p>
|
|||
<p>You have to repeat the same proccess to install <code>curl</code>, use the apt command:</p>
|
||||
<pre><code class="language-sh"> $ sudo apt install curl
|
||||
</code></pre>
|
||||
<p>Once you have <code>Curl</code> installed you can go ahead and continue with the Rust and Cargo installations.</p>
|
||||
<p>Once you have <code>curl</code> installed you can go ahead and continue with the Rust and Cargo installations.</p>
|
||||
<h3 id="3-rust-and-cargo-installation"><a class="header" href="#3-rust-and-cargo-installation">3. Rust and Cargo Installation.</a></h3>
|
||||
<p>To install Rust and Cargo on your Unix System you have to download the <code>rustup installer script</code> using the following command on the terminal:</p>
|
||||
<pre><code class="language-shell">$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
|
@ -286,7 +285,7 @@ Free Documentation License".
|
|||
<nav class="nav-wrapper" aria-label="Page navigation">
|
||||
<!-- Mobile navigation buttons -->
|
||||
|
||||
<a rel="next" href="chapter_1.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||
<a rel="next" href="IPFSNodes.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
@ -297,7 +296,7 @@ Free Documentation License".
|
|||
|
||||
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
||||
|
||||
<a rel="next" href="chapter_1.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||
<a rel="next" href="IPFSNodes.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</nav>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/env bash
|
||||
|
||||
ipfs add --cid-version 1 -r -w book/ > bookCIDs.txt
|
|
@ -0,0 +1,238 @@
|
|||
# DECA's IPFS Nodes Setup Guide
|
||||
The following guide is on how to setup an IPFS node for DECA Protocol Requirements if you want to contribute and provide some infrastructure. This guide is based on Debian 12.1, improvements to our documentation are welcome.
|
||||
|
||||
## IPFS Instalation
|
||||
|
||||
1. Download the Linux Kubo binary from [`dist.ipfs.tech`](https://dist.ipfs.tech/#kubo).
|
||||
|
||||
```bash
|
||||
$ wget https://dist.ipfs.tech/kubo/v0.22.0/kubo_v0.22.0_linux-amd64.tar.gz
|
||||
```
|
||||
|
||||
1. Untargz the file:
|
||||
|
||||
```bash
|
||||
$ tar -xvzf kubo_v0.22.0_linux-amd64.tar.gz
|
||||
> x kubo/LICENSE
|
||||
> x kubo/LICENSE-APACHE
|
||||
> x kubo/LICENSE-MIT
|
||||
> x kubo/README.md
|
||||
> x kubo/install.sh
|
||||
> x kubo/ipfs
|
||||
```
|
||||
|
||||
1. Move into the `go-ipfs` folder and run the install script:
|
||||
|
||||
```bash
|
||||
$ cd kubo
|
||||
|
||||
$ sudo bash install.sh
|
||||
|
||||
> Moved ./ipfs to /usr/local/bin
|
||||
```
|
||||
|
||||
1. Test that IPFS has installed correctly:
|
||||
|
||||
```bash
|
||||
ipfs --version
|
||||
|
||||
> ipfs version 0.22.0
|
||||
```
|
||||
|
||||
## Setup ipfs service for deca
|
||||
|
||||
First time config setup for a server:
|
||||
```sh
|
||||
ipfs init --profile server
|
||||
```
|
||||
> This removes local discovery requests
|
||||
|
||||
### Enable Public Gateway
|
||||
Modify the GateWay section with the IP Address 0.0.0.0 :
|
||||
```sh
|
||||
"Addresses": {
|
||||
"API": "/ip4/127.0.0.1/tcp/5001",
|
||||
"Announce": [],
|
||||
"AppendAnnounce": [],
|
||||
"Gateway": "/ip4/0.0.0.0/tcp/8080",
|
||||
```
|
||||
|
||||
### Enable WebSocket on port 4004
|
||||
Add swarm address in the config (specifically the ws line):
|
||||
```sh
|
||||
"Swarm": [
|
||||
"/ip4/0.0.0.0/tcp/4001",
|
||||
"/ip4/0.0.0.0/tcp/4004/ws",
|
||||
"/ip6/::/tcp/4001",
|
||||
"/ip4/0.0.0.0/udp/4001/quic",
|
||||
"/ip6/::/udp/4001/quic"
|
||||
]
|
||||
```
|
||||
|
||||
### Enable Circuit Relay V2
|
||||
Enable Swarm.RelayService with the following command:
|
||||
```sh
|
||||
ipfs config --json Swarm.RelayService.Enabled true
|
||||
```
|
||||
and
|
||||
|
||||
```sh
|
||||
ipfs config --json Swarm.RelayClient.Enabled true
|
||||
```
|
||||
|
||||
### Enable Public Gateway
|
||||
To enable the public gateway setting your Gateway section should look as the
|
||||
following:
|
||||
|
||||
```sh
|
||||
"Gateway": {
|
||||
"APICommands": [],
|
||||
"DeserializedResponses": null,
|
||||
"HTTPHeaders": {},
|
||||
"NoDNSLink": false,
|
||||
"NoFetch": false,
|
||||
"PathPrefixes": [],
|
||||
"PublicGateways":{
|
||||
"devteam": {
|
||||
"UseSubdomains": false,
|
||||
"Paths": [
|
||||
"/ipfs",
|
||||
"/ipns"
|
||||
]
|
||||
}
|
||||
},
|
||||
"RootRedirect": ""
|
||||
},
|
||||
```
|
||||
|
||||
### Set IPFS as a daemon
|
||||
|
||||
Copy the following lines after the `sudo vim... command`, modify user and path to ipfs so that it matches with your system and user that runs ipfs:
|
||||
|
||||
```sh
|
||||
$ sudo vim /etc/systemd/system/ipfs.service
|
||||
|
||||
[Unit]
|
||||
Description=IPFS Daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=/usr/local/bin/ipfs daemon --enable-gc=true --migrate=true
|
||||
ExecStop=/usr/local/bin/ipfs shutdown
|
||||
User=nodemaster
|
||||
Restart=on-failure
|
||||
LimitNOFILE=10240
|
||||
KillSignal=SIGINT
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
**NOTE: in this example user that runs ipfs is nodemaster, also the ipfs location is at /usr/local/bin/ipfs if you don't know the path, try `$ whereis ipfs`**
|
||||
|
||||
Enable the service
|
||||
|
||||
```sh
|
||||
$ sudo systemctl daemon-reload
|
||||
$ sudo systemctl enable ipfs.service
|
||||
$ sudo systemctl start ipfs.service
|
||||
$ sudo systemctl status ipfs.service
|
||||
```
|
||||
**NOTE: service must be set as active (running), if not please verify the preview steps**
|
||||
|
||||
|
||||
## Set IPFS as a daemon and Nginx Reverse Proxy
|
||||
|
||||
### Nginx Reverse Proxy for a public gateway and websocket
|
||||
> NOTE: websocket is required for the Orbitdb which hold search.deca.eco
|
||||
> our carbon credits distributed database
|
||||
|
||||
The Gateway setup:
|
||||
Change the server name for your own domain name:
|
||||
```sh
|
||||
server {
|
||||
listen 80;
|
||||
server_name gateway.decentralizescience.org;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8080;
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
allow all;
|
||||
}
|
||||
}
|
||||
```
|
||||
> Note: Remember to enable the service and get ssl with certbot
|
||||
|
||||
The enabling Secure WebSocket with nginx:
|
||||
> NOTE: Change the server name for your own domain name.
|
||||
|
||||
```sh
|
||||
server {
|
||||
listen 80;
|
||||
server_name ipfs.decentralizedscience.org;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:4004;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> NOTE: Remember to enable the service and get ssl with certbot
|
||||
|
||||
## Testing
|
||||
|
||||
### Verify Secure WebSocket connection
|
||||
Doing an IPFS ping
|
||||
```sh
|
||||
ipfs ping /dns4/gateway.decentralizedscience.org/443/wss/p2p/12D3KooWQzickgUJ1N9dNZMJpNnFUCHmhndTVgexXnt6dQhPFcEE
|
||||
|
||||
PING 12D3KooWQzickgUJ1N9dNZMJpNnFUCHmhndTVgexXnt6dQhPFcEE.
|
||||
Pong received: time=161.27 ms
|
||||
Pong received: time=161.13 ms
|
||||
Pong received: time=161.55 ms
|
||||
```
|
||||
Doing a swarm connect
|
||||
```sh
|
||||
ipfs swarm connect /dns4/gateway.decentralizedscience.org/443/wss/p2p/12D3KooWQzickgUJ1N9dNZMJpNnFUCHmhndTVgexXnt6dQhPFcEE
|
||||
|
||||
connect 12D3KooWQzickgUJ1N9dNZMJpNnFUCHmhndTVgexXnt6dQhPFcEE success
|
||||
```
|
||||
|
||||
### check the IPFS public Gateway:
|
||||
|
||||
Browse by adding `/ipns/docs.deca.eco/` to your gateway address:
|
||||
> You should see the IPFS official web3 website
|
||||
|
||||
Example:
|
||||
https://gateway.decentralizedscience.org/ipns/docs.deca.eco/
|
||||
|
||||
## License
|
||||
|
||||
[**GPLV3**](./LICENSE). ?
|
||||
|
||||
## Contact.
|
||||
|
||||
***Developers***
|
||||
- [p1r0](mailto:p1r0@nethunters.xyz)
|
||||
|
||||
## ToDo/Proposal
|
||||
|
||||
* Setup a DECA testnodes health by forking [this code](https://github.com/ipfs/public-gateway-checker)
|
||||
* Setup and handle data with [ipfs-cluster](https://ipfscluster.io/)
|
||||
|
||||
|
||||
## References
|
||||
|
||||
1. [Install IPFS Kubo](https://docs.ipfs.tech/install/command-line/#install-official-binary-distributions)
|
||||
2. [Hosting a public IPFS gateway](https://gist.github.com/NatoBoram/09d244ab02af16fecb62b917f7bee3c0)
|
||||
3. [file transfer](https://github.com/ipfs/go-ipfs/blob/master/docs/file-transfer.md)
|
||||
4. [circuit relay](https://docs.libp2p.io/concepts/circuit-relay/)
|
||||
5. [understanding circuit relay](https://blog.aira.life/understanding-ipfs-circuit-relay-ccc7d2a39)
|
||||
6. [experimental features](https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md)
|
||||
|
||||
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
[Introduction](../README.md)
|
||||
|
||||
- [Chapter 1](./chapter_1.md)
|
||||
- [IPFSNodes](./IPFSNodes.md)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
# Chapter 1
|
Loading…
Reference in New Issue