I spent my whole yesterday to go deep dive into IPFS source code. Now I can understand most part of it. However, I still have a question about its protocol and hope someone can help me clear about this.
As I understand, when I want to put a block of data into IPFS, this is what will happen:
- I save block in my store.
- I create a message
AddProviderto notify that I’m a provider of this block. This message will be sent to top closest peers to the key (CID of the block).
- Peer who received this message will save in provider store which says that I’m a provider of this block.
So this is the way information of a block will broadcast to the whole network. However, I am not clear about how content will be distributed in IPFS. DHT seems only provide way to find providers of a given block. Bitswap protocol only controls which block I can provide and which blocks I want, so it doesn’t specify how my block will be distributed in IPFS.
So currently my understand is: until someone get that block and pin that block, I’m the only one will provide that block. This is sad because I want my content will be automatically distributed in IPFS.
Thanks for your help.