astroport/zen/README.md

77 lines
2.4 KiB
Markdown
Raw Normal View History

2020-04-29 17:05:25 +02:00
# Explication de la machinerie.
Each IPFS Node publish on it's onw IPFS address ~/.zen/ipfs directory.
It contains per channel/wallets credentials and properties (each unique).
.Qm*** sub directory is used for exchanging messages between peers
SSB is the source of the gossip ipfs swarm structure
Blob can accept commands from the differents channels it manages.
2020-04-29 19:55:45 +02:00
Channels are populated/monitored through to ~/.zen/ipfs_swarm
2020-04-29 17:05:25 +02:00
IMPORTANT TODO!!
2020-04-29 19:55:45 +02:00
- timeout.sh CPU problem to investigate
# MOVE swarm.key (once cron_MINUTE.sh is activated should be OK)
mv ~/.ipfs/swarm.key ~/.ipfs/swarm.key.old
sudo systemctl restart ipfs
# Restart ssb-server
2020-04-30 05:30:55 +02:00
kill -9 $(ps auxf --sort=+utime | grep -w ssb-daemon| grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}');
kill -9 $(ps auxf --sort=+utime | grep -w ssb-server| grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}');
kill -9 $(ps auxf --sort=+utime | grep -w oasis | grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}')
printf '{"manifest":"sync"}' > ~/.ssb/manifest.json
ssb-server start &
sbotc -t async manifest > ~/.ssb/manifest.json
2020-04-29 19:55:45 +02:00
2020-04-29 17:05:25 +02:00
2020-03-29 15:44:01 +02:00
# IPFS FILESYSTEM STRUCTURE
```
# ssb_INIT.sh
~/.zen/ipfs/.$ipfsnodeid/G1SSB/_ssb.whoami
~/.zen/ipfs/.$ipfsnodeid/G1SSB/_g1.pubkey
~/.zen/ipfs/.$ipfsnodeid/G1SSB/_g1.qrcode.png
2020-04-27 23:32:49 +02:00
~/.zen/ipfs/.${ipfsnodeid}/Addresses
~/.zen/ipfs/.${ipfsnodeid}/AgentVersion
~/.zen/ipfs/.${ipfsnodeid}/repo.stat
~/.zen/ipfs/.${ipfsnodeid}/tryme.addr
2020-03-29 15:44:01 +02:00
# zen_MAKE.sh
~/.zen/ipfs/.$ipfsnodeid/TAG/${J}
~/.zen/ipfs/.$ipfsnodeid/TAG/${J}/_tag.uid
~/.zen/ipfs/.$ipfsnodeid/TAG/${J}/_tag.passenger.filename
~/.zen/ipfs/.$ipfsnodeid/TAG/${J}/_tag.passenger.metadata.json
2020-04-28 18:18:24 +02:00
~/.zen/ipfs/.$ipfsnodeid/TAG/${J}/_tag.passenger.fulltitle
2020-03-29 15:44:01 +02:00
# ssb_SURVEY_contact.sh
~/.zen/ipfs/.${ipfsnodeid}/CONTACT/${g1author}
~/.zen/ipfs/.${ipfsnodeid}/CONTACT/${g1author}/ipfs_swarm.key.crypt
~/.zen/ipfs/.${ipfsnodeid}/Addresses
~/.zen/ipfs/.${ipfsnodeid}/AgentVersion
~/.zen/ipfs/.${ipfsnodeid}/repo.stat
~/.zen/ipfs/.${ipfsnodeid}/CHAN/sha256(id@channel)
2020-04-13 19:12:20 +02:00
# ipfs_SWARM_refresh.sh
2020-03-29 15:44:01 +02:00
```
2020-04-13 19:12:20 +02:00
# IPFS CHANNELS ARE IMPORTED FROM LOCAL NODE
2020-03-29 15:44:01 +02:00
```
~/.zen/ipfs/sha256(id@channel)/_uid
2020-04-13 19:12:20 +02:00
~/.zen/ipfs/sha256(+33647683646@SMS_+33667676767)/_uid
2020-03-29 15:44:01 +02:00
```
2020-04-13 19:12:20 +02:00
# natools CRYPT/DECRYPT
g1pub=$(cat ~/.ssb/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
$MY_PATH/tools/natools.py encrypt -p $g1pub -i file -o file.crypt
$MY_PATH/tools/natools.py decrypt --pubsec -k ~/.ssb/secret.dunikey -i file.crypt -o file