../
swrm development log: 02
Hello again,
Last night, I’ve reached a good milestone in the swrm project. I was able to install the debian iso file, using swrm (yayy). It was pretty slow, mainly cause I’ve not setup concurrent piece downloads from multiple peers etc. Right now, It’s just a sequential download, where it gets piece by piece, and picks a peer in a dumb manner.
But for now, It can do the following:
- parse the torrent file
- contact the tracker and fetch peers
- perform handshake with peer and get bitfield
- parse bitfield, send interested and wait for unchoke
- request blocks and reassemble into pieces (verified with sha1)
- write all pieces to file, to get final file.
It’s missing the following and more:
- simultaneous downloads from multiple peers
- smart piece selection
- pipeline multiple block requests
- better retry for failed pieces
- periodic re-announce (via interval given)
Now, I’ll start optimizing the performance, by adding simulataneous downloads, etc.
Also, here is the result of my first validation check after debian iso got downloaded:
$ sha512sum debian-13.6.0-amd64-netinst.iso
ce0eeee7b51fdcdbed1e5116668c1fee27e528767bdf488e5f115a67b225e5dfd0afca1d456aaa9408ceb6b8527521ff7b6b5d62fdbe6f8c5faaf8df56a96292 debian-13.6.0-amd64-netinst.iso
$ cat SHA512SUMS | grep "debian-13.6.0-amd64-netinst.iso"
ce0eeee7b51fdcdbed1e5116668c1fee27e528767bdf488e5f115a67b225e5dfd0afca1d456aaa9408ceb6b8527521ff7b6b5d62fdbe6f8c5faaf8df56a96292 debian-13.6.0-amd64-netinst.iso
Next up, Optimization!
That’s it, Bye!