get Blocks forged by Pool daily
-
@luxe You'd have to look up every block on a day, see who mined it, then back track to where there assignment was. If you only look at the current miners you'll miss any miner that's no longer there - so the only way I see to do it is to look at every block for that day and link it to a pool.
-
@haitch yes
@nixxda i have no logs that was @haitch ... and wouldn't you need logs of all pools? blockchain is the better source i guess.
-
@haitch but you cant search for Reward assignment with a timestamp?
-
@nixxda No, you can not (as far as i know) ... you have to scan all pools incoming or miners outgoing transactions, identify reward assignment transactions and build a lookup :-)
If a miner was on a pool for a month, and changed pool in the day you want to track, you can only find his previous pool by searching for his previous reward assignment, that was a month ago ...
So the perfect way would be to collect all data since block 0 into a database and update that with every new block ... problem here, what if you run into a fork ... all you data would be corrupted :-)
-
@nixxda You can start at block X for the Day - get the account that forged it, then get that accounts transactions of type 20 ( http://localhost:8125/burst?requestType=getAccountTransactions&account=17250039689296678890&type=20 ) then parse that to figure out where they were when the block was forged.
-
I think I understand it now.
Rather then checking for Assignment and then Blocks do it the other way around and check every Block for Assignment!?
And have a list of "Block at Pool" for all Blocks you've checked in the end.
nice!I'm down to ~360 doing it manually!-) and perfect!
-
@Lexicon finally time to fully digest your answer!
and if I understand that right your doing exactly what we have been talking about down here and not only for your pool!?
sorry didn't get that at first!
What I dont understand is the Reward at the end! way back?? but you can't really "backtest" only log at current time?!
-
@nixxda i tested it on a wallet that used a fresh database file. unfortunately though this still only gets the current reward assignment and it cannot back date as far as i am aware, thats why recording the data live would be much more accurate
-
@LithStud yes it seams @Lexicon is already doing it the best way possible. Which is logging at each round.
and he' s getting real close to that Bounty!if only, [small] I wouldn't have taken his "Donate for Pool Development" so seriously and by that basically paid him for his free time and bla bla bla bla bla bla i own you bi....ch [/small]
just kidding!-)i'm very happy if it works!
-
@Lexicon said in get Blocks forged by Pool daily:
@nixxda i tested it on a wallet that used a fresh database file. unfortunately though this still only gets the current reward assignment and it cannot back date as far as i am aware, thats why recording the data live would be much more accurate
Logging at current time seams to be the most accurate way! and is good for me!
Link for Bounty!-)
-
-
@Lexicon perfect!-) you made my night! BURST-GAJL-VWKN-2XPB-H39R9 ?
and also, I wanna login!! is there a registration or what password should I use (and what's behind that login?)
-
well. im writing in some code so people can register by the following steps
-
sending the pool a message with what password they want to set.
-
then check for the message by issuing a command through the local chat that contains the transactionid.
and yeah that is my address
-
-
@nixxda also i added the date and time in aswell. just incase you needed it the time is in UTC
-
@Lexicon
can you let it run for the next week without touching it?!-) e.g making it even better??
I love it! would have liked to mess around with the API some more but this way it so unbelievably clean !!
perfect for my use!
10K sent!
-
@nixxda yeah no problem. i should probably include the tx-fee reward as another column. let me know if you want me to add that or not. otherwise ill leave as is :).
thanks for the burst man its really appreciated. i just noticed you sent me 500 earlier today and its set up as a subscription
-
@Lexicon yes, I like what your doing!-)
tx fees....... hmm .... not to important right now but yes, if you can do that without to much effort?
-
@nixxda yeah already done buddy
