Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: What algorithm should be choosed to decide which input address be rewarded AGS  (Read 600 times)

0 Members and 1 Guest are viewing this topic.

Offline HackFisher

  • Hero Member
  • *****
  • Posts: 883
    • View Profile

I have a disscussion with @logxing about some confuse of this problem, if some one want to implement an AGS browser:

What algorithm should be choosed to decide which address be rewarded AGS?

In this post, toast said the biggest input address is choosed:

Two options:

1) Just send from multiple addresses. I3 will pick the one with the biggest input for each transaction and reward everything there.
2) Create a separate wallet, send everything to one address in that wallet, then send from that wallet.

But in bytemaster's another post, mentioned that it is random:

Suppose this guy owns all the input addresses, how are the AGS shared when there are multiple inputs? Equally divided among all the inputs or proportional to the input amounts? Although this transaction looks much more like from an online wallet, in which case the online wallet is going to get the AGS, I guess.

Another question is I suppose it should be valid to donate from a single address multiple times, and doesn't matter on a single day or multiple days. If on a single day then the total should be counted towards the shares of that day, and on multiple days then each day is just individually calculated. Please confirm if this is correct. Thanks.

We assume all input addresses belong to the same user in the same wallet.  We thus randomly pick one to assign the full donation to.

Yes, each day is individually calculated.


So, which one's algorithm is right? And I think should remind the community about the reasonable but non-public assummation that all input addresses belong to the same user in the same wallet. Most people didn't notice that i think.
« Last Edit: January 05, 2014, 12:37:51 PM by HackFisher »
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline coolspeed

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
    • My Blog
Since bytemaster assumes all input addresses are yours, so it does not that matter to which the AGS are sent.
Bottom line, you should keep all your private keys tightly.
Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed

Offline HackFisher

  • Hero Member
  • *****
  • Posts: 883
    • View Profile
Since bytemaster assumes all input addresses are yours, so it does not that matter to which the AGS are sent.
Bottom line, you should keep all your private keys tightly.

So, in this way, I understand that the last algorithm is not so important with pre requirement of this assumption, it is all decided by specific AGS browser developer.

But I'm wandering it may helpful if we keey unity as part of AGS protocal to avoid confuse and issues for those who do not know and don't follow this assumption. Different browsers may be not compatible with each other on this question.
« Last Edit: January 05, 2014, 01:58:04 PM by HackFisher »
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline coolspeed

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
    • My Blog
Proportional to each input address may be the most clear way.
Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed

Offline 5chdn

  • Sr. Member
  • ****
  • Posts: 487
  • i wonder how many chars i can put in this field 50
    • View Profile
    • Votesapp
  • GitHub: 5chdn
Proportional to each input address may be the most clear way.

Thats what I did and thats in my opinion the most appropiate approach.
https://github.com/donSchoe/ags-parser/blob/master/pts_chain.rb#L122

I scan the transaction for all input addresses and their input value. (making sure the sum is equal output volume)

The result looks like that: This guy donated 100 PTS from 2 input addresses. He will need two public keys to obtain them:

Code: [Select]
"35458";"2013-12-26 02:15:22 UTC";"PuwK6ANGJRvYoYbaXtvzWamZBcdDrFAJik";"14.27250002";"600.0";"8.33333333"
"35458";"2013-12-26 02:15:22 UTC";"Pcr9yRyr2WvqZTWTERzmrTNMEQnWJY2pco";"85.72749998";"600.0";"8.33333333"

Offline bytemaster

Proportional to each input address may be the most clear way.

Minimizing the number of entries in the genesis block will be beneficial.  Why should we import more dust than necessary into the genesis block?
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline earthbound

  • Full Member
  • ***
  • Posts: 120
    • View Profile
    • earthbound.io
Proportional to each input address may be the most clear way.

Minimizing the number of entries in the genesis block will be beneficial.  Why should we import more dust than necessary into the genesis block?

Because it's going to be so effing bulky anyway (from so many donors) that it doesn't matter? :)
I think I'm not alone when I say I'd like to see more and more planets fall under the ruthless dominion of our solar system. -Jack Handey

Offline bytemaster

Proportional to each input address may be the most clear way.

Minimizing the number of entries in the genesis block will be beneficial.  Why should we import more dust than necessary into the genesis block?

Because it's going to be so effing bulky anyway (from so many donors) that it doesn't matter? :)

It could reduce the size by over 50% to pick one address rather than doing it proportional.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

 

Google+