papiche/Astroport.ONE

:chains: Enhance and make stronger TW chaining

Opened this issue · 0 comments

TW states history is stored on IPFS Station in ~/.zen/game/players/${PLAYER}/ipfs/moa/
the last IPFS CID is recorded in Astroport tiddler during PLAYER.refresh runtime.
CURCHAIN=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].chain | rev | cut -f 1 -d '/' | rev) # Remove "/ipfs/" part

In order to make TW remember its whole history,
we should create "CID" with the whole, and insert that value instead.
This will affect CURCHAIN extraction...

To remember TW landing stations. Make the chain format like UPlanet style

echo "${MOATS}:${IPFSNODEID}:${UMAPROOT}" > ~/.zen/tmp/${MOATS}/${UMAP}/${G1PUB}/_chain

Doing this evolution will allow TW to contain all it's state, being easy to clean in case of key hijacking