Author Topic: 2 x 800 PTS - Generate Unspent Output Set every day at midnight GMT [PAID]  (Read 28304 times)

0 Members and 1 Guest are viewing this topic.

Offline BrownBear

  • Full Member
  • ***
  • Posts: 51
    • View Profile
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.
« Last Edit: February 13, 2014, 02:41:48 pm by BrownBear »

Offline 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: 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 toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
My what a good opportunity for us all to take a moment and hash out genesis block spec:
https://bitsharestalk.org/index.php?topic=1738.0
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.

Offline BrownBear

  • Full Member
  • ***
  • Posts: 51
    • View Profile
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.

Quote
Lastly 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

  • Guest
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.

Offline bytemaster

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: 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 bytemaster

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: 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 vertoe

  • Jr. Member
  • **
  • Posts: 30
  • i'm here
    • View Profile
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?

Offline bytemaster

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: 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.

drekrob

  • Guest
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.

Offline BrownBear

  • Full Member
  • ***
  • Posts: 51
    • View Profile
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.
« Last Edit: February 12, 2014, 03:46:12 am by BrownBear »

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
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.

drekrob

  • Guest

Offline vertoe

  • Jr. Member
  • **
  • Posts: 30
  • i'm here
    • View Profile
patience, young padawan, there is a bounty for two of us ;)