get Blocks forged by Pool daily
-
@nixxda I'm just editing, guess a main section development is even better ... so i made that.
-
I know there is a number on http://util.burst-team.us:8888/pool for the last 10 days. But as it says on the bottom, its inaccurate because it only takes the current Reward Assignment of each miner and then pulls all the blocks they forged in the last 10 days.
That is correct, and the solution would be even more complicated, even if you do not track it per 10 days, but per day ... it is still not accurate.
So what would be needed is to exactly track at what block miners did reward assignment to another pool, so that found blocks of that miner can be always counted for the correct pool.
I thought about make it in that detail level, but skipped it due no time and to much request to api :-) Maybe in the future.Btw. that 10 days could be made adjustable by settings or change and compile it yourself.
https://github.com/de-luxe/burstcoin-observer/blob/master/src/main/java/burstcoin/observer/service/PoolService.java#L71
-
@nixxda looked up into available api calls and the thing you want isnt really cost effective, as it would put unnecessary strain on a wallet client (or even worse public server). While it is possible you would need to scan whole chain to agregate statistics. If lets say to start from just this point in time and go on further. You could write a deamon who would record found block and what poo/user found it. Or if just one pool then like Lexicon is duing pool itself does similar records (i suppose it can just record all blocks not just found in that pool).
-
@luxe The ninja pools log each time they forge a block, but there are variable entries per block, but it would be possible to parse it out of the log
-
@nixxda Every statistic collecting code can use its local own wallet, no issue stressing that :-)
@haitch sure, but it is all in the blockchain, too. All reward assignment transactions and every block knows it's miner ... it's not the pools accounts in a block as generator.
So if you build a lookup of every miner, on what block he was assigned to what pool, you can find out how many blocks a pool got in a given amount of time.
The observer works stupid other way round, it counts blocks for every miner in the given time. And based of current rewardAssignment counts it for the pools.
-
@luxe I realize that one should do it after every round! But polling the Wallet for 680something getAccountBlockIds might be a bit much!?
and only to check if the last block went to this pool!?
and it needs another step of automation because I cant do it after every round!!-)
running it once or twice a day manually is plenty i think!I'm writing to slow (and I'm currently the MC Server Support Team for the kids.....)
just saw the other answers!Yes Logs! @luxe can you give away a "snipped" of those Logs in one week from now?
its not as cool as scripting API requests but I'll split the bounty for doing this work!-)
-
@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

