I've changed the algorithm now to do it like this:
When the first change in day in the blockchain appears the AGS file is written. If another block comes along later with a reverse day change (day -1), it's scanned for AGS updates and written if required.
This means, there will be output at 0:06 every day, but it can change for up to 2 hours later. The ProtoShares are counted to the first forward day change (day
) in the chain. Afaik DreKrob is also working on it using this approach, since he found a way to use RPC after all. My implementation can be pulled into protosharesd/-qt and run via command line parameter (-unspent).
My webinterface will be a using html/javascript. This keeps setup easy.
Please tell me if I got this right:
You can input the day you want to calculate the genesis data for and the percentage of the total money supply for the new currency that is supposed to be distributed amonst AGS holders. The script then allocates 10% of the new currency to all PTS addresses according to their balance and x% (the previously set amount) of the new currency to all AGS holders according to the size of their donations.
The result will be a json file that contains each PTS address and the percentage that they are supposed to get. ( [ { "address": number between 0 and 1 }, ... ] )