functionland / go-fula

Client-server stack for Web3! Turn your Raspberry Pi to a BAS server in minutes and enjoy the freedom of decentralized Web with a superior user experience!
MIT License
13 stars 6 forks source link

rm API in go-fula #220

Open ehsan6sha opened 6 months ago

ehsan6sha commented 6 months ago

Currently we have a Put and Get, We also need a Rm endpoint for go-fula so that it removes the stored data (which we use IPFS read opener and write opener for read and write at the moment)

For the data store WNFS calls ....tbd... endpoint for removal of cids

ehsan6sha commented 6 months ago

The process for rm in WNFS is that: It does not remove the cids corresponding the the path but just puts the updated cids in the HAMT without that node. so it only puts some cids and does not remove anything indeed. So I think a suggested process for rm is that: 1- we find out which cids are get when we request that specific file, check what cids are put after rm is done by WNFS. and request to unpin the ones that are removed and pin the ones that are created. However, in theory we should not charge users for new cids (or should we?). I do not have a process for it on chain side right now in my mind

ehsan6sha commented 6 months ago

so maybe no change or new api is needed on go-fula side