2 x 800 PTS - Generate Unspent Output Set every day at midnight GMT [PAID]

Started by bytemaster, February 11, 2014, 04:33:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BrownBear

I'm still not 100% sure about the genesis block, but I think I might know what you want ^_^

A different problem arose tho:
When multiple addresses donate to AGS together, how am I supposed to fairly and accurately calculate which address donated how much? The obvious answer would be to give every address AGS relative to the amount that address spent, but then we get rounding errors.
I've looked at agsexplorer to find out how it's done there and saw that they just remove fees and other outputs in the transactions from the highest staking input address and ignore the resulting unfairness.
Example: http://www1.agsexplorer.com/balances/1GwqVEwMiwEwifRaLnRB14CJQ4rjqaJmvR
200mBTC where spent, the 17.82203 mBTC of fees and change where simply subtracted from 1EmFGWtWgAF8ZjDHHMZPqRZvSboLjWEY2r's angel shares.

Assuming that all inputs belong to the same person, the unfairness wouldn't matter, but if there was any scenario where two people could donate in the same TX (multisig?), one of them would get less AGS.

Is this how it's supposed to be handled or should a different approach be taken? If so, which?

EDIT:
Even worse, agsexplorer seems to do this rather indeterministicly:
http://www1.agsexplorer.com/balances/1KHXpgQLeLgMTZmP5JVss5XX55UUTFunPP
https://blockchain.info/de/tx/d2b64a6d2e3860bfc6f37774bad6e7c4bfbc1ea63716de4bc146188f8e63e61e

In that transaction, address 1Q4isu8WRDn8Withk4GhM4vbeKNdRcq7TH leaves empty handed. To get comparable results, we need a clearly defined way to distribute the AGS.

bytemaster

By genesis block I mean data in the same format as above but pulling it all together.


Sent from my iPhone using Tapatalk
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.

toast

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

BrownBear

My code now spits out unspent tx out for any day you like as well as a file containing an entry for everyone who donated to the angel share address.

QuoteLastly I would like the service to produce a genesis block every day based upon a web-form that specifies the percentage of the money supply that should be allocated to AGS and PTS.    It should be in the same format as the AGS and PTS balances.
Can you expand on that part a bit, please?

I will do further testing to ensure data validity and set up a server soon.

drekrob

I just noticed that my method might not work after all. The bitcoind/protosharesd api i'm using outputs only unspent outputs via rpc. So every donation to the angel adress that got already spent again is not listet and thus i wont ever be able to get accurate results. So good luck to you two in claiming this bounty, my solution disqualified itself.

bytemaster

Quote from: BrownBear on February 12, 2014, 02:49:23 AM
I'm also about to complete this bounty. Mine is a modification in protosharesd which will output the json data every day.
Since I'm the third, I'm unsure whether I should get a server for this or not, but either way I can replicate one (or both) of the above.

Here's the fork of protoshares:
https://github.com/BrownBear2/ProtoShares

This version will create a new json file in the specified location (-unspent path/to/file.json) whenever the first block of a new day has been received according to the blocktime.

So far no one has completed the bounty and delivered a complete working service that meets all of the requirements.   In the event that multiple people complete within 3 days of each other the award will go to the two solutions we consider most robust, well documented, and accurate.

We will allow for several days of operation to verify the services are indeed producing the same results.   Until two independent implementations produce identical results no one gets paid.   This applies to the AGS data as well.  A mistake I made last time was not having a means to validate / compare results.   So if you pull your data from agsexplorer or angelshares.info then I suggest you find a way to produce identical results.
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.

bytemaster

Quote from: vertoe on February 12, 2014, 07:39:52 AM
Quote from: bytemaster on February 12, 2014, 06:07:17 AM
Missing AGS and how do I specify the day... I should have access to every day (after the launch), not just the most recent day.

Ok, will adjust the script to output daily results and create AGS integration. I've overread that part.

Daily JSON is enough or do you want to be able to get the result on the basis of a specified block?

I am fine with the status of the last block timestamped for each day GMT time.  This will line up with the AGS for that day and make everyone's life easier.
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.

vertoe

Quote from: bytemaster on February 12, 2014, 06:07:17 AM
Missing AGS and how do I specify the day... I should have access to every day (after the launch), not just the most recent day.

Ok, will adjust the script to output daily results and create AGS integration. I've overread that part.

Daily JSON is enough or do you want to be able to get the result on the basis of a specified block?

bytemaster

Quote from: vertoe on February 12, 2014, 01:36:42 AM
I've written two PHP scripts to accomplish that.

JSON file honoring the defined form: http://q30.protoshar.es/pts/pts_unspent.json
Source code published on github: https://github.com/vertoe/pts-unspent
HOWTO set up a similar service: https://github.com/vertoe/pts-unspent/wiki

Note, the database is currently being filled as the blockchain is being parsed.

PuCPcTzHDpsWrVEdBrC5F53qrxfdiUXk62

Missing AGS and how do I specify the day... I should have access to every day (after the launch), not just the most recent day.
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.

drekrob

well i shall continue with this tomorrow, I have been up way to long... If anyone feels like doing the daily genesis block i would not mind.

BrownBear

I'm also about to complete this bounty. Mine is a modification in protosharesd which will output the json data every day.
Since I'm the third, I'm unsure whether I should get a server for this or not, but either way I can replicate one (or both) of the above.

Here's the fork of protoshares:
https://github.com/BrownBear2/ProtoShares

This version will create a new json file in the specified location (-unspent path/to/file.json) whenever the first block of a new day has been received according to the blocktime.

toast

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.


vertoe