0

I'm running a browser node with js-ipfs by importing the js library from a CDN. I'm adding a file by calling ipfs.add() and I've set a parameter option { pin: false } to help with debugging.

I am logging dataReceived and dataSent as given by the ipfs.bitswap.stat() function.

So as soon as I add a file, data sent begins to increase, up to approximately the size of the file I just added.

Why is this? Where is my node sending the file to?

user339946
  • 5,961
  • 9
  • 52
  • 97

1 Answers1

0

tl;dr: You published and announced the file, and then served it to someone who requested it.

From what I understand about how things work, it sounds that likely what happened is...

  1. your node connected to the IPFS network via bootstrap nodes
  2. announced that it has the CID for the file you added
  3. someone responded to the content announcement by requesting that CID
  4. your node responded with the blocks for that CID

If you're the only that has that CID, you'd serve 100% of the blocks, which would tally about the size of the file.

Dietrich Ayala
  • 921
  • 6
  • 9