Rollback and advanced resume

File rollback and advanced resume are the two file integrity checking mechanisms used by DC++ such that one can stop and resume a download whilst ensuring it remains intact, especially allowing for switching between different sources. DC++ versions through 0.699 rely by default upon file rollback as a download resume integrity-checking mechanism; the currently developing version, by contrast, uses exclusively advanced resuming.

File rollback, having originated prior to TTH, assumes little about the relationship between two putatively equivalent sources. Instead, when resuming a file, it examines the last $ROLLBACK_WINDOW bytes of the already downloaded file, begins downloading the new segment $ROLLBACK_WINDOW bytes before the ostensible resume position, and declares the files intact and fit for resuming if and only if the remote and local $ROLLBACK_WINDOW-sized buffers exactly match. Otherwise, it declares a rollback inconsistency and ceases resuming.

This has the weaknesses of detecting only errors in the accumulated portion of the file within the usually small rollback window, requiring to compensate extra bandwidth to transfer that overlap window, creating a loophole in the TTH regime allowing the corruption of transferred files. Further, in recent DC++ versions, file rollback has been destructive, truncating a file according to the rollback window size provided a detected inconsistency. This process repeats up to every couple of minutes, as often as DC++ retries and gets a remote slot; this results in a trade-off between large rollback windows capable of detecting more transfer corruption and a greater risk of losing what progress one’s client has achieved.

Advanced resuming resolves all of these issues by relying, rather than on the limited rollback window, upon the entire file as locally downloaded. As such, it could not be primarily utilised until hash-capable clients had reached ubiquity. Advanced resuming a file involves re-hashing the locally held portion of the file being resumed, proceeding until it detects either a hash inconsistency or the exhaustion of the local data; this point it selects as the resume position. Because it only resumes files the root TTH informs it are identical, it needs not concern itself, by contrast with rollback, with cross-checking the local and remote data, saving bandwidth. Finally, unlike rollback-resumed files, subsequent sessions can take advantage of the now-primed TTH checking machinery, so is as secure as downloading a file without resuming.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: