Difference between revisions of "AICH"
(→Definitions) |
(oops. should be using the preview more often) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<center> | <center> | ||
− | '''English''' | [[AICH-de| | + | '''English''' | |
+ | [[AICH-de|Deutsch]] | ||
</center> | </center> | ||
== Description == | == Description == | ||
− | [[ICH|ICH's]] success | + | [[ICH|ICH's]] success is indisputable but it would be convenient to know exactly which part of the [[FAQ_eD2k-Kademlia#What_is_a_chunk?|chunk]] is [[Corrupt|corrupt]], especially when multiple parts are corrupted. [[AICH]] (Advanced Intelligent [[Corrupt]]ion Handler) takes care of this task and allows [[aMule]] and any other supporting [[client|clients]] to know precisely which portions of the [[FAQ_eD2k-Kademlia#What_is_a_chunk?|chunk]] are [[Corrupt|corrupt]]. |
== Definitions == | == Definitions == | ||
Line 13: | Line 14: | ||
== The actual work == | == The actual work == | ||
− | When a [[FAQ_eD2k-Kademlia#What_is_a_chunk?|chunk]] is known to be [[Corrupt|corrupt]], [[aMule]] will try to get an [[AICH Hashset]] from a [[client]] | + | When a [[FAQ_eD2k-Kademlia#What_is_a_chunk?|chunk]] is known to be [[Corrupt|corrupt]], [[aMule]] will try to get an [[AICH Hashset]] from a [[client]] that is sharing the complete file. It will ask for the all hashes of the 53 parts in the [[Corrupt|corrupt]] [[FAQ_eD2k-Kademlia#What_is_a_chunk?|chunk]] and the necessary [[Verifying Hash|Verifying Hashes]] to complete the [[AICH Hashset]] tree up to the [[Root Hash]]. |
− | Once it gets the [[Block Hash|Block Hashes]] and the [[Verifying Hash|Verifying Hashes]], it builds up the tree to get the [[Root Hash]] and check if it's the same as the [[Root Hash]] the original [[ed2k link]] | + | Once it gets the [[Block Hash|Block Hashes]] and the [[Verifying Hash|Verifying Hashes]], it builds up the tree to get the [[Root Hash]] and check if it's the same as the [[Root Hash]] provided by the original [[ed2k link]]. If it is, those [[Block Hash|Block Hashes]] will be considered reliable. If it isn't, the [[Block Hash|Block Hashes]] and [[Verifying Hash|Verifying Hashes]] will be dropped and considered fakes. |
− | Once the [[Block Hash]]es are considered reliable, each 180KB part in the [[Corrupt|corrupt]]ed [[FAQ_eD2k-Kademlia#What_is_a_chunk?|chunk]] will be hashed (using the [http://www.faqs.org/rfcs/rfc3174.html SHA1 algorithm]) in order to compare the resulting hash with the | + | Once the [[Block Hash]]es are considered reliable, each 180KB part in the [[Corrupt|corrupt]]ed [[FAQ_eD2k-Kademlia#What_is_a_chunk?|chunk]] will be hashed (using the [http://www.faqs.org/rfcs/rfc3174.html SHA1 algorithm]) in order to compare the resulting hash with the received [[Block Hash]]es. If they are the same, that part alright, so there's no need to download it again. If the hashes are different, that part is [[Corrupt|corrupt]]ed and it will be downloaded again. |
== How is the [[Root Hash]] spread? == | == How is the [[Root Hash]] spread? == | ||
Line 23: | Line 24: | ||
The ideal way to spread the [[Root Hash]] is through the [[ed2k link]]. However, files are more frequently downloaded through the search feature of the [[FAQ_eD2k-Kademlia#What_is_ED2K?|eD2k]] [[client]]. Also, the [[ed2k link]] might not include the [[Root Hash]] in its URL. In such cases an alternative method is used to get the file's [[Root Hash]]. | The ideal way to spread the [[Root Hash]] is through the [[ed2k link]]. However, files are more frequently downloaded through the search feature of the [[FAQ_eD2k-Kademlia#What_is_ED2K?|eD2k]] [[client]]. Also, the [[ed2k link]] might not include the [[Root Hash]] in its URL. In such cases an alternative method is used to get the file's [[Root Hash]]. | ||
− | [[client|Clients]] ask other [[client|clients]] for the [[Root Hash]]. If at least 10 other [[client]]s send you the same [[Root Hash]] and that is 92% or more of the total [[Root Hash]]es received, that [[Root Hash]] will be considered | + | [[client|Clients]] ask other [[client|clients]] for the [[Root Hash]]. If at least 10 other [[client]]s send you the same [[Root Hash]] and that is 92% or more of the total [[Root Hash]]es received, that [[Root Hash]] will be considered reliable for the '''current session only'''. It will not be stored anywhere on disk and will only be kept in memory. Also, it will not be shared with any other [[client]] who asks for it. |
When the file download is completed, the [[Root Hash]] will be calculated, with the whole [[AICH Hashset]], stored in ''~/.aMule/known2.met'' and shared with any [[client]] who asks for it. | When the file download is completed, the [[Root Hash]] will be calculated, with the whole [[AICH Hashset]], stored in ''~/.aMule/known2.met'' and shared with any [[client]] who asks for it. | ||
Line 29: | Line 30: | ||
== Storing the [[AICH Hashset]] == | == Storing the [[AICH Hashset]] == | ||
− | Once a file has been | + | Once a file has been downloaded completely, [[aMule]] builds its complete [[AICH Hashset]] and stores it in ''~/.aMule/known2.met'' so whenever a [[client]] asks for it, aMule can provide the Hashset without having to recalculate it every time. |
− | Please | + | Please note that as long as the AICH method can be applied to a file, [[ICH]] will not be used for that file. |
Latest revision as of 00:12, 1 September 2010
English | Deutsch
Contents
Description
ICH's success is indisputable but it would be convenient to know exactly which part of the chunk is corrupt, especially when multiple parts are corrupted. AICH (Advanced Intelligent Corruption Handler) takes care of this task and allows aMule and any other supporting clients to know precisely which portions of the chunk are corrupt.
Definitions
Each chunk is divided into 53 parts (52x 180KB and 1x 140KB) and each of these parts is hashed using the SHA1 algorithm. Each of these hashes is called a Block Hash. By combining pairs of Block Hashes (i.e. each part with the part next to it) aMule will get a whole tree of hashes (this tree which is therefore a hashset made of all of the other Block Hashes is called the AICH Hashset). Each hash which is neither a Block Hash nor the Root Hash, is a Verifying Hash. The hash at the top level is the Root Hash and it is supposed to be provided by the ed2k link when releasing.
The actual work
When a chunk is known to be corrupt, aMule will try to get an AICH Hashset from a client that is sharing the complete file. It will ask for the all hashes of the 53 parts in the corrupt chunk and the necessary Verifying Hashes to complete the AICH Hashset tree up to the Root Hash.
Once it gets the Block Hashes and the Verifying Hashes, it builds up the tree to get the Root Hash and check if it's the same as the Root Hash provided by the original ed2k link. If it is, those Block Hashes will be considered reliable. If it isn't, the Block Hashes and Verifying Hashes will be dropped and considered fakes.
Once the Block Hashes are considered reliable, each 180KB part in the corrupted chunk will be hashed (using the SHA1 algorithm) in order to compare the resulting hash with the received Block Hashes. If they are the same, that part alright, so there's no need to download it again. If the hashes are different, that part is corrupted and it will be downloaded again.
How is the Root Hash spread?
The ideal way to spread the Root Hash is through the ed2k link. However, files are more frequently downloaded through the search feature of the eD2k client. Also, the ed2k link might not include the Root Hash in its URL. In such cases an alternative method is used to get the file's Root Hash.
Clients ask other clients for the Root Hash. If at least 10 other clients send you the same Root Hash and that is 92% or more of the total Root Hashes received, that Root Hash will be considered reliable for the current session only. It will not be stored anywhere on disk and will only be kept in memory. Also, it will not be shared with any other client who asks for it.
When the file download is completed, the Root Hash will be calculated, with the whole AICH Hashset, stored in ~/.aMule/known2.met and shared with any client who asks for it.
Storing the AICH Hashset
Once a file has been downloaded completely, aMule builds its complete AICH Hashset and stores it in ~/.aMule/known2.met so whenever a client asks for it, aMule can provide the Hashset without having to recalculate it every time.
Please note that as long as the AICH method can be applied to a file, ICH will not be used for that file.