diff --git a/20h12.process.sh b/20h12.process.sh index e88d3482..6b3f7060 100755 --- a/20h12.process.sh +++ b/20h12.process.sh @@ -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 diff --git a/API/QRCODE.sh b/API/QRCODE.sh index 5bcd900e..5b6fffdb 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -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 diff --git a/BOOTSTRAP/Readme.md b/BOOSTRAP/Readme.md similarity index 87% rename from BOOTSTRAP/Readme.md rename to BOOSTRAP/Readme.md index 61eefcfe..fbbbe7f7 100644 --- a/BOOTSTRAP/Readme.md +++ b/BOOSTRAP/Readme.md @@ -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 diff --git a/README.md b/README.md index 071187ce..bf66ccf9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index 92d198fa..bc2eba7d 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -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) diff --git a/RUNTIME/VOEUX.refresh.sh b/RUNTIME/VOEUX.refresh.sh index 4accd3b4..24b2064b 100755 --- a/RUNTIME/VOEUX.refresh.sh +++ b/RUNTIME/VOEUX.refresh.sh @@ -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 diff --git a/_12345.sh b/_12345.sh index c6f2aac6..7b7c7404 100755 --- a/_12345.sh +++ b/_12345.sh @@ -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} diff --git a/ajouter_media.sh b/ajouter_media.sh index 2ba3d32b..30a3f915 100755 --- a/ajouter_media.sh +++ b/ajouter_media.sh @@ -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) diff --git a/tools/Connect_PLAYER_To_Gchange.sh b/tools/Connect_PLAYER_To_Gchange.sh index efc16db5..a8da620e 100755 --- a/tools/Connect_PLAYER_To_Gchange.sh +++ b/tools/Connect_PLAYER_To_Gchange.sh @@ -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 diff --git a/tools/ipfs_config.sh b/tools/ipfs_config.sh index 712e05d2..33d1523b 100755 --- a/tools/ipfs_config.sh +++ b/tools/ipfs_config.sh @@ -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 diff --git a/tools/search_for_this_email_in_players.sh b/tools/search_for_this_email_in_players.sh index b2078841..5859b8e2 100755 --- a/tools/search_for_this_email_in_players.sh +++ b/tools/search_for_this_email_in_players.sh @@ -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") diff --git a/tools/verify_payment.sh b/tools/verify_payment.sh index e6e92528..b5168dac 100755 --- a/tools/verify_payment.sh +++ b/tools/verify_payment.sh @@ -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")