Does the IPFS.add() method automatically update my local DHT and propagate it to other peers?

112 Views Asked by At

https://www.youtube.com/watch?v=PlvMGpQnqOM After watching the above tutorial on the IPFS protocol, I've learned that nodes use a distributed hash table(DHT) to query CID from other peers and fetch data. This leads to the logical conclusion that in order for me to let other peers download data from my node after adding it to IPFS using the IPFS.add() method, either the IPFS.add() method needs to include functionality for propagating my updated local DHT(new CID, peerID pair) to other connected peers or there has to be separate methods in the JS IPFS source code that allows me to propagate my local DHT to other peers. In essence, I want to know exactly how this works: "When you add a file to IPFS, you're putting it in your own node and making it accessible to peers on the network while your node is running"(https://proto.school/regular-files-api/03). Hence, I am religiously studying the JS IPFS source code(https://github.com/ipfs/js-ipfs) to find this functionality to no avail. Please help me find the methods within JS IPFS that allow other peers to recognize that I have a certain file that I've added to IPFS.

0

There are 0 best solutions below