Hi, is it real to monitor brandwith statistic by hash? Like torrent tracker monitor upload and download speed and count of downloaded/uploaded MB by specific torrent
Not at the moment and, unfortunately, I’m not sure if this is really doable (although we may be able to, e.g., track the top X most popular blocks). Like bittorrent, IPFS breaks files into blocks. However, unlike bittorent, IPFS treats all files as a part of a single, global filesystem (basically, one huge torrent).
Bittorrent aggregates statistics at the torrent level (it doesn’t track statistics per block). However, in IPFS, the analogue would be aggregating statistics at the node level (what we already do).
So, the question is, at what level should we track statistics. We could track statistics for each block independently but this is likely to lead to quite a bit of overhead. Alternatively, we could try to aggregate statistics at, e.g., pin roots. However, we’d then need to keep track of which blocks are referenced by which pins at all times (arguably more expensive in terms of disk space).
If i download file by hash, can i chech from what node i download?
If you enable debug logging, you can probably scrape it from the debug logs (see ipfs log
). However, this isn’t really supported.
I need to monitor “Bitswap.TaskWorker.Work” event?
No, that tells you where you’re sending the blocks. I don’t believe we have an “event” for this, we just log “got block BlockCID from PeerID” (level DEBUG).