BOOSTRAP is important... every chain has a seed, better if it is you really!

This commit is contained in:
fred 2023-11-24 18:02:20 +01:00
parent adce8d8c10
commit 50c95d9a32
12 changed files with 50 additions and 46 deletions

View File

@ -56,7 +56,7 @@ espeak "REFRESHING UPLANET" > /dev/null 2>&1
## if [[ ! $isLAN ]]; then
## REFRESH BOOTSTRAP LIST (OFFICIAL SWARM)
## REFRESH BOOSTRAP LIST (OFFICIAL SWARM)
espeak "bootstrap refresh" > /dev/null 2>&1
ipfs bootstrap rm --all > /dev/null 2>&1

View File

@ -285,8 +285,16 @@ if [[ ${QRCODE:0:5} == "~~~~~" ]]; then
fi
if [[ ${APPNAME} == "friend" ]]; then
# CHECK IF ${VAL} HAS A PROFILE
${MY_PATH}/../tools/timeout.sh -t 5 \
curl -s ${myDATA}/user/profile/${VAL} > ~/.zen/tmp/${MOATS}/gchange.json
## Send ॐ★ॐ
${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/tmp/${MOATS}/secret.key stars -p ${VAL} -n ${WHAT} >> ~/.zen/tmp/${MOATS}/disco
[[ -s ~/.zen/tmp/${MOATS}/gchange.json ]] \
&& ${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/tmp/${MOATS}/secret.key stars -p ${VAL} -n ${WHAT} >> ~/.zen/tmp/${MOATS}/disco \
&& rm ~/.zen/tmp/${MOATS}/gchange.json \
|| echo "/${VAL} profile is not existing yet..." >> ~/.zen/tmp/${MOATS}/disco
fi

View File

@ -1,4 +1,4 @@
# THE ART OF BOOTSTRAPING
# THE ART OF BOOSTRAPING
"Blockchain" has special treatment during "heart beats" making evolve change of "State".
@ -10,46 +10,33 @@ Astroport.ONE is collecting is map through the bootstrap nodes in ~/.zen/Astropo
A new list makes a new "Station Tribe". Some bootstrap scenario could initiate automatic key creation & cross signatures
(ex: Create 25 PLAYERs to start a 5x5 document emitting with random cross signature)
THIS IS ALREADY THE CASE WITH PGP.
Instead you can convert your SSH key and benefit from Astroport Data Layer Protocol
```
## SEE EXERCICE
keygen --help
```
PLAYER key & wishes can be controled through : ```~/.zen/Astroport.ONE/command.sh``` or directly through TW (Tag="voeu")
Each wish, is a derivated key, it has an IPNS publishing and can be associated to its own ASTROBOT program to take care about Friends data collect & merge.
VISA.new.sh is creating TW from ```templates/twdefault.html``` and ```templates/minimal.html```
This script is important as it initialize PLAYER... It could allow different templating.
This script is important as it initialize PLAYER and connect him to STATION... You can add more different templates...
Visit https://tiddlywiki.com to understand all the capacities this tools have inside.
## 20H12
Every day (20H12.process.sh) activates automation.
Sequence is run in that order:
1. PLAYER.refresh
2. Connect_PLAYER_To_Gchange.sh
3. VOEUX.create.sh
4. VOEUX.refresh.sh
5. ASTROBOT/G1WishName.sh
Sequence is run every night :
1. PLAYER.refresh (distributed USERs key management)
2. UPLANET.refresh (UPlanet key refresh only Station in Boostrap list)
## _12345.sh : The MAP maintainer
This process is run almost every hour. Stations are getting and publishing
Each time MAP.refresh.sh is running it takes data from PLAYERs caches (~/.zen/game/players/.../) and publish it on Station IPNS key.
## UPlanet
UMap shared keys introduce common blockchains.
PROTOCOL
To avoid collisions and maintain data freshness.
20H12 process time should be adjusted on real sun time based on longitude.
Every 4 minute next 0.01 longitude is processed.
Every UMap is then processed by latitude...
So the planet sectors act like a "Virtual Hard Drive" giving 24s to each sector for being refreshed.
To spread blockchain next step calculations, key management will be given to the closest Astroport Station.
CONTROL AGENT
Disfunctions and protocol break can be detected by every Stations thus they can identify bad IPFS NODE publiher(s) and blacklist them
Boostrap Stations gets LANCoeurBOX through 12345 client call, asking for IPNS retrieval so SWARM data are collected.
## REVERSE CODE

View File

@ -125,7 +125,7 @@ Permet la Gestion des PLAYER (et des G1VoeuX) en mode CLI
Une fois votre Station Astroport démarrée:
* le port 1234 publie API (REPONSE PORT TCP 45780 45781 ( jusqu'à ... 45790 )
* le port 12345 publie MAP(*) (CARTE DE L'ESSAIM - BOOTSTRAP / STATIONS)
* le port 12345 publie MAP(*) (CARTE DE L'ESSAIM - BOOSTRAP / STATIONS)
* le port 33101 publie G1BILLETS (REPONSE PORT TCP 33102)
* le port 8080, 4001 et 5001 sont ceux de la passerelle IPFS

View File

@ -171,11 +171,17 @@ for PLAYER in ${PLAYERONE[@]}; do
# Connect_PLAYER_To_Gchange.sh : Sync FRIENDS TW
##############################################################
echo "##################################################################"
echo "## GCHANGE+ & Ŋ1 EXPLORATION: Connect_PLAYER_To_Gchange.sh"
${MY_PATH}/../tools/Connect_PLAYER_To_Gchange.sh "${PLAYER}"
# G1PalPay - Check for G1 TX incoming comments #
${MY_PATH}/G1PalPay.sh ${HOME}/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html "${PLAYER}"
[[ ${COINS} > 100 ]] \
&& echo "## Connect_PLAYER_To_Gchange.sh" \
&& ${MY_PATH}/../tools/Connect_PLAYER_To_Gchange.sh "${PLAYER}" \
|| echo "1000 ẑen needed to activate star system"
# G1PalPay - 10 ZEN mini -> Check for G1 TX incoming comments #
[[ ${COINS} > 1 ]] \
&& echo "## RUNNING G1PalPay " \
&& ${MY_PATH}/G1PalPay.sh ${HOME}/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html "${PLAYER}" \
|| echo "> INSUFFICIENT ${COINS} - 10 ẑen minimum"
### CHECK FOR pending (TODO)

View File

@ -250,7 +250,7 @@ do
WISHFLUX=$(ipfs add -qHwr ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${WISHNAME}/* | tail -n 1) # ADDING JSONS TO IPFS
ipfs name publish -k $VOEUKEY /ipfs/$WISHFLUX # PUBLISH $VOEUKEY
echo "## ASK ${myIPFSGW}${IPNS_VOEUNS} TO REFRESH" ## TODO LOOP BOOTSTRAP & ONLINE FRIENDS
echo "## ASK ${myIPFSGW}${IPNS_VOEUNS} TO REFRESH" ## TODO LOOP BOOSTRAP & ONLINE FRIENDS
curl -m 120 -so ~/.zen/tmp/${WISHNAME}.astroindex.html "${myIPFSGW}${IPNS_VOEUNS}" &
## MOVE INTO PLAYER AREA

View File

@ -67,7 +67,7 @@ echo 0 > ~/.zen/tmp/random.sleep
###################
# NEVER ENDING LOOP
###################################################################
## WILL SCAN ALL BOOTSTRAP - REFRESH "SELF IPNS BALISE" - RECEIVE UPLINK ORDERS
## WILL SCAN ALL BOOSTRAP - REFRESH "SELF IPNS BALISE" - RECEIVE UPLINK ORDERS
###################################################################
while true; do
@ -97,7 +97,7 @@ while true; do
done
done
############# GET BOOTSTRAP SWARM DATA
############# GET BOOSTRAP SWARM DATA
for bootnode in $(cat ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | grep -Ev "#" | rev | cut -d '/' -f 1 | rev | grep -v '^[[:space:]]*$') # remove comments and empty lines
do
@ -144,8 +144,8 @@ while true; do
continue
fi
## ASK BOOTSTRAP NODE TO GET MY MAP UPSYNC
## - MAKES MY BALISE PRESENT IN BOOTSTRAP SWARM KEY -
## ASK BOOSTRAP NODE TO GET MY MAP UPSYNC
## - MAKES MY BALISE PRESENT IN BOOSTRAP SWARM KEY -
if [[ $iptype == "ip4" || $iptype == "ip6" ]]; then
############ UPSYNC CALL
@ -153,7 +153,7 @@ while true; do
curl -s -m 10 http://${nodeip}:12345/?${NODEG1PUB}=${IPFSNODEID} -o ~/.zen/tmp/swarm/${ipfsnodeid}/map.${nodeip}.json
## LOOKING IF ITS SWARM MAP COULD COMPLETE MINE
echo "ANALYSING BOOTSTRAP SWARM MAP"
echo "ANALYSING BOOSTRAP SWARM MAP"
itipnswarmap=$(cat ~/.zen/tmp/swarm/${ipfsnodeid}/map.${nodeip}.json | jq -r '.g1swarm' | rev | cut -d '/' -f 1 | rev )
ipfs ls /ipns/${itipnswarmap} | rev | cut -d ' ' -f 1 | rev | cut -d '/' -f 1 > ~/.zen/tmp/_swarm.${ipfsnodeid}

View File

@ -156,7 +156,7 @@ case $? in
esac
fi
## CHANGE ASTROPORT BOOTSTRAP
## CHANGE ASTROPORT BOOSTRAP
if [[ $1 == "on" ]]; then
STRAP=$(ipfs bootstrap)
BOOT=$(zenity --entry --width 300 --title="Catégorie" --text="$STRAP Changez de Bootstrap" --entry-text="Aucun" Astroport Public)

View File

@ -42,7 +42,10 @@ mkdir -p ~/.zen/tmp/${IPFSNODEID}/GCHANGE/${PLAYER}/
${MY_PATH}/timeout.sh -t 20 \
curl -s ${myDATA}/user/profile/${G1PUB} > ~/.zen/game/players/${PLAYER}/ipfs/gchange.json
[[ ! $? == 0 ]] && echo "xxxxx ERROR PROBLEM WITH GCHANGE+ NODE ${myDATA} xxxxx" && exit 1
[[ ! $(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.title' 2>/dev/null) ]] && echo "xxxxx GCHANGE+ DATA ERROR ${myDATA} xxxxx" && exit 1
[[ ! $(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.title' 2>/dev/null) ]] \
&& echo "xxxxx GCHANGE+ MISSING ACCOUNT ${myDATA} xxxxx" \
&& ${MY_PATH}/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey set -n " " -v " " -a " " -d " " -pos 0.00 0.00 -s https://qo-op.com -A ${MY_PATH}/../images/plain.png \
&& exit 0
# $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey get > ~/.zen/game/players/${PLAYER}/ipfs/gchange.json
## GET AVATAR PICTURE

View File

@ -53,7 +53,7 @@ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
ipfs config Addresses.API "/ip4/0.0.0.0/tcp/5001"
ipfs config Addresses.Gateway "/ip4/0.0.0.0/tcp/8080"
######### CLEAN DEFAULT BOOTSTRAP ADD Astroport.ONE Officials ###########
######### CLEAN DEFAULT BOOSTRAP ADD Astroport.ONE Officials ###########
ipfs bootstrap rm --all
for bootnode in $(cat ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | grep -Ev "#") # remove comments

View File

@ -10,7 +10,7 @@ ME="${0##*/}"
. "${MY_PATH}/my.sh"
### USE 12345 MAP
## EXPLORE SWARM BOOTSTRAP REPLICATED TW CACHE
## EXPLORE SWARM BOOSTRAP REPLICATED TW CACHE
start=`date +%s`
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")

View File

@ -10,7 +10,7 @@ ME="${0##*/}"
. "${MY_PATH}/my.sh"
### USE 12345 MAP
## EXPLORE SWARM BOOTSTRAP REPLICATED TW CACHE
## EXPLORE SWARM BOOSTRAP REPLICATED TW CACHE
start=`date +%s`
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")