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

Started by HackFisher, January 05, 2014, 12:32:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bytemaster

Quote from: earthbound on January 05, 2014, 11:50:01 PM
Quote from: bytemaster on January 05, 2014, 08:16:21 PM
Quote from: coolspeed on January 05, 2014, 01:10:50 PM
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: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
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.

earthbound

Quote from: bytemaster on January 05, 2014, 08:16:21 PM
Quote from: coolspeed on January 05, 2014, 01:10:50 PM
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

bytemaster

Quote from: coolspeed on January 05, 2014, 01:10:50 PM
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: [url="http://bytemaster.bitshares.org"]http://bytemaster.bitshares.org[/url]
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.

5chdn

Quote from: coolspeed on January 05, 2014, 01:10:50 PM
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:

"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"

coolspeed

Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed

HackFisher

Quote from: coolspeed on January 05, 2014, 12:56:15 PM
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.
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.

coolspeed

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

HackFisher

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:

Quote from: toast on January 03, 2014, 02:57:07 AM
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:

Quote from: bytemaster on January 02, 2014, 08:55:30 PM
Quote from: jifehuang on January 02, 2014, 06:13:30 PM
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.
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.