aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: "negative" credits?  (Read 4318 times)

kontorotsui

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
"negative" credits?
« on: September 11, 2006, 12:47:48 AM »

Hello, if I may, I'd like to suggest a small improvement to counter the incresing leeching behaviour in the e2dk network.
After a lot of investigation on client behaviour, I can say there are:

1) Fair clients, they upload full chunks while downloading about the same amount of data. Usually they cooperate with my client to share files and complete the same files I download at the same time I do.
2) "closed" clients, they usually have completed files and don't download from me, but they never give me anything even after a week. They are suspicious, but one can still justify them by saying they might have very long queues... yet some of them are malicious, as I reach QR 2 or 1, then they reset me or reconnect and put me back to 4800 or such.
3) unfair clients, they download from me hundreds of megabytes, but upload only partial chunks, like 10Kb, sometimes 1Mb. Usually their download/upload ratio from me is 1000 or 10000! Yet they seem to complete to download a file much before me. If they start with a couple of parts out of 20, they complete the file before me, because they download what I have, but not upload me what they got from others. And I guess they do the same to others. In a word: leechers.

While antileeching is quite a challenging task and nothing can be done against behaviour 2, wouldn't a little improvement to credit system help to counter unfair clients?
If I'm not mistaken, the credit system gives 100 to every client with whom there was no data exchange (and that is ok) and to clients that has downloaded more than twice what they uploaded to you.

The change I suggest is to allow "negative" credits for clients with a too high download/upload ratio, with a bottom value of 50.
This means that if a client downloads more than twice what has uploaded to you, the rating goes down to 90, 85, 70, until it finally reaches 50 with a 10:1 ratio. This would give much less priority to clients with too low upload or unfair behaviour.
If the client is fair, my rating in his queue should be 1000 (max), so should quickly upload to me and recover from a rating below 100 in my queue.

This should also be quite easy to code, I bet  :)
Logged
Andrea "Kontorotsui" Controzzi - Pisa - Italy

kontorotsui

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
RE: "negative" credits?
« Reply #1 on: September 11, 2006, 01:02:37 AM »

I reply myself  :D

I found this: http://www.filesharingweb.de/mediaWiki/index.php/English:Credit_Systems

The TK4 is IMO the best, and here there is even the code: http://emuletk4mod.sourceforge.net/TK4_Mod_Creditsystem.htm

Would it be possible to implement those credit systems in aMule and have them available as options?
Logged
Andrea "Kontorotsui" Controzzi - Pisa - Italy

kontorotsui

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: "negative" credits?
« Reply #2 on: September 17, 2006, 12:06:08 PM »

I see there is not much interest in the idea  :(

Anyway I downloaded the source code and changed the code myself.
I tested for some days and my own credit systems works perfectly: who gave me nothing or worse than 1:4 ratio is getting a modifier below 100, down to 50, and now I give more and first to whom bothered to upload me some (and fairly enough) data.

I'm not sure if I should post the small change I did to the code (in ClientCredits.cpp) to achieve this. Maybe in the development folder?

If anyone is interested let me know.
« Last Edit: September 17, 2006, 12:11:12 PM by kontorotsui »
Logged
Andrea "Kontorotsui" Controzzi - Pisa - Italy

N1ckR

  • Guest
Re: \
« Reply #3 on: March 01, 2007, 12:29:24 PM »

I would like this feature, this and obscured connections are about the only to things I really desire from Amule (which is a credit to how well it works out of the box).

I have just moved from Emule (windows) to Amule (Linux) and find that using the Eastshare credit system really balances things out (in terms of penalising leechers over new users over uploads), the maths is real simple:

for every 1mb uploaded to me  get 6 credits.
for every 1mb downloaded from me loose 2 credits.

There is a limit like with the official system (I think 500 credits max).

Cheers Nick.


Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: \
« Reply #4 on: March 02, 2007, 01:48:59 PM »

kontorotsui,

You may post your patch and discuss it, I see no problem with that, as long as your credit police is an acceptable one. Also, make sure you mark your client with a different version, so that other clients know that you are an aMule mod, to be fair.
Logged

N1ckR

  • Guest
Re: \
« Reply #5 on: March 04, 2007, 01:25:35 PM »

It might nice to implement a menu option (in preferences) and some code to switch the credit systems, as it would prevent too many different versions doing similar jobs, easier to maintain, would this kind of functionality be considered core and if not, is there a way to implement this in a modular way, rather than a patch (easier to maintain) ?

Of course I would be offering to have a go at this, but would need guidance I am not familar with the code of aMule.

Cheers, Nick
Logged