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

garbage cleaning #151

Open ehsan6sha opened 1 year ago

ehsan6sha commented 1 year ago

Right now when we upload a file it is stored locally and then pushed to blox backend. here we create 3 copies: 1 the original file, 1 the DAG version created on the client, 1 the DAG version created on backend. Two of these are on the client, occupying double the space. Can we somehow garbage collect?

ehsan6sha commented 1 year ago

What we can do is only keep the upper leafs (As they are only CIDs) and delete the very bottom row of nodes as they are the ones with the content